Commit 99e0c993 authored by 刘林's avatar 刘林

fix(jg):设计年限功能修改

parent 1def9590
......@@ -272,7 +272,6 @@ public class JgOverDesignServiceLifeServiceImpl extends BaseService<JgOverDesign
equip.setSafetyAssessmentCreditCode(Objects.toString(device.get("safetyAssessmentCreditCode"), ""));
equip.setSafetyAssessmentResult(Objects.toString(device.get("safetyAssessmentResult"), ""));
equip.setSafetyAssessmentDate(castDate2TimeStr(Objects.toString(device.get("safetyAssessmentDate"), null)));
equip.setSafetyAssessmentName(Objects.toString(device.get("equListCode"), ""));
if (!ObjectUtils.isEmpty(device.get("safetyAssessmentReport"))) {
equip.setSafetyAssessmentReport(JSONObject.toJSONString(device.get("safetyAssessmentReport")));
}
......@@ -667,6 +666,10 @@ public class JgOverDesignServiceLifeServiceImpl extends BaseService<JgOverDesign
equipment.remove("recDate");
InspectionDetectionInfo inspectionDetectionInfo = new InspectionDetectionInfo();
BeanUtil.copyProperties(equipment, inspectionDetectionInfo);
if (!ObjectUtils.isEmpty(equipment.get("inspectReport"))) {
inspectionDetectionInfo.setInspectReport(JSONObject.toJSONString(equipment.get("inspectReport")));
}
inspectionDetectionInfo.setInspectConclusion(Objects.toString(equipment.get("inspectConclusionCode"),""));
// 处理jySeq更新逻辑
String jySeq = Objects.toString(equipment.get("jySeq"), "");
if (!jySeq.isEmpty()) {
......@@ -1052,7 +1055,6 @@ public class JgOverDesignServiceLifeServiceImpl extends BaseService<JgOverDesign
.findFirst()
.map(info -> {
Map<String, Object> result = new HashMap<>(Bean.BeantoMap(info));
result.put("inspectReport", JSON.parseArray(info.getInspectReport()));
result.put("inspectConclusionCode", info.getInspectConclusion());
result.put("inspectConclusion",
Optional.ofNullable(dataDictionaryServiceImpl.getByCode(info.getInspectConclusion(), "JYJL"))
......@@ -1067,6 +1069,7 @@ public class JgOverDesignServiceLifeServiceImpl extends BaseService<JgOverDesign
result.put("safetyAssessmentDate", overDesignServiceLifeEq.getSafetyAssessmentDate());
}
commonService.convertStringToJsonobject(result, new String[]{"safetyAssessmentReport"});
commonService.convertStringToJsonobject(result, new String[]{"inspectReport"});
return result;
})
.orElse(Collections.emptyMap());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment