From 184a0722e53f64f40ddb2c88f11f26941f565a8c Mon Sep 17 00:00:00 2001
From: ZY <zc857179121@qq.com>
Date: 星期三, 18 十二月 2024 14:56:44 +0800
Subject: [PATCH] 上报逻辑调整
---
src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java | 47 +++++++++++++++++++++++++----------------------
1 files changed, 25 insertions(+), 22 deletions(-)
diff --git a/src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java b/src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java
index c2c10bf..61f6a6f 100644
--- a/src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java
+++ b/src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java
@@ -336,15 +336,22 @@
// }
// agvWrkMastService.updateById(agvWrkMast);
// }
-
+ Integer pltType = agvWrkMast.getPltType();
+ if (Cools.isEmpty(pltType) && !Cools.isEmpty(agvWrkMast.getLocNo())) {
+ AgvLocMast agvLocMast = agvLocMastService.selectById(agvWrkMast.getLocNo());
+ if (agvLocMast != null) {
+ pltType = agvLocMast.getPltType();
+ }
+ }
if (!isJSON(orderNo)) {
//妫�鏌ヨ鍗曟槸鍚﹀凡瀹屾垚
- orderService.checkComplete(orderNo, agvWrkMast.getPltType());
+ orderService.checkComplete(orderNo, pltType);
} else {
List<Map> maps = JSONArray.parseArray(orderNo, Map.class);
+ Integer finalPltType = pltType;
maps.forEach(map -> {
String o = map.get("orderNo").toString();
- orderService.checkComplete(o, agvWrkMast.getPltType());
+ orderService.checkComplete(o, finalPltType);
});
}
@@ -706,33 +713,29 @@
if (Cools.isEmpty(agvWrkDetls)) {
return;
}
+ List<AgvWrkDetl> data = new ArrayList<>();
//鍖哄垎涓嶅悓浠诲姟绫诲瀷鐨勪笂鎶ユ柟寮�
-
- if (IN_TYPE_LIST.contains(agvWrkMast.getIoType())) {
- String barcode = agvWrkMast.getBarcode();
- if (barcode.startsWith("20") || barcode.startsWith("21") || barcode.startsWith("40")) {
- reportMesPakinOrder(agvWrkMast, agvWrkDetls);
+ for (AgvWrkDetl agvWrkDetl : agvWrkDetls) {
+ if (agvWrkDetl.getMatnr().compareTo("39") <= 0) {
+ data.add(agvWrkDetl);
}
}
- if (OUT_TYPE_List.contains(agvWrkMast.getIoType())) {
- String barcode = agvWrkMast.getBarcode();
- if (barcode.startsWith("20") || barcode.startsWith("21") || barcode.startsWith("40")) {
- reportMesPakoutOrder(agvWrkMast, agvWrkDetls);
+ if (!data.isEmpty()) {
+ if (IN_TYPE_LIST.contains(agvWrkMast.getIoType())) {
+ reportMesPakinOrder(agvWrkMast, data);
+ }
+ if (OUT_TYPE_List.contains(agvWrkMast.getIoType())) {
+ reportMesPakoutOrder(agvWrkMast, data);
+ }
+ if (MOVE_TYPE_List.contains(agvWrkMast.getIoType())) {
+ generateMesParam(agvWrkMast, data);
}
}
- if (MOVE_TYPE_List.contains(agvWrkMast.getIoType())) {
- String barcode = agvWrkMast.getBarcode();
- if (agvWrkMast == null || agvWrkMast.getBarcode() == null) {
- return;
- }
- if (barcode.startsWith("20") || barcode.startsWith("21") || barcode.startsWith("40")) {
- generateMesParam(agvWrkMast, agvWrkDetls);
- }
- }
-
}
+
+
private void reportMesPakinOrder(AgvWrkMast agvWrkMast, List<AgvWrkDetl> agvWrkDetls) {
for (AgvWrkDetl agvWrkDetl : agvWrkDetls) {
--
Gitblit v1.9.1