From 5b31c7c7d24e371eeb93acbd5481aca11f7cb041 Mon Sep 17 00:00:00 2001
From: skyouc <creaycat@gmail.com>
Date: 星期二, 20 一月 2026 10:36:30 +0800
Subject: [PATCH] no message
---
src/main/java/com/zy/asrs/task/handler/OrderSyncHandler.java | 32 ++++++++++++++++++++++++++------
1 files changed, 26 insertions(+), 6 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 23276e6..83e07af 100644
--- a/src/main/java/com/zy/asrs/task/handler/OrderSyncHandler.java
+++ b/src/main/java/com/zy/asrs/task/handler/OrderSyncHandler.java
@@ -19,6 +19,8 @@
import com.zy.asrs.entity.*;
import com.zy.asrs.enums.OrderTypeEnum;
import com.zy.asrs.service.*;
+import com.zy.asrs.service.impl.TaskDetlLogServiceImpl;
+import com.zy.asrs.service.impl.TaskDetlServiceImpl;
import com.zy.asrs.task.AbstractHandler;
import com.zy.asrs.task.core.ReturnT;
import com.zy.asrs.utils.OrderInAndOutUtil;
@@ -69,6 +71,8 @@
private LocDetlService locDetlService;
@Autowired
CheckOrderDetlService checkOrderDetlService;
+ @Autowired
+ private TaskDetlLogService taskDetlLogService;
@Transactional
@@ -288,9 +292,9 @@
.setPro_id(detl.getSuppCode())
.setLocation_no(locDetl.getZpallet())
.setSj_emp(locDetl.getModiUser$())
- .setLocation_type(MatLocType.getMatTag(material.getTagId() + ""))
+ .setLocation_type(MatLocType.getMatTag(material.getTagId() + ""))
// 涓婃姤鏃讹紝榛樿涓婃姤鏃堕棿鏄洿鏂版椂闂�
- .setSj_date(Utils.dateToStr(order.getUpdateTime(), "yyyy-MM-dd HH:mm:ss") )
+ .setSj_date(Utils.dateToStr(order.getUpdateTime(), "yyyy-MM-dd HH:mm:ss"))
// 涓婃姤鏃讹紝榛樿涓婃姤鏁伴噺鏄鍗曟暟閲�
.setPick_qty(detl.getQty().intValue())
// 涓婃姤鏃讹紝榛樿鎹熷潖鏁伴噺鏄�0
@@ -353,7 +357,7 @@
.setUpdate_time(Utils.dateToStr(new Date(), "yyyy-MM-dd HH:mm:ss"))
//鐩爣搴撳尯
.setTarget_location("")
- .setTarget_location("1");
+ .setSource_location("1");
List<OrderItemsParam> reportOrderParams = new ArrayList<>();
orderDetls.forEach(detl -> {
@@ -361,6 +365,15 @@
if (Objects.isNull(material)) {
throw new CoolException("鐗╂枡涓嶅瓨鍦�");
}
+ 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槸鍚﹀凡瀹屾垚锛侊紒");
+ }
+ //鐩爣搴撳尯
+ orderParam.setTarget_location(detlLog.getAreaType());
OrderItemsParam itemParam = new OrderItemsParam();
// BS Code
itemParam
@@ -371,12 +384,19 @@
// 涓婃姤鏃讹紝榛樿浜у搧id鏄緵搴斿晢缂栫爜
.setPro_id(detl.getSuppCode())
// // 涓婃姤鏃讹紝榛樿鏉ユ簮浣嶇疆鏄痭ull
- .setLocation_no(null)
+ .setLocation_no(detlLog.getZpallet())
// 涓婃姤鏃讹紝榛樿涓婃姤鏁伴噺鏄鍗曟暟閲�
.setPick_qty(detl.getQty().intValue());
reportOrderParams.add(itemParam);
});
+ if (orderParam.getTarget_location().equals("2")) {
+ orderParam.setType("11");
+ } else if (orderParam.getTarget_location().equals("3")) {
+ orderParam.setType("12");
+ } else {
+ orderParam.setType("13");
+ }
orderParam.setPartList(reportOrderParams);
XSR response = null;
@@ -516,7 +536,7 @@
/**
* 鎹熸孩鍗曞畬缁撲笂鎶�
- *
+ *
* @param order
* @return
*/
@@ -562,7 +582,7 @@
if (response.getSuccess()) {
return SUCCESS;
} else {
- return FAIL;
+ return FAIL;
}
}
--
Gitblit v1.9.1