#
luxiaotao1123
2024-04-07 bda52da89628d1587ab804510f9995c671a318ca
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/model/protocol/ShuttleProtocol.java
@@ -29,7 +29,7 @@
    /**
     * 四向穿梭车号
     */
    private String shuttleNo;
    private Integer shuttleNo;
    /**
     * 任务号
@@ -89,6 +89,11 @@
     * 是否顶升
     */
    private Boolean hasLift;
    /**
     * 是否有托盘
     */
    private Boolean hasPallet;
    /**
     * 行驶方向
@@ -163,6 +168,11 @@
    private Device device;
    /**
     * 扩展字段
     */
    private Object extend;
    /**
     * 设置小车状态
     */
    public void setProtocolStatus(Integer status) {
@@ -230,6 +240,14 @@
        return this.taskNo == null ? 0 : this.taskNo;
    }
    public void setTaskNo(Integer taskNo) {
        RedisUtil redisUtil = SpringUtils.getBean(RedisUtil.class);
        if (null != redisUtil) {
            redisUtil.set(DeviceRedisConstant.SHUTTLE_FLAG + this.shuttleNo, taskNo);
            this.taskNo = taskNo;
        }
    }
    //通过当前二维码获取当前库位号
    public String getCurrentLocNo() {
        LocService locService = SpringUtils.getBean(LocService.class);
@@ -250,25 +268,6 @@
        }
        return currentLoc.getLocNo();
    }
    // 是否处于空闲待命状态
    public Boolean isIdle() {
        if (this.deviceStatus == null
                || this.pakMk == null
                || this.errorCode == null
                || this.protocolStatus == null
        ) {
            return false;
        }
        boolean res = this.deviceStatus.equals(ShuttleDeviceStatusType.IDLE)
                && this.pakMk
                && !this.errorCode.equals("0")
                && this.getTaskNo() == 0
                && this.protocolStatus.intValue() == ShuttleProtocolStatusType.IDLE.id
                ;
        return res;
    }
}