From 5701eb6693c654d53f1bba460eb3a417d495b344 Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期三, 11 六月 2025 17:31:53 +0800
Subject: [PATCH] bug修复;下发任务给rcs携带货架码
---
src/main/java/com/zy/asrs/task/OrderSyncScheduler.java | 50 +++++++++++++++++++++++++++++++-------------------
1 files changed, 31 insertions(+), 19 deletions(-)
diff --git a/src/main/java/com/zy/asrs/task/OrderSyncScheduler.java b/src/main/java/com/zy/asrs/task/OrderSyncScheduler.java
index c72487c..8003028 100644
--- a/src/main/java/com/zy/asrs/task/OrderSyncScheduler.java
+++ b/src/main/java/com/zy/asrs/task/OrderSyncScheduler.java
@@ -3,8 +3,7 @@
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.core.common.Cools;
-import com.zy.asrs.entity.DocType;
-import com.zy.asrs.entity.Order;
+import com.zy.asrs.entity.*;
import com.zy.asrs.mapper.OrderDetlMapper;
import com.zy.asrs.service.*;
import com.zy.asrs.task.core.ReturnT;
@@ -28,6 +27,15 @@
private OrderSyncHandler orderSyncHandler;
@Autowired
private OrderService orderService;
+
+
+ @Autowired
+ private OrderLogService orderLogService;
+
+ @Autowired
+ private OrderDetlLogService orderDetlLogService;
+
+
@Autowired
private ApiLogService apiLogService;
@@ -43,6 +51,9 @@
@Autowired
private DocTypeService docTypeService;
+ @Autowired
+ private AgvWrkDetlService agvWrkDetlService;
+
private Integer page = 1;
private Integer size = 200;
@@ -57,7 +68,7 @@
}
//@Scheduled(cron = "0/5 * * * * ? ")
- @Scheduled(fixedDelay = 600000)
+ //@Scheduled(fixedDelay = 600000)
//@Async("orderThreadPool")
public void completeAndReport() {
String erpReport = Parameter.get().getErpReport();
@@ -65,21 +76,21 @@
List<Order> orders = orderService.selectComplete();
for (Order order : orders) {
//濡傛灉鏄皟鎷ㄥ崟鍒欒繘琛屽垽鏂�
-// if (order.getDocType() == 33) {
-// //鏌ヨ搴撳瓨涓槸鍚﹀瓨鍦ㄨ璁㈠崟鐨勭墿鏂欎俊鎭紝瀛樺湪鍒欎笉澶勭悊璇ヨ鍗�
-// List<OrderDetl> orderDetlList = orderDetlService.selectByOrderId(order.getId());
-// Boolean flag = false;
-// for (OrderDetl orderDetl : orderDetlList) {
-// List<AgvLocDetl> agvLocDetls = agvLocDetlService.selectList(new EntityWrapper<AgvLocDetl>().eq("matnr", orderDetl.getMatnr()).eq("three_code", orderDetl.getThreeCode()));
-// if (!Cools.isEmpty(agvLocDetls)) {
-// //鍙鏈変竴椤硅鍗曟槑缁嗗瓨鍦紝鍒欐爣璇嗕负true锛岃烦杩囪璁㈠崟
-// flag = true;
-// }
-// }
-// if (flag) {
-// continue;
-// }
-// }
+ if (order.getDocType() == 33) {
+ //鏌ヨ搴撳瓨涓槸鍚﹀瓨鍦ㄨ璁㈠崟鐨勭墿鏂欎俊鎭紝瀛樺湪鍒欎笉澶勭悊璇ヨ鍗�
+ List<OrderDetl> orderDetlList = orderDetlService.selectByOrderId(order.getId());
+ Boolean flag = false;
+ for (OrderDetl orderDetl : orderDetlList) {
+ List<AgvLocDetl> agvLocDetls = agvLocDetlService.selectList(new EntityWrapper<AgvLocDetl>().eq("matnr", orderDetl.getMatnr()).eq("three_code", orderDetl.getThreeCode()));
+ if (!Cools.isEmpty(agvLocDetls) ) {
+ //鍙鏈変竴椤硅鍗曟槑缁嗗瓨鍦紝鍒欐爣璇嗕负true锛岃烦杩囪璁㈠崟
+ flag = true;
+ }
+ }
+ if (flag) {
+ continue;
+ }
+ }
ReturnT<String> result = orderSyncHandler.start(order);
if (!result.isSuccess()) {
//log.error("鍗曟嵁[orderNo={}]涓婃姤erp澶辫触", order.getOrderNo());
@@ -90,7 +101,7 @@
//@Scheduled(cron = "* 0/5 * * * ? ")
//@Scheduled(cron = "0/30 * * * * ? ")
- @Scheduled(fixedDelay = 30000)
+ //@Scheduled(fixedDelay = 30000)
//@Async("orderThreadPool")
public synchronized void reportOrder() {
DocType docType = docTypeService.selectOne(new EntityWrapper<DocType>().eq("doc_name", "閾跺骇閲囪喘鍏ュ簱鍗�"));
@@ -127,4 +138,5 @@
}
}
+
}
--
Gitblit v1.9.1