智慧保安后台管理-外网
Administrator
2021-12-15 8d43111bd0e598bc0b2014cbfa69a32e74959dff
src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
@@ -142,7 +142,12 @@
            and bu.real_name like concat('%', #{user.realName},'%')
        </if>
        <if test="user.dispatch!=null and user.dispatch != ''">
            and bu.dispatch = #{user.dispatch}
            <if test="user.dispatch == 0">
                and bu.dispatch = #{user.dispatch}
            </if>
            <if test="user.dispatch == 1">
                and bu.dispatch = #{user.dispatch}
            </if>
        </if>
        <if test="user.userType!=null and user.userType != ''">
            and bu.user_type = #{user.userType}
@@ -682,6 +687,7 @@
    <!--导出保安员信息-->
    <select id="exportSecurityInfo" resultType="org.springblade.modules.system.excel.SecurityExcel">
        select
        distinct bu.id,
        bd.dept_name deptId,
        bu.real_name realName,
        bu.phone,
@@ -786,6 +792,36 @@
        ORDER BY bu.id desc
    </select>
    <!--查询押运人员编码不为null的保安信息-->
    <select id="selectEquipent" resultType="java.util.HashMap">
        SELECT id,
               equipment_code as code
        FROM blade_user
        WHERE dept_id = '1460129345988239362'
          AND role_id = '1412226235153731586'
          AND is_deleted = 0
          AND `status` = 1
          AND equipment_code IS NOT NULL
    </select>
    <!--查詢用戶派遣記錄信息-->
    <select id="getUserDispatcherInfo" resultType="org.springblade.modules.dispatcher.vo.DispatcherVO">
        select
        sdu.name dispatcherCompany,
        dispatcherTime dispatchertime,
        sd.end_time endTime
        from blade_user bu
        left join
        sys_dispatcher sd
        on
        sd.user_ids = bu.id
        left join
        sys_dispatcher_unit sdu
        on
        sdu.id = sd.dispatcher_unit_id
        where 1=1
        and sd.status = 0
        and bu.dispatch = 0
        and bu.id = #{id}
    </select>
</mapper>