| | |
| | | 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,--> |