<?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>
|