From 1c0de42ba7a23c9f54be63cf5966f1636cb6a482 Mon Sep 17 00:00:00 2001 From: luyie Date: Fri, 27 Sep 2024 15:13:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E5=90=91=E9=87=8F=E6=95=B0=E6=8D=AE=E5=B1=9E=E6=80=A7=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E5=90=8E=E9=83=A8=E5=88=86=E5=AD=97=E6=AE=B5=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gglm/bigmodel/business/vo/DeviceModelData.java | 39 +++++++++++----------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/business/vo/DeviceModelData.java b/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/business/vo/DeviceModelData.java index dc24aca..a633a3a 100644 --- a/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/business/vo/DeviceModelData.java +++ b/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/business/vo/DeviceModelData.java @@ -8,7 +8,6 @@ import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import org.springblade.core.tool.utils.Func; /** * @Author: ypj @@ -164,49 +163,49 @@ public class DeviceModelData { public static DeviceModelData of(ModelAttrVO data) { return DeviceModelData.builder() - .modelId(data.getModelId().toString()) + .modelId(null != data.getModelId() ? data.getModelId().toString() : null) .name(data.getName()) .signage(data.getSignage()) .dbType(data.getDbType()) .fieldLength(data.getFieldLength()) - .keepFigures(data.getKeepFigures().toString()) - .accessRules(data.getAccessRules().toString()) + .keepFigures(null != data.getKeepFigures() ? data.getKeepFigures().toString() : null) + .accessRules(null != data.getAccessRules() ? data.getAccessRules().toString() : null) .descs(data.getDescs()) - .modelClassifyId(data.getModelClassifyId().toString()) + .modelClassifyId(null != data.getModelClassifyId() ? data.getModelClassifyId().toString() : null) .type("0").build(); } public static DeviceModelData of(ModelFuncVO data) { return DeviceModelData.builder() - .modelId(data.getModelId().toString()) + .modelId(null != data.getModelId() ? data.getModelId().toString() : null) .name(data.getName()) .signage(data.getSignage()) .parameterJson(data.getParameterJson()) - .controlStatus(data.getControlStatus().toString()) + .controlStatus(null != data.getControlStatus() ? data.getControlStatus().toString() : null) .parameterTag(data.getParameterTag()) - .isPopup(data.getIsPopup().toString()) - .isCheck(data.getIsCheck().toString()) - .parameterSource(data.getParameterSource().toString()) + .isPopup(null != data.getIsPopup() ? data.getIsPopup().toString() : null) + .isCheck(null != data.getIsCheck() ? data.getIsCheck().toString() : null) + .parameterSource(null != data.getParameterSource() ? data.getParameterSource().toString() : null) .sourceAttrSignage(data.getSourceAttrSignage()) - .controlParameter(data.getControlParameter().toString()) - .intervalLength(data.getIntervalLength().toString()) - .minValue(data.getMinValue().toString()) - .maxValue(data.getMaxValue().toString()) - .coefficient(data.getCoefficient().toString()) + .controlParameter(null != data.getControlParameter() ? data.getControlParameter().toString() : null) + .intervalLength(null != data.getIntervalLength() ? data.getIntervalLength().toString() : null) + .minValue(null != data.getMinValue() ? data.getMinValue().toString() : null) + .maxValue(null != data.getMaxValue() ? data.getMaxValue().toString() : null) + .coefficient(null != data.getCoefficient() ? data.getCoefficient().toString() : null) .descs(data.getDescs()) .type("1").build(); } public static DeviceModelData of(ModelEventVO data) { return DeviceModelData.builder() - .modelId(data.getModelId().toString()) + .modelId(null != data.getModelId() ? data.getModelId().toString() : null) .name(data.getName()) .signage(data.getSignage()) - .modelClassifyId(data.getModelClassifyId().toString()) - .level(data.getLevel().toString()) - .duration(data.getDuration().toString()) + .modelClassifyId(null != data.getModelClassifyId() ? data.getModelClassifyId().toString() : null) + .level(null != data.getLevel() ? data.getLevel().toString() : null) + .duration(null != data.getDuration() ? data.getDuration().toString() : null) .descs(data.getDescs()) - .modelClassifyId(data.getModelClassifyId().toString()) + .modelClassifyId(null != data.getModelClassifyId() ? data.getModelClassifyId().toString() : null) .type("2").build(); } }