Commit c4135f71 authored by suhuiguang's avatar suhuiguang

1.压力管道编辑保存时同步更新管道es的装置名称、装置id

parent 3d398870
...@@ -173,4 +173,10 @@ public class ESEquipmentCategoryDto { ...@@ -173,4 +173,10 @@ public class ESEquipmentCategoryDto {
@Field(type = FieldType.Text) @Field(type = FieldType.Text)
private String INFORMATION_SITUATION; private String INFORMATION_SITUATION;
/**
* 工程装置id(工业管道使用)
*/
@Field(type = FieldType.Keyword)
private String PROJECT_CONTRAPTION_ID;
} }
...@@ -86,6 +86,8 @@ public class BatchDataChangeProcessStrategy implements IChangeDataProcessStrateg ...@@ -86,6 +86,8 @@ public class BatchDataChangeProcessStrategy implements IChangeDataProcessStrateg
String record = item.getRecord(); String record = item.getRecord();
// 设计信息更新 // 设计信息更新
pieLineDataChangeService.saveDesignForPieLine(record, allChangeColumns, item); pieLineDataChangeService.saveDesignForPieLine(record, allChangeColumns, item);
// 更新es的冗余的管道名称字段
pieLineDataChangeService.updateEs(record, projectContraptionChangeDataDto);
// 技术参数入库保存 // 技术参数入库保存
TechParamsPipelineChangeFieldDto paramsPipelineChangeFieldDto = new TechParamsPipelineChangeFieldDto(); TechParamsPipelineChangeFieldDto paramsPipelineChangeFieldDto = new TechParamsPipelineChangeFieldDto();
BeanUtil.copyProperties(item, paramsPipelineChangeFieldDto, false); BeanUtil.copyProperties(item, paramsPipelineChangeFieldDto, false);
......
...@@ -137,6 +137,18 @@ public class EquipChangeDataUpdateService { ...@@ -137,6 +137,18 @@ public class EquipChangeDataUpdateService {
} }
} }
public void updateRegisterEsDataPieLine(String record, ProjectContraptionChangeDataDto registerChangeDataDto) {
// es 数据更新
Optional<ESEquipmentCategoryDto> optional = esEquipmentCategory.findById(record);
if (optional.isPresent()) {
ESEquipmentCategoryDto esEquipmentCategoryDto = optional.get();
esEquipmentCategoryDto.setPROJECT_CONTRAPTION(registerChangeDataDto.getProjectContraption());
// 冗余更新 正常 应该是在加设备时写入
esEquipmentCategoryDto.setPROJECT_CONTRAPTION_ID(registerChangeDataDto.getProjectContraptionId()) ;
esEquipmentCategory.save(esEquipmentCategoryDto);
}
}
private EquipmentCategory getEquipmentCategory(EquipRegisterChangeDataDto registerChangeDataDto) { private EquipmentCategory getEquipmentCategory(EquipRegisterChangeDataDto registerChangeDataDto) {
return equipmentCategoryMapper.selectOne(new LambdaQueryWrapper<EquipmentCategory>().eq(EquipmentCategory::getCode, registerChangeDataDto.getEquDefine())); return equipmentCategoryMapper.selectOne(new LambdaQueryWrapper<EquipmentCategory>().eq(EquipmentCategory::getCode, registerChangeDataDto.getEquDefine()));
} }
......
...@@ -63,4 +63,8 @@ public class PieLineDataChangeServiceImpl { ...@@ -63,4 +63,8 @@ public class PieLineDataChangeServiceImpl {
// 2.更新管道的设计单位名称 // 2.更新管道的设计单位名称
equipChangeDataUpdateService.updatePieLineDesignData(record, pieLineDesignChangeDataDto); equipChangeDataUpdateService.updatePieLineDesignData(record, pieLineDesignChangeDataDto);
} }
public void updateEs(String record, ProjectContraptionChangeDataDto projectContraptionChangeDataDto) {
equipChangeDataUpdateService.updateRegisterEsDataPieLine(record, projectContraptionChangeDataDto);
}
} }
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