From 962c3a2d98cb40347d1ea0540c80a63972d1ea5b Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期一, 16 六月 2025 17:03:25 +0800
Subject: [PATCH] 1
---
src/main/java/com/zy/asrs/service/impl/ToWmsServiceImpl.java | 102 +++++++++++++++++++++++++-------------------------
1 files changed, 51 insertions(+), 51 deletions(-)
diff --git a/src/main/java/com/zy/asrs/service/impl/ToWmsServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/ToWmsServiceImpl.java
index b2f81cc..ee48c9c 100644
--- a/src/main/java/com/zy/asrs/service/impl/ToWmsServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/ToWmsServiceImpl.java
@@ -8,7 +8,7 @@
import com.zy.asrs.entity.LocMast;
import com.zy.asrs.entity.TaskWrk;
import com.zy.asrs.entity.TaskWrkReport;
-import com.zy.asrs.entity.wms.StorageEscalationParam;
+import com.zy.asrs.entity.param.StorageEscalationParam;
import com.zy.asrs.entity.wms.WmsResult;
import com.zy.asrs.service.*;
import com.zy.common.service.CommonService;
@@ -23,7 +23,7 @@
import java.util.Date;
@Slf4j
-@Service
+@Service("toWmsService")
public class ToWmsServiceImpl implements ToWmsService {
@Autowired
@@ -54,7 +54,7 @@
/**
* 浠诲姟寮�濮嬫椂锛學CS鍥炶皟WMS
*/
- @Value("${wms.taskExecCallback}")
+ @Value("${wms.TaskExecCallback}")
private String taskExecCallback;
/**
* 浠诲姟瀹屾垚缁撴潫鏃讹紝WCS鍥炶皟WMS
@@ -62,17 +62,17 @@
@Value("${wms.taskStatusFeedbackPath}")
private String taskStatusFeedbackPath;
- @Value("${wms.code}")
- private String code;
+// @Value("${wms.code}")
+// private String code;
- @Value("${wms.successCode}")
- private String successCode;
-
- @Value("${wms.msg}")
- private String msg;
-
- @Value("${wms.data}")
- private String data;
+// @Value("${wms.successCode}")
+// private String successCode;
+//
+// @Value("${wms.msg}")
+// private String msg;
+//
+// @Value("${wms.data}")
+// private String data;
@Override
public void addReportLog(TaskWrk taskWrk) {
@@ -84,44 +84,44 @@
@Override
public TaskWrk getLocNoFromWms(StorageEscalationParam wmsParam) {
- String response = "";
- Boolean success = false;
- try {
- response = new HttpHandler.Builder()
- .setUri(wmsUrl)
- .setPath(inboundTaskApplyPath)
- .setJson(JSON.toJSONString(wmsParam))
- .build()
- .doPost();
- if (!Cools.isEmpty(response)) {
- JSONObject jsonObject = JSON.parseObject(response);
- if (!Cools.isEmpty(jsonObject.get(code)) && jsonObject.get(code).equals(successCode)) {
- //鏈変簺涓夋柟wms绯荤粺涓嶈兘鍙婃椂杩斿洖搴撲綅鍙凤紝杩欐椂鍊欏氨闇�瑕�
- //ZWmsResult result = JSON.parseObject(jsonObject.get(data).toString(), WmsResult.class);
- TaskWrk taskWrk = null;
- int i = 1;
- while (i < 10) {
- taskWrk = taskWrkService.selectByBarcode(wmsParam.getBarcode());
- if (taskWrk != null) {
- break;
- }
- try {
- i++;
- Thread.sleep(500L);
- } catch (InterruptedException e) {
- throw new RuntimeException(e);
- }
- }
- return taskWrk;
- }
- }
- } catch (IOException e) {
- e.printStackTrace();
- log.info("璇锋眰wms鎶ラ敊锛寋}", e.getMessage());
- } finally {
- addApiLog("鍏ュ簱浠诲姟璇锋眰鑾峰彇搴撲綅", wmsUrl + inboundTaskApplyPath, JSON.toJSONString(wmsParam), response, success);
- }
- return null;
+// String response = "";
+// Boolean success = false;
+// try {
+// response = new HttpHandler.Builder()
+// .setUri(wmsUrl)
+// .setPath(inboundTaskApplyPath)
+// .setJson(JSON.toJSONString(wmsParam))
+// .build()
+// .doPost();
+// if (!Cools.isEmpty(response)) {
+// JSONObject jsonObject = JSON.parseObject(response);
+// if (!Cools.isEmpty(jsonObject.get(code)) && jsonObject.get(code).equals(successCode)) {
+// //鏈変簺涓夋柟wms绯荤粺涓嶈兘鍙婃椂杩斿洖搴撲綅鍙凤紝杩欐椂鍊欏氨闇�瑕�
+// //ZWmsResult result = JSON.parseObject(jsonObject.get(data).toString(), WmsResult.class);
+// TaskWrk taskWrk = null;
+// int i = 1;
+// while (i < 10) {
+// taskWrk = taskWrkService.selectByBarcode(wmsParam.getBarcode());
+// if (taskWrk != null) {
+// break;
+// }
+// try {
+// i++;
+// Thread.sleep(500L);
+// } catch (InterruptedException e) {
+// throw new RuntimeException(e);
+// }
+// }
+// return taskWrk;
+// }
+// }
+// } catch (IOException e) {
+// e.printStackTrace();
+// log.info("璇锋眰wms鎶ラ敊锛寋}", e.getMessage());
+// } finally {
+// addApiLog("鍏ュ簱浠诲姟璇锋眰鑾峰彇搴撲綅", wmsUrl + inboundTaskApplyPath, JSON.toJSONString(wmsParam), response, success);
+// }
+ return null;
}
--
Gitblit v1.9.1