智慧保安后台管理-验收版本
tangzy
2021-11-25 39e82fbf10b1062d37a127aac0629e79fc80654a
1.许可
3 files modified
210 ■■■■■ changed files
src/main/java/org/springblade/modules/equipage/controller/CarController.java 8 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml 182 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/record/mapper/RecordMapper.xml 20 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/equipage/controller/CarController.java
@@ -136,7 +136,7 @@
        params.put("beginTime", beginTime);
        params.put("endTime", endTime);
        params.put("rectify", rectify);
        params.put("callbackUrl", "http://2h3f861221.wicp.vip/car/SaveUrl");
        params.put("callbackUrl", "http://s16s652780.51mypc.cn/car/SaveUrl");
        params.put("callbackId", "1");
        params.put("appId", "PO00000761");
        params.put("timestamp", System.currentTimeMillis());
@@ -209,14 +209,14 @@
        csvurl = null;
        List<String> allString = new ArrayList<>();
        DowloadZipUtil dowloadZipUtil = new DowloadZipUtil();
        File file = dowloadZipUtil.downloadFile(fileUrl, "D:\\caiji");
        File file = dowloadZipUtil.downloadFile(fileUrl, "/usr/local/nginx/dist/enterprises/car");
        //文件名
        String name = file.getName();
        String substring = name.substring(0, name.length() - 4);
        //解压数据
        FileZip fileZip = new FileZip();
        fileZip.ZipUncompress("D:\\caiji\\" + substring + ".zip", "D:\\caiji");
        csvurl = "D:\\caiji\\" + substring + ".csv";
        fileZip.ZipUncompress("/usr/local/nginx/dist/enterprises/car" + substring + ".zip", "/usr/local/nginx/dist/enterprises/car");
        csvurl = substring + ".csv";
    }
    /**
     * 人员
src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
@@ -45,11 +45,11 @@
        FROM
        sys_information i
        LEFT JOIN ( SELECT COUNT( * ) AS znum, dept_id FROM blade_user WHERE role_id = '1412226235153731586' AND
        status=1 GROUP BY dept_id ) A ON A.dept_id = i.departmentid
        status=1 AND is_deleted = 0 GROUP BY dept_id ) A ON A.dept_id = i.departmentid
        LEFT JOIN ( SELECT COUNT( * ) AS cnum, dept_id FROM blade_user WHERE role_id = '1412226235153731586' AND
        status=1 AND hold=1 GROUP BY dept_id ) B ON B.dept_id = i.departmentid
        status=1 AND is_deleted = 0 AND hold=1 GROUP BY dept_id ) B ON B.dept_id = i.departmentid
        LEFT JOIN ( SELECT COUNT( * ) AS pnum, dept_id FROM blade_user WHERE role_id = '1412226235153731586' AND
        status=1 AND dispatch=0 GROUP BY dept_id ) C ON C.dept_id = i.departmentid
        status=1 AND is_deleted = 0 AND dispatch=0 GROUP BY dept_id ) C ON C.dept_id = i.departmentid
        where 1=1
        <if test="information.enterprisename!=null and information.enterprisename!=''">
            and i.enterpriseName like concat(concat('%', #{information.enterprisename}),'%')
@@ -1204,142 +1204,170 @@
    <select id="selectLi" resultType="java.util.HashMap">
        SELECT
        IFNULL( A.num, 0 ) AS num,
        IFNULL( V.num, 0 ) AS num,
        IFNULL( B.cznum, 0 ) AS cznum,
        IFNULL( C.paiqnum, 0 ) AS paiqnum,
        IFNULL( D.wpaiqnum, 0 ) AS wpaiqnum,
        IFNULL( E.sbnum, 0 ) AS sbnum,
        IFNULL( F.wcaijnum, 0 ) AS wcaijnum,
        IFNULL( H.ycaijzpnum, 0 ) AS ycaijzpnum,
        IFNULL( I.ycaijzwnum, 0 ) AS ycaijzwnum,
        IFNULL( G.yicnum, 0 ) AS yicnum,
        A.dept_id,
        d.enterpriseName AS deptname,
        d.stats,
        A.departmentid,
        A.enterpriseName AS deptname,
        A.stats,
        j.dept_name AS jurname
        FROM
        ( SELECT COUNT( * ) AS num, dept_id, jurisdiction FROM blade_user WHERE role_id = '1412226235153731586' and
        status=1 AND is_deleted=0 GROUP BY
        dept_id, jurisdiction ) A
        ( SELECT jurisdiction, departmentid,enterpriseName,stats FROM sys_information where stats !=1) A
        LEFT JOIN (
        SELECT
        J.znum+J.fznum as num,
        J.dept_id
        FROM
        (
        SELECT
        A.znum,
        IFNULL( B.znum, 0 ) AS fznum,
        A.dept_id
        FROM
        (
        SELECT
        COUNT( * ) AS znum,
        bu.dept_id
        FROM
        blade_user bu
        WHERE
        bu.`status` = 1
        AND bu.is_deleted = 0
        AND bu.role_id = '1412226235153731586'
        GROUP BY
        bu.dept_id
        ) A
        LEFT JOIN (
        SELECT
        IFNULL( COUNT( * ), 0 ) AS znum,
        bd.parent_id
        FROM
        blade_user bu
        LEFT JOIN blade_dept bd ON bu.dept_id = bd.id
        WHERE
        bu.`status` = 1
        AND bu.is_deleted = 0
        AND bu.role_id = '1412226235153731586'
        GROUP BY
        bd.parent_id
        ) B ON B.parent_id = A.dept_id
        ) J
        ) V ON V.dept_id = A.departmentid
        LEFT JOIN (
        SELECT
        COUNT( * ) AS cznum,
        dept_id,
        jurisdiction
        dept_id
        FROM
        blade_user
        WHERE
        role_id = '1412226235153731586' and status=1 AND is_deleted=0
        AND hold=1
        role_id = '1412226235153731586'
        AND STATUS = 1
        AND is_deleted = 0
        AND hold = 1
        GROUP BY
        dept_id,
        jurisdiction
        ) B ON A.dept_id = B.dept_id
        dept_id
        ) B ON A.departmentid = B.dept_id
        LEFT JOIN (
        SELECT
        COUNT( * ) AS paiqnum,
        dept_id,
        jurisdiction
        dept_id
        FROM
        blade_user
        WHERE
        role_id = '1412226235153731586' and status=1 AND is_deleted=0
        AND dispatch=0
        role_id = '1412226235153731586'
        AND STATUS = 1
        AND is_deleted = 0
        AND dispatch = 0
        GROUP BY
        dept_id,
        jurisdiction
        ) C ON C.dept_id = A.dept_id
        dept_id
        ) C ON C.dept_id = A.departmentid
        LEFT JOIN (
        SELECT
        COUNT( * ) AS wpaiqnum,
        dept_id,
        jurisdiction
        dept_id
        FROM
        blade_user
        WHERE
        role_id = '1412226235153731586' and status=1 AND is_deleted=0
        AND dispatch=1
        role_id = '1412226235153731586'
        AND STATUS = 1
        AND is_deleted = 0
        AND dispatch = 1
        GROUP BY
        dept_id,
        jurisdiction
        ) D ON D.dept_id = A.dept_id
        dept_id
        ) D ON D.dept_id = A.departmentid
        LEFT JOIN ( SELECT COUNT( * ) AS sbnum, deptid FROM sys_socil GROUP BY deptid ) E ON E.deptid = A.departmentid
        LEFT JOIN (
        SELECT COUNT( * ) AS sbnum, deptid, jurisdiction FROM sys_socil GROUP BY deptid, jurisdiction
        ) E
        ON E.deptid = A.dept_id
        LEFT JOIN
        (
        SELECT
        COUNT( * ) AS wcaijnum,
        dept_id,
        jurisdiction
        dept_id
        FROM
        blade_user
        WHERE
        role_id = '1412226235153731586' and status=1 AND is_deleted=0
        AND photo=1
        role_id = '1412226235153731586'
        AND STATUS = 1
        AND is_deleted = 0
        AND photo = 1
        GROUP BY
        dept_id,
        jurisdiction
        ) F
        ON F.dept_id = A.dept_id
        LEFT JOIN
        (
        dept_id
        ) F ON F.dept_id = A.departmentid
        LEFT JOIN (
        SELECT
        COUNT( * ) AS ycaijzpnum,
        dept_id,
        jurisdiction
        dept_id
        FROM
        blade_user
        WHERE
        role_id = '1412226235153731586' and status=1 AND is_deleted=0
        AND photo=0
        role_id = '1412226235153731586'
        AND STATUS = 1
        AND is_deleted = 0
        AND photo = 0
        GROUP BY
        dept_id,
        jurisdiction
        ) H
        ON H.dept_id = A.dept_id
        LEFT JOIN
        (
        dept_id
        ) H ON H.dept_id = A.departmentid
        LEFT JOIN (
        SELECT
        COUNT( * ) AS ycaijzwnum,
        dept_id,
        jurisdiction
        dept_id
        FROM
        blade_user
        WHERE
        role_id = '1412226235153731586' and status=1 AND is_deleted=0
        AND fingerprint=0
        role_id = '1412226235153731586'
        AND STATUS = 1
        AND is_deleted = 0
        AND fingerprint = 0
        GROUP BY
        dept_id,
        jurisdiction
        ) I
        ON I.dept_id = A.dept_id
        dept_id
        ) I ON I.dept_id = A.departmentid
        LEFT JOIN (
        SELECT
        COUNT( * ) AS yicnum,
        dept_id,
        jurisdiction
        dept_id
        FROM
        blade_user
        WHERE
        role_id = '1412226235153731586' and status=1 AND is_deleted=0
        AND examination_mx=1
        role_id = '1412226235153731586'
        AND STATUS = 1
        AND is_deleted = 0
        AND examination_mx = 1
        GROUP BY
        dept_id,
        jurisdiction
        ) G ON G.dept_id = A.dept_id
        LEFT JOIN sys_information d ON A.dept_id = d.departmentid
        dept_id
        ) G ON G.dept_id = A.departmentid
        LEFT JOIN blade_dept d ON A.departmentid = d.id
        LEFT JOIN sys_jurisdiction j ON j.id = A.jurisdiction
        WHERE 1=1
        WHERE 1 =1
        <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1372091709474910209'">
            and A.jurisdiction =#{jurisdiction}
            and (j.id = #{jurisdiction} or j.parent_id = #{jurisdiction})
        </if>
        <if test="deptid!=null and deptid!=''">
            and d.enterpriseName like concat(concat('%', #{deptid}),'%')
            and A.enterpriseName like concat(concat('%', #{deptid}),'%')
        </if>
        <if test="stats!=null and stats!=''">
            and d.stats =#{stats}
            and A.stats =#{stats}
        </if>
    </select>
src/main/java/org/springblade/modules/record/mapper/RecordMapper.xml
@@ -41,7 +41,25 @@
    <select id="selectRecordPage" resultMap="recordResultMap">
        select * from sys_record
        select * from sys_record si left join
        sys_jurisdiction sj
        on
        sj.id = si.jurisdiction where 1=1
        <if test="record.ptype!=null and record.ptype!=''">
            and ptype=#{record.ptype}
        </if>
        <if test="record.jurisdiction!=null and record.jurisdiction != '' and record.jurisdiction!='1372091709474910209'">
            and (sj.id = #{record.jurisdiction} or sj.parent_id = #{record.jurisdiction})
        </if>
        <if test="record.papprove!=null and record.papprove!=''">
            and papprove=#{record.papprove}
        </if>
        <if test="record.xapprove!=null and record.xapprove!=''">
            and xapprove=#{record.xapprove}
        </if>
        <if test="record.sapprove!=null and record.sapprove!=''">
            and sapprove=#{record.sapprove}
        </if>
    </select>
</mapper>