智慧保安后台管理项目备份
Administrator
2021-09-22 9c10d5e9ce87f3aa5144e4dc314a7a95fef64691
Merge branch 'master' of http://192.168.0.105:10010/r/zhba_management
2 files modified
137 ■■■■ changed files
src/main/java/org/springblade/modules/information/controller/InformationController.java 4 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml 133 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/information/controller/InformationController.java
@@ -1181,7 +1181,7 @@
        Map<String, Object> map = new HashMap<String, Object>();
        Integer count = 0;
        List<Map<String, Object>> lists = new ArrayList<>();
        if (jurisdiction.equals("1372091709474910209")){
        if (jurisdiction.equals("1372091709474910209") || "".equals(jurisdiction)){
            List<Map<Object, Object>> maps = informationService.selectBx(jurisdiction, deptid, type);
            for (int i = 0; i < maps.size(); i++) {
                String num = maps.get(i).get("num").toString();
@@ -1227,7 +1227,7 @@
        Map<String, Object> map = new HashMap<String, Object>();
        Integer count = 0;
        List<Map<String, Object>> lists = new ArrayList<>();
        if (jurisdiction.equals("1372091709474910209")) {
        if (jurisdiction.equals("1372091709474910209") || "".equals(jurisdiction)) {
            List<Map<Object, Object>> maps = informationService.selectExtype(jurisdiction, deptid, type);
            for (int i = 0; i < maps.size(); i++) {
                String num = maps.get(i).get("num").toString();
src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
@@ -1030,53 +1030,114 @@
    <!--资格审查异常数量-->
    <select id="selectExtype" resultType="java.util.HashMap">
        SELECT COUNT
        (*) as num,
        d.dept_name,
        u.real_name,
        j.dept_name AS jurname
        FROM blade_user u
        LEFT JOIN blade_dept d ON d.id = u.dept_id
        LEFT JOIN sys_jurisdiction j ON j.id = u.jurisdiction
        WHERE u.examination_type = 1 and u.is_deleted=0 and u.status = 1
        <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1372091709474910209'">
            and u.jurisdiction in (${jurisdiction})
        </if>
        <if test="deptid!=null and deptid!=''">
            and u.dept_id =#{deptid}
        </if>
        SELECT
        IFNULL( J.num, 0 ) AS num
        FROM
        ( SELECT departmentid, jurisdiction FROM sys_information GROUP BY departmentid, jurisdiction ) H
        LEFT JOIN (
        SELECT
        COUNT( * ) AS num,
        dept_id
        FROM
        blade_user
        WHERE
        examination_type = 1
        AND is_deleted = 0
        AND STATUS = 1
        <if test="type!=null and type=='1'.toString()">
            and to_days(u.update_time) = to_days(now())
            and to_days(audit_time) = to_days(now())
        </if>
        <if test="type!=null and type=='2'.toString()">
            and DATE_FORMAT(u.update_time, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )
            and DATE_FORMAT(audit_time, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )
        </if>
        GROUP BY d.dept_name,u.real_name,
        j.dept_name
        GROUP BY
        dept_id
        ) J ON J.dept_id = H.departmentid
        WHERE 1 = 1
        <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1372091709474910209'">
            AND H.jurisdiction in(${jurisdiction})
        </if>
        <if test="deptid!=null and deptid!=''">
            AND H.departmentid = #{deptid}
        </if>
    </select>
<!--    <select id="selectExtype" resultType="java.util.HashMap">-->
<!--        SELECT COUNT-->
<!--        (*) as num,-->
<!--        d.dept_name,-->
<!--        u.real_name,-->
<!--        j.dept_name AS jurname-->
<!--        FROM blade_user u-->
<!--        LEFT JOIN blade_dept d ON d.id = u.dept_id-->
<!--        LEFT JOIN sys_jurisdiction j ON j.id = u.jurisdiction-->
<!--        WHERE u.examination_type = 1 and u.is_deleted=0 and u.status = 1-->
<!--        <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1372091709474910209'">-->
<!--            and u.jurisdiction in (${jurisdiction})-->
<!--        </if>-->
<!--        <if test="deptid!=null and deptid!=''">-->
<!--            and u.dept_id =#{deptid}-->
<!--        </if>-->
<!--        <if test="type!=null and type=='1'.toString()">-->
<!--            and to_days(u.update_time) = to_days(now())-->
<!--        </if>-->
<!--        <if test="type!=null and type=='2'.toString()">-->
<!--            and DATE_FORMAT(u.update_time, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )-->
<!--        </if>-->
<!--        GROUP BY d.dept_name,u.real_name,-->
<!--        j.dept_name-->
<!--    </select>-->
    <!--表现差的数量-->
<!--    <select id="selectBx" resultType="java.util.HashMap">-->
<!--        SELECT IFNULL(COUNT( * ),0) AS num,-->
<!--        d.dept_name,-->
<!--        j.dept_name AS jurname-->
<!--        FROM sys_performance u-->
<!--        LEFT JOIN blade_dept d ON d.id = u.departmentid-->
<!--        LEFT JOIN sys_jurisdiction j ON j.id = u.jurisdiction-->
<!--        WHERE score = 3-->
<!--        <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1372091709474910209'">-->
<!--            and u.jurisdiction in(${jurisdiction})-->
<!--        </if>-->
<!--        <if test="deptid!=null and deptid!=''">-->
<!--            and u.departmentid =#{deptid}-->
<!--        </if>-->
<!--        <if test="type!=null and type=='1'.toString()">-->
<!--            and to_days(u.time) = to_days(now())-->
<!--        </if>-->
<!--        <if test="type!=null and type=='2'.toString()">-->
<!--            and DATE_FORMAT(u.time, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )-->
<!--        </if>-->
<!--        GROUP BY d.dept_name,-->
<!--        j.dept_name-->
<!--    </select>-->
    <select id="selectBx" resultType="java.util.HashMap">
        SELECT IFNULL(COUNT( * ),0) AS num,
        d.dept_name,
        j.dept_name AS jurname
        FROM sys_performance u
        LEFT JOIN blade_dept d ON d.id = u.departmentid
        LEFT JOIN sys_jurisdiction j ON j.id = u.jurisdiction
        WHERE score = 3
        <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1372091709474910209'">
            and u.jurisdiction in(${jurisdiction})
        </if>
        <if test="deptid!=null and deptid!=''">
            and u.departmentid =#{deptid}
        </if>
        SELECT
        IFNULL( J.num, 0 ) AS num
        FROM
        ( SELECT departmentid, jurisdiction FROM sys_information GROUP BY departmentid, jurisdiction ) H
        LEFT JOIN (
        SELECT
        IFNULL( COUNT( * ), 0 ) AS num,
        u.dept_id
        FROM
        sys_performance p
        INNER JOIN blade_user u ON p.securityId = u.id WHERE 1=1
        <if test="type!=null and type=='1'.toString()">
            and to_days(u.time) = to_days(now())
            and to_days(p.time) = to_days(now())
        </if>
        <if test="type!=null and type=='2'.toString()">
            and DATE_FORMAT(u.time, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )
            and DATE_FORMAT(p.time, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )
        </if>
        GROUP BY d.dept_name,
        j.dept_name
        GROUP BY
        dept_id
        ) J ON J.dept_id = H.departmentid
        WHERE 1 = 1
        <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1372091709474910209'">
            AND H.jurisdiction in(${jurisdiction})
        </if>
        <if test="deptid!=null and deptid!=''">
            AND H.departmentid = #{deptid}
        </if>
    </select>