package com.qianwen.smartman.modules.dmpLog.vo;
|
|
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModelProperty;
|
import java.util.Date;
|
import com.qianwen.smartman.common.constant.DateConstant;
|
import com.qianwen.smartman.common.enums.WorkstationParamStateEnum;
|
import com.qianwen.core.tool.utils.DateUtil;
|
import com.qianwen.smartman.modules.dmpLog.enums.LogTypeEnum;
|
|
@ApiModel("dmp日志")
|
public class DmpLogVo {
|
private String traceId;
|
@ApiModelProperty("类型")
|
private Integer type;
|
@ApiModelProperty("设备编号")
|
private String machineCode;
|
@ApiModelProperty("设备名称")
|
private String machineName;
|
@ApiModelProperty("采集项")
|
private String affectedVariable;
|
@ApiModelProperty("采集值")
|
private String variableValue;
|
@ApiModelProperty("状态")
|
private Integer status;
|
@ApiModelProperty("类型名称")
|
private String typeStr;
|
@ApiModelProperty("状态名称")
|
private String statusStr;
|
private Long ts;
|
|
public void setTraceId(final String traceId) {
|
this.traceId = traceId;
|
}
|
|
public void setType(final Integer type) {
|
this.type = type;
|
}
|
|
public void setMachineCode(final String machineCode) {
|
this.machineCode = machineCode;
|
}
|
|
public void setMachineName(final String machineName) {
|
this.machineName = machineName;
|
}
|
|
public void setAffectedVariable(final String affectedVariable) {
|
this.affectedVariable = affectedVariable;
|
}
|
|
public void setVariableValue(final String variableValue) {
|
this.variableValue = variableValue;
|
}
|
|
public void setStatus(final Integer status) {
|
this.status = status;
|
}
|
|
public void setTypeStr(final String typeStr) {
|
this.typeStr = typeStr;
|
}
|
|
public void setStatusStr(final String statusStr) {
|
this.statusStr = statusStr;
|
}
|
|
public void setTs(final Long ts) {
|
this.ts = ts;
|
}
|
|
public boolean equals(final Object o) {
|
if (o == this) {
|
return true;
|
}
|
if (o instanceof DmpLogVo) {
|
DmpLogVo other = (DmpLogVo) o;
|
if (other.canEqual(this)) {
|
Object this$type = getType();
|
Object other$type = other.getType();
|
if (this$type == null) {
|
if (other$type != null) {
|
return false;
|
}
|
} else if (!this$type.equals(other$type)) {
|
return false;
|
}
|
Object this$status = getStatus();
|
Object other$status = other.getStatus();
|
if (this$status == null) {
|
if (other$status != null) {
|
return false;
|
}
|
} else if (!this$status.equals(other$status)) {
|
return false;
|
}
|
Object this$ts = getTs();
|
Object other$ts = other.getTs();
|
if (this$ts == null) {
|
if (other$ts != null) {
|
return false;
|
}
|
} else if (!this$ts.equals(other$ts)) {
|
return false;
|
}
|
Object this$traceId = getTraceId();
|
Object other$traceId = other.getTraceId();
|
if (this$traceId == null) {
|
if (other$traceId != null) {
|
return false;
|
}
|
} else if (!this$traceId.equals(other$traceId)) {
|
return false;
|
}
|
Object this$machineCode = getMachineCode();
|
Object other$machineCode = other.getMachineCode();
|
if (this$machineCode == null) {
|
if (other$machineCode != null) {
|
return false;
|
}
|
} else if (!this$machineCode.equals(other$machineCode)) {
|
return false;
|
}
|
Object this$machineName = getMachineName();
|
Object other$machineName = other.getMachineName();
|
if (this$machineName == null) {
|
if (other$machineName != null) {
|
return false;
|
}
|
} else if (!this$machineName.equals(other$machineName)) {
|
return false;
|
}
|
Object this$affectedVariable = getAffectedVariable();
|
Object other$affectedVariable = other.getAffectedVariable();
|
if (this$affectedVariable == null) {
|
if (other$affectedVariable != null) {
|
return false;
|
}
|
} else if (!this$affectedVariable.equals(other$affectedVariable)) {
|
return false;
|
}
|
Object this$variableValue = getVariableValue();
|
Object other$variableValue = other.getVariableValue();
|
if (this$variableValue == null) {
|
if (other$variableValue != null) {
|
return false;
|
}
|
} else if (!this$variableValue.equals(other$variableValue)) {
|
return false;
|
}
|
Object this$typeStr = getTypeStr();
|
Object other$typeStr = other.getTypeStr();
|
if (this$typeStr == null) {
|
if (other$typeStr != null) {
|
return false;
|
}
|
} else if (!this$typeStr.equals(other$typeStr)) {
|
return false;
|
}
|
Object this$statusStr = getStatusStr();
|
Object other$statusStr = other.getStatusStr();
|
return this$statusStr == null ? other$statusStr == null : this$statusStr.equals(other$statusStr);
|
}
|
return false;
|
}
|
return false;
|
}
|
|
protected boolean canEqual(final Object other) {
|
return other instanceof DmpLogVo;
|
}
|
|
public int hashCode() {
|
Object $type = getType();
|
int result = (1 * 59) + ($type == null ? 43 : $type.hashCode());
|
Object $status = getStatus();
|
int result2 = (result * 59) + ($status == null ? 43 : $status.hashCode());
|
Object $ts = getTs();
|
int result3 = (result2 * 59) + ($ts == null ? 43 : $ts.hashCode());
|
Object $traceId = getTraceId();
|
int result4 = (result3 * 59) + ($traceId == null ? 43 : $traceId.hashCode());
|
Object $machineCode = getMachineCode();
|
int result5 = (result4 * 59) + ($machineCode == null ? 43 : $machineCode.hashCode());
|
Object $machineName = getMachineName();
|
int result6 = (result5 * 59) + ($machineName == null ? 43 : $machineName.hashCode());
|
Object $affectedVariable = getAffectedVariable();
|
int result7 = (result6 * 59) + ($affectedVariable == null ? 43 : $affectedVariable.hashCode());
|
Object $variableValue = getVariableValue();
|
int result8 = (result7 * 59) + ($variableValue == null ? 43 : $variableValue.hashCode());
|
Object $typeStr = getTypeStr();
|
int result9 = (result8 * 59) + ($typeStr == null ? 43 : $typeStr.hashCode());
|
Object $statusStr = getStatusStr();
|
return (result9 * 59) + ($statusStr == null ? 43 : $statusStr.hashCode());
|
}
|
|
public String toString() {
|
return "DmpLogVo(traceId=" + getTraceId() + ", type=" + getType() + ", machineCode=" + getMachineCode() + ", machineName=" + getMachineName() + ", affectedVariable=" + getAffectedVariable() + ", variableValue=" + getVariableValue() + ", status=" + getStatus() + ", typeStr=" + getTypeStr() + ", statusStr=" + getStatusStr() + ", ts=" + getTs() + ")";
|
}
|
|
public String getTraceId() {
|
return this.traceId;
|
}
|
|
public Integer getType() {
|
return this.type;
|
}
|
|
public String getMachineCode() {
|
return this.machineCode;
|
}
|
|
public String getMachineName() {
|
return this.machineName;
|
}
|
|
public String getAffectedVariable() {
|
return this.affectedVariable;
|
}
|
|
public String getVariableValue() {
|
return this.variableValue;
|
}
|
|
public Integer getStatus() {
|
return this.status;
|
}
|
|
public String getTypeStr() {
|
LogTypeEnum logType;
|
if (this.type != null && (logType = LogTypeEnum.getValue(this.type)) != null) {
|
return logType.getName();
|
}
|
return null;
|
}
|
|
public String getStatusStr() {
|
WorkstationParamStateEnum stateEnum;
|
if (this.status != null && (stateEnum = WorkstationParamStateEnum.of(this.status)) != null) {
|
return stateEnum.getDescription();
|
}
|
return null;
|
}
|
|
public String getTs() {
|
if (this.ts != null) {
|
return DateUtil.format(new Date(this.ts.longValue()), DateConstant.PATTERN_DATE_TIME);
|
}
|
return null;
|
}
|
}
|