智慧保安后台管理-外网-验收版本
Administrator
2021-09-13 0d99d26f39e055ee17fdbf2c5cbd1daf695c4310
src/main/java/org/springblade/modules/dispatcher/mapper/DispatcherMapper.xml
@@ -26,6 +26,10 @@
            blade_user bu
        on
            bu.id = sd.user_ids
        left join
            sys_information si
        on
            si.departmentid = bu.dept_id
        where 1=1
        <if test="dispatcher.dispatcherUnitId!=null">
            and sd.dispatcher_unit_id = #{dispatcher.dispatcherUnitId}
@@ -33,8 +37,15 @@
        <if test="dispatcher.deptId!=null">
            and sd.dept_id = #{dispatcher.deptId}
        </if>
        <if test="dispatcher.dispatch!=null and dispatcher.dispatch!=''">
            and bu.dispatch = #{dispatcher.dispatch}
            and sd.status = #{dispatcher.dispatch}
        </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},'%')
@@ -51,6 +62,7 @@
                or ( sd.dispatcherTime &lt;= #{dispatcher.overTime} and sd.dispatcherTime &gt;= #{dispatcher.beginTime})
            </if>
        </if>
        order by sd.id desc
    </select>
    <!--派遣记录详情-->
@@ -77,4 +89,18 @@
        and dispatcher_unit_id = #{dispatcherUnitVO1.id}
    </select>
    <!--查询用的派遣信息-->
    <select id="getDispatcherInfoByUserId" resultType="org.springblade.modules.dispatcher.vo.DispatcherVO">
        select
            sd.*
        from
            sys_dispatcher sd
        left join
            sys_dispatcher_unit sdu
        on
            sdu.id = sd.dispatcher_unit_id
        where sd.user_ids = #{userId}
        and sd.status = 0
    </select>
</mapper>