Commit eef409ce authored by suhuiguang's avatar suhuiguang

1.管道历史问题处理-es没有也刷库

parent a2bdcc1d
......@@ -912,19 +912,19 @@ public class DataHandlerServiceImpl {
List<PieLineEquipContraptionDto> eqs = jgInstallationNoticeEqMapper.selectPCIdNeErrorPieLineInUseInfo2();
log.info("处理前:查询管道的装置id与安装告知的装置id的不一样管道设备:{}", eqs.size());
eqs.forEach(eq->{
// 1.已安装告知单据为准更新es
Optional<ESEquipmentCategoryDto> equInfosWithEs = esEquipmentCategory.findById(eq.getRecord());
equInfosWithEs.ifPresent(equInfoEs -> {
// 已安装告知单据为准更新es
equInfoEs.setProjectContraptionId(eq.getProjectContraptionId());
equInfoEs.setPROJECT_CONTRAPTION(eq.getProjectContraption());
esEquipmentCategory.save(equInfoEs);
// 已安装告知单据为准更新use_info
LambdaUpdateWrapper<IdxBizJgUseInfo> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(IdxBizJgUseInfo::getRecord, eq.getRecord());
updateWrapper.set(IdxBizJgUseInfo::getProjectContraptionId, eq.getProjectContraptionId());
updateWrapper.set(IdxBizJgUseInfo::getProjectContraption, eq.getProjectContraption());
useInfoService.update(updateWrapper);
});
// 2.已安装告知单据为准更新use_info
LambdaUpdateWrapper<IdxBizJgUseInfo> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(IdxBizJgUseInfo::getRecord, eq.getRecord());
updateWrapper.set(IdxBizJgUseInfo::getProjectContraptionId, eq.getProjectContraptionId());
updateWrapper.set(IdxBizJgUseInfo::getProjectContraption, eq.getProjectContraption());
useInfoService.update(updateWrapper);
});
List<PieLineEquipContraptionDto> eqsAfter = jgInstallationNoticeEqMapper.selectPCIdNeErrorPieLineInUseInfo2();
log.info("处理后:查询管道装置id与安装告知的装置id的不一样管道设备:{}", eqsAfter.size());
......
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