ソースを参照

1.修复部门相关的查询,无法查询最底层部门问题

jzp 22 時間 前
コミット
4a87827b82

+ 3 - 1
fs-admin/src/main/java/com/fs/qw/controller/QwUserController.java

@@ -204,7 +204,9 @@ public class QwUserController extends BaseController {
             combinedList.add(deptId);
         }
         //本部门的下级部门
-        List<Long> deptList = companyDeptService.selectCompanyDeptByParentId(deptId);
+        //List<Long> deptList = companyDeptService.selectCompanyDeptByParentId(deptId);
+        //本部门的全部下级部门
+        List<Long> deptList = companyDeptService.getCurrentDeptIdDownTreeIds(deptId);
         if (!deptList.isEmpty()){
             combinedList.addAll(deptList);
         }

+ 9 - 3
fs-company/src/main/java/com/fs/company/controller/company/CompanyUserController.java

@@ -149,7 +149,9 @@ public class CompanyUserController extends BaseController {
             combinedDpetList.add(deptId);
         }
         //本部门的下级部门
-        List<Long> deptList = companyDeptService.selectCompanyDeptByParentId(deptId);
+        //List<Long> deptList = companyDeptService.selectCompanyDeptByParentId(deptId);
+        //本部门的全部下级部门
+        List<Long> deptList = companyDeptService.getCurrentDeptIdDownTreeIds(deptId);
         if (!deptList.isEmpty()){
             combinedDpetList.addAll(deptList);
         }
@@ -576,7 +578,9 @@ public class CompanyUserController extends BaseController {
             combinedList.add(deptId);
         }
         //本部门的下级部门
-        List<Long> deptList = companyDeptService.selectCompanyDeptByParentId(deptId);
+        //List<Long> deptList = companyDeptService.selectCompanyDeptByParentId(deptId);
+        //本部门的全部下级部门
+        List<Long> deptList = companyDeptService.getCurrentDeptIdDownTreeIds(deptId);
         if (!deptList.isEmpty()){
             combinedList.addAll(deptList);
         }
@@ -672,7 +676,9 @@ public class CompanyUserController extends BaseController {
             }
 
         //本部门的下级部门
-        List<Long> deptList = companyDeptService.selectCompanyDeptByParentId(deptId);
+        //List<Long> deptList = companyDeptService.selectCompanyDeptByParentId(deptId);
+        //本部门的全部下级部门
+        List<Long> deptList = companyDeptService.getCurrentDeptIdDownTreeIds(deptId);
         if (!deptList.isEmpty()){
             combinedDeptList.addAll(deptList);
         }

+ 6 - 2
fs-company/src/main/java/com/fs/company/controller/course/FsCourseFinishTempParentController.java

@@ -92,7 +92,9 @@ public class FsCourseFinishTempParentController extends BaseController
             combinedList.add(deptId);
         }
         //本部门的下级部门
-        List<Long> deptList = companyDeptService.selectCompanyDeptByParentId(deptId);
+        //List<Long> deptList = companyDeptService.selectCompanyDeptByParentId(deptId);
+        //本部门的全部下级部门
+        List<Long> deptList = companyDeptService.getCurrentDeptIdDownTreeIds(deptId);
         if (!deptList.isEmpty()){
             combinedList.addAll(deptList);
         }
@@ -157,7 +159,9 @@ public class FsCourseFinishTempParentController extends BaseController
             combinedList.add(deptId);
         }
         //本部门的下级部门
-        List<Long> deptList = companyDeptService.selectCompanyDeptByParentId(deptId);
+        //List<Long> deptList = companyDeptService.selectCompanyDeptByParentId(deptId);
+        //本部门的全部下级部门
+        List<Long> deptList = companyDeptService.getCurrentDeptIdDownTreeIds(deptId);
         if (!deptList.isEmpty()){
             combinedList.addAll(deptList);
         }

+ 3 - 1
fs-company/src/main/java/com/fs/company/controller/course/FsCourseWatchLogController.java

@@ -118,7 +118,9 @@ public class FsCourseWatchLogController extends BaseController
         }
 
         //本部门的下级部门
-        List<Long> deptList = companyDeptService.selectCompanyDeptByParentId(deptId);
+        //List<Long> deptList = companyDeptService.selectCompanyDeptByParentId(deptId);
+        //本部门的全部下级部门
+        List<Long> deptList = companyDeptService.getCurrentDeptIdDownTreeIds(deptId);
         if (!deptList.isEmpty()){
             combinedList.addAll(deptList);
         }

+ 7 - 2
fs-company/src/main/java/com/fs/company/controller/qw/QwExternalContactController.java

@@ -210,7 +210,10 @@ public class QwExternalContactController extends BaseController
             combinedList.add(deptId);
         }
         //本部门的下级部门
