From 5b5bf0d3fb08926b700b9d9ef127eb86d3241725 Mon Sep 17 00:00:00 2001
From: TQS <56479841@qq.com>
Date: 星期三, 16 四月 2025 15:09:12 +0800
Subject: [PATCH] 添加小车定位失败日志打印
---
src/main/java/com/zy/core/model/protocol/SteProtocol.java | 44 ++++++++++++++++++++++++++++++++++++++++----
1 files changed, 40 insertions(+), 4 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 c2c8f60..cda2621 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;
@@ -23,6 +24,7 @@
private Short steNo;
/**
+ * -1 = 绂荤嚎
* 1 = 鑱旀満妯″紡
* 0 = 鑴辨満妯″紡
*/
@@ -185,6 +187,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,7 +242,7 @@
basSte.setSteErr(alarm.longValue());
}
basSte.setWrkNo(taskNo.intValue());
- if (basSte.getPakMk().equals("N")) {
+// if (basSte.getPakMk().equals("N")) {
// if (!Cools.isEmpty(row)) {
// basSte.setRow(row.intValue());
// }
@@ -239,7 +252,7 @@
// if (!Cools.isEmpty(lev)) {
// basSte.setLev(lev.intValue());
// }
- }
+// }
return basSte;
}
@@ -247,7 +260,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 {
@@ -256,7 +273,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;
}
}
@@ -267,4 +284,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