From 4c836a398d10086d33ef44d6a744bc0765a35296 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=85=B4=E8=BE=89?= Date: Tue, 1 Apr 2025 17:31:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=B2=E9=94=80Bugfix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cim/idm/controller/MESToWMSController.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/zi-wms-pda/src/main/java/com/cim/idm/controller/MESToWMSController.java b/zi-wms-pda/src/main/java/com/cim/idm/controller/MESToWMSController.java index 8d4517e..a393bb6 100644 --- a/zi-wms-pda/src/main/java/com/cim/idm/controller/MESToWMSController.java +++ b/zi-wms-pda/src/main/java/com/cim/idm/controller/MESToWMSController.java @@ -48,18 +48,26 @@ public class MESToWMSController { @ApiOperation(value = "取消物料入库请求") @RequestMapping(value = "/meswms_cancelship_request", method = RequestMethod.POST) - public AjaxResult cancelShipByMES(@RequestBody JSONArray in) throws Exception { + public AjaxResult cancelShipByMES(@RequestBody JSONArray in) { log.info("Received cancel ship request: {}", in.toJSONString()); String undoId = in.getJSONObject(0).getString("undoId"); String userId = in.getJSONObject(0).getString("userId"); // return mesToWMSService.cancelShipByMES(in); - return mesToWMSService.sapcprkUndo(undoId, userId); + try { + return mesToWMSService.sapcprkUndo(undoId, userId); + } catch (Exception e) { + throw new RuntimeException(e); + } } @ApiOperation(value = "物料入库请求") @RequestMapping(value = "/meswms_ship_request", method = RequestMethod.POST) - public AjaxResult shipByMES(@RequestBody JSONArray in) throws Exception { + public AjaxResult shipByMES(@RequestBody JSONArray in) { log.info("Received ship request: {}", in.toJSONString()); - return mesToWMSService.shipByMES(in); + try { + return mesToWMSService.shipByMES(in); + } catch (Exception e) { + throw new RuntimeException(e); + } } } \ No newline at end of file