-        List<Long> deptList = companyDeptService.selectCompanyDeptByParentId(deptId);
+        //List<Long> deptList = companyDeptService.selectCompanyDeptByParentId(deptId);
+
+        //本部门的全部下级部门
+        List<Long> deptList = companyDeptService.getCurrentDeptIdDownTreeIds(deptId);
         if (!deptList.isEmpty()){
             combinedList.addAll(deptList);
         }
@@ -832,7 +835,9 @@ public class QwExternalContactController extends BaseController
                 combinedList.add(deptId);
             }
             //本部门的下级部门
-            List<Long> deptList = companyDeptService.selectCompanyDeptByParentId(deptId);
+            //List<Long> deptList = companyDeptService.selectCompanyDeptByParentId(deptId);
+            //本部门的全部下级部门
+            List<Long> deptList = companyDeptService.getCurrentDeptIdDownTreeIds(deptId);
             if (!deptList.isEmpty()){
                 combinedList.addAll(deptList);
             }

+ 3 - 1
fs-company/src/main/java/com/fs/company/controller/qw/QwExternalContactTransferLogController.java

@@ -73,7 +73,9 @@ public class QwExternalContactTransferLogController extends BaseController
             combinedList.add(deptId);
         }
         //本部门的下级部门
-        List<Long> deptList = companyDeptService.selectCompanyDeptByParentId(deptId);
+        //List<Long> deptList = companyDeptService.selectCompanyDeptByParentId(deptId);
+        //本部门的全部下级部门
+        List<Long> deptList = companyDeptService.getCurrentDeptIdDownTreeIds(deptId);
         if (!deptList.isEmpty()){
             combinedList.addAll(deptList);
         }

+ 3 - 1
fs-company/src/main/java/com/fs/company/controller/qw/QwFriendWelcomeController.java

@@ -82,7 +82,9 @@ public class QwFriendWelcomeController extends BaseController
             combinedList.add(deptId);
         }
         //本部门的下级部门
-        List<Long> deptList = companyDeptService.selectCompanyDeptByParentId(deptId);
+        //List<Long> deptList = companyDeptService.selectCompanyDeptByParentId(deptId);
+        //本部门的全部下级部门
+        List<Long> deptList = companyDeptService.getCurrentDeptIdDownTreeIds(deptId);
         if (!deptList.isEmpty()){
             combinedList.addAll(deptList);
         }

+ 3 - 1
fs-company/src/main/java/com/fs/company/controller/qw/QwGroupChatController.java

@@ -74,7 +74,9 @@ public class QwGroupChatController extends BaseController
             combinedList.add(deptId);
         }
         //本部门的下级部门
-        List<Long> deptList = companyDeptService.selectCompanyDeptByParentId(deptId);
+        //List<Long> deptList = companyDeptService.selectCompanyDeptByParentId(deptId);
+        //本部门的全部下级部门
+        List<Long> deptList = companyDeptService.getCurrentDeptIdDownTreeIds(deptId);
         if (!deptList.isEmpty()){
             combinedList.addAll(deptList);
         }

+ 3 - 1
fs-company/src/main/java/com/fs/company/controller/qw/QwSopController.java

@@ -114,7 +114,9 @@ public class QwSopController extends BaseController
             combinedList.add(deptId);
         }
         //本部门的下级部门
-        List<Long> deptList = companyDeptService.selectCompanyDeptByParentId(deptId);
+        //List<Long> deptList = companyDeptService.selectCompanyDeptByParentId(deptId);
+        //本部门的全部下级部门
+        List<Long> deptList = companyDeptService.getCurrentDeptIdDownTreeIds(deptId);
         if (!deptList.isEmpty()){
             combinedList.addAll(deptList);
         }

+ 3 - 1
fs-company/src/main/java/com/fs/company/controller/qw/QwSopLogsController.java

@@ -175,7 +175,9 @@ public class QwSopLogsController extends BaseController
                     combinedList.add(deptId);
                 }
                 // 本部门的下级部门
-                List<Long> deptList = companyDeptService.selectCompanyDeptByParentId(deptId);
+                //List<Long> deptList = companyDeptService.selectCompanyDeptByParentId(deptId);
+                //本部门的全部下级部门
+                List<Long> deptList = companyDeptService.getCurrentDeptIdDownTreeIds(deptId);
                 if (!deptList.isEmpty()) {
                     combinedList.addAll(deptList);
                 }

+ 3 - 1
fs-company/src/main/java/com/fs/company/controller/qw/QwWorkTaskNewController.java

@@ -87,7 +87,9 @@ public class QwWorkTaskNewController extends BaseController
             combinedList.add(deptId);
         }
         //本部门的下级部门
-        List<Long> deptList = companyDeptService.selectCompanyDeptByParentId(deptId);
+        //List<Long> deptList = companyDeptService.selectCompanyDeptByParentId(deptId);
+        //本部门的全部下级部门
+        List<Long> deptList = companyDeptService.getCurrentDeptIdDownTreeIds(deptId);
         if (!deptList.isEmpty()){
             combinedList.addAll(deptList);
         }