Commit ba49be21 authored by suhuiguang's avatar suhuiguang

fix(大编辑):bug修复

1.管道的新增及删除日志修改描述
parent b17913ca
...@@ -112,7 +112,7 @@ public class PieLineDataChangeServiceImpl { ...@@ -112,7 +112,7 @@ public class PieLineDataChangeServiceImpl {
public void deletePieLineBatch(List<PipelineChangeItemDto> deletedPieLines, List<FieldChangeMeta> allChangeColumns, String projectContraptionId) { public void deletePieLineBatch(List<PipelineChangeItemDto> deletedPieLines, List<FieldChangeMeta> allChangeColumns, String projectContraptionId) {
List<String> recordsForDeleted = deletedPieLines.stream().map(TechParamsPipelineChangeFieldDto::getRecord).collect(Collectors.toList()); List<String> recordsForDeleted = deletedPieLines.stream().map(TechParamsPipelineChangeFieldDto::getRecord).collect(Collectors.toList());
// 构建删除日志 // 构建删除日志
this.buildDeletePieLineLog(recordsForDeleted, allChangeColumns, projectContraptionId); this.buildDeletePieLineLog(deletedPieLines, allChangeColumns, projectContraptionId);
// 删除涉及的19张表的数据 // 删除涉及的19张表的数据
superviseInfoMapper.deleteDataAll(recordsForDeleted); superviseInfoMapper.deleteDataAll(recordsForDeleted);
List<ESEquipmentCategoryDto> esDtoList = recordsForDeleted.stream().map(v -> { List<ESEquipmentCategoryDto> esDtoList = recordsForDeleted.stream().map(v -> {
...@@ -124,21 +124,21 @@ public class PieLineDataChangeServiceImpl { ...@@ -124,21 +124,21 @@ public class PieLineDataChangeServiceImpl {
esEquipmentCategory.deleteAll(esDtoList); esEquipmentCategory.deleteAll(esDtoList);
} }
private void buildDeletePieLineLog(List<String> recordsForDeleted, List<FieldChangeMeta> allChangeColumns, String projectContraptionId) { private void buildDeletePieLineLog(List<PipelineChangeItemDto> recordsForDeleted, List<FieldChangeMeta> allChangeColumns, String projectContraptionId) {
recordsForDeleted.forEach(record -> { recordsForDeleted.forEach(item -> {
FieldChangeMeta fieldChangeMeta = new FieldChangeMeta(); FieldChangeMeta fieldChangeMeta = new FieldChangeMeta();
fieldChangeMeta.setChangeId(projectContraptionId); fieldChangeMeta.setChangeId(projectContraptionId);
fieldChangeMeta.setColumnKey(PIE_LINE_KEY); fieldChangeMeta.setColumnKey(PIE_LINE_KEY);
fieldChangeMeta.setChangeId(projectContraptionId + "/" + record); fieldChangeMeta.setChangeId(projectContraptionId + "/" + item.getRecord());
fieldChangeMeta.setColumnLabel("管道删除"); fieldChangeMeta.setColumnLabel("管道删除");
fieldChangeMeta.setColumnType("String"); fieldChangeMeta.setColumnType("String");
fieldChangeMeta.setFieldDisplayDefine(null); fieldChangeMeta.setFieldDisplayDefine(null);
fieldChangeMeta.setColumnFamily(PIE_LINE_DELETE); fieldChangeMeta.setColumnFamily(PIE_LINE_DELETE);
fieldChangeMeta.setColumnNewValue(null);
fieldChangeMeta.setIsRepeatColumn(false); fieldChangeMeta.setIsRepeatColumn(false);
fieldChangeMeta.setColumnOldValue(item.getRecord());
fieldChangeMeta.setDisplayOldValue(item.getPipelineNumber());
fieldChangeMeta.setColumnNewValue(null);
fieldChangeMeta.setDisplayNewValue(null); fieldChangeMeta.setDisplayNewValue(null);
fieldChangeMeta.setColumnOldValue(record);
fieldChangeMeta.setDisplayOldValue(record);
allChangeColumns.add(fieldChangeMeta); allChangeColumns.add(fieldChangeMeta);
}); });
} }
...@@ -147,7 +147,7 @@ public class PieLineDataChangeServiceImpl { ...@@ -147,7 +147,7 @@ public class PieLineDataChangeServiceImpl {
String record = idUtil.nextId().toString(); String record = idUtil.nextId().toString();
newPieLine.setRecord(record); newPieLine.setRecord(record);
newPieLine.setProjectContraptionId(projectContraptionChangeDataDto.getProjectContraptionId()); newPieLine.setProjectContraptionId(projectContraptionChangeDataDto.getProjectContraptionId());
this.buildNewPieLineLog(projectContraptionChangeDataDto, record, allChangeColumns); this.buildNewPieLineLog(projectContraptionChangeDataDto, record, allChangeColumns, newPieLine);
// 检验信息 // 检验信息
IdxBizJgInspectionDetectionInfo inspectionDetectionInfo = BeanUtil.copyProperties(newPieLine, IdxBizJgInspectionDetectionInfo.class); IdxBizJgInspectionDetectionInfo inspectionDetectionInfo = BeanUtil.copyProperties(newPieLine, IdxBizJgInspectionDetectionInfo.class);
if (!ValidationUtil.isEmpty(inspectionDetectionInfo)) { if (!ValidationUtil.isEmpty(inspectionDetectionInfo)) {
...@@ -265,7 +265,7 @@ public class PieLineDataChangeServiceImpl { ...@@ -265,7 +265,7 @@ public class PieLineDataChangeServiceImpl {
esEquipmentCategory.save(esEquipmentDto); esEquipmentCategory.save(esEquipmentDto);
} }
private void buildNewPieLineLog(ProjectContraptionChangeDataDto projectContraptionChangeDataDto, String record, List<FieldChangeMeta> allChangeColumns) { private void buildNewPieLineLog(ProjectContraptionChangeDataDto projectContraptionChangeDataDto, String record, List<FieldChangeMeta> allChangeColumns, PipelineChangeItemDto newPieLine) {
FieldChangeMeta fieldChangeMeta = new FieldChangeMeta(); FieldChangeMeta fieldChangeMeta = new FieldChangeMeta();
fieldChangeMeta.setChangeId(projectContraptionChangeDataDto.getProjectContraptionId()); fieldChangeMeta.setChangeId(projectContraptionChangeDataDto.getProjectContraptionId());
fieldChangeMeta.setColumnKey(PIE_LINE_KEY); fieldChangeMeta.setColumnKey(PIE_LINE_KEY);
...@@ -274,12 +274,12 @@ public class PieLineDataChangeServiceImpl { ...@@ -274,12 +274,12 @@ public class PieLineDataChangeServiceImpl {
fieldChangeMeta.setChangeId(projectContraptionChangeDataDto.getProjectContraptionId() + "/" + record); fieldChangeMeta.setChangeId(projectContraptionChangeDataDto.getProjectContraptionId() + "/" + record);
fieldChangeMeta.setFieldDisplayDefine(null); fieldChangeMeta.setFieldDisplayDefine(null);
fieldChangeMeta.setColumnFamily(PIE_LINE_CREATE); fieldChangeMeta.setColumnFamily(PIE_LINE_CREATE);
fieldChangeMeta.setColumnNewValue(record);
fieldChangeMeta.setDisplayNewValue(record);
fieldChangeMeta.setIsRepeatColumn(false); fieldChangeMeta.setIsRepeatColumn(false);
fieldChangeMeta.setDisplayNewValue(record); fieldChangeMeta.setDisplayNewValue(record);
fieldChangeMeta.setColumnOldValue(null); fieldChangeMeta.setColumnOldValue(null);
fieldChangeMeta.setDisplayOldValue(null); fieldChangeMeta.setDisplayOldValue(null);
fieldChangeMeta.setColumnNewValue(record);
fieldChangeMeta.setDisplayNewValue(newPieLine.getPipelineNumber());
allChangeColumns.add(fieldChangeMeta); allChangeColumns.add(fieldChangeMeta);
} }
......
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