From a9ec32e3db22fa4f5f44fa2b68e92862c1f58a5d Mon Sep 17 00:00:00 2001
From: tangzy <tangzy123456>
Date: Thu, 25 Nov 2021 15:22:18 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 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..6d2ae59 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
- WHERE A.jurisdiction in (${deptid})
- GROUP BY cz, wcz, jurisdiction
+ GROUP BY dept_id) C ON A.departmentid = C.dept_id
+ WHERE A.jurisdiction in(${deptid})
+ GROUP BY cz, wcz
</select>
<!--查询部门下面的所有单位-->
--
Gitblit v1.9.3