智慧保安后台管理-外网-验收版本
tangzy
2021-12-06 cc057177b2fb17aee9a173a6adbabdc578fd74c7
src/main/java/org/springblade/modules/dispatcher/mapper/DispatcherMapper.xml
@@ -26,7 +26,13 @@
            blade_user bu
        on
            bu.id = sd.user_ids
        left join
            sys_information si
        on
            si.departmentid = bu.dept_id
        where 1=1
        and bu.is_deleted = 0
        and bu.status = 1
        <if test="dispatcher.dispatcherUnitId!=null">
            and sd.dispatcher_unit_id = #{dispatcher.dispatcherUnitId}
        </if>
@@ -39,6 +45,9 @@
        </if>
        <if test="dispatcher.userIds!=null and  dispatcher.userIds!=''">
            and sd.user_ids like concat('%', #{dispatcher.userIds},'%')
        </if>
        <if test="dispatcher.jurisdiction!=null and  dispatcher.jurisdiction!='' and  dispatcher.jurisdiction!='1372091709474910209' ">
            and si.jurisdiction = #{dispatcher.jurisdiction}
        </if>
        <if test="dispatcher.name!=null and  dispatcher.name!=''">
            and sd.name like concat('%', #{dispatcher.name},'%')
@@ -55,6 +64,37 @@
                or ( sd.dispatcherTime &lt;= #{dispatcher.overTime} and sd.dispatcherTime &gt;= #{dispatcher.beginTime})
            </if>
        </if>
        order by sd.id desc
    </select>
    <!--  app从业单位查询  -->
    <select id="queryDispatcher" resultType="org.springblade.modules.dispatcher.vo.DispatcherVO">
        select
        sd.*,bu.real_name securityName
        ,sdu.name dispatcherCompany
        ,sdu.address dispatcherAddress
        ,sdu.linkman dispatcherPerson
        ,sdu.phone dispatcherPhone
        ,bu.cardid idCardNo
        from
        sys_dispatcher sd
        left join
        sys_dispatcher_unit sdu
        on
        sdu.id = sd.dispatcher_unit_id
        left join
        blade_user bu
        on
        bu.id = sd.user_ids
        left join
        sys_information si
        on
        si.departmentid = bu.dept_id
        where 1=1
        and bu.is_deleted = 0
        and bu.status = 1
        <if test="dispatcher.userIds!=null and  dispatcher.userIds!=''">
            and sd.user_ids like concat('%', #{dispatcher.userIds},'%')
        </if>
    </select>
    <!--派遣记录详情-->