| | |
| | | <!--分页查询--> |
| | | <select id="pageList" resultType="org.jeecg.modules.mdc.entity.MdcEquipmentOvertime"> |
| | | SELECT |
| | | * |
| | | t2.equipment_id equipmentId, |
| | | t5.equipment_name equipmentName, |
| | | t2.efficient_date efficientDate, |
| | | t4.start_date startDate, |
| | | t4.end_date endDate, |
| | | t1.start_time startTime, |
| | | t1.end_time endTime, |
| | | t1.remark remark |
| | | FROM |
| | | mdc_equipment_overtime |
| | | mdc_equipment_overtime t1 |
| | | LEFT JOIN mdc_device_calendar t2 ON t1.calendar_id = t2.id |
| | | LEFT JOIN mdc_shift t3 ON t2.shift_id = t3.id |
| | | LEFT JOIN mdc_shift_sub t4 ON t3.id = t4.shift_id |
| | | LEFT JOIN mdc_equipment t5 ON t5.equipment_id = t2.equipment_id |
| | | <where> |
| | | <if test="mdcEquipmentOvertime.equipmentName != null and mdcEquipmentOvertime.equipmentName != '' "> |
| | | AND t5.equipment_name LIKE CONCAT(CONCAT('%',#{mdcEquipmentOvertime.equipmentName}),'%') |
| | | </if> |
| | | <if test="mdcEquipmentOvertime.equipmentId != null and mdcEquipmentOvertime.equipmentId != '' "> |
| | | AND equipment_id LIKE CONCAT(CONCAT('%',#{mdcEquipmentOvertime.equipmentId}),'%') |
| | | AND t2.equipment_id LIKE CONCAT(CONCAT('%',#{mdcEquipmentOvertime.equipmentId}),'%') |
| | | </if> |
| | | <if test="mdcEquipmentOvertime.startTime != null and mdcEquipmentOvertime.endTime != null"> |
| | | AND efficient_date BETWEEN #{ mdcEquipmentOvertime.startTime } AND #{ mdcEquipmentOvertime.endTime } |
| | | AND t2.efficient_date BETWEEN #{ mdcEquipmentOvertime.startTime } AND #{ mdcEquipmentOvertime.endTime } |
| | | </if> |
| | | <if test="mdcEquipmentOvertime.mdcSectionIds != null and mdcEquipmentOvertime.mdcSectionIds.size() > 0 "> |
| | | AND equipment_id IN |
| | | AND t2.equipment_id IN |
| | | <foreach collection="mdcEquipmentOvertime.mdcSectionIds" item="id" index="index" open="(" close=")" separator=","> |
| | | #{ id } |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | order by efficient_date asc |
| | | order by t2.efficient_date asc |
| | | </select> |
| | | </mapper> |