Junjie
2023-12-19 599d236a9e81bfc65566ea3553d8c59d4e6a3136
src/main/java/com/zy/core/model/protocol/LiftProtocol.java
@@ -130,6 +130,11 @@
    private LiftAssignCommand assignCommand;
    /**
     * 指令下发时间
     */
    private Long sendTime = 0L;
    /**
     * 设置提升机状态
     */
    public void setProtocolStatus(Integer status) {
@@ -147,20 +152,22 @@
    // 是否处于空闲待命状态
    public Boolean isIdle(Short taskNo) {
        if(this.taskNo == null
                || this.busy == null
        if(this.busy == null
                || this.model == null
                || this.deviceError == null
                || this.pakMk == null
                || this.token == null
        ){
            return false;
        }
        boolean res = (this.taskNo == 0 || this.taskNo.intValue() == taskNo.intValue())
                && !this.busy
        boolean res =
//                (this.taskNo.equals(this.completeTaskNo) || this.taskNo.intValue() == taskNo.intValue())
                !this.busy
                && this.model
                && !this.pakMk
                && !this.deviceError
                && this.protocolStatusType.equals(LiftProtocolStatusType.IDLE)
                ;
        return res;
    }
@@ -177,12 +184,14 @@
            return false;
        }
        boolean res = this.taskNo == 0
                && !this.busy
        boolean res =
//                this.taskNo.equals(this.completeTaskNo)
                !this.busy
                && this.model
                && !this.pakMk
                && !this.deviceError
                && this.token == 0
                && this.protocolStatusType.equals(LiftProtocolStatusType.IDLE)
                ;
        return res;
    }