From fd5953bf3789d97f9cffe0055573d3ffc4e2cca9 Mon Sep 17 00:00:00 2001 From: luyie Date: Fri, 27 Sep 2024 14:56:41 +0800 Subject: [PATCH 1/3] =?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 | 54 ++++++++++++++++++---- 1 file changed, 45 insertions(+), 9 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 5593352..dc24aca 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 @@ -4,7 +4,10 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.hnac.hzinfo.sdk.v5.model.vo.ModelAttrVO; import com.hnac.hzinfo.sdk.v5.model.vo.ModelEventVO; import com.hnac.hzinfo.sdk.v5.model.vo.ModelFuncVO; +import lombok.AllArgsConstructor; +import lombok.Builder; import lombok.Data; +import lombok.NoArgsConstructor; import org.springblade.core.tool.utils.Func; /** @@ -12,6 +15,9 @@ import org.springblade.core.tool.utils.Func; * @Date: 2024/9/19 7:55 */ @Data +@Builder +@AllArgsConstructor +@NoArgsConstructor public class DeviceModelData { /** * 模型id @@ -157,20 +163,50 @@ public class DeviceModelData { private String type; public static DeviceModelData of(ModelAttrVO data) { - DeviceModelData deviceModelData = Func.copyProperties(data, DeviceModelData.class); - deviceModelData.setType("0"); - return deviceModelData; + return DeviceModelData.builder() + .modelId(data.getModelId().toString()) + .name(data.getName()) + .signage(data.getSignage()) + .dbType(data.getDbType()) + .fieldLength(data.getFieldLength()) + .keepFigures(data.getKeepFigures().toString()) + .accessRules(data.getAccessRules().toString()) + .descs(data.getDescs()) + .modelClassifyId(data.getModelClassifyId().toString()) + .type("0").build(); } public static DeviceModelData of(ModelFuncVO data) { - DeviceModelData deviceModelData = Func.copyProperties(data, DeviceModelData.class); - deviceModelData.setType("1"); - return deviceModelData; + return DeviceModelData.builder() + .modelId(data.getModelId().toString()) + .name(data.getName()) + .signage(data.getSignage()) + .parameterJson(data.getParameterJson()) + .controlStatus(data.getControlStatus().toString()) + .parameterTag(data.getParameterTag()) + .isPopup(data.getIsPopup().toString()) + .isCheck(data.getIsCheck().toString()) + .parameterSource(data.getParameterSource().toString()) + .sourceAttrSignage(data.getSourceAttrSignage()) + .controlParameter(data.getControlParameter().toString()) + .intervalLength(data.getIntervalLength().toString()) + .minValue(data.getMinValue().toString()) + .maxValue(data.getMaxValue().toString()) + .coefficient(data.getCoefficient().toString()) + .descs(data.getDescs()) + .type("1").build(); } public static DeviceModelData of(ModelEventVO data) { - DeviceModelData deviceModelData = Func.copyProperties(data, DeviceModelData.class); - deviceModelData.setType("2"); - return deviceModelData; + return DeviceModelData.builder() + .modelId(data.getModelId().toString()) + .name(data.getName()) + .signage(data.getSignage()) + .modelClassifyId(data.getModelClassifyId().toString()) + .level(data.getLevel().toString()) + .duration(data.getDuration().toString()) + .descs(data.getDescs()) + .modelClassifyId(data.getModelClassifyId().toString()) + .type("2").build(); } } From 1c0de42ba7a23c9f54be63cf5966f1636cb6a482 Mon Sep 17 00:00:00 2001 From: luyie Date: Fri, 27 Sep 2024 15:13:52 +0800 Subject: [PATCH 2/3] =?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(); } } From 43f59c14a64a9fad6425b4f34f3d303ef1db2bf0 Mon Sep 17 00:00:00 2001 From: luyie Date: Sun, 29 Sep 2024 11:28:28 +0800 Subject: [PATCH 3/3] =?UTF-8?q?fix:=E7=9F=A5=E8=AF=86=E5=BA=93=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=8E=92=E9=99=A4=E9=80=BB=E8=BE=91=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gglm/bigmodel/maintenance/mapper/KnowledgeFileFragmentMapper.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/mapper/KnowledgeFileFragmentMapper.xml b/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/mapper/KnowledgeFileFragmentMapper.xml index c4f82cd..d4bde7b 100644 --- a/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/mapper/KnowledgeFileFragmentMapper.xml +++ b/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/mapper/KnowledgeFileFragmentMapper.xml @@ -15,5 +15,7 @@ FROM knowledge_file_segment AS `segment` LEFT JOIN knowledge_file_info `info` ON `segment`.DOC_ID = `info`.ID + WHERE + `segment`.IS_DELETED = 0 \ No newline at end of file