From 39a7c54ceffb921258ac0148f58ccea60da0c87e Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期四, 06 四月 2023 14:03:42 +0800
Subject: [PATCH] 充电逻辑
---
src/main/java/com/zy/core/model/protocol/ShuttleProtocol.java | 21 +++++++++++++++++++++
1 files changed, 21 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..302507e 100644
--- a/src/main/java/com/zy/core/model/protocol/ShuttleProtocol.java
+++ b/src/main/java/com/zy/core/model/protocol/ShuttleProtocol.java
@@ -251,6 +251,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