| | |
| | | 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; |
| | | |
| | | @Data |
| | |
| | | private Integer shuttleNo; |
| | | |
| | | // 状态 |
| | | private String status = "-"; |
| | | private Integer status; |
| | | |
| | | // 有物 |
| | | private String loading = "-"; |
| | | //四向穿梭车忙装填 |
| | | private String busyStatus = "-"; |
| | | |
| | | /** |
| | | * 小车忙状态位枚举 |
| | | */ |
| | | private ShuttleStatusType busyStatusType; |
| | | |
| | | /** |
| | | * 任务号 |
| | | */ |
| | | public Integer taskNo; |
| | | |
| | | // 正在执行任务 |
| | | private String execute; |
| | | /** |
| | | * 当前二维码 |
| | | * 0为空 |
| | | */ |
| | | private Short currentCode; |
| | | |
| | | // 任务完成,等待WCS确认 |
| | | private String waiting; |
| | | /** |
| | | * 当前库位号 |
| | | */ |
| | | private String locNo; |
| | | |
| | | // 排 |
| | | private Short row; |
| | | /** |
| | | * 库位号-X |
| | | */ |
| | | private int locNoX; |
| | | |
| | | // 列 |
| | | private Short bay; |
| | | /** |
| | | * 库位号-Y |
| | | */ |
| | | private int locNoY; |
| | | |
| | | // 层 |
| | | private Short lev; |
| | | |
| | | // 异常码1 |
| | | private String alarm1 = "-"; |
| | | |
| | | // 异常码2 |
| | | private String alarm2 = "-"; |
| | | /** |
| | | * 当前库位层高 |
| | | */ |
| | | private int locNoLev; |
| | | |
| | | /** |
| | | * 电池电量 |
| | |
| | | public String batteryPower = "-"; |
| | | |
| | | /** |
| | | * 当前速度 |
| | | * 电池温度 |
| | | */ |
| | | public Short speed; |
| | | public String batteryTemp = "-"; |
| | | |
| | | /** |
| | | * 错误编号 |
| | | */ |
| | | private String errorCode; |
| | | |
| | | /** |
| | | * Plc输出状态IO |
| | | */ |
| | | private Short plcOutputStatusIO; |
| | | |
| | | /** |
| | | * Plc输出状态IO-顶升位 |
| | | */ |
| | | private Boolean plcOutputLift; |
| | | |
| | | /** |
| | | * Plc输出状态IO-换向位 |
| | | */ |
| | | private Boolean plcOutputTransfer; |
| | | |
| | | /** |
| | | * Plc输出状态IO-抱闸位 |
| | | */ |
| | | private Boolean plcOutputBrake; |
| | | |
| | | /** |
| | | * Plc输出状态IO-充电位 |
| | | */ |
| | | private Boolean plcOutputCharge; |
| | | |
| | | /** |
| | | * 错误信息码 |
| | | */ |
| | | private String statusErrorCode; |
| | | |
| | | /** |
| | | * 错误信息码枚举 |
| | | */ |
| | | private ShuttleErrorCodeType errorCodeType; |
| | | |
| | | /** |
| | | * PLC输入状态 |
| | | */ |
| | | private Short plcInputStatus; |
| | | |
| | | /** |
| | | * 当前或者之前读到的二维码值 |
| | | */ |
| | | private Short currentOrBeforeCode; |
| | | |
| | | /** |
| | | * 读到的二维码X方向偏移量 |
| | | */ |
| | | private Short codeOffsetX; |
| | | |
| | | /** |
| | | * 读到的二维码Y方向偏移量 |
| | | */ |
| | | private Short codeOffsetY; |
| | | |
| | | /** |
| | | * 当前的电压值 |
| | | */ |
| | | private Integer currentVoltage; |
| | | |
| | | /** |
| | | * 当前的模拟量值 |
| | | */ |
| | | private Short currentAnalogValue; |
| | | |
| | | /** |
| | | * 当前的升降伺服速度 |
| | | */ |
| | | private Short currentLiftServoSpeed; |
| | | |
| | | /** |
| | | * 当前的行走伺服速度 |
| | | */ |
| | | private Short currentMoveServoSpeed; |
| | | |
| | | /** |
| | | * 当前的升降伺服负载率 |
| | | */ |
| | | private Short currentLiftServoLoad; |
| | | |
| | | /** |
| | | * 当前的行走伺服负载率 |
| | | */ |
| | | private Short currentMoveServoLoad; |
| | | |
| | | /** |
| | | * 充电状态 |
| | |
| | | */ |
| | | public String loca = "-"; |
| | | |
| | | public String getErrorCode$() { |
| | | if(this.errorCodeType == null) return null; |
| | | return this.errorCodeType.desc; |
| | | } |
| | | |
| | | public void setErrorCode(Short errorCode) { |
| | | this.errorCode = ShuttleErrorCodeType.get(errorCode.intValue()).desc; |
| | | this.errorCodeType = ShuttleErrorCodeType.get(errorCode.intValue()); |
| | | } |
| | | |
| | | 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$() { |
| | | if (this.plcOutputCharge == null) { |
| | | return null; |
| | | } |
| | | 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"; |
| | | } |
| | | |
| | | } |