From d13a01d1769f29b336e5b9f8612c6d41aaabbbb1 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期五, 22 十一月 2024 20:42:20 +0800
Subject: [PATCH] #读取地图文件优化

---
 src/main/java/com/zy/common/utils/ShuttleDispatchUtils.java |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/zy/common/utils/ShuttleDispatchUtils.java b/src/main/java/com/zy/common/utils/ShuttleDispatchUtils.java
index c1d64c0..b0113aa 100644
--- a/src/main/java/com/zy/common/utils/ShuttleDispatchUtils.java
+++ b/src/main/java/com/zy/common/utils/ShuttleDispatchUtils.java
@@ -103,6 +103,11 @@
                 continue;
             }
 
+            if (shuttleProtocol.getWorkingMode() == 0) {
+                //灏忚溅澶勪簬鎵嬪姩妯″紡
+                continue;
+            }
+
             int currentLev = shuttleProtocol.getPoint().getZ();//灏忚溅褰撳墠灞傞珮
             String currentLocNo = shuttleProtocol.getCurrentLocNo();//灏忚溅褰撳墠搴撲綅鍙�
 
@@ -176,8 +181,9 @@
                     String currentLocNo = shuttleThread.getShuttleProtocol().getCurrentLocNo();
                     int currentLev = Utils.getLev(currentLocNo);
                     List<WrkMast> wrkMasts1 = wrkMastService.selectNoShuttleWrkByLev(currentLev);//鍒ゆ柇褰撳墠绌挎杞︽ゼ灞傛槸鍚︽湁寰呭垎閰嶈溅杈嗙殑浠诲姟锛屽鏋滄湁鍒欎笉鍒嗛厤杩欒締杞�
-                    if (!wrkMasts1.isEmpty()) {
-                        //瀛樺湪鍏朵粬浠诲姟锛岃烦杩囪繖杈嗚溅
+                    int shuttleCount = this.getShuttleCountByLev(currentLev);//鑾峰彇绌挎杞︽ゼ灞傝溅杈嗘暟閲�
+                    if (!wrkMasts1.isEmpty() && shuttleCount <= 1) {
+                        //瀛樺湪鍏朵粬浠诲姟涓斿彲鐢ㄥ皬杞︽暟閲忓皬浜庣瓑浜�1锛岃烦杩囪繖杈嗚溅
                         continue;
                     }
 
@@ -325,6 +331,14 @@
             }
 
             if (point.getZ().equals(lev)) {
+                if (shuttleProtocol.getChargState() == 1) {
+                    continue;//鍏呯數涓�
+                }
+
+                if (shuttleProtocol.getSuspendState() == 1) {
+                    continue;//绠″埗涓�
+                }
+
                 levCount++;//鐩爣妤煎眰鏈夎溅锛屾暟閲忓鍔�
             }
         }

--
Gitblit v1.9.1