From 2f6502b1ac9e1a979a8e01c9c9763d9c327e522b Mon Sep 17 00:00:00 2001
From: zhangc <zc@123>
Date: 星期五, 20 十二月 2024 08:52:34 +0800
Subject: [PATCH] 切换环境至dev并优化单据处理逻辑

---
 src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java |   34 +++++++++++++++++++++++-----------
 1 files changed, 23 insertions(+), 11 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 e26edd6..7ff5102 100644
--- a/src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java
+++ b/src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java
@@ -43,9 +43,9 @@
     //绉诲簱绫诲瀷鏁扮粍
     private static final List<Integer> MOVE_TYPE_List = new ArrayList<Integer>() {{
         add(11);
-        add(101);
         add(12);
-        add(53);
+        //add(53);
+        add(101);
         add(103);
         add(108);
         add(111);
@@ -135,6 +135,23 @@
             }
 
 
+            Integer pltType = agvWrkMast.getPltType();
+            if (Cools.isEmpty(pltType) && !Cools.isEmpty(agvWrkMast.getLocNo())) {
+                AgvLocMast agvLocMast = agvLocMastService.selectById(agvWrkMast.getLocNo());
+                if (agvLocMast != null) {
+                    pltType = agvLocMast.getPltType();
+                } else {
+                    if (!Cools.isEmpty(agvWrkMast.getSourceLocNo())) {
+                        agvLocMast = agvLocMastService.selectById(agvWrkMast.getLocNo());
+                        if (agvLocMast != null) {
+                            pltType = agvLocMast.getPltType();
+                        }
+                    }
+                }
+            }
+            if (Cools.isEmpty(agvWrkMast.getPltType())) {
+                agvWrkMast.setPltType(pltType);
+            }
             agvWrkMast.setModiTime(new Date());
             //淇敼宸ヤ綔妗g姸鎬佷负207.搴撳瓨鏇存柊瀹屾垚
             agvWrkMast.setWrkSts(207L);
@@ -336,13 +353,7 @@
 //                }
 //                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, pltType);
@@ -716,11 +727,11 @@
         List<AgvWrkDetl> data = new ArrayList<>();
         //鍖哄垎涓嶅悓浠诲姟绫诲瀷鐨勪笂鎶ユ柟寮�
         for (AgvWrkDetl agvWrkDetl : agvWrkDetls) {
-            if (agvWrkDetl.getMatnr().startsWith("10") || agvWrkDetl.getMatnr().startsWith("20") || agvWrkDetl.getMatnr().startsWith("30")) {
+            if (agvWrkDetl.getMatnr().compareTo("39") <= 0) {
                 data.add(agvWrkDetl);
             }
         }
-        if (!Cools.isEmpty(data)) {
+        if (!data.isEmpty()) {
             if (IN_TYPE_LIST.contains(agvWrkMast.getIoType())) {
                 reportMesPakinOrder(agvWrkMast, data);
             }
@@ -734,6 +745,7 @@
 
     }
 
+
     private void reportMesPakinOrder(AgvWrkMast agvWrkMast, List<AgvWrkDetl> agvWrkDetls) {
 
         for (AgvWrkDetl agvWrkDetl : agvWrkDetls) {

--
Gitblit v1.9.1