From f5c0365702be7d445420a9961b1f2e64b621213b Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期二, 04 十一月 2025 12:44:02 +0800
Subject: [PATCH] *
---
src/main/java/com/zy/asrs/controller/OpenController.java | 46 ++++++++++++++++++++++++++++++++--------------
1 files changed, 32 insertions(+), 14 deletions(-)
diff --git a/src/main/java/com/zy/asrs/controller/OpenController.java b/src/main/java/com/zy/asrs/controller/OpenController.java
index 7c4003f..b96ecfe 100644
--- a/src/main/java/com/zy/asrs/controller/OpenController.java
+++ b/src/main/java/com/zy/asrs/controller/OpenController.java
@@ -346,7 +346,7 @@
try{
DeviceErrorService deviceErrorService = SpringUtils.getBean(DeviceErrorService.class);
- deviceErrorService.addDeviceError("wms/taskCreate", 1, "wms浠诲姟涓嬪彂,params:"+JSON.toJSONString(params));
+ deviceErrorService.addDeviceError("wms涓嬪彂浠诲姟", 1, "wms浠诲姟涓嬪彂,浠诲姟鏁�:"+params.size());
} catch (Exception e2){
// log.error("e2:"+e2.getMessage());
}
@@ -356,7 +356,7 @@
if (Cools.isEmpty(param)){
try{
DeviceErrorService deviceErrorService = SpringUtils.getBean(DeviceErrorService.class);
- deviceErrorService.addDeviceError("wmsErr", 1, "鍙傛暟涓虹┖,params:"+JSON.toJSONString(params));
+ deviceErrorService.addDeviceError("wms涓嬪彂浠诲姟寮傚父", 1, "鍙傛暟涓虹┖,param:"+JSON.toJSONString(param));
} catch (Exception e2){
// log.error("e2:"+e2.getMessage());
}
@@ -364,7 +364,7 @@
} else if (Cools.isEmpty(param.getTaskNo())){
try{
DeviceErrorService deviceErrorService = SpringUtils.getBean(DeviceErrorService.class);
- deviceErrorService.addDeviceError("wmsErr", 1, "浠诲姟鍙蜂负绌�,taskNo:"+JSON.toJSONString(param));
+ deviceErrorService.addDeviceError("wms涓嬪彂浠诲姟寮傚父", 1, "浠诲姟鍙蜂负绌�,taskNo:"+JSON.toJSONString(param));
} catch (Exception e2){
// log.error("e2:"+e2.getMessage());
}
@@ -372,7 +372,7 @@
} else if (Cools.isEmpty(param.getIoType())){
try{
DeviceErrorService deviceErrorService = SpringUtils.getBean(DeviceErrorService.class);
- deviceErrorService.addDeviceError("wmsErr", 1, "浠诲姟绫诲瀷涓虹┖,ioType:"+JSON.toJSONString(param));
+ deviceErrorService.addDeviceError("wms涓嬪彂浠诲姟寮傚父", 1, "浠诲姟绫诲瀷涓虹┖,ioType:"+JSON.toJSONString(param));
} catch (Exception e2){
// log.error("e2:"+e2.getMessage());
}
@@ -381,7 +381,7 @@
if (Cools.isEmpty(param.getStartPoint()) || Cools.isEmpty(param.getTargetPoint())){
try{
DeviceErrorService deviceErrorService = SpringUtils.getBean(DeviceErrorService.class);
- deviceErrorService.addDeviceError("wmsErr", 1, "鍒濆鐩爣鎴栬�呯洰鏍囦綅涓虹┖,Point:"+JSON.toJSONString(param));
+ deviceErrorService.addDeviceError("wms涓嬪彂浠诲姟寮傚父", 1, "鍒濆鐩爣鎴栬�呯洰鏍囦綅涓虹┖,Point:"+JSON.toJSONString(param));
} catch (Exception e2){
// log.error("e2:"+e2.getMessage());
}
@@ -413,7 +413,7 @@
if(Cools.isEmpty(locMast)){
try{
DeviceErrorService deviceErrorService = SpringUtils.getBean(DeviceErrorService.class);
- deviceErrorService.addDeviceError("wmsErr", 1, "鍒濆搴撲綅鏃犳硶鎵惧埌,locNo:"+JSON.toJSONString(locNo));
+ deviceErrorService.addDeviceError("wms涓嬪彂浠诲姟寮傚父", 1, "鍒濆搴撲綅鏃犳硶鎵惧埌,locNo:"+JSON.toJSONString(locNo));
} catch (Exception e2){
// log.error("e2:"+e2.getMessage());
}
@@ -431,11 +431,21 @@
if(Cools.isEmpty(staDesc)){
try{
DeviceErrorService deviceErrorService = SpringUtils.getBean(DeviceErrorService.class);
- deviceErrorService.addDeviceError("wmsErr", 1, "鍏ュ簱璺姴涓嶅瓨鍦�,param:"+JSON.toJSONString(param));
+ deviceErrorService.addDeviceError("wms涓嬪彂浠诲姟寮傚父", 1, "鍏ュ簱璺姴涓嶅瓨鍦�,param:"+JSON.toJSONString(param));
} catch (Exception e2){
// log.error("e2:"+e2.getMessage());
}
return R.error("鍏ュ簱璺姴涓嶅瓨鍦�");
+ }
+ TaskWrk taskWrk = taskWrkService.selectOne(new EntityWrapper<TaskWrk>().eq("TARGET_POINT", param.getTargetPoint()));
+ if(!Cools.isEmpty(taskWrk)){
+ try{
+ DeviceErrorService deviceErrorService = SpringUtils.getBean(DeviceErrorService.class);
+ deviceErrorService.addDeviceError("wms涓嬪彂浠诲姟寮傚父", 1, "鐩爣搴撲綅瀛樺湪鎵ц涓换鍔★紒锛侊紒,param:"+JSON.toJSONString(param));
+ } catch (Exception e2){
+// log.error("e2:"+e2.getMessage());
+ }
+ return R.error("鐩爣搴撲綅瀛樺湪鎵ц涓换鍔★紒锛侊紒");
}
r = openService.taskCreate(new TaskCreateParam(param,staDesc.getCrnNo(),staDesc.getCrnStn()));
@@ -448,11 +458,21 @@
if(Cools.isEmpty(staDesc)){
try{
DeviceErrorService deviceErrorService = SpringUtils.getBean(DeviceErrorService.class);
- deviceErrorService.addDeviceError("wmsErr", 1, "鍑哄簱璺姴涓嶅瓨鍦�,param:"+JSON.toJSONString(param));
+ deviceErrorService.addDeviceError("wms涓嬪彂浠诲姟寮傚父", 1, "鍑哄簱璺姴涓嶅瓨鍦�,param:"+JSON.toJSONString(param));
} catch (Exception e2){
// log.error("e2:"+e2.getMessage());
}
return R.error("鍑哄簱璺姴涓嶅瓨鍦�");
+ }
+ TaskWrk taskWrk = taskWrkService.selectOne(new EntityWrapper<TaskWrk>().eq("START_POINT", param.getStartPoint()));
+ if(!Cools.isEmpty(taskWrk)){
+ try{
+ DeviceErrorService deviceErrorService = SpringUtils.getBean(DeviceErrorService.class);
+ deviceErrorService.addDeviceError("wms涓嬪彂浠诲姟寮傚父", 1, "鍑哄彛搴撲綅瀛樺湪鎵ц涓换鍔★紒锛侊紒,param:"+JSON.toJSONString(param));
+ } catch (Exception e2){
+// log.error("e2:"+e2.getMessage());
+ }
+ return R.error("鍑哄彛搴撲綅瀛樺湪鎵ц涓换鍔★紒锛侊紒");
}
r = openService.taskCreate(new TaskCreateParam(param,staDesc.getCrnNo(),staDesc.getStnNo()));
}else if (param.getIoType() == 3){
@@ -460,7 +480,7 @@
if(Cools.isEmpty(locMast2)){
try{
DeviceErrorService deviceErrorService = SpringUtils.getBean(DeviceErrorService.class);
- deviceErrorService.addDeviceError("wmsErr", 1, "鐩爣搴撲綅鏃犳硶鎵惧埌,locNo:"+JSON.toJSONString(param.getTargetPoint()));
+ deviceErrorService.addDeviceError("wms涓嬪彂浠诲姟寮傚父", 1, "鐩爣搴撲綅鏃犳硶鎵惧埌,locNo:"+JSON.toJSONString(param.getTargetPoint()));
} catch (Exception e2){
// log.error("e2:"+e2.getMessage());
}
@@ -469,7 +489,7 @@
if (!locMast2.getCrnNo().equals(locMast.getCrnNo())){
try{
DeviceErrorService deviceErrorService = SpringUtils.getBean(DeviceErrorService.class);
- deviceErrorService.addDeviceError("wmsErr", 1, "璧峰搴撲綅涓庣洰鏍囧簱浣嶄笉鍐嶅悓涓�宸烽亾,param:"+JSON.toJSONString(param));
+ deviceErrorService.addDeviceError("wms涓嬪彂浠诲姟寮傚父", 1, "璧峰搴撲綅涓庣洰鏍囧簱浣嶄笉鍐嶅悓涓�宸烽亾,param:"+JSON.toJSONString(param));
} catch (Exception e2){
// log.error("e2:"+e2.getMessage());
}
@@ -499,6 +519,7 @@
@RequestBody WMSAndAGVInterfaceParam param,//涓埅涓嬪彂 1锛氬嚭搴擄紝2锛氱Щ搴� 3锛氬叆搴� 1锛氬彇娑� 2 瀹屾垚
HttpServletRequest request) {
auth(appkey, param, request);
+ param.updateIoTyoe(param.getIoType());//涓埅涓嬪彂 1锛氬嚭搴擄紝2锛氱Щ搴� 3锛氬叆搴� ====杞崲涓�====> 1锛氬叆搴擄紝2锛氬嚭搴擄紝3锛氱Щ搴�
// param.updateTaskStatus(param.getTaskStatus());
if (Cools.isEmpty(param)){
return R.error("鍙傛暟涓虹┖锛�");
@@ -506,14 +527,11 @@
return R.error("宸ヤ綔鍙蜂负绌猴紒");
} else if (Cools.isEmpty(param.getIoType())){
return R.error("鎿嶄綔绫诲瀷涓虹┖锛�");
- } else if (Cools.isEmpty(param.getBarcode())){
- return R.error("鎵樼洏鐮佷笉鑳戒负绌猴紒");
}
TaskWrk taskWrk = taskWrkService.selectOne(new EntityWrapper<TaskWrk>()
.eq("task_no", param.getTaskNo())
- .eq("io_type",param.getIoType())
- .eq("barcode",param.getBarcode()));
+ .eq("io_type",param.getIoType()));
if (Cools.isEmpty(taskWrk)){
return R.error("鏈煡鍒板綋鍓嶄换鍔�---"+param);
}
--
Gitblit v1.9.1