From 0df6e7bb33c9f6a18f026a500776b00cbf2ae62c Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期二, 24 十二月 2024 09:48:06 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/common/utils/ShuttleDispatchUtils.java |   24 +++++++++++++++++-------
 1 files changed, 17 insertions(+), 7 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..3cb4367 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;
                     }
 
@@ -315,16 +321,20 @@
 
             NyShuttleProtocol.NyShuttlePointClass point = null;
             if (shuttleProtocol.getPoint() == null) {
-                BasShuttle basShuttle = basShuttleService.selectById(shuttle.getId());//灏忚溅濡傛灉娌℃湁鏁版嵁锛屼粠鏁版嵁搴撳彇鏁版嵁
-                if (basShuttle == null || basShuttle.getPoint() == null) {
-                    continue;
-                }
-                point = JSON.parseObject(basShuttle.getPoint(), NyShuttleProtocol.NyShuttlePointClass.class);
+                continue;
             }else {
                 point = shuttleProtocol.getPoint();
             }
 
             if (point.getZ().equals(lev)) {
+                if (shuttleProtocol.getChargState() == 1) {
+                    continue;//鍏呯數涓�
+                }
+
+                if (shuttleProtocol.getSuspendState() == 1) {
+                    continue;//绠″埗涓�
+                }
+
                 levCount++;//鐩爣妤煎眰鏈夎溅锛屾暟閲忓鍔�
             }
         }

--
Gitblit v1.9.1