智慧保安后台管理-外网-验收版本
tangzy
2021-12-06 cc057177b2fb17aee9a173a6adbabdc578fd74c7
src/main/java/org/springblade/modules/dispatcher/mapper/DispatcherUnitMapper.xml
@@ -5,13 +5,17 @@
    <!--派遣公司分页信息-->
    <select id="selectDispatcherUnitPage" resultType="org.springblade.modules.dispatcher.vo.DispatcherUnitVO">
        select
            sdu.*,bt.dept_name deptName
            sdu.*,bt.dept_name deptName,sj.dept_name jurisdictionName
        from
            sys_dispatcher_unit sdu
        LEFT JOIN
            blade_dept bt
        ON
            sdu.dept_id = bt.id
        left join
            sys_jurisdiction sj
        on
            sj.id = sdu.jurisdiction
        WHERE
            1=1
        <if test="dispatcherUnit.deptName!=null and  dispatcherUnit.deptName!=''">
@@ -35,12 +39,17 @@
        <if test="dispatcherUnit.jurisdiction!=null">
            and sdu.jurisdiction = #{dispatcherUnit.jurisdiction}
        </if>
        <if test="dispatcherUnit.deptId!=null and dispatcherUnit.deptId!=''">
            and sdu.dept_id = #{dispatcherUnit.deptId}
        </if>
        <if test="dispatcherUnit.district!=null">
            and sdu.district = #{dispatcherUnit.district}
        </if>
        <if test="dispatcherUnit.beginTime!=null or dispatcherUnit.overTime!=null">
            and sdu.end_time &lt;= #{dispatcherUnit.overTime} and sdu.end_time &gt;= #{dispatcherUnit.beginTime}
            or ( sdu.start_time &lt;= #{dispatcherUnit.overTime} and sdu.start_time &gt;= #{dispatcherUnit.beginTime})
            <if test="dispatcherUnit.beginTime!='' or dispatcherUnit.overTime!=''">
                and sdu.end_time &lt;= #{dispatcherUnit.overTime} and sdu.end_time &gt;= #{dispatcherUnit.beginTime}
                or ( sdu.start_time &lt;= #{dispatcherUnit.overTime} and sdu.start_time &gt;= #{dispatcherUnit.beginTime})
            </if>
        </if>
    </select>
@@ -59,6 +68,9 @@
        <if test="dispatcherUnit.deptName!=null and  dispatcherUnit.deptName!=''">
            and bt.dept_name like concat('%', #{dispatcherUnit.deptName},'%')
        </if>
        <if test="dispatcherUnit.deptId!=null and  dispatcherUnit.deptId!=''">
            and sdu.dept_id like concat('%', #{dispatcherUnit.deptId},'%')
        </if>
        <if test="dispatcherUnit.name!=null and  dispatcherUnit.name!=''">
            and sdu.name like concat('%', #{dispatcherUnit.name},'%')
        </if>