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 |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 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 f567dce..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;
@@ -35,10 +36,13 @@
     @Autowired
     private ISysDeptService deptService;
 
+    @Autowired
+    private SysExpertClassifyService expertClassifyService;
+
     /**
      * 获取部门列表
      */
-    @PreAuthorize("@ss.hasPermi('system:dept:list')")
+//    @PreAuthorize("@ss.hasPermi('system:dept:list')")
     @GetMapping("/list")
     @ApiOperation(value = "获取部门列表")
     public R<List<SysDept>> list(SysDept dept)
@@ -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