Commit 4c872f42 authored by tianbo's avatar tianbo

bugfix:

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