From de4b127b4b20c84d6432a58cc4fc7438bc079ea6 Mon Sep 17 00:00:00 2001
From: tqs <56479841@qq.com>
Date: 星期三, 21 十二月 2022 17:22:14 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java |    8 +++++---
 1 files changed, 5 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 91d8106..c92f5ab 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -1446,7 +1446,7 @@
                             }
                         }
                         LocMast sourceLoc = locMastService.selectById(wrkMast.getSourceLocNo());
-                        if(sourceLoc.getLocSts().equals("F")){
+                        if(sourceLoc.getLocSts().equals("F") || sourceLoc.getLocSts().equals("D")){
                             sourceLoc.setLocSts("R"); // R.鍑哄簱棰勭害
                             sourceLoc.setModiTime(new Date());
                             if (!locMastService.updateById(sourceLoc)) {
@@ -2119,7 +2119,7 @@
         SteThread steThread = (SteThread) SlaveConnection.get(SlaveType.Ste, steNo);
         SteProtocol steProtocol = steThread.getSteProtocol();
         if (steProtocol == null) { return; }
-        if (steProtocol.isIdle()) {
+        if (steProtocol.isIdle() && steProtocol.getLoad() == 0) {
             // 鍫嗗灈鏈虹┖闂�
             if (crnProtocol.getStatusType().equals(CrnStatusType.IDLE) || crnProtocol.getTaskNo() == 0) {
                 LocMast locMast;
@@ -2198,7 +2198,7 @@
         SteProtocol steProtocol = steThread.getSteProtocol();
         if (steProtocol == null) { return; }
         // 绌挎杞︾┖闂�
-        if (steProtocol.isIdle()) {
+        if (steProtocol.isIdle() && steProtocol.getLoad() == 0) {
             // 鍫嗗灈鏈虹┖闂�
             if (crnProtocol.getStatusType().equals(CrnStatusType.IDLE) || crnProtocol.getTaskNo() == 0) {
 
@@ -2544,6 +2544,8 @@
                                     log.error("搴撲綅绉昏浆 ===>> 杞Щ搴撳瓨鏄庣粏鏁版嵁澶辫触锛沎婧愬簱浣�={}],[鐩爣搴撲綅={}]", wrkMast.getSourceLocNo(), wrkMast.getLocNo());
                                     continue;
                                 }
+                            } else {
+                                locSts = "D";
                             }
                             if(Cools.isEmpty(locSts)){
                                 log.error("搴撲綅绉昏浆 ===>> 搴撳瓨鐘舵�佷负绌猴紱[婧愬簱浣�={}],[鐩爣搴撲綅={}]", wrkMast.getSourceLocNo(), wrkMast.getLocNo());

--
Gitblit v1.9.1