From bbe021298549f86c5ee5c9294e987eab874cddc7 Mon Sep 17 00:00:00 2001
From: zwl <1051256694@qq.com>
Date: 星期二, 01 七月 2025 10:07:17 +0800
Subject: [PATCH] 更新入出库优先级

---
 src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java |   24 +++++++++++++++++++-----
 1 files changed, 19 insertions(+), 5 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 a6f9389..5ced3e9 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -378,8 +378,15 @@
                         storageEscalationParam.setBoxNo(BoxNo);
                         //鏄惁婊℃澘 1婊℃澘  0绌烘澘
                         storageEscalationParam.setStaType(staProtocol.isEmptyMk() ? 0 : 1);
-                        //搴撲綅绫诲瀷 1楂樺簱浣� 0浣庡簱浣�
-                        storageEscalationParam.setLocType(staProtocol.isHigh() ? 1 : 0);
+                        //搴撲綅绫诲瀷 2涓簱浣� 1楂樺簱浣� 0浣庡簱浣�
+                        if(staProtocol.isHigh()){
+                            storageEscalationParam.setLocType(1);
+                        }else if(staProtocol.isLow()){
+                            storageEscalationParam.setLocType(0);
+                        }else if (staProtocol.isCentre()){
+                            storageEscalationParam.setLocType(2);
+                        }
+
                         storageEscalationParam.setTerminalNo(staProtocol.getSiteId());
                         log.info("缁勬墭鍏ュ簱={}", storageEscalationParam);
                         String response = "";
@@ -1832,7 +1839,7 @@
         taskWrk.setStatus(TaskStatusType.RECEIVE.id);//浠诲姟鐘舵�侊細鎺ユ敹
         taskWrk.setCreateTime(now);
         taskWrk.setIoType(1);//浠诲姟绫诲瀷 鍏ュ簱
-        taskWrk.setIoPri(13);//浼樺厛绾�
+        taskWrk.setIoPri(10);//浼樺厛绾�
         taskWrk.setBarcode(barcode);//鏉$爜
         taskWrk.setTargetPoint(locNo);
         taskWrk.setStartPoint(staNo+"");
@@ -1916,14 +1923,21 @@
             // 鑾峰彇led绾跨▼
             LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, led.getId());
             // led鏄剧ず榛樿鍐呭
-            if (reset && !ledThread.isLedMk()) {
+            if (reset) {
                 ledThread.setLedMk(true);
-                if (!MessageQueue.offer(SlaveType.Led, led.getId(), new Task(4, new ArrayList<>()))) {
+                if (!MessageQueue.offer(SlaveType.Led, led.getId(), new Task(2, new ArrayList<>()))) {
                     log.error(""+mark+" - 1"+" - {}鍙稬ED鍛戒护涓嬪彂澶辫触锛侊紒锛乕ip锛歿}] [port锛歿}]", led.getId(), led.getIp(), led.getPort());
                 } else {
 
                 }
             }
+//            if (reset) {
+//                if (!MessageQueue.offer(SlaveType.Led, led.getId(), new Task(2, new ArrayList<>()))) {
+//                    log.error(""+mark+" - 1"+" - {}鍙稬ED鍛戒护涓嬪彂澶辫触锛侊紒锛乕ip锛歿}] [port锛歿}]", led.getId(), led.getIp(), led.getPort());
+//                } else {
+//
+//                }
+//            }
         }
 //        log.info(""+mark+" - 0"+" - 鎵ц瀹屾垚锛氬叾浠�  ===>> LED鏄剧ず鍣ㄥ浣嶏紝鏄剧ず榛樿淇℃伅");
     }

--
Gitblit v1.9.1