From 0df1bc410aaf9d1d0da183dab4389c8300875629 Mon Sep 17 00:00:00 2001 From: haungxing <1203316822@qq.com> Date: Thu, 18 Jan 2024 09:28:13 +0800 Subject: [PATCH] =?UTF-8?q?#=20=E5=8D=B1=E9=99=A9=E6=BA=90=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=E5=8A=9F=E8=83=BD=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/hnac/hzims/safeproduct/hazard/dto/HazardInstanceDTO.java | 3 +++ .../safeproduct/hazard/service/impl/DangerSourceServiceImpl.java | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/hazard/dto/HazardInstanceDTO.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/hazard/dto/HazardInstanceDTO.java index f459815..6cbe9fb 100644 --- a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/hazard/dto/HazardInstanceDTO.java +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/hazard/dto/HazardInstanceDTO.java @@ -25,6 +25,9 @@ public class HazardInstanceDTO implements Serializable { @ApiModelProperty("设备名称") private String emName; + @ApiModelProperty(value = "应用类型") + private String applyType; + @ApiModelProperty("危险源列表") private List hazardList; diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hazard/service/impl/DangerSourceServiceImpl.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hazard/service/impl/DangerSourceServiceImpl.java index 6c666fe..d4a369c 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hazard/service/impl/DangerSourceServiceImpl.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hazard/service/impl/DangerSourceServiceImpl.java @@ -326,9 +326,16 @@ public class DangerSourceServiceImpl extends BaseServiceImpl sourceList = req.getHazardList().stream().map(h -> { DangerSourceEntity result = JSONObject.parseObject(JSON.toJSONString(h), DangerSourceEntity.class); + result.setId(null); result.setLibraryId(h.getId()); result.setRefDept(req.getDeptId()); result.setRefDeptName(req.getDeptName()); + result.setApplyType(req.getApplyType()); + result.setCreateTime(null); + result.setCreateDept(null); + result.setCreateUser(null); + result.setUpdateUser(null); + result.setUpdateTime(null); return result; }).collect(Collectors.toList()); return this.saveBatch(sourceList);