hyingbo
6 天以前 e935889261ef38c8eaef31e54cbfc466d63d2ef4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.mdc.mapper.MdcVacationManagementMappper">
    <!--根据车间层级查询假期列表-->
    <select id="pageList" resultType="org.jeecg.modules.mdc.entity.MdcVacationManagement">
        select * from mdc_vacation_management
        <where>
            <if test="vacation.equipmentName != null and vacation.equipmentName != '' ">
                and equipment_name like concat(concat('%',#{vacation.equipmentName}),'%')
            </if>
            <if test="vacation.equipmentId != null and vacation.equipmentId !='' ">
                and equipment_id like concat(concat('%',#{vacation.equipmentId}),'%')
            </if>
            <if test="vacation.startTime != null and vacation.endTime != null">
                and vacation_date between #{ vacation.startTime } and #{ vacation.endTime }
            </if>
            <if test="vacation.mdcSectionIds != null || vacation.mdcSectionIds.size() > 0 ">
                and equipment_id in
                <foreach collection="vacation.mdcSectionIds" item="id" index="index" open="(" close=")" separator=",">
                    #{id}
                </foreach>
            </if>
            order by vacation_date asc
        </where>
    </select>
 
    <select id="selectLastWeekDays" resultType="org.jeecg.modules.mdc.entity.MdcVacationManagement">
        select top 1 * from mdc_vacation_management where vacation_type = '双休日' order by vacation_date desc
    </select>
</mapper>