From 54374a97aa4daab8802552338252827b76bd800b Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期一, 02 一月 2023 08:34:12 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/core/model/protocol/SteProtocol.java | 28 ++++++++++++----------------
1 files changed, 12 insertions(+), 16 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 42515cc..4d64bbb 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.core.News;
import com.zy.core.enums.SteHisTaskStatusType;
import com.zy.core.enums.SteLocaType;
import com.zy.core.enums.SteStatusType;
@@ -69,6 +70,12 @@
* 鐢垫睜鐢甸噺
*/
public Float charge = 0.0F;
+
+ public void setCharge(Float charge) {
+ if (charge >= 0) {
+ this.charge = charge;
+ }
+ }
/**
* 婊$數
@@ -257,6 +264,7 @@
// 鏄惁澶勪簬绌洪棽寰呭懡鐘舵��
public Boolean isIdle() {
boolean res = this.statusType.equals(SteStatusType.IDLE)
+ && this.mode == 1
&& this.pakMk.equals("N")
&& !isAlarm()
&& this.chargeStatus == 0
@@ -270,7 +278,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;
}
}
@@ -282,22 +290,10 @@
}
public Boolean isEnable() {
- if (Cools.isEmpty(row)) {
- if (row == 0) {
- return false;
- }
+ if (Cools.isEmpty(row, bay, lev)) {
+ return false;
}
- if (Cools.isEmpty(bay)) {
- if (bay == 0) {
- return false;
- }
- }
- if (Cools.isEmpty(lev)) {
- if (lev == 0) {
- return false;
- }
- }
- return true;
+ return row > 0 && bay > 0 && lev > 0;
}
}
--
Gitblit v1.9.1