From 6ad9c778d138d0806966ce044dd4ee2ee46d2ea2 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Sat, 18 Sep 2021 16:56:52 +0800
Subject: [PATCH] 分局预警接口修改
---
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