fix 78032 标签项管理--展示区域管理,将已有关联数据的区域批量删除,删除成功了
This commit is contained in:
@@ -166,7 +166,15 @@ public class LawsAreaController extends JeroController<LawsArea, ILawsAreaServic
|
|||||||
if(!map.containsKey("ids") || StringUtils.isEmpty(map.get("ids"))){
|
if(!map.containsKey("ids") || StringUtils.isEmpty(map.get("ids"))){
|
||||||
return Result.error(ResultCommon.PLEASE_SELECT_DATA);
|
return Result.error(ResultCommon.PLEASE_SELECT_DATA);
|
||||||
}
|
}
|
||||||
this.lawsAreaService.deleteByIds(Arrays.asList(map.get("ids").split(",")));
|
List<String> idList = Arrays.asList(map.get("ids").split(","));
|
||||||
|
List<LawsArea> lawsAreas = lawsAreaService.listByIds(idList);
|
||||||
|
for (LawsArea lawsArea : lawsAreas) {
|
||||||
|
int count= lawsTagService.queryExitArea(lawsArea);
|
||||||
|
if (count > 0) {
|
||||||
|
return Result.error(ResultCommon.TAG_DELETE_ERROR_2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.lawsAreaService.deleteByIds(idList);
|
||||||
return Result.OK(ResultCommon.SUCCESSFULLY_DELETED_IN_BULK);
|
return Result.OK(ResultCommon.SUCCESSFULLY_DELETED_IN_BULK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user