自动化立体仓库 - WCS系统
Junjie
2023-04-04 c08e857d010676d45ff5f4fc022613b974563d43
src/main/java/com/zy/core/model/protocol/ShuttleProtocol.java
@@ -230,6 +230,27 @@
        }
    }
    // 是否处于空闲待命状态,传入的taskNo和当前taskNo相同时允许放行
    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);