From 0f78d17f6bc34d2864b2822b455a275f3b5fa81d Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期二, 20 九月 2022 15:05:05 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/core/model/protocol/SteProtocol.java | 41 ++++++++++++++++++++++++++++++++---------
1 files changed, 32 insertions(+), 9 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 8b0c9d6..cab04bd 100644
--- a/src/main/java/com/zy/core/model/protocol/SteProtocol.java
+++ b/src/main/java/com/zy/core/model/protocol/SteProtocol.java
@@ -1,5 +1,6 @@
package com.zy.core.model.protocol;
+import com.core.common.Cools;
import com.zy.asrs.entity.BasSte;
import com.zy.core.enums.SteHisTaskStatusType;
import com.zy.core.enums.SteLocaType;
@@ -34,6 +35,11 @@
public SteStatusType statusType;
/**
+ * 浠诲姟鍙�
+ */
+ public Short taskNo = 0;
+
+ /**
* 姝e湪鎵ц浠诲姟
*/
public Boolean execute;
@@ -58,7 +64,7 @@
/**
* 鐢垫睜鐢甸噺
*/
- public Float charge;
+ public Float charge = 0.0F;
/**
* 婊$數
@@ -75,7 +81,6 @@
*/
public Short feed;
-
/**
* 褰撳墠浣嶇疆 1锛岃繎鐐癸紝2杩滅偣锛�3A鐐癸紝4B鐐�
*/
@@ -91,7 +96,7 @@
/**
* 褰撳墠閫熷害
*/
- public Double speed;
+ public Double speed = 0.0D;
/**
* 楂樹綆浣� 0锛屼綆浣嶏紝1楂樹綅
@@ -107,11 +112,6 @@
* 鍦ㄨ建閬撲笂 0涓嶅湪锛�1鍦�
*/
public Short track;
-
- /**
- * 浠诲姟鍙�
- */
- public Integer taskNo = 0;
/**
* 浠诲姟绫诲瀷
@@ -218,12 +218,35 @@
*/
private String lastIo = "I";
+ private String pakMk = "-";
public BasSte toSqlModel(BasSte basSte){
if (alarm!=null) {
basSte.setSteErr(alarm.longValue());
}
- basSte.setWrkNo(taskNo);
+ 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());
+ }
return basSte;
}
+
+ // 鏄惁澶勪簬绌洪棽寰呭懡鐘舵��
+ public Boolean isIdle() {
+ return this.statusType.equals(SteStatusType.IDLE)
+ && this.pakMk.equals("N")
+ && !isAlarm();
+ }
+
+ // 鏄惁澶勪簬鎶ヨ鐘舵��
+ public Boolean isAlarm() {
+ return this.alarm > 1;
+ }
+
}
--
Gitblit v1.9.1