From c08e857d010676d45ff5f4fc022613b974563d43 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期二, 04 四月 2023 14:58:41 +0800
Subject: [PATCH] 提升机和四向穿梭车入库出优化
---
src/main/java/com/zy/core/model/protocol/ShuttleProtocol.java | 37 +++++++++++++++++++++++++++++++++++++
1 files changed, 37 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 8e407ec..e29ec7d 100644
--- a/src/main/java/com/zy/core/model/protocol/ShuttleProtocol.java
+++ b/src/main/java/com/zy/core/model/protocol/ShuttleProtocol.java
@@ -1,7 +1,9 @@
package com.zy.core.model.protocol;
import com.core.common.SpringUtils;
+import com.zy.asrs.entity.LocMast;
import com.zy.asrs.service.BasShuttleService;
+import com.zy.asrs.service.LocMastService;
import com.zy.core.News;
import com.zy.core.enums.ShuttleErrorCodeType;
import com.zy.core.enums.ShuttleProtocolStatusType;
@@ -228,4 +230,39 @@
}
}
+ // 鏄惁澶勪簬绌洪棽寰呭懡鐘舵�侊紝浼犲叆鐨則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 String getCurrentLocNo() {
+ LocMastService locMastService = SpringUtils.getBean(LocMastService.class);
+ if (locMastService == null) {
+ return null;
+ }
+ //婧愬簱浣�(灏忚溅褰撳墠浣嶇疆)
+ LocMast currentLocMast = locMastService.queryByQrCode(this.currentCode.toString());
+ if (currentLocMast == null) {
+ return null;
+ }
+ return currentLocMast.getLocNo();
+ }
+
}
--
Gitblit v1.9.1