Commit 4c872f42 authored by tianbo's avatar tianbo

bugfix:

1、压力管道装置删除逻辑修改
parent 562774c8
...@@ -108,6 +108,7 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP ...@@ -108,6 +108,7 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP
if (records.isEmpty()) return Boolean.TRUE; if (records.isEmpty()) return Boolean.TRUE;
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("recordList", records); map.put("recordList", records);
map.put("equList", PipelineEnum.PRESSURE_PIPELINE.getCode());
registerInfoService.batchDeleteByRecord(map); registerInfoService.batchDeleteByRecord(map);
// 删除装置表信息 // 删除装置表信息
this.removeById(sequenceNbr); this.removeById(sequenceNbr);
......
...@@ -470,7 +470,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -470,7 +470,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
.collect(Collectors.toList()); .collect(Collectors.toList());
idxBizJgRegisterInfoService.batchDeleteByRecord(MapBuilder.<String, Object>create() idxBizJgRegisterInfoService.batchDeleteByRecord(MapBuilder.<String, Object>create()
.put("recordList", records) .put("recordList", records)
.put("equCategory", equipmentInfoForm.get("EQU_CATEGORY")) .put("equList", equipmentInfoForm.get("EQU_LIST"))
.build()); .build());
} }
...@@ -999,8 +999,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -999,8 +999,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
esEquipmentCategoryDto.setSEQUENCE_NBR(recordList.toString()); esEquipmentCategoryDto.setSEQUENCE_NBR(recordList.toString());
list.add(esEquipmentCategoryDto); list.add(esEquipmentCategoryDto);
} }
// 删除校验,被引用时不可删除,管道排除在外 // 删除校验,被引用时不可删除。管道不做是否引用校验,直接删除已有管道
if(!PipelineEnum.INDUSTRIAL_PIPELINE.getCode().equals(map.get("equCategory"))) { if(!PipelineEnum.PRESSURE_PIPELINE.getCode().equals(map.get("equList"))) {
this.checkForDelete(records); this.checkForDelete(records);
} }
// 删除涉及的19张表的数据 // 删除涉及的19张表的数据
...@@ -1010,6 +1010,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -1010,6 +1010,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
return true; return true;
} }
/**
* 删除校验,被引用时不可删除
*
* @param records
*/
private void checkForDelete(List<String> records) { private void checkForDelete(List<String> records) {
for (String record : records) { for (String record : records) {
Boolean isUsed = commonService.checkEquipIsUsed(record); Boolean isUsed = commonService.checkEquipIsUsed(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