From 3e6824c089291d1672eb97ce9f6f8e18841ee874 Mon Sep 17 00:00:00 2001
From: tangzy <tangzy123456>
Date: Fri, 17 Sep 2021 10:51:08 +0800
Subject: [PATCH] 1.用户
---
src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml | 76 +++++++++++++++++++++----------------
1 files changed, 43 insertions(+), 33 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 7967fe8..054d807 100644
--- a/src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
+++ b/src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
@@ -136,45 +136,55 @@
j.dept_name
</select>
- <!--通过辖区查询机构id,然后通过机构id查询当前机构交社保的人数(numj单位已交社保数量;numz单位人员总数)-->
<select id="selectCs" resultType="java.util.HashMap">
- SELECT A.numj,
- B.numz,
- d.dept_name as deptname
- FROM (
- SELECT COUNT
- (*) AS numj,
- deptid
- FROM sys_socil
- WHERE deptid IN (SELECT i.departmentid
- FROM sys_information i
- LEFT JOIN sys_jurisdiction j ON j.id = i.jurisdiction where 1=1
- <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1372091709474910209'">
- and i.jurisdiction in(${jurisdiction})
- </if>
- GROUP BY i.departmentid)
- GROUP BY deptid
- ) A
- left JOIN (
- SELECT COUNT
- (*) AS numz,
- dept_id
+ SELECT COUNT(*) as numj,jurisdiction
FROM blade_user
- WHERE dept_id IN (SELECT i.departmentid
- FROM sys_information i
- LEFT JOIN sys_jurisdiction j ON j.id = i.jurisdiction where 1=1
+ WHERE soil = 1
<if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1372091709474910209'">
- and i.jurisdiction in(${jurisdiction})
+ and jurisdiction in(${jurisdiction})
</if>
- GROUP BY i.departmentid)
- GROUP BY dept_id
- ) B ON A.deptid = B.dept_id
- LEFT JOIN (SELECT id, dept_name FROM blade_dept) d ON d.id = A.deptid where 1=1
- <if test="deptid!=null and deptid!=''">
- and A.deptid =#{deptid}
- </if>
+ group by jurisdiction
</select>
+ <!--通过辖区查询机构id,然后通过机构id查询当前机构交社保的人数(numj单位已交社保数量;numz单位人员总数)-->
+<!-- <select id="selectCs" resultType="java.util.HashMap">-->
+<!-- SELECT A.numj,-->
+<!-- B.numz,-->
+<!-- d.dept_name as deptname-->
+<!-- FROM (-->
+<!-- SELECT COUNT-->
+<!-- (*) AS numj,-->
+<!-- deptid-->
+<!-- FROM sys_socil-->
+<!-- WHERE deptid IN (SELECT i.departmentid-->
+<!-- FROM sys_information i-->
+<!-- LEFT JOIN sys_jurisdiction j ON j.id = i.jurisdiction where 1=1-->
+<!-- <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1372091709474910209'">-->
+<!-- and i.jurisdiction in(${jurisdiction})-->
+<!-- </if>-->
+<!-- GROUP BY i.departmentid)-->
+<!-- GROUP BY deptid-->
+<!-- ) A-->
+<!-- left JOIN (-->
+<!-- SELECT COUNT-->
+<!-- (*) AS numz,-->
+<!-- dept_id-->
+<!-- FROM blade_user-->
+<!-- WHERE dept_id IN (SELECT i.departmentid-->
+<!-- FROM sys_information i-->
+<!-- LEFT JOIN sys_jurisdiction j ON j.id = i.jurisdiction where 1=1-->
+<!-- <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1372091709474910209'">-->
+<!-- and i.jurisdiction in(${jurisdiction})-->
+<!-- </if>-->
+<!-- GROUP BY i.departmentid)-->
+<!-- GROUP BY dept_id-->
+<!-- ) B ON A.deptid = B.dept_id-->
+<!-- LEFT JOIN (SELECT id, dept_name FROM blade_dept) d ON d.id = A.deptid where 1=1-->
+<!-- <if test="deptid!=null and deptid!=''">-->
+<!-- and A.deptid =#{deptid}-->
+<!-- </if>-->
+<!-- </select>-->
+
<!-- <!–统计上个月和这个月交社保的人数以及缴纳金额–>-->
<!-- <select id="selectTo" resultType="java.util.HashMap">-->
<!-- SELECT IFNULL(A.lastmonth, 0) AS lastmonth,-->
--
Gitblit v1.9.3