From ca6062762cf95a074635626ce185d2fd14512e76 Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期三, 20 十二月 2023 16:16:07 +0800
Subject: [PATCH] #提升机异常码

---
 src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java |   21 ++++++++++++++++++---
 1 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
index ebea0fe..a2fb473 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -2897,7 +2897,7 @@
                     if (ioType != 110 && ioType != 10) {
                         List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("loc_no", sourceLocNo));
                         locDetls.forEach(locDetl -> {
-                            Wrapper<WrkDetl> wrapper = new EntityWrapper<WrkDetl>().eq("matnr", locDetl.getMatnr()).eq("wrk_no", wrkMast.getWrkNo());
+                            Wrapper<WrkDetl> wrapper = new EntityWrapper<WrkDetl>().eq("matnr", locDetl.getMatnr()).eq("wrk_no", wrkNo);
                             Utils.wapperSetCondition(wrapper, "batch", locDetl.getBatch());
                             Utils.wapperSetCondition(wrapper, "three_code", locDetl.getThreeCode());
                             Utils.wapperSetCondition(wrapper, "dead_time", locDetl.getDeadTime());
@@ -2927,6 +2927,11 @@
 
                         });
 
+                        if (ioType == 107) {
+                            locDetls = new ArrayList<>();
+                            ledCommand.setMatDtos(new ArrayList<>());
+                        }
+
                         if (locDetls.isEmpty()) {
                             List<WrkDetl> wrkDetls = wrkDetlService.selectList(new EntityWrapper<WrkDetl>().eq("wrk_no", wrkNo));
                             wrkDetls.forEach(wrkDetl -> {
@@ -2934,11 +2939,10 @@
                             });
 
                             if (wrkDetls.isEmpty()) {//浠庡巻鍙叉。鏌ヨ
-                                List<WrkDetlLog> wrkDetlLogs = wrkDetlLogService.selectLatestByWorkNo(wrkNo);
+                                List<WrkDetlLog> wrkDetlLogs = wrkDetlLogService.selectLatestByWorkNo(wrkNo, barcode);
                                 for (WrkDetlLog wrkDetlLog : wrkDetlLogs) {
                                     ledCommand.getMatDtos().add(new MatDto(wrkDetlLog.getMatnr(), wrkDetlLog.getMaktx(), wrkDetlLog.getAnfme(), wrkDetlLog.getAnfme(), wrkDetlLog.getSpecs(), wrkDetlLog.getSuppCode()));
                                 }
-
                             }
                         }
                     }
@@ -3389,6 +3393,17 @@
 
             //鑾峰彇灏忚溅鍒拌緭閫佺珯鐐硅璧板懡浠�
             NyShuttleOperaResult result = NyShuttleOperaUtils.getStartToTargetCommands(shuttleThread.getSlave().getId(), wrkMast.getWrkNo(), shuttleProtocol.getCurrentLocNo(), liftSta.getLocNo(), NavigationMapType.NORMAL.id);
+            if (result == null) {
+                //璺緞鑾峰彇澶辫触锛岄渶瑕佽В閿佷笂闈㈤攣瀹氱殑璺緞
+                //灏濊瘯瑙i攣鐩爣绔欒矾寰�
+                boolean result3 = navigateMapUtils.writeNavigateNodeToRedisMap(Utils.getLev(wrkMast.getLocNo()), targetNodes, false);//鎵�浣跨敤鐨勮矾寰勮繘琛岃В閿�
+                if (!result3) {
+                    News.info("{}浠诲姟锛寋}灏忚溅锛岃矾寰勮В閿佸け璐�", wrkMast.getWrkNo(), shuttleProtocol.getShuttleNo());
+                    return false;//璺緞瑙i攣澶辫触
+                }
+                News.info("{}浠诲姟锛寋}灏忚溅锛岃矾寰勮绠楀け璐�", wrkMast.getWrkNo(), shuttleProtocol.getShuttleNo());
+                return false;//璺緞瑙i攣澶辫触
+            }
             List<NyShuttleHttpCommand> commands = result.getCommands();
 
             ShuttleAssignCommand assignCommand = new ShuttleAssignCommand();

--
Gitblit v1.9.1