自动化立体仓库 - WCS系统
Junjie
2023-11-07 6017ff0fac73ee771282f8c4711f20ec9ca67bd7
src/main/java/com/zy/asrs/domain/vo/ShuttleStateTableVo.java
@@ -1,6 +1,10 @@
package com.zy.asrs.domain.vo;
import com.core.common.SpringUtils;
import com.zy.asrs.entity.BasShuttleErr;
import com.zy.asrs.service.BasShuttleErrService;
import com.zy.core.enums.ShuttleErrorCodeType;
import com.zy.core.enums.ShuttleProtocolStatusType;
import com.zy.core.enums.ShuttleStatusType;
import lombok.Data;
@@ -11,7 +15,7 @@
    private Integer shuttleNo;
    // 状态
    private String status = "-";
    private Integer status;
    //四向穿梭车忙装填
    private String busyStatus = "-";
@@ -95,7 +99,7 @@
    /**
     * 错误信息码
     */
    private Short statusErrorCode;
    private String statusErrorCode;
    /**
     * 错误信息码枚举
@@ -125,7 +129,7 @@
    /**
     * 当前的电压值
     */
    private Short currentVoltage;
    private Integer currentVoltage;
    /**
     * 当前的模拟量值
@@ -167,14 +171,35 @@
        return this.errorCodeType.desc;
    }
    public void setStatusErrorCode(Short statusErrorCode) {
        this.statusErrorCode = statusErrorCode;
        this.errorCodeType = ShuttleErrorCodeType.get(statusErrorCode.intValue());
    public void setErrorCode(Short errorCode) {
        this.errorCode = ShuttleErrorCodeType.get(errorCode.intValue()).desc;
        this.errorCodeType = ShuttleErrorCodeType.get(errorCode.intValue());
    }
    public void setStatusErrorCode(ShuttleErrorCodeType type) {
        this.statusErrorCode = type.id.shortValue();
    public void setErrorCode(ShuttleErrorCodeType type) {
        this.errorCode = type.desc;
        this.errorCodeType = type;
    }
    public String getPlcOutputLift$() {
        if (this.plcOutputLift == null) {
            return null;
        }
        return this.plcOutputLift ? "Y" : "N";
    }
    public String getPlcOutputTransfer$() {
        if (this.plcOutputTransfer == null) {
            return null;
        }
        return this.plcOutputTransfer ? "Y" : "N";
    }
    public String getPlcOutputBrake$() {
        if (this.plcOutputBrake == null) {
            return null;
        }
        return this.plcOutputBrake ? "Y" : "N";
    }
    public String getPlcOutputCharge$() {
@@ -184,4 +209,18 @@
        return this.plcOutputCharge ? "Y" : "N";
    }
    public String getStatus$() {
        if (this.status == null) {
            return ShuttleProtocolStatusType.OFFLINE.desc;
        }
        return ShuttleProtocolStatusType.get(this.status).desc;
    }
    public String getCurrentVoltage$() {
        if (this.currentVoltage == null) {
            return "";
        }
        return (this.currentVoltage / 1000.0) + "V";
    }
}