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);