From a28d328cdad3ff4599e11e68fa3975d86fb3dd3e Mon Sep 17 00:00:00 2001
From: TQS <56479841@qq.com>
Date: 星期三, 22 二月 2023 17:22:27 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/core/model/protocol/SteProtocol.java | 33 +++++++++++++++++++++++++++++++--
1 files changed, 31 insertions(+), 2 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 201d49d..6e65744 100644
--- a/src/main/java/com/zy/core/model/protocol/SteProtocol.java
+++ b/src/main/java/com/zy/core/model/protocol/SteProtocol.java
@@ -4,6 +4,7 @@
import com.core.common.SpringUtils;
import com.zy.asrs.entity.BasSte;
import com.zy.asrs.service.BasSteService;
+import com.zy.common.utils.News;
import com.zy.core.enums.SteHisTaskStatusType;
import com.zy.core.enums.SteLocaType;
import com.zy.core.enums.SteStatusType;
@@ -190,6 +191,12 @@
*/
private Short chargeStatus;
+ // 鍏ュ簱鍙栫┖
+ private Boolean inEmpty;
+
+ // 鍑哄簱鍙栫┖
+ private Boolean outEmpty;
+
public void setStatus(Short status){
this.status = status;
this.statusType = SteStatusType.get(status);
@@ -253,7 +260,10 @@
boolean res = this.statusType.equals(SteStatusType.IDLE)
&& this.pakMk.equals("N")
&& !isAlarm()
- && this.chargeStatus == 0;
+ && this.chargeStatus == 0
+ && isEnable()
+ && this.getMode()==1
+ ;
if (!res) {
return res;
} else {
@@ -262,7 +272,7 @@
String chargeLine = SpringUtils.getBean(BasSteService.class).selectById(this.steNo).getChargeLine();
return charge > Float.parseFloat(chargeLine);
} catch (Exception e) {
- log.error("fail", e);
+ News.error("fail", e);
return false;
}
}
@@ -273,4 +283,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