From 94860d0ab6d9fedf9413b2083eb9af17d8bd7d54 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期三, 28 九月 2022 13:44:11 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/core/model/protocol/SteProtocol.java |   29 ++++++++++++++++++++++++++++-
 1 files changed, 28 insertions(+), 1 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 a3d2bf6..0b6a91a 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,11 @@
      */
     public Short crnAllowRun;
 
+    /**
+     * 鍏呯數鐘舵��  1锛氬湪鍏呯數锛�0锛氫笉鍦ㄥ厖鐢�
+     */
+    private Short chargeStatus;
+
     public void setStatus(Short status){
         this.status = status;
         this.statusType = SteStatusType.get(status);
@@ -247,7 +252,10 @@
     public Boolean isIdle() {
         boolean res = this.statusType.equals(SteStatusType.IDLE)
                 && this.pakMk.equals("N")
-                && !isAlarm();
+                && !isAlarm()
+                && this.chargeStatus == 0
+                && isEnable()
+                ;
         if (!res) {
             return res;
         } else {
@@ -267,4 +275,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