智慧保安后台管理-外网
Administrator
2021-08-28 7327c2b113573bccaeef5b3fc5c82011abc00cd8
src/main/java/org/springblade/modules/dispatcher/mapper/DispatcherMapper.xml
@@ -15,13 +15,17 @@
    <!--派遣记录分页数据-->
    <select id="selectDispatcherPage" resultType="org.springblade.modules.dispatcher.vo.DispatcherVO">
        select
            sd.*,sdu.name dispatcherCompany
            sd.*,bu.real_name securityName,sdu.name dispatcherCompany,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
        where 1=1
        <if test="dispatcher.dispatcherUnitId!=null">
            and sd.dispatcher_unit_id = #{dispatcher.dispatcherUnitId}
@@ -41,6 +45,12 @@
        <if test="dispatcher.dispatcherCompany!=null and  dispatcher.dispatcherCompany!=''">
            and sdu.name like concat('%', #{dispatcher.dispatcherCompany},'%')
        </if>
        <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>
    <!--派遣记录详情-->
@@ -59,4 +69,12 @@
        </if>
    </select>
    <!--派遣记录条数-->
    <select id="getDispatcherCount" resultType="java.lang.Integer">
        select ifnull(count(*),0) count from sys_dispatcher
        where
        1=1
        and dispatcher_unit_id = #{dispatcherUnitVO1.id}
    </select>
</mapper>