Commit 99ca7203 authored by suhuiguang's avatar suhuiguang

1.刷管道历史数据接口,增加装置名称记录到use_info

parent b0543304
...@@ -666,6 +666,7 @@ public class DataHandlerServiceImpl { ...@@ -666,6 +666,7 @@ public class DataHandlerServiceImpl {
} }
// 更新设备es的装置id、使用信息的装置id // 更新设备es的装置id、使用信息的装置id
projectContraptionIdRecordsMap.forEach((k,v)->{ projectContraptionIdRecordsMap.forEach((k,v)->{
IdxBizJgProjectContraption idxBizJgProjectContraption = projectContraptionService.getById(k);
Iterable<ESEquipmentCategoryDto> equipmentCategories = esEquipmentCategory.findAllById(v); Iterable<ESEquipmentCategoryDto> equipmentCategories = esEquipmentCategory.findAllById(v);
equipmentCategories.forEach(e-> e.setProjectContraptionId(k + "")); equipmentCategories.forEach(e-> e.setProjectContraptionId(k + ""));
esEquipmentCategory.saveAll(equipmentCategories); esEquipmentCategory.saveAll(equipmentCategories);
...@@ -674,6 +675,7 @@ public class DataHandlerServiceImpl { ...@@ -674,6 +675,7 @@ public class DataHandlerServiceImpl {
LambdaUpdateWrapper<IdxBizJgUseInfo> updateWrapper = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<IdxBizJgUseInfo> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(IdxBizJgUseInfo::getRecord, u.getRecord()); updateWrapper.eq(IdxBizJgUseInfo::getRecord, u.getRecord());
updateWrapper.set(IdxBizJgUseInfo::getProjectContraptionId, k); updateWrapper.set(IdxBizJgUseInfo::getProjectContraptionId, k);
updateWrapper.set(IdxBizJgUseInfo::getProjectContraption, idxBizJgProjectContraption.getProjectContraption());
useInfoService.update(updateWrapper); useInfoService.update(updateWrapper);
}); });
}); });
...@@ -870,10 +872,14 @@ public class DataHandlerServiceImpl { ...@@ -870,10 +872,14 @@ public class DataHandlerServiceImpl {
eqs.forEach(eq->{ eqs.forEach(eq->{
Optional<ESEquipmentCategoryDto> equInfosWithEs = esEquipmentCategory.findById(eq.getEquId()); Optional<ESEquipmentCategoryDto> equInfosWithEs = esEquipmentCategory.findById(eq.getEquId());
equInfosWithEs.ifPresent(equInfoEs -> { equInfosWithEs.ifPresent(equInfoEs -> {
LambdaUpdateWrapper<IdxBizJgUseInfo> updateWrapper = new LambdaUpdateWrapper<>(); if(StringUtils.isNotEmpty(equInfoEs.getProjectContraptionId())){
updateWrapper.eq(IdxBizJgUseInfo::getRecord, equInfoEs.getSEQUENCE_NBR()); IdxBizJgProjectContraption idxBizJgProjectContraption = projectContraptionService.getById(equInfoEs.getProjectContraptionId());
updateWrapper.set(IdxBizJgUseInfo::getProjectContraptionId, equInfoEs.getProjectContraptionId()); LambdaUpdateWrapper<IdxBizJgUseInfo> updateWrapper = new LambdaUpdateWrapper<>();
useInfoService.update(updateWrapper); updateWrapper.eq(IdxBizJgUseInfo::getRecord, equInfoEs.getSEQUENCE_NBR());
updateWrapper.set(IdxBizJgUseInfo::getProjectContraptionId, idxBizJgProjectContraption.getSequenceNbr());
updateWrapper.set(IdxBizJgUseInfo::getProjectContraption, idxBizJgProjectContraption.getProjectContraption());
useInfoService.update(updateWrapper);
}
}); });
}); });
List<JgInstallationNoticeEq> eqsAfter = jgInstallationNoticeEqMapper.selectPCIdNeErrorPieLineInUseInfo(); List<JgInstallationNoticeEq> eqsAfter = jgInstallationNoticeEqMapper.selectPCIdNeErrorPieLineInUseInfo();
......
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