Administrator
2021-08-31 08363052cecb30230a2c8b3eba791ca8d1be00a5
src/main/java/org/springblade/modules/dispatcher/mapper/DispatcherMapper.xml
@@ -15,7 +15,7 @@
    <!--派遣记录分页数据-->
    <select id="selectDispatcherPage" resultType="org.springblade.modules.dispatcher.vo.DispatcherVO">
        select
            sd.*,bu.real_name securityName,sdu.name dispatcherCompany,bu.cardid
            sd.*,bu.real_name securityName,sdu.name dispatcherCompany,bu.cardid idCardNo
        from
            sys_dispatcher sd
        left join
@@ -33,6 +33,10 @@
        <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>
@@ -45,11 +49,11 @@
        <if test="dispatcher.dispatcherCompany!=null and  dispatcher.dispatcherCompany!=''">
            and sdu.name like concat('%', #{dispatcher.dispatcherCompany},'%')
        </if>
        <if test="dispatcher.beginTime!=null and  dispatcher.beginTime!=''">
            and sd.dispatcherTime &gt;  #{dispatcher.beginTime}
        </if>
        <if test="dispatcher.overTime!=null and  dispatcher.overTime!=''">
            and sd.end_time &lt;  #{dispatcher.overTime}
        <if test="dispatcher.beginTime!=null or dispatcher.overTime!=null">
            <if test="dispatcher.beginTime!='' or dispatcher.overTime!=''">
                and sd.end_time &lt;= #{dispatcher.overTime} and sd.end_time &gt;= #{dispatcher.beginTime}
                or ( sd.dispatcherTime &lt;= #{dispatcher.overTime} and sd.dispatcherTime &gt;= #{dispatcher.beginTime})
            </if>
        </if>
    </select>
@@ -77,4 +81,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>