Commit 67cd3a2e authored by 韩桐桐's avatar 韩桐桐

fix(jg):新增设备时检验检测数据处理

parent 85b4cca9
......@@ -2185,6 +2185,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
IdxBizJgSupervisionInfo supervisionInfo = JSON.parseObject(JSON.toJSONString(equipmentInfoForm), IdxBizJgSupervisionInfo.class);
// 其他信息
IdxBizJgOtherInfo otherInfo = JSON.parseObject(JSON.toJSONString(equipmentInfoForm), IdxBizJgOtherInfo.class);
// 检验检测
IdxBizJgInspectionDetectionInfo inspectionDetectionInfo = JSON.parseObject(JSON.toJSONString(equipmentInfoForm), IdxBizJgInspectionDetectionInfo.class);
// 使用信息
useInfo.setRecord(record);
......@@ -2290,19 +2292,24 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
iIdxBizJgOtherInfoService.saveOrUpdateData(otherInfo);
if (CylinderTypeEnum.CYLINDER.getCode().equals(equCategory) || "2100".equals(equCategory) || "8300".equals(equCategory)) {
IdxBizJgInspectionDetectionInfo inspectionDetectionInfo = JSON.parseObject(JSON.toJSONString(equipmentInfoForm), IdxBizJgInspectionDetectionInfo.class);
List<Map<String, Object>> inspectionAndTestingInstitutions = commonMapper.getUnitListByType(INSPECTION_AND_TESTING_INSTITUTIONS);
Optional<Map<String, Object>> optional = inspectionAndTestingInstitutions.stream().filter(x -> x.get("useCode").equals(inspectionDetectionInfo.getInspectOrgCode())).findFirst();
Map<String, Object> mapOrDefault = optional.orElse(Collections.emptyMap());
inspectionDetectionInfo.setInspectOrgName((String) mapOrDefault.getOrDefault("useUnit", inspectionDetectionInfo.getInspectOrgName()));
inspectionDetectionInfo.setRecord(record);
inspectionDetectionInfo.setRecDate(date);
inspectionDetectionInfo.setInspectType("8300".equals(equCategory) ? "AZJDJY" : "ZZJDJY");
// inspectionDetectionInfo.setInspectConclusion("6040");
inspectionDetectionInfo.setSequenceNbr(OPERATESAVE.equals(operateType) ? null : String.valueOf(equipmentInfoForm.get("INSPECTIONDETECTIONINFO_SEQ")));
iIdxBizJgInspectionDetectionInfoService.saveOrUpdateData(inspectionDetectionInfo);
}
// 检验检测信息
inspectionDetectionInfo.setRecord(record);
inspectionDetectionInfo.setRecDate(date);
iIdxBizJgInspectionDetectionInfoService.saveOrUpdateData(inspectionDetectionInfo);
// if (CylinderTypeEnum.CYLINDER.getCode().equals(equCategory) || "2100".equals(equCategory) || "8300".equals(equCategory)) {
// IdxBizJgInspectionDetectionInfo inspectionDetectionInfo = JSON.parseObject(JSON.toJSONString(equipmentInfoForm), IdxBizJgInspectionDetectionInfo.class);
// List<Map<String, Object>> inspectionAndTestingInstitutions = commonMapper.getUnitListByType(INSPECTION_AND_TESTING_INSTITUTIONS);
// Optional<Map<String, Object>> optional = inspectionAndTestingInstitutions.stream().filter(x -> x.get("useCode").equals(inspectionDetectionInfo.getInspectOrgCode())).findFirst();
// Map<String, Object> mapOrDefault = optional.orElse(Collections.emptyMap());
// inspectionDetectionInfo.setInspectOrgName((String) mapOrDefault.getOrDefault("useUnit", inspectionDetectionInfo.getInspectOrgName()));
// inspectionDetectionInfo.setRecord(record);
// inspectionDetectionInfo.setRecDate(date);
// inspectionDetectionInfo.setInspectType("8300".equals(equCategory) ? "AZJDJY" : "ZZJDJY");
// // inspectionDetectionInfo.setInspectConclusion("6040");
// inspectionDetectionInfo.setSequenceNbr(OPERATESAVE.equals(operateType) ? null : String.valueOf(equipmentInfoForm.get("INSPECTIONDETECTIONINFO_SEQ")));
// iIdxBizJgInspectionDetectionInfoService.saveOrUpdateData(inspectionDetectionInfo);
// }
// 八大类技术参数和主要零部件和安全附件表
List<IdxBizJgMainParts> mainPartsList = new ArrayList<>();
......
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