From 1dca57c0f15c3cdfbebf14ad1e9e04d8c84e775c Mon Sep 17 00:00:00 2001
From: skyouc <958836976@qq.com>
Date: 星期六, 07 三月 2026 09:51:47 +0800
Subject: [PATCH] no message
---
src/main/java/com/zy/asrs/task/handler/OrderSyncHandler.java | 29 ++++++++++++++++++++---------
1 files changed, 20 insertions(+), 9 deletions(-)
diff --git a/src/main/java/com/zy/asrs/task/handler/OrderSyncHandler.java b/src/main/java/com/zy/asrs/task/handler/OrderSyncHandler.java
index dcf0978..be6a809 100644
--- a/src/main/java/com/zy/asrs/task/handler/OrderSyncHandler.java
+++ b/src/main/java/com/zy/asrs/task/handler/OrderSyncHandler.java
@@ -21,6 +21,7 @@
import com.zy.asrs.service.*;
import com.zy.asrs.service.impl.TaskDetlLogServiceImpl;
import com.zy.asrs.service.impl.TaskDetlServiceImpl;
+import com.zy.asrs.service.impl.WrkDetlLogServiceImpl;
import com.zy.asrs.task.AbstractHandler;
import com.zy.asrs.task.core.ReturnT;
import com.zy.asrs.utils.OrderInAndOutUtil;
@@ -73,6 +74,8 @@
CheckOrderDetlService checkOrderDetlService;
@Autowired
private TaskDetlLogService taskDetlLogService;
+ @Autowired
+ private WrkDetlLogServiceImpl wrkDetlLogService;
@Transactional
@@ -276,7 +279,7 @@
orderDetls.forEach(detl -> {
Mat material = matService.selectByMatnr(detl.getMatnr());
if (Objects.isNull(material)) {
- throw new CoolException("鐗╂枡涓嶅瓨鍦�");
+ throw new CoolException(material.getMatnr() + "鐗╂枡涓嶅瓨鍦�");
}
ReportOrderParams itemParam = new ReportOrderParams();
@@ -386,17 +389,26 @@
orderDetls.forEach(detl -> {
Mat material = matService.selectByMatnr(detl.getMatnr());
if (Objects.isNull(material)) {
- throw new CoolException("鐗╂枡涓嶅瓨鍦�");
+ throw new CoolException(material.getMatnr() + "鐗╂枡涓嶅瓨鍦�");
}
- TaskDetlLog detlLog = taskDetlLogService.selectOne(new EntityWrapper<TaskDetlLog>()
+ //TODO 姝e父瀹岀粨闇�瑕佹墦寮�
+// TaskDetlLog detlLog = taskDetlLogService.selectOne(new EntityWrapper<TaskDetlLog>()
+// .eq("matnr", detl.getMatnr())
+// .eq("supp_code", detl.getStandby1())
+// .eq("order_no", detl.getOrderNo()));
+// if (Objects.isNull(detlLog)) {
+// throw new CoolException("鏁版嵁閿欒 锛岃妫�鏌GV浠诲姟妗f槸鍚﹀凡瀹屾垚锛侊紒");
+// }
+ WrkDetlLog detlLog = wrkDetlLogService.selectOne(new EntityWrapper<WrkDetlLog>()
.eq("matnr", detl.getMatnr())
.eq("supp_code", detl.getStandby1())
.eq("order_no", detl.getOrderNo()));
if (Objects.isNull(detlLog)) {
- throw new CoolException("鏁版嵁閿欒 锛岃妫�鏌GV浠诲姟妗f槸鍚﹀凡瀹屾垚锛侊紒");
+ throw new CoolException("鐗╂枡缂栫爜锛�" + detl.getMatnr() + "鏁版嵁閿欒 锛岃妫�鏌ュ爢鍨涙満浠诲姟妗f槸鍚﹀凡瀹屾垚锛侊紒");
}
//鐩爣搴撳尯
- orderParam.setTarget_location(detlLog.getAreaType());
+ orderParam.setTarget_location("2");
+// orderParam.setTarget_location(detlLog.getAreaType());
OrderItemsParam itemParam = new OrderItemsParam();
// BS Code
itemParam
@@ -409,7 +421,7 @@
// // 涓婃姤鏃讹紝榛樿鏉ユ簮浣嶇疆鏄痭ull
.setLocation_no(detlLog.getZpallet())
// 涓婃姤鏃讹紝榛樿涓婃姤鏁伴噺鏄鍗曟暟閲�
- .setPick_qty(detl.getQty().intValue());
+ .setPick_qty(Objects.isNull(detl.getQty()) ? 0 : detl.getQty().intValue());
reportOrderParams.add(itemParam);
});
@@ -479,9 +491,8 @@
orderDetls.forEach(detl -> {
Mat material = matService.selectByMatnr(detl.getMatnr());
if (Objects.isNull(material)) {
- throw new CoolException("鐗╂枡涓嶅瓨鍦�");
+ throw new CoolException(material.getMatnr() + "鐗╂枡涓嶅瓨鍦�");
}
-
TaskDetlLog detlLog = taskDetlLogService.selectOne(new EntityWrapper<TaskDetlLog>()
.eq("matnr", detl.getMatnr())
.eq("supp_code", detl.getStandby1())
@@ -596,7 +607,7 @@
detls.forEach(detl -> {
Mat material = matService.selectByMatnr(detl.getMatnr());
if (Objects.isNull(material)) {
- throw new CoolException("鐗╂枡涓嶅瓨鍦�");
+ throw new CoolException(material.getMatnr() + "鐗╂枡涓嶅瓨鍦�");
}
OrderItemsParam itemParam = new OrderItemsParam();
itemParam.setLocation_no(detl.getZpallet())
--
Gitblit v1.9.1