|  |  |  | 
|---|
|  |  |  | package com.zy.asrs.domain.vo; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.zy.core.enums.ShuttleErrorCodeType; | 
|---|
|  |  |  | import com.zy.core.enums.ShuttleProtocolStatusType; | 
|---|
|  |  |  | import com.zy.core.enums.ShuttleStatusType; | 
|---|
|  |  |  | import lombok.Data; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | private Integer shuttleNo; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 状态 | 
|---|
|  |  |  | private String status = "-"; | 
|---|
|  |  |  | private Integer status; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //四向穿梭车忙装填 | 
|---|
|  |  |  | private String busyStatus = "-"; | 
|---|
|  |  |  | 
|---|
|  |  |  | * 0为空 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Short currentCode; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 当前库位号 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private String locNo; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 库位号-X | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private int locNoX; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 库位号-Y | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private int locNoY; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 当前库位层高 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private int locNoLev; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 电池电量 | 
|---|
|  |  |  | 
|---|
|  |  |  | private Short plcOutputStatusIO; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 错误信息码 | 
|---|
|  |  |  | * Plc输出状态IO-顶升位 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Short statusErrorCode; | 
|---|
|  |  |  | private Boolean plcOutputLift; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 错误信息码枚举 | 
|---|
|  |  |  | * Plc输出状态IO-换向位 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private ShuttleErrorCodeType errorCodeType; | 
|---|
|  |  |  | private Boolean plcOutputTransfer; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * Plc输出状态IO-抱闸位 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Boolean plcOutputBrake; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * Plc输出状态IO-充电位 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Boolean plcOutputCharge; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 错误信息码 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private String statusErrorCode; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * PLC输入状态 | 
|---|
|  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 当前的电压值 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private Short currentVoltage; | 
|---|
|  |  |  | private Integer currentVoltage; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 当前的模拟量值 | 
|---|
|  |  |  | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public String loca = "-"; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getErrorCode$() { | 
|---|
|  |  |  | if(this.errorCodeType == null) return null; | 
|---|
|  |  |  | return this.errorCodeType.desc; | 
|---|
|  |  |  | public String getPlcOutputLift$() { | 
|---|
|  |  |  | if (this.plcOutputLift == null) { | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return this.plcOutputLift ? "Y" : "N"; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public void setStatusErrorCode(Short statusErrorCode) { | 
|---|
|  |  |  | this.statusErrorCode = statusErrorCode; | 
|---|
|  |  |  | this.errorCodeType = ShuttleErrorCodeType.get(statusErrorCode); | 
|---|
|  |  |  | public String getPlcOutputTransfer$() { | 
|---|
|  |  |  | if (this.plcOutputTransfer == null) { | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return this.plcOutputTransfer ? "Y" : "N"; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public void setStatusErrorCode(ShuttleErrorCodeType type) { | 
|---|
|  |  |  | this.statusErrorCode = type.id.shortValue(); | 
|---|
|  |  |  | this.errorCodeType = type; | 
|---|
|  |  |  | 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"; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|