From bcb742a2682e7e33621fc028cee9da033cf2ad80 Mon Sep 17 00:00:00 2001
From: tangzy <tangzy123456>
Date: Fri, 17 Sep 2021 16:29:33 +0800
Subject: [PATCH] 1.用户

---
 src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml b/src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml
index d5cb1f4..3b80694 100644
--- a/src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml
+++ b/src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml
@@ -383,23 +383,22 @@
 
     <select id="selectHold" resultType="java.util.HashMap">
         SELECT IFNULL(B.cz, 0)  as cz,
-               IFNULL(C.wcz, 0) as wcz,
-               A.jurisdiction
-        FROM (SELECT jurisdiction FROM blade_user) A
-                 LEFT JOIN (SELECT COUNT(hold) as cz, jurisdiction
+               IFNULL(C.wcz, 0) as wcz
+        FROM (SELECT departmentid,jurisdiction FROM sys_information) A
+                 LEFT JOIN (SELECT COUNT(hold) as cz, dept_id
                             FROM blade_user
                             WHERE hold = 1
                               AND role_id = '1412226235153731586'
                               and status = 1
-                            GROUP BY jurisdiction) B ON A.jurisdiction = B.jurisdiction
-                 LEFT JOIN (SELECT COUNT(hold) as wcz, jurisdiction
+                            GROUP BY dept_id) B ON A.departmentid = B.dept_id
+                 LEFT JOIN (SELECT COUNT(hold) as wcz, dept_id
                             FROM blade_user
                             WHERE hold = 2
                               AND role_id = '1412226235153731586'
                               and status = 1
-                            GROUP BY jurisdiction) C ON A.jurisdiction = C.jurisdiction
+                            GROUP BY dept_id) C ON A.departmentid = C.dept_id
         WHERE A.jurisdiction in (${deptid})
-        GROUP BY cz, wcz, jurisdiction
+        GROUP BY cz, wcz
     </select>
 
     <!--查询部门下面的所有单位-->

--
Gitblit v1.9.3