智慧保安后台管理项目备份
tangzy
2021-08-31 4ecf2dbe2c255c3b556ff4bfb49b4e2e8285bd17
src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
@@ -406,7 +406,7 @@
        AND STATUS = 1
        AND is_deleted = 0
        GROUP BY dept_id
        ) J ON J.dept_id = H.departmentid
        ) J ON J.dept_id = H.departmentid where 1=1
        <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1123598813738675201'">
            and H.jurisdiction =#{jurisdiction}
        </if>
@@ -463,6 +463,8 @@
        WHERE
        YEAR ( s.update_time ) =#{year}
        AND dispatch = 0
        AND `status`=1
        AND is_deleted=0
        AND 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!='1123598813738675201'">
@@ -1080,6 +1082,7 @@
        IFNULL( G.yicnum, 0 ) AS yicnum,
        A.dept_id,
        d.enterpriseName AS deptname,
        d.stats,
        j.dept_name AS jurname
        FROM
        ( SELECT COUNT( * ) AS num, dept_id, jurisdiction FROM blade_user WHERE role_id = '1412226235153731586' and
@@ -1166,6 +1169,9 @@
        </if>
        <if test="deptid!=null and deptid!=''">
            and d.dept_name like concat(concat('%', #{deptid}),'%')
        </if>
        <if test="stats!=null and stats!=''">
            and d.stats =#{stats}
        </if>
    </select>
@@ -1377,6 +1383,7 @@
        SELECT
        A.enterpriseName,
        A.departmentid,
        A.stats,
        A.jurisdiction,
        A.dept_name as jurname,
        IFNULL( B.num, 0 ) AS fwnum,
@@ -1386,6 +1393,7 @@
        SELECT
        i.enterpriseName,
        i.departmentid,
        i.stats,
        i.jurisdiction,
        j.dept_name
        FROM
@@ -1406,12 +1414,31 @@
        <if test="deptid!=null and deptid!=''">
            and A.enterpriseName like concat('%', #{deptid},'%')
        </if>
        <if test="stats!=null and stats!=''">
            and A.stats=#{stats}
        </if>
    </select>
    <!--保安人员详情-->
    <select id="selectUIn" resultType="java.util.HashMap">
        SELECT real_name,securitynumber,cardid,phone,hold,soil,photo,examination_type,dispatch FROM blade_user WHERE
        role_id='1412226235153731586' AND is_deleted=0 AND `status`=1
        SELECT
        u.real_name,
        u.securitynumber,
        u.cardid,
        u.phone,
        u.hold,
        u.soil,
        u.photo,
        u.examination_type,
        u.dispatch,
        i.enterpriseName
        FROM
        blade_user u
        LEFT JOIN sys_information i ON i.departmentid = u.dept_id
        WHERE
        u.role_id = '1412226235153731586'
        AND u.is_deleted = 0
        AND u.`status` =1
        <if test="deptid!=null and deptid!=''">
            and dept_id=#{deptid}
        </if>