From 3a0c8b52844edf7a8d86e971934c0a2f116036be Mon Sep 17 00:00:00 2001 From: 张天森 <1292933220@qq.com> Date: 星期六, 08 十月 2022 15:01:55 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/huacheng_test' into huacheng_test --- flower_city/src/main/java/com/dg/core/controller/OrganizationController.java | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/flower_city/src/main/java/com/dg/core/controller/OrganizationController.java b/flower_city/src/main/java/com/dg/core/controller/OrganizationController.java index 2cd8557..bc0f74d 100644 --- a/flower_city/src/main/java/com/dg/core/controller/OrganizationController.java +++ b/flower_city/src/main/java/com/dg/core/controller/OrganizationController.java @@ -88,6 +88,11 @@ public ResultData deleteConfigById(@RequestParam(value = "Id",required = false) String Id) { Assert.notNull(Id, "Id 不能为空"); + OrganizationChartEntity entity=iOrganizationChartService.selectConfigById(Id); + if(!StringUtils.isEmpty(entity.getParentId())) + { + return ResultData.error("该机构下存在其他部门!请先删除子部门"); + } return toAjax(iOrganizationChartService.deleteConfigById(Id)); } @@ -151,7 +156,6 @@ return getDataTable(ids); } - //递归取id private List<OrganizationChartEntity> disposestreetId(List<OrganizationChartEntity> lists) { @@ -170,8 +174,5 @@ } return ids; } - - - } -- Gitblit v1.7.1