From cfb75c26838c2e8dacf663e4083484f3b1047ca1 Mon Sep 17 00:00:00 2001 From: Junjie <fallin.jie@qq.com> Date: 星期四, 06 四月 2023 16:57:47 +0800 Subject: [PATCH] 四向穿梭车地图楼层切换后,显示楼层效果 --- src/main/java/com/zy/core/model/protocol/ShuttleProtocol.java | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 42 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 d370e72..302507e 100644 --- a/src/main/java/com/zy/core/model/protocol/ShuttleProtocol.java +++ b/src/main/java/com/zy/core/model/protocol/ShuttleProtocol.java @@ -230,6 +230,48 @@ } } + // 鏄惁澶勪簬绌洪棽寰呭懡鐘舵�侊紝浼犲叆鐨則askNo鍜屽綋鍓峵askNo鐩稿悓鏃跺厑璁告斁琛� + public Boolean isIdle(Short taskNo) { + boolean res = this.busyStatusType.equals(ShuttleStatusType.IDLE) + && this.pakMk.equals(true) + && this.errorCodeType.equals(ShuttleErrorCodeType.NORMAL) + && (this.taskNo == 0 || this.taskNo == taskNo) + ; + 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 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