From 0c4b48edb964d47a6db0e2f6a6073fade51c3c4d Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期四, 09 十一月 2023 09:27:54 +0800
Subject: [PATCH] # 显示器

---
 src/main/java/com/zy/core/model/protocol/LiftProtocol.java |   36 ++++++++++++++++++++++++------------
 1 files changed, 24 insertions(+), 12 deletions(-)

diff --git a/src/main/java/com/zy/core/model/protocol/LiftProtocol.java b/src/main/java/com/zy/core/model/protocol/LiftProtocol.java
index abc2b26..dcee8b0 100644
--- a/src/main/java/com/zy/core/model/protocol/LiftProtocol.java
+++ b/src/main/java/com/zy/core/model/protocol/LiftProtocol.java
@@ -115,7 +115,14 @@
     /**
      * 浣滀笟鏍囪
      */
-    private Boolean pakMk = true;
+    private Boolean pakMk = false;
+
+    /**
+     * 鐙崰浠ょ墝
+     * 鏈浠诲姟鍗犳嵁锛屼护鐗屼负0
+     * 琚换鍔″崰鎹紝灏嗕换鍔″彿璧嬪�肩粰浠ょ墝
+     */
+    private Integer token = 0;
 
     /**
      * 浠诲姟鍛戒护
@@ -140,20 +147,22 @@
 
     // 鏄惁澶勪簬绌洪棽寰呭懡鐘舵��
     public Boolean isIdle(Short taskNo) {
-        if(this.taskNo == null
-                || this.busy == null
+        if(this.busy == null
                 || this.model == null
                 || this.deviceError == null
                 || this.pakMk == null
+                || this.token == null
         ){
             return false;
         }
 
-        boolean res = (this.taskNo == 0 || this.taskNo.intValue() == taskNo.intValue())
-                && !this.busy
+        boolean res =
+//                (this.taskNo.equals(this.completeTaskNo) || this.taskNo.intValue() == taskNo.intValue())
+                !this.busy
                 && this.model
-                && this.pakMk.equals(true)
+                && !this.pakMk
                 && !this.deviceError
+                && this.protocolStatusType.equals(LiftProtocolStatusType.IDLE)
                 ;
         return res;
     }
@@ -165,23 +174,26 @@
                 || this.model == null
                 || this.deviceError == null
                 || this.pakMk == null
+                || this.token == null
         ){
             return false;
         }
 
-        boolean res = this.taskNo == 0
-                && !this.busy
+        boolean res =
+//                this.taskNo.equals(this.completeTaskNo)
+                !this.busy
                 && this.model
-                && this.pakMk.equals(true)
+                && !this.pakMk
                 && !this.deviceError
+                && this.token == 0
+                && this.protocolStatusType.equals(LiftProtocolStatusType.IDLE)
                 ;
         return res;
     }
 
     // 鏄惁澶勪簬绌洪棽寰呭懡鐘舵�侊紝涓嶅垽鏂换鍔″彿
     public Boolean isIdleNoTask() {
-        if(this.taskNo == null
-                || this.busy == null
+        if(this.busy == null
                 || this.model == null
                 || this.deviceError == null
                 || this.pakMk == null
@@ -191,7 +203,7 @@
 
         boolean res = !this.busy
                 && this.model
-                && this.pakMk.equals(true)
+                && !this.pakMk
                 && !this.deviceError
                 ;
         return res;

--
Gitblit v1.9.1