From a9e22958a02555b297f1950c3188f1c5b818f70a Mon Sep 17 00:00:00 2001
From: cpT <1@123>
Date: 星期一, 30 六月 2025 09:23:54 +0800
Subject: [PATCH] #改造
---
src/main/java/com/zy/asrs/controller/OpenController.java | 25 ++++++++++++++++---------
src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java | 6 +++---
2 files changed, 19 insertions(+), 12 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..7c4003f 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:"+JSON.toJSONString(params));
+ } 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, "鍙傛暟涓虹┖,params:"+JSON.toJSONString(params));
} 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());
}
diff --git a/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java
index 8690b3d..382854e 100644
--- a/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java
@@ -68,7 +68,7 @@
if (taskWrk != null) {
try{
DeviceErrorService deviceErrorService = SpringUtils.getBean(DeviceErrorService.class);
- deviceErrorService.addDeviceError("wms", 1, "浠诲姟宸插瓨鍦紝璇峰嬁閲嶅鎻愪氦,taskWrk:"+JSON.toJSONString(taskWrk));
+ deviceErrorService.addDeviceError("wmsErr", 1, "浠诲姟宸插瓨鍦紝璇峰嬁閲嶅鎻愪氦,taskWrk:"+JSON.toJSONString(taskWrk));
} catch (Exception e2){
// log.error("e2:"+e2.getMessage());
}
@@ -77,7 +77,7 @@
if (param.getIoType().equals(0)){
try{
DeviceErrorService deviceErrorService = SpringUtils.getBean(DeviceErrorService.class);
- deviceErrorService.addDeviceError("wms", 1, "鐢熸垚浠诲姟澶辫触锛屼换鍔$被鍨嬩笉瀛樺湪锛�,iotype:"+JSON.toJSONString(param.getIoType()));
+ deviceErrorService.addDeviceError("wmsErr", 1, "鐢熸垚浠诲姟澶辫触锛屼换鍔$被鍨嬩笉瀛樺湪锛�,iotype:"+JSON.toJSONString(param.getIoType()));
} catch (Exception e2){
// log.error("e2:"+e2.getMessage());
}
@@ -154,7 +154,7 @@
if (!taskWrkService.insert(taskWrk)) {
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