From 5aa831dffdfb0ca524362e8d649c28babc681ece Mon Sep 17 00:00:00 2001 From: cpT <1@123> Date: 星期一, 30 六月 2025 16:43:18 +0800 Subject: [PATCH] #改造 --- src/main/java/com/zy/asrs/controller/OpenController.java | 25 ++++++++++++++++--------- 1 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/zy/asrs/controller/OpenController.java b/src/main/java/com/zy/asrs/controller/OpenController.java index 032c79e..b669db4 100644 --- a/src/main/java/com/zy/asrs/controller/OpenController.java +++ b/src/main/java/com/zy/asrs/controller/OpenController.java @@ -343,13 +343,20 @@ public R outboundTaskSend(@RequestHeader String appkey, @RequestBody List<CarryParam> params,//涓埅涓嬪彂 1锛氬嚭搴擄紝2锛氱Щ搴� 3锛氬叆搴� HttpServletRequest request) { + + try{ + DeviceErrorService deviceErrorService = SpringUtils.getBean(DeviceErrorService.class); + deviceErrorService.addDeviceError("wms/taskCreate", 1, "wms浠诲姟涓嬪彂,浠诲姟鏁�:"+params.size()); + } catch (Exception e2){ +// log.error("e2:"+e2.getMessage()); + } auth(appkey, params, request); // List<WMSAndAGVInterfaceParam> params1 =new ArrayList<>(); for (CarryParam param:params){ if (Cools.isEmpty(param)){ try{ DeviceErrorService deviceErrorService = SpringUtils.getBean(DeviceErrorService.class); - deviceErrorService.addDeviceError("wms", 1, "鍙傛暟涓虹┖,params:"+JSON.toJSONString(params)); + deviceErrorService.addDeviceError("wmsErr", 1, "鍙傛暟涓虹┖,param:"+JSON.toJSONString(param)); } catch (Exception e2){ // log.error("e2:"+e2.getMessage()); } @@ -357,7 +364,7 @@ } else if (Cools.isEmpty(param.getTaskNo())){ try{ DeviceErrorService deviceErrorService = SpringUtils.getBean(DeviceErrorService.class); - deviceErrorService.addDeviceError("wms", 1, "浠诲姟鍙蜂负绌�,taskNo:"+JSON.toJSONString(param)); + deviceErrorService.addDeviceError("wmsErr", 1, "浠诲姟鍙蜂负绌�,taskNo:"+JSON.toJSONString(param)); } catch (Exception e2){ // log.error("e2:"+e2.getMessage()); } @@ -365,7 +372,7 @@ } else if (Cools.isEmpty(param.getIoType())){ try{ DeviceErrorService deviceErrorService = SpringUtils.getBean(DeviceErrorService.class); - deviceErrorService.addDeviceError("wms", 1, "浠诲姟绫诲瀷涓虹┖,ioType:"+JSON.toJSONString(param)); + deviceErrorService.addDeviceError("wmsErr", 1, "浠诲姟绫诲瀷涓虹┖,ioType:"+JSON.toJSONString(param)); } catch (Exception e2){ // log.error("e2:"+e2.getMessage()); } @@ -374,7 +381,7 @@ if (Cools.isEmpty(param.getStartPoint()) || Cools.isEmpty(param.getTargetPoint())){ try{ DeviceErrorService deviceErrorService = SpringUtils.getBean(DeviceErrorService.class); - deviceErrorService.addDeviceError("wms", 1, "鍒濆鐩爣鎴栬�呯洰鏍囦綅涓虹┖,Point:"+JSON.toJSONString(param)); + deviceErrorService.addDeviceError("wmsErr", 1, "鍒濆鐩爣鎴栬�呯洰鏍囦綅涓虹┖,Point:"+JSON.toJSONString(param)); } catch (Exception e2){ // log.error("e2:"+e2.getMessage()); } @@ -406,7 +413,7 @@ if(Cools.isEmpty(locMast)){ try{ DeviceErrorService deviceErrorService = SpringUtils.getBean(DeviceErrorService.class); - deviceErrorService.addDeviceError("wms", 1, "鍒濆搴撲綅鏃犳硶鎵惧埌,locNo:"+JSON.toJSONString(locNo)); + deviceErrorService.addDeviceError("wmsErr", 1, "鍒濆搴撲綅鏃犳硶鎵惧埌,locNo:"+JSON.toJSONString(locNo)); } catch (Exception e2){ // log.error("e2:"+e2.getMessage()); } @@ -424,7 +431,7 @@ if(Cools.isEmpty(staDesc)){ try{ DeviceErrorService deviceErrorService = SpringUtils.getBean(DeviceErrorService.class); - deviceErrorService.addDeviceError("wms", 1, "鍏ュ簱璺姴涓嶅瓨鍦�,param:"+JSON.toJSONString(param)); + deviceErrorService.addDeviceError("wmsErr", 1, "鍏ュ簱璺姴涓嶅瓨鍦�,param:"+JSON.toJSONString(param)); } catch (Exception e2){ // log.error("e2:"+e2.getMessage()); } @@ -441,7 +448,7 @@ if(Cools.isEmpty(staDesc)){ try{ DeviceErrorService deviceErrorService = SpringUtils.getBean(DeviceErrorService.class); - deviceErrorService.addDeviceError("wms", 1, "鍑哄簱璺姴涓嶅瓨鍦�,param:"+JSON.toJSONString(param)); + deviceErrorService.addDeviceError("wmsErr", 1, "鍑哄簱璺姴涓嶅瓨鍦�,param:"+JSON.toJSONString(param)); } catch (Exception e2){ // log.error("e2:"+e2.getMessage()); } @@ -453,7 +460,7 @@ if(Cools.isEmpty(locMast2)){ try{ DeviceErrorService deviceErrorService = SpringUtils.getBean(DeviceErrorService.class); - deviceErrorService.addDeviceError("wms", 1, "鐩爣搴撲綅鏃犳硶鎵惧埌,locNo:"+JSON.toJSONString(param.getTargetPoint())); + deviceErrorService.addDeviceError("wmsErr", 1, "鐩爣搴撲綅鏃犳硶鎵惧埌,locNo:"+JSON.toJSONString(param.getTargetPoint())); } catch (Exception e2){ // log.error("e2:"+e2.getMessage()); } @@ -462,7 +469,7 @@ if (!locMast2.getCrnNo().equals(locMast.getCrnNo())){ try{ DeviceErrorService deviceErrorService = SpringUtils.getBean(DeviceErrorService.class); - deviceErrorService.addDeviceError("wms", 1, "璧峰搴撲綅涓庣洰鏍囧簱浣嶄笉鍐嶅悓涓�宸烽亾,param:"+JSON.toJSONString(param)); + deviceErrorService.addDeviceError("wmsErr", 1, "璧峰搴撲綅涓庣洰鏍囧簱浣嶄笉鍐嶅悓涓�宸烽亾,param:"+JSON.toJSONString(param)); } catch (Exception e2){ // log.error("e2:"+e2.getMessage()); } -- Gitblit v1.9.1