| | |
| | | <mapper namespace="org.jeecg.modules.mdc.mapper.MdcVacationManagementMappper"> |
| | | <!--根据车间层级查询假期列表--> |
| | | <select id="pageList" resultType="org.jeecg.modules.mdc.entity.MdcVacationManagement"> |
| | | select mvm.* from mdc_vacation_management mvm,mdc_equipment me where mvm.equipment_id=me.equipment_id |
| | | <if test="vacation.equipmentName != null and vacation.equipmentName != '' "> |
| | | and mvm.equipment_name like concat(concat('%',#{vacation.equipmentName}),'%') |
| | | </if> |
| | | <if test="vacation.equipmentId != null and vacation.equipmentId !='' "> |
| | | and mvm.equipment_id like concat(concat('%',#{vacation.equipmentId}),'%') |
| | | </if> |
| | | <if test="vacation.mdcSectionIds != null || vacation.mdcSectionIds.size() > 0 "> |
| | | and mvm.equipment_id in |
| | | <foreach collection="vacation.mdcSectionIds" item="id" index="index" open="(" close=")" separator=","> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | 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> |
| | | </mapper> |