Junjie
2023-06-16 087a7abb6cfd669c7253c823d83e05f6eba78753
src/main/java/com/zy/core/model/protocol/LiftProtocol.java
@@ -1,15 +1,11 @@
package com.zy.core.model.protocol;
import com.core.common.SpringUtils;
import com.zy.asrs.service.BasShuttleService;
import com.zy.core.News;
import com.zy.core.enums.LiftProtocolStatusType;
import com.zy.core.enums.ShuttleErrorCodeType;
import com.zy.core.enums.ShuttleProtocolStatusType;
import com.zy.core.enums.ShuttleStatusType;
import com.zy.core.model.command.LiftAssignCommand;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import java.util.Date;
/**
 * 提升机
@@ -22,6 +18,11 @@
     * 提升机号
     */
    private Short liftNo;
    /**
     * 提升机内部二维码
     */
    private Short barcode = 1699;
    /**
     * 任务号
@@ -190,9 +191,39 @@
    private Boolean pakMk = true;
    /**
     * 四向穿梭车调度提升机时,需要锁定此标记
     */
    private Boolean securityMk = false;
    /**
     * 任务命令
     */
    private LiftAssignCommand assignCommand;
    /**
     * 出入库模式,1:入库,2:出库
     */
    private Integer outInModel;
    /**
     * 出入库模式起始站点
     */
    private Integer startSta;
    /**
     * 出入库模式目标站点
     */
    private Integer distSta;
    /**
     * 出入库模式步数
     */
    private Integer outInModelStep;
    /**
     * 工作时间
     */
    private Date wrkTime;
    public Short getLiftLockShortValue() {
        return liftLock ? (short) 1 : (short) 0;
@@ -216,12 +247,23 @@
    // 是否处于空闲待命状态
    public Boolean isIdle() {
        if(this.taskNo == null
                || this.liftLock == null
                || this.ready == null
                || this.running == null
                || this.mode == null
                || this.pakMk == null
        ){
            return false;
        }
        boolean res = this.taskNo == 0
                && !this.liftLock
                && this.ready
//                && this.ready
                && !this.running
                && this.mode
                && this.pakMk.equals(true)
                && !this.securityMk
                ;
        return res;
    }