From 8c28e0e9d71b84eb18a3b40a9afc46ab50269aa2 Mon Sep 17 00:00:00 2001
From: zengh <123456>
Date: Fri, 27 Aug 2021 21:08:07 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml | 24 ++++++++++++++++++------
1 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml b/src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
index 5a0d8f2..7603447 100644
--- a/src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
+++ b/src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
@@ -198,12 +198,24 @@
</select>
<select id="selectDisp" resultType="java.util.HashMap">
- SELECT COUNT(d.NAME) AS num,
- u.real_name
- FROM sys_dispatcher d
- LEFT JOIN blade_user u ON u.cardid = d.cardid
- WHERE d.dept_id = #{deptid}
- GROUP BY u.real_name
+ SELECT IFNULL(A.thisnum, 0) AS pnum,
+ IFNULL(B.lastnum, 0) AS wpnum
+ FROM (SELECT COUNT(*) AS thisnum, dept_id,jurisdiction
+ FROM blade_user
+ WHERE role_id = '1412226235153731586' AND `status`=1 AND is_deleted=0
+ AND dispatch = 0
+ GROUP BY dept_id,jurisdiction) A
+ LEFT JOIN (SELECT COUNT(*) AS lastnum, dept_id,jurisdiction
+ FROM blade_user
+ WHERE role_id = '1412226235153731586' AND `status`=1 AND is_deleted=0
+ AND dispatch = 0
+ GROUP BY dept_id,jurisdiction) B ON A.dept_id = B.dept_id
+ <if test="jurisdiction!=null and jurisdiction=='' and jurisdiction!='1123598813738675201">
+ WHERE A.jurisdiction = #{jurisdiction}
+ </if>
+ <if test="deptid!=null and deptid==''">
+ WHERE A.dept_id = #{deptid}
+ </if>
</select>
<select id="selectSoil" resultType="java.util.HashMap">
--
Gitblit v1.9.3