Commit c5bc5edd authored by suhuiguang's avatar suhuiguang

1.使用登记完成后缺少检验信息bug

parent 71c98fde
...@@ -409,7 +409,6 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -409,7 +409,6 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
private void updateOrCreateInspectionDetection(Map<String, Object> equipment, JgUseRegistration jgUseRegistration, IdxBizJgRegisterInfo registerInfo) { private void updateOrCreateInspectionDetection(Map<String, Object> equipment, JgUseRegistration jgUseRegistration, IdxBizJgRegisterInfo registerInfo) {
InspectionDetectionInfo inspectionDetectionInfo = new InspectionDetectionInfo(); InspectionDetectionInfo inspectionDetectionInfo = new InspectionDetectionInfo();
BeanUtil.copyProperties(equipment, inspectionDetectionInfo); BeanUtil.copyProperties(equipment, inspectionDetectionInfo);
if("unit".equals(jgUseRegistration.getManageType())){ if("unit".equals(jgUseRegistration.getManageType())){
if (registerInfo.getEquList().equals(EquipmentClassifityEnum.YLGD.getCode())){ if (registerInfo.getEquList().equals(EquipmentClassifityEnum.YLGD.getCode())){
// 压力管道逻辑,根据设备record + 检验报告编号判定唯一一条检验流水,有进行更新,无则进行插入 // 压力管道逻辑,根据设备record + 检验报告编号判定唯一一条检验流水,有进行更新,无则进行插入
...@@ -422,7 +421,11 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -422,7 +421,11 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
if (equipment.get("jySeq") != null) { if (equipment.get("jySeq") != null) {
// 更新逻辑 // 更新逻辑
InspectionDetectionInfo inspectionDetectionInfoDb = inspectionDetectionInfoMapper.selectById(equipment.get("jySeq").toString()); InspectionDetectionInfo inspectionDetectionInfoDb = inspectionDetectionInfoMapper.selectById(equipment.get("jySeq").toString());
String inspectionSeq = inspectionDetectionInfoDb.getSequenceNbr();
String record = inspectionDetectionInfoDb.getRecord();
Bean.copyExistPropertis(inspectionDetectionInfo, inspectionDetectionInfoDb); Bean.copyExistPropertis(inspectionDetectionInfo, inspectionDetectionInfoDb);
inspectionDetectionInfoDb.setSequenceNbr(inspectionSeq);
inspectionDetectionInfoDb.setRecord(record);
inspectionDetectionInfoMapper.updateById(inspectionDetectionInfoDb); inspectionDetectionInfoMapper.updateById(inspectionDetectionInfoDb);
} else { } else {
String record = Optional.ofNullable(equipment.get("equipId")) String record = Optional.ofNullable(equipment.get("equipId"))
...@@ -1297,26 +1300,6 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -1297,26 +1300,6 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
return ""; return "";
} }
private void savePieLineProjectInspectData(JgUseRegistration jgUseRegistration, IdxBizJgRegisterInfo registerInfo, JSONObject mapData) {
// 单位办理的压力管道,在完成审批时,将检验信息写入到装置检验信息表
if("unit".equals(jgUseRegistration.getManageType()) && registerInfo.getEquList().equals(EquipmentClassifityEnum.YLGD.getCode())){
IdxBizJgProjectInspection inspectionDetectionInfo = new IdxBizJgProjectInspection();
BeanUtil.copyProperties(mapData, inspectionDetectionInfo);
if (mapData.get("jySeq") != null) {
// 更新逻辑
IdxBizJgProjectInspection inspectionDetectionInfoDb = projectInspectionMapper.selectById(mapData.get("jySeq").toString());
Bean.copyExistPropertis(inspectionDetectionInfo, inspectionDetectionInfoDb);
projectInspectionMapper.updateById(inspectionDetectionInfo);
} else {
inspectionDetectionInfo.setProjectContraptionId(jgUseRegistration.getProjectContraptionId());
inspectionDetectionInfo.setRecDate(new Date());
// 使用登记创建新增的检验信息id设置为使用登记的主键id,在作废时级联作废
inspectionDetectionInfo.setSequenceNbr(jgUseRegistration.getSequenceNbr() + "");
projectInspectionMapper.insert(inspectionDetectionInfo);
}
}
}
/** /**
* 生成使用登记证变更记录 * 生成使用登记证变更记录
* *
......
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