自动化立体仓库 - WCS系统
#
luxiaotao1123
2022-11-24 ec25a39ab1d455e8c38e043ccdf2172139462068
src/main/java/com/zy/core/model/protocol/SteProtocol.java
@@ -185,6 +185,17 @@
     */
    public Short crnAllowRun;
    /**
     * 充电状态  1:在充电;0:不在充电
     */
    private Short chargeStatus;
    // 入库取空
    private Boolean inEmpty;
    // 出库取空
    private Boolean outEmpty;
    public void setStatus(Short status){
        this.status = status;
        this.statusType = SteStatusType.get(status);
@@ -246,8 +257,12 @@
    // 是否处于空闲待命状态
    public Boolean isIdle() {
        boolean res = this.statusType.equals(SteStatusType.IDLE)
                && this.mode == 1
                && this.pakMk.equals("N")
                && !isAlarm();
                && !isAlarm()
                && this.chargeStatus == 0
                && isEnable()
                ;
        if (!res) {
            return res;
        } else {
@@ -267,4 +282,23 @@
        return this.alarm > 1;
    }
    public Boolean isEnable() {
        if (Cools.isEmpty(row)) {
            if (row == 0) {
                return false;
            }
        }
        if (Cools.isEmpty(bay)) {
            if (bay == 0) {
                return false;
            }
        }
        if (Cools.isEmpty(lev)) {
            if (lev == 0) {
                return false;
            }
        }
        return true;
    }
}