From acabc19b58ebdfd71fdd3e9a279989005e7c9e79 Mon Sep 17 00:00:00 2001
From: TQS <56479841@qq.com>
Date: 星期五, 02 十二月 2022 15:16:45 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/core/model/protocol/SteProtocol.java |   56 ++++++++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 46 insertions(+), 10 deletions(-)

diff --git a/src/main/java/com/zy/core/model/protocol/SteProtocol.java b/src/main/java/com/zy/core/model/protocol/SteProtocol.java
index 726504c..76fb48b 100644
--- a/src/main/java/com/zy/core/model/protocol/SteProtocol.java
+++ b/src/main/java/com/zy/core/model/protocol/SteProtocol.java
@@ -185,6 +185,17 @@
      */
     public Short crnAllowRun;
 
+    /**
+     * 鍏呯數鐘舵��  1锛氬湪鍏呯數锛�0锛氫笉鍦ㄥ厖鐢�
+     */
+    private Short chargeStatus;
+
+    // 鍏ュ簱鍙栫┖
+    private Boolean inEmpty;
+
+    // 鍑哄簱鍙栫┖
+    private Boolean outEmpty;
+
     public void setStatus(Short status){
         this.status = status;
         this.statusType = SteStatusType.get(status);
@@ -229,15 +240,17 @@
             basSte.setSteErr(alarm.longValue());
         }
         basSte.setWrkNo(taskNo.intValue());
-        if (!Cools.isEmpty(row)) {
-            basSte.setRow(row.intValue());
-        }
-        if (!Cools.isEmpty(bay)) {
-            basSte.setBay(bay.intValue());
-        }
-        if (!Cools.isEmpty(lev)) {
-            basSte.setLev(lev.intValue());
-        }
+//        if (basSte.getPakMk().equals("N")) {
+//            if (!Cools.isEmpty(row)) {
+//                basSte.setRow(row.intValue());
+//            }
+//            if (!Cools.isEmpty(bay)) {
+//                basSte.setBay(bay.intValue());
+//            }
+//            if (!Cools.isEmpty(lev)) {
+//                basSte.setLev(lev.intValue());
+//            }
+//        }
         return basSte;
     }
 
@@ -245,7 +258,11 @@
     public Boolean isIdle() {
         boolean res = this.statusType.equals(SteStatusType.IDLE)
                 && this.pakMk.equals("N")
-                && !isAlarm();
+                && !isAlarm()
+                && this.chargeStatus == 0
+                && isEnable()
+                && this.getMode()==1
+                ;
         if (!res) {
             return res;
         } else {
@@ -265,4 +282,23 @@
         return this.alarm > 1;
     }
 
+    public Boolean isEnable() {
+        if (Cools.isEmpty(row)) {
+            if (row == 0) {
+                return false;
+            }
+        }
+        if (Cools.isEmpty(bay)) {
+            if (bay == 0) {
+                return false;
+            }
+        }
+        if (Cools.isEmpty(lev)) {
+            if (lev == 0) {
+                return false;
+            }
+        }
+        return true;
+    }
+
 }

--
Gitblit v1.9.1