From 0b83448133a1af459273318bc5b0c2a4bc6e0448 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期六, 08 四月 2023 17:09:14 +0800
Subject: [PATCH] 四向穿梭车逻辑优化
---
src/main/java/com/zy/core/model/protocol/ShuttleProtocol.java | 47 +++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 47 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/zy/core/model/protocol/ShuttleProtocol.java b/src/main/java/com/zy/core/model/protocol/ShuttleProtocol.java
index e29ec7d..4092680 100644
--- a/src/main/java/com/zy/core/model/protocol/ShuttleProtocol.java
+++ b/src/main/java/com/zy/core/model/protocol/ShuttleProtocol.java
@@ -39,6 +39,12 @@
*/
private Integer protocolStatus;
+// /**
+// * 灏忚溅褰撳墠鏄惁鏈夎揣
+// * true:鏈夎揣锛宖alse锛氭棤璐�
+// */
+// private Boolean loading = false;
+
/**
* 褰撳墠灏忚溅鐘舵�佹灇涓�
*/
@@ -96,6 +102,26 @@
* Plc杈撳嚭鐘舵�両O
*/
private Short plcOutputStatusIO;
+
+ /**
+ * Plc杈撳嚭鐘舵�両O-椤跺崌浣�
+ */
+ private Boolean plcOutputLift;
+
+ /**
+ * Plc杈撳嚭鐘舵�両O-鎹㈠悜浣�
+ */
+ private Boolean plcOutputTransfer;
+
+ /**
+ * Plc杈撳嚭鐘舵�両O-鎶遍椄浣�
+ */
+ private Boolean plcOutputBrake;
+
+ /**
+ * Plc杈撳嚭鐘舵�両O-鍏呯數浣�
+ */
+ private Boolean plcOutputCharge;
/**
* 閿欒淇℃伅鐮�
@@ -251,6 +277,27 @@
}
}
+ // 鏄惁婊¤冻鍏呯數鐘舵��
+ public Boolean isRequireCharge() {
+ boolean res = this.busyStatusType.equals(ShuttleStatusType.IDLE)
+ && this.pakMk.equals(true)
+ && this.errorCodeType.equals(ShuttleErrorCodeType.NORMAL)
+ && this.taskNo == 0
+ ;
+ if (!res) {
+ return res;
+ } else {
+ // 鐢甸噺
+ try {
+ Integer chargeLine = SpringUtils.getBean(BasShuttleService.class).selectById(this.shuttleNo).getChargeLine();
+ return this.getBatteryPower$() < chargeLine;
+ } catch (Exception e) {
+ News.error("fail", e);
+ return false;
+ }
+ }
+ }
+
//閫氳繃褰撳墠浜岀淮鐮佽幏鍙栧綋鍓嶅簱浣嶅彿
public String getCurrentLocNo() {
LocMastService locMastService = SpringUtils.getBean(LocMastService.class);
--
Gitblit v1.9.1