Commit d9109578 authored by 刘林's avatar 刘林

fix:(jg):改造告知添加管道后,默认添加检验信息

parent 90a9b502
......@@ -165,6 +165,15 @@ public class ChangeEquipImpactCertListener {
manage.setReceiveCompanyCode(afterValue);
manage.setReceiveOrgName(CommonCustomConverter.CompanyCodeConverter.getNameByCode(afterValue));
break;
case "fillingMedium":
manage.setFillingMedium(afterValue);
break;
case "gasNum":
manage.setGasNum(Integer.valueOf(afterValue));
break;
case "volume":
manage.setVolume(afterValue);
break;
default:
log.warn("未处理的USE_CERT字段:[{}]", columnKey);
break;
......
......@@ -177,16 +177,14 @@ public class PieLineDataChangeServiceImpl {
this.buildNewPieLineLog(projectContraptionChangeDataDto, record, allChangeColumns, newPieLine);
// 检验信息
IdxBizJgInspectionDetectionInfo inspectionDetectionInfo = BeanUtil.copyProperties(newPieLine, IdxBizJgInspectionDetectionInfo.class);
if (!ValidationUtil.isEmpty(inspectionDetectionInfo)) {
inspectionDetectionInfo.setRecord(record);
inspectionDetectionInfo.setRecDate(new Date());
inspectionDetectionInfo.setSequenceNbr(null);
if (inspectionDetectionInfo.getNextInspectDate() != null) {
inspectionDetectionInfo.setNextInspectDate(DateUtil.parse(DateUtil.format(inspectionDetectionInfo.getNextInspectDate(), DatePattern.NORM_DATE_PATTERN)));
}
commonEquipDataProcessService.getJgUseRegistrationService().getInspectionDetectionInfoService().getBaseMapper().insert(inspectionDetectionInfo);
newPieLine.setJySeq(inspectionDetectionInfo.getSequenceNbr());
inspectionDetectionInfo.setRecord(record);
inspectionDetectionInfo.setRecDate(new Date());
inspectionDetectionInfo.setSequenceNbr(null);
if (inspectionDetectionInfo.getNextInspectDate() != null) {
inspectionDetectionInfo.setNextInspectDate(DateUtil.parse(DateUtil.format(inspectionDetectionInfo.getNextInspectDate(), DatePattern.NORM_DATE_PATTERN)));
}
commonEquipDataProcessService.getJgUseRegistrationService().getInspectionDetectionInfoService().getBaseMapper().insert(inspectionDetectionInfo);
newPieLine.setJySeq(inspectionDetectionInfo.getSequenceNbr());
// 使用信息
IdxBizJgUseInfo useInfo = BeanUtil.copyProperties(newPieLine, IdxBizJgUseInfo.class);
......
......@@ -1272,13 +1272,11 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
// 检验检测
IdxBizJgInspectionDetectionInfo inspectionDetectionInfo = JSON.parseObject(toJSONString(pipData), IdxBizJgInspectionDetectionInfo.class);
if (!BeanUtil.isEmpty(inspectionDetectionInfo)) {
inspectionDetectionInfo.setRecord(record);
inspectionDetectionInfo.setRecDate(date);
Optional.ofNullable(inspectionDetectionInfo.getNextInspectDate()).ifPresent(x -> inspectionDetectionInfo.setNextInspectDate(DateUtil.parse(DateUtil.format(inspectionDetectionInfo.getNextInspectDate(), DatePattern.NORM_DATE_PATTERN))));
inspectionDetectionInfo.setSequenceNbr(null);
idxBizJgInspectionDetectionInfoService.saveOrUpdateData(inspectionDetectionInfo);
}
inspectionDetectionInfo.setRecord(record);
inspectionDetectionInfo.setRecDate(date);
Optional.ofNullable(inspectionDetectionInfo.getNextInspectDate()).ifPresent(x -> inspectionDetectionInfo.setNextInspectDate(DateUtil.parse(DateUtil.format(inspectionDetectionInfo.getNextInspectDate(), DatePattern.NORM_DATE_PATTERN))));
inspectionDetectionInfo.setSequenceNbr(null);
inspectionDetectionInfoList.add(inspectionDetectionInfo);
// 管道技术参数
IdxBizJgTechParamsPipeline pipelineInfo = JSON.parseObject(toJSONString(pipData), IdxBizJgTechParamsPipeline.class);
......
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