Commit eaa64c14 authored by suhuiguang's avatar suhuiguang

1.管道刷历史数据,生产环境异常数据适配

parent a4d2a5b3
...@@ -576,6 +576,9 @@ public class DataHandlerServiceImpl { ...@@ -576,6 +576,9 @@ public class DataHandlerServiceImpl {
Map<Long, List<String>> projectContraptionIdRecordsMap = new HashMap<>(); Map<Long, List<String>> projectContraptionIdRecordsMap = new HashMap<>();
for(JgInstallationNotice installationNotice : noticeList){ for(JgInstallationNotice installationNotice : noticeList){
List<JgInstallationNoticeEq> noticeEqs = installationNoticeEqService.list(new LambdaQueryWrapper<JgInstallationNoticeEq>().eq(JgInstallationNoticeEq::getEquipTransferId, installationNotice.getSequenceNbr()).select(JgInstallationNoticeEq::getEquId,JgInstallationNoticeEq::getInformNumber)); List<JgInstallationNoticeEq> noticeEqs = installationNoticeEqService.list(new LambdaQueryWrapper<JgInstallationNoticeEq>().eq(JgInstallationNoticeEq::getEquipTransferId, installationNotice.getSequenceNbr()).select(JgInstallationNoticeEq::getEquId,JgInstallationNoticeEq::getInformNumber));
if(noticeEqs.isEmpty()){
continue;
}
List<String> records = noticeEqs.stream().map(JgInstallationNoticeEq::getEquId).collect(Collectors.toList()); List<String> records = noticeEqs.stream().map(JgInstallationNoticeEq::getEquId).collect(Collectors.toList());
List<IdxBizJgUseInfo> useInfos = useInfoService.lambdaQuery() List<IdxBizJgUseInfo> useInfos = useInfoService.lambdaQuery()
.in(IdxBizJgUseInfo::getRecord, records) .in(IdxBizJgUseInfo::getRecord, records)
...@@ -756,6 +759,7 @@ public class DataHandlerServiceImpl { ...@@ -756,6 +759,7 @@ public class DataHandlerServiceImpl {
private void updateProjectContraptionAfter(JgUseRegistration useRegistration, JgInstallationNotice installationNotice) { private void updateProjectContraptionAfter(JgUseRegistration useRegistration, JgInstallationNotice installationNotice) {
// 特殊处理 将任意一个的 record 放入到remark字段 // 特殊处理 将任意一个的 record 放入到remark字段
IdxBizJgUseInfo useInfo = getIdxBizJgUseInfo(installationNotice.getRemark()); IdxBizJgUseInfo useInfo = getIdxBizJgUseInfo(installationNotice.getRemark());
if(useInfo != null){
LambdaUpdateWrapper<IdxBizJgProjectContraption> updateWrapper = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<IdxBizJgProjectContraption> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(BaseEntity::getSequenceNbr, installationNotice.getProjectContraptionId()); updateWrapper.eq(BaseEntity::getSequenceNbr, installationNotice.getProjectContraptionId());
updateWrapper.set(IdxBizJgProjectContraption::getUscUnitCreditCode ,null); updateWrapper.set(IdxBizJgProjectContraption::getUscUnitCreditCode ,null);
...@@ -773,9 +777,11 @@ public class DataHandlerServiceImpl { ...@@ -773,9 +777,11 @@ public class DataHandlerServiceImpl {
updateWrapper.set(IdxBizJgProjectContraption::getUseDate, useRegistration.getAuditPassDate()); updateWrapper.set(IdxBizJgProjectContraption::getUseDate, useRegistration.getAuditPassDate());
projectContraptionService.update(null, updateWrapper); projectContraptionService.update(null, updateWrapper);
} }
}
private void createProjectInspectInfoAfter(JgUseRegistration useRegistration) { private void createProjectInspectInfoAfter(JgUseRegistration useRegistration) {
JgRegistrationHistory jgRegistrationHistory = getRegistrationHistory(useRegistration.getSequenceNbr() + ""); JgRegistrationHistory jgRegistrationHistory = getRegistrationHistory(useRegistration.getSequenceNbr() + "");
if(jgRegistrationHistory != null){
JSONObject mapData = JSONObject.parseObject(jgRegistrationHistory.getChangeData()); JSONObject mapData = JSONObject.parseObject(jgRegistrationHistory.getChangeData());
IdxBizJgProjectInspection inspectionDetectionInfo = new IdxBizJgProjectInspection(); IdxBizJgProjectInspection inspectionDetectionInfo = new IdxBizJgProjectInspection();
BeanUtil.copyProperties(mapData, inspectionDetectionInfo); BeanUtil.copyProperties(mapData, inspectionDetectionInfo);
...@@ -806,6 +812,8 @@ public class DataHandlerServiceImpl { ...@@ -806,6 +812,8 @@ public class DataHandlerServiceImpl {
projectInspectionMapper.insert(inspectionDetectionInfo); projectInspectionMapper.insert(inspectionDetectionInfo);
} }
}
private IdxBizJgUseInfo getIdxBizJgUseInfo(String record) { private IdxBizJgUseInfo getIdxBizJgUseInfo(String record) {
return useInfoService.getOneData(record); return useInfoService.getOneData(record);
} }
......
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