From 0386ec2085f557b43678e26d23a15a3240e12e68 Mon Sep 17 00:00:00 2001
From: 1 <1@123>
Date: 星期二, 13 五月 2025 18:15:15 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/controller/TaskWrkController.java | 122 +++++++++++++++++++++-------------------
1 files changed, 64 insertions(+), 58 deletions(-)
diff --git a/src/main/java/com/zy/asrs/controller/TaskWrkController.java b/src/main/java/com/zy/asrs/controller/TaskWrkController.java
index a8b9f79..4c5eb58 100644
--- a/src/main/java/com/zy/asrs/controller/TaskWrkController.java
+++ b/src/main/java/com/zy/asrs/controller/TaskWrkController.java
@@ -23,6 +23,7 @@
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
+import java.time.LocalDateTime;
import java.util.*;
@RestController
@@ -260,41 +261,44 @@
}
String response="";
- try{
- HashMap<String, Object> headParam = new HashMap<>();
- headParam.put("taskNo",taskWrk.getTaskNo());
- headParam.put("status",taskWrk.getStatus());
- headParam.put("ioType",taskWrk.getIoTypeWms());
- headParam.put("barcode",taskWrk.getBarcode());
-// headParam.put("reportTime",new Date());
- log.info("wcs鎵嬪姩瀹屾垚浠诲姟涓婃姤wms={}", taskWrk);
- response = new HttpHandler.Builder()
- // .setHeaders(headParam)
- .setUri(wmsUrl)
- .setPath(taskStatusFeedbackPath)
- .setJson(JSON.toJSONString(headParam))
- .build()
- .doPost();
- JSONObject jsonObject = JSON.parseObject(response);
- apiLogService.save("wcs鎵嬪姩瀹屾垚浠诲姟涓婃姤wms"
- ,wmsUrl+taskStatusFeedbackPath
- ,null
- ,"127.0.0.1"
- ,JSON.toJSONString(headParam)
- ,response
- ,true
- );
- }catch (Exception e){
- log.error("wcs鎵嬪姩瀹屾垚浠诲姟涓婃姤wms澶眥},杩斿洖鍊�={}", taskWrk,response);
-// throw new CoolException(e);
- }
Date now = new Date();
locMast.setModiTime(now);
- locMastService.updateById(locMast);
taskWrk.setStatus(7);//鎵嬪姩瀹屾垚浠诲姟
taskWrk.setModiTime(now);
taskWrk.setCompleteTime(now);
+// try{
+// HashMap<String, Object> headParam = new HashMap<>();
+// headParam.put("taskNo",taskWrk.getTaskNo());
+// headParam.put("taskStatus",taskWrk.getStatusWms());
+// headParam.put("ioType",taskWrk.getIoTypeWms());
+// headParam.put("barCode",taskWrk.getBarcode());
+// headParam.put("reportTime", LocalDateTime.now());
+// headParam.put("weight",taskWrk.getScWeight().doubleValue());
+//
+// log.info("wcs鎵嬪姩瀹屾垚浠诲姟涓婃姤wms={}", taskWrk);
+// response = new HttpHandler.Builder()
+// // .setHeaders(headParam)
+// .setUri(wmsUrl)
+// .setPath(taskStatusFeedbackPath)
+// .setJson(JSON.toJSONString(headParam))
+// .build()
+// .doPost();
+//
+// JSONObject jsonObject = JSON.parseObject(response);
+// apiLogService.save("wcs鎵嬪姩瀹屾垚浠诲姟涓婃姤wms"
+// ,wmsUrl+taskStatusFeedbackPath
+// ,null
+// ,"127.0.0.1"
+// ,JSON.toJSONString(headParam)
+// ,response
+// ,true
+// );
+// }catch (Exception e){
+// log.error("wcs鎵嬪姩瀹屾垚浠诲姟涓婃姤wms澶眥},杩斿洖鍊�={}", taskWrk,response);
+//// throw new CoolException(e);
+// }
+ locMastService.updateById(locMast);
taskWrkService.updateById(taskWrk);
return R.ok();
}
@@ -319,35 +323,37 @@
taskWrk.setModiUser(1111L);//鎿嶄綔鍛�
}
String response="";
- try{
- HashMap<String, Object> headParam = new HashMap<>();
- headParam.put("taskNo",taskWrk.getTaskNo());
- headParam.put("status",taskWrk.getStatus());
- headParam.put("ioType",taskWrk.getIoTypeWms());
- headParam.put("barcode",taskWrk.getBarcode());
-// headParam.put("reportTime",new Date());
-
- log.info("wcs鎵嬪姩鍙栨秷浠诲姟涓婃姤wm={}", taskWrk);
- response = new HttpHandler.Builder()
- // .setHeaders(headParam)
- .setUri(wmsUrl)
- .setPath(taskStatusFeedbackPath)
- .setJson(JSON.toJSONString(headParam))
- .build()
- .doPost();
- JSONObject jsonObject = JSON.parseObject(response);
- apiLogService.save("wcs鎵嬪姩鍙栨秷浠诲姟涓婃姤wms"
- ,wmsUrl+taskStatusFeedbackPath
- ,null
- ,"127.0.0.1"
- ,JSON.toJSONString(headParam)
- ,response
- ,true
- );
- }catch (Exception e){
- log.error("wcs鎵嬪姩鍙栨秷浠诲姟涓婃姤wms澶辫触={},杩斿洖鍊�={}", taskWrk,response);
-// throw new CoolException(e);
- }
+// try{
+// HashMap<String, Object> headParam = new HashMap<>();
+// headParam.put("taskNo",taskWrk.getTaskNo());
+// headParam.put("taskStatus",taskWrk.getStatusWms());
+// headParam.put("ioType",taskWrk.getIoTypeWms());
+// headParam.put("barCode",taskWrk.getBarcode());
+// headParam.put("reportTime", LocalDateTime.now());
+// headParam.put("weight",taskWrk.getScWeight().doubleValue());
+//
+//
+// log.info("wcs鎵嬪姩鍙栨秷浠诲姟涓婃姤wm={}", taskWrk);
+// response = new HttpHandler.Builder()
+// // .setHeaders(headParam)
+// .setUri(wmsUrl)
+// .setPath(taskStatusFeedbackPath)
+// .setJson(JSON.toJSONString(headParam))
+// .build()
+// .doPost();
+// JSONObject jsonObject = JSON.parseObject(response);
+// apiLogService.save("wcs鎵嬪姩鍙栨秷浠诲姟涓婃姤wms"
+// ,wmsUrl+taskStatusFeedbackPath
+// ,null
+// ,"127.0.0.1"
+// ,JSON.toJSONString(headParam)
+// ,response
+// ,true
+// );
+// }catch (Exception e){
+// log.error("wcs鎵嬪姩鍙栨秷浠诲姟涓婃姤wms澶辫触={},杩斿洖鍊�={}", taskWrk,response);
+//// throw new CoolException(e);
+// }
taskWrk.setCompleteTime(now);//瀹岀粨鏃堕棿
taskWrkService.updateById(taskWrk);
return R.ok();
--
Gitblit v1.9.1