|
|
@ -8,7 +8,6 @@ import lombok.AllArgsConstructor; |
|
|
|
import lombok.Builder; |
|
|
|
import lombok.Builder; |
|
|
|
import lombok.Data; |
|
|
|
import lombok.Data; |
|
|
|
import lombok.NoArgsConstructor; |
|
|
|
import lombok.NoArgsConstructor; |
|
|
|
import org.springblade.core.tool.utils.Func; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @Author: ypj |
|
|
|
* @Author: ypj |
|
|
@ -164,49 +163,49 @@ public class DeviceModelData { |
|
|
|
|
|
|
|
|
|
|
|
public static DeviceModelData of(ModelAttrVO data) { |
|
|
|
public static DeviceModelData of(ModelAttrVO data) { |
|
|
|
return DeviceModelData.builder() |
|
|
|
return DeviceModelData.builder() |
|
|
|
.modelId(data.getModelId().toString()) |
|
|
|
.modelId(null != data.getModelId() ? data.getModelId().toString() : null) |
|
|
|
.name(data.getName()) |
|
|
|
.name(data.getName()) |
|
|
|
.signage(data.getSignage()) |
|
|
|
.signage(data.getSignage()) |
|
|
|
.dbType(data.getDbType()) |
|
|
|
.dbType(data.getDbType()) |
|
|
|
.fieldLength(data.getFieldLength()) |
|
|
|
.fieldLength(data.getFieldLength()) |
|
|
|
.keepFigures(data.getKeepFigures().toString()) |
|
|
|
.keepFigures(null != data.getKeepFigures() ? data.getKeepFigures().toString() : null) |
|
|
|
.accessRules(data.getAccessRules().toString()) |
|
|
|
.accessRules(null != data.getAccessRules() ? data.getAccessRules().toString() : null) |
|
|
|
.descs(data.getDescs()) |
|
|
|
.descs(data.getDescs()) |
|
|
|
.modelClassifyId(data.getModelClassifyId().toString()) |
|
|
|
.modelClassifyId(null != data.getModelClassifyId() ? data.getModelClassifyId().toString() : null) |
|
|
|
.type("0").build(); |
|
|
|
.type("0").build(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static DeviceModelData of(ModelFuncVO data) { |
|
|
|
public static DeviceModelData of(ModelFuncVO data) { |
|
|
|
return DeviceModelData.builder() |
|
|
|
return DeviceModelData.builder() |
|
|
|
.modelId(data.getModelId().toString()) |
|
|
|
.modelId(null != data.getModelId() ? data.getModelId().toString() : null) |
|
|
|
.name(data.getName()) |
|
|
|
.name(data.getName()) |
|
|
|
.signage(data.getSignage()) |
|
|
|
.signage(data.getSignage()) |
|
|
|
.parameterJson(data.getParameterJson()) |
|
|
|
.parameterJson(data.getParameterJson()) |
|
|
|
.controlStatus(data.getControlStatus().toString()) |
|
|
|
.controlStatus(null != data.getControlStatus() ? data.getControlStatus().toString() : null) |
|
|
|
.parameterTag(data.getParameterTag()) |
|
|
|
.parameterTag(data.getParameterTag()) |
|
|
|
.isPopup(data.getIsPopup().toString()) |
|
|
|
.isPopup(null != data.getIsPopup() ? data.getIsPopup().toString() : null) |
|
|
|
.isCheck(data.getIsCheck().toString()) |
|
|
|
.isCheck(null != data.getIsCheck() ? data.getIsCheck().toString() : null) |
|
|
|
.parameterSource(data.getParameterSource().toString()) |
|
|
|
.parameterSource(null != data.getParameterSource() ? data.getParameterSource().toString() : null) |
|
|
|
.sourceAttrSignage(data.getSourceAttrSignage()) |
|
|
|
.sourceAttrSignage(data.getSourceAttrSignage()) |
|
|
|
.controlParameter(data.getControlParameter().toString()) |
|
|
|
.controlParameter(null != data.getControlParameter() ? data.getControlParameter().toString() : null) |
|
|
|
.intervalLength(data.getIntervalLength().toString()) |
|
|
|
.intervalLength(null != data.getIntervalLength() ? data.getIntervalLength().toString() : null) |
|
|
|
.minValue(data.getMinValue().toString()) |
|
|
|
.minValue(null != data.getMinValue() ? data.getMinValue().toString() : null) |
|
|
|
.maxValue(data.getMaxValue().toString()) |
|
|
|
.maxValue(null != data.getMaxValue() ? data.getMaxValue().toString() : null) |
|
|
|
.coefficient(data.getCoefficient().toString()) |
|
|
|
.coefficient(null != data.getCoefficient() ? data.getCoefficient().toString() : null) |
|
|
|
.descs(data.getDescs()) |
|
|
|
.descs(data.getDescs()) |
|
|
|
.type("1").build(); |
|
|
|
.type("1").build(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static DeviceModelData of(ModelEventVO data) { |
|
|
|
public static DeviceModelData of(ModelEventVO data) { |
|
|
|
return DeviceModelData.builder() |
|
|
|
return DeviceModelData.builder() |
|
|
|
.modelId(data.getModelId().toString()) |
|
|
|
.modelId(null != data.getModelId() ? data.getModelId().toString() : null) |
|
|
|
.name(data.getName()) |
|
|
|
.name(data.getName()) |
|
|
|
.signage(data.getSignage()) |
|
|
|
.signage(data.getSignage()) |
|
|
|
.modelClassifyId(data.getModelClassifyId().toString()) |
|
|
|
.modelClassifyId(null != data.getModelClassifyId() ? data.getModelClassifyId().toString() : null) |
|
|
|
.level(data.getLevel().toString()) |
|
|
|
.level(null != data.getLevel() ? data.getLevel().toString() : null) |
|
|
|
.duration(data.getDuration().toString()) |
|
|
|
.duration(null != data.getDuration() ? data.getDuration().toString() : null) |
|
|
|
.descs(data.getDescs()) |
|
|
|
.descs(data.getDescs()) |
|
|
|
.modelClassifyId(data.getModelClassifyId().toString()) |
|
|
|
.modelClassifyId(null != data.getModelClassifyId() ? data.getModelClassifyId().toString() : null) |
|
|
|
.type("2").build(); |
|
|
|
.type("2").build(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|