package com.qianwen.mdc.collect.dto;
|
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
|
import com.qianwen.mdc.collect.enums.WorkstationParamTypeEnum;
|
/**
|
* 封装好的采集数据,主要包括了工位id,calendarCode,shiftIndex,shiftTimeType
|
*/
|
public class PackedTelemetryData {
|
private Long workstationId;
|
//private Integer paramType;
|
private String name;//参数名称如Output,DeviceStatus
|
private String value;
|
private Long time;
|
private String calendarCode;
|
private Integer factoryYear;
|
private Integer factoryMonth;
|
private Integer factoryWeek;
|
private Integer factoryDate;
|
private Integer shiftIndex;
|
private Integer shiftTimeType;
|
|
|
public PackedTelemetryData setWorkstationId(Long workstationId) {
|
this.workstationId = workstationId;
|
return this;
|
}
|
|
public PackedTelemetryData setValue(String value) {
|
this.value = value;
|
return this;
|
}
|
|
|
|
public Long getTime() {
|
return time;
|
}
|
|
public void setTime(Long time) {
|
this.time = time;
|
}
|
|
public PackedTelemetryData setCalendarCode(String calendarCode) {
|
this.calendarCode = calendarCode;
|
return this;
|
}
|
|
public PackedTelemetryData setFactoryYear(Integer factoryYear) {
|
this.factoryYear = factoryYear;
|
return this;
|
}
|
|
public PackedTelemetryData setFactoryMonth(Integer factoryMonth) {
|
this.factoryMonth = factoryMonth;
|
return this;
|
}
|
|
public PackedTelemetryData setFactoryWeek(Integer factoryWeek) {
|
this.factoryWeek = factoryWeek;
|
return this;
|
}
|
|
public PackedTelemetryData setFactoryDate(Integer factoryDate) {
|
this.factoryDate = factoryDate;
|
return this;
|
}
|
|
public PackedTelemetryData setShiftIndex(Integer shiftIndex) {
|
this.shiftIndex = shiftIndex;
|
return this;
|
}
|
|
public PackedTelemetryData setShiftTimeType(Integer shiftTimeType) {
|
this.shiftTimeType = shiftTimeType;
|
return this;
|
}
|
public PackedTelemetryData setName(String name) {
|
this.name = name;
|
return this;
|
}
|
|
|
public String getName() {
|
return name;
|
}
|
|
protected boolean canEqual(Object other) {
|
return other instanceof PackedTelemetryData;
|
}
|
|
|
public String toString() {
|
return ToStringBuilder.reflectionToString(this);
|
}
|
|
public Long getWorkstationId() {
|
return this.workstationId;
|
}
|
|
public Integer getParamType() {
|
int result = WorkstationParamTypeEnum.OTHER.getType();
|
|
|
switch(this.name) {
|
case "Output":
|
result = WorkstationParamTypeEnum.OUTPUT.getType();
|
break;
|
case "DeviceStatus":
|
result = WorkstationParamTypeEnum.STATE.getType();
|
break;
|
case "Alarm":
|
result = WorkstationParamTypeEnum.ALARM.getType();
|
break;
|
case "AlarmNo":
|
result = WorkstationParamTypeEnum.ALARM_NO.getType();
|
break;
|
case "AlarmMsg":
|
result = WorkstationParamTypeEnum.ALARM_MSG.getType();
|
break;
|
default:
|
result = WorkstationParamTypeEnum.OTHER.getType();
|
break;
|
}
|
return result;
|
}
|
|
public String getValue() {
|
return this.value;
|
}
|
|
|
public String getCalendarCode() {
|
return this.calendarCode;
|
}
|
|
public Integer getFactoryYear() {
|
return this.factoryYear;
|
}
|
|
public Integer getFactoryMonth() {
|
return this.factoryMonth;
|
}
|
|
public Integer getFactoryWeek() {
|
return this.factoryWeek;
|
}
|
|
public Integer getFactoryDate() {
|
return this.factoryDate;
|
}
|
|
public Integer getShiftIndex() {
|
return this.shiftIndex;
|
}
|
|
public Integer getShiftTimeType() {
|
return this.shiftTimeType;
|
}
|
}
|