From d45f521ab36d3c4759fc3ac3a6e0d6548c233567 Mon Sep 17 00:00:00 2001
From: heheng <475597332@qq.com>
Date: Tue, 02 Jun 2026 17:25:59 +0800
Subject: [PATCH] 功能修改
---
expert-admin/src/main/java/com/gkhy/web/controller/system/SysDeptController.java | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/expert-admin/src/main/java/com/gkhy/web/controller/system/SysDeptController.java b/expert-admin/src/main/java/com/gkhy/web/controller/system/SysDeptController.java
index 44a0ff3..0229813 100644
--- a/expert-admin/src/main/java/com/gkhy/web/controller/system/SysDeptController.java
+++ b/expert-admin/src/main/java/com/gkhy/web/controller/system/SysDeptController.java
@@ -10,6 +10,7 @@
import com.gkhy.common.enums.BusinessType;
import com.gkhy.common.utils.StringUtils;
import com.gkhy.system.service.ISysDeptService;
+import com.gkhy.system.service.SysExpertClassifyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@@ -34,6 +35,9 @@
{
@Autowired
private ISysDeptService deptService;
+
+ @Autowired
+ private SysExpertClassifyService expertClassifyService;
/**
* 获取部门列表
@@ -144,11 +148,14 @@
{
if (deptService.hasChildByDeptId(deptId))
{
- return warn("存在下级部门,不允许删除");
+ return warn("存在下级处室,不允许删除");
}
if (deptService.checkDeptExistUser(deptId))
{
- return warn("部门存在用户,不允许删除");
+ return warn("处室存在用户,不允许删除");
+ }
+ if (expertClassifyService.countByDeptId(deptId) > 0){
+ return warn("处室存在专业领域,不允许删除,请先专业领域删除对应处室绑定");
}
//todo 校验专家是否申请复用
deptService.checkDeptDataScope(deptId);
--
Gitblit v1.9.2