| | |
| | | <select id="pageList" resultType="org.jeecg.modules.mdc.entity.MdcEquipmentOvertime"> |
| | | SELECT |
| | | t1.id, |
| | | t2.equipment_id equipmentId, |
| | | t4.equipment_name equipmentName, |
| | | t2.effective_date effectiveDate, |
| | | t3.start_date startDate, |
| | | t3.end_date endDate, |
| | | t1.equipment_id equipmentId, |
| | | t2.equipment_name equipmentName, |
| | | t1.the_date theDate, |
| | | t1.start_time startTime, |
| | | t1.end_time endTime, |
| | | t1.duration duration, |
| | | t1.remark remark, |
| | | t1.create_by createBy, |
| | | t1.create_time createTime, |
| | |
| | | t1.update_time updateTime |
| | | FROM |
| | | mdc_equipment_overtime t1 |
| | | LEFT JOIN mdc_device_calendar t2 ON t1.calendar_id = t2.id |
| | | LEFT JOIN mdc_shift_sub t3 ON t3.id = t2.shift_sub_id |
| | | LEFT JOIN mdc_equipment t4 ON t4.equipment_id = t2.equipment_id |
| | | LEFT JOIN mdc_equipment t2 ON t2.equipment_id = t1.equipment_id |
| | | <where> |
| | | <if test="mdcEquipmentOvertime.equipmentName != null and mdcEquipmentOvertime.equipmentName != '' "> |
| | | AND t4.equipment_name LIKE CONCAT(CONCAT('%',#{mdcEquipmentOvertime.equipmentName}),'%') |
| | | AND t2.equipment_name LIKE CONCAT(CONCAT('%',#{mdcEquipmentOvertime.equipmentName}),'%') |
| | | </if> |
| | | <if test="mdcEquipmentOvertime.equipmentId != null and mdcEquipmentOvertime.equipmentId != '' "> |
| | | AND t2.equipment_id LIKE CONCAT(CONCAT('%',#{mdcEquipmentOvertime.equipmentId}),'%') |
| | | AND t1.equipment_id LIKE CONCAT(CONCAT('%',#{mdcEquipmentOvertime.equipmentId}),'%') |
| | | </if> |
| | | <if test="mdcEquipmentOvertime.mdcSectionIds != null and mdcEquipmentOvertime.mdcSectionIds.size() > 0 "> |
| | | AND t2.equipment_id IN |
| | | AND t1.equipment_id IN |
| | | <foreach collection="mdcEquipmentOvertime.mdcSectionIds" item="id" index="index" open="(" close=")" separator=","> |
| | | #{ id } |
| | | </foreach> |
| | | </if> |
| | | <if test="mdcEquipmentOvertime.startTime != null and mdcEquipmentOvertime.startTime != '' and mdcEquipmentOvertime.endTime != null and mdcEquipmentOvertime.endTime != ''"> |
| | | AND t1.the_date BETWEEN #{ mdcEquipmentOvertime.startTime } AND #{ mdcEquipmentOvertime.endTime } |
| | | </if> |
| | | </where> |
| | | order by t2.effective_date asc |
| | | order by t1.the_date asc |
| | | </select> |
| | | |
| | | <!--list列表--> |
| | | <select id="list" resultType="org.jeecg.modules.mdc.entity.MdcEquipmentOvertime"> |
| | | SELECT |
| | | t1.id, |
| | | t2.equipment_id equipmentId, |
| | | t4.equipment_name equipmentName, |
| | | t2.effective_date effectiveDate, |
| | | t3.start_date startDate, |
| | | t3.end_date endDate, |
| | | t1.equipment_id equipmentId, |
| | | t2.equipment_name equipmentName, |
| | | t1.the_date theDate, |
| | | t1.start_time startTime, |
| | | t1.end_time endTime, |
| | | t1.duration duration, |
| | | t1.remark remark, |
| | | t1.create_by createBy, |
| | | t1.create_time createTime, |
| | |
| | | t1.update_time updateTime |
| | | FROM |
| | | mdc_equipment_overtime t1 |
| | | LEFT JOIN mdc_device_calendar t2 ON t1.calendar_id = t2.id |
| | | LEFT JOIN mdc_shift_sub t3 ON t3.id = t2.shift_sub_id |
| | | LEFT JOIN mdc_equipment t4 ON t4.equipment_id = t2.equipment_id |
| | | LEFT JOIN mdc_equipment t2 ON t2.equipment_id = t1.equipment_id |
| | | <where> |
| | | <if test="mdcEquipmentOvertime.equipmentName != null and mdcEquipmentOvertime.equipmentName != '' "> |
| | | AND t4.equipment_name LIKE CONCAT(CONCAT('%',#{mdcEquipmentOvertime.equipmentName}),'%') |
| | | AND t2.equipment_name LIKE CONCAT(CONCAT('%',#{mdcEquipmentOvertime.equipmentName}),'%') |
| | | </if> |
| | | <if test="mdcEquipmentOvertime.equipmentId != null and mdcEquipmentOvertime.equipmentId != '' "> |
| | | AND t2.equipment_id LIKE CONCAT(CONCAT('%',#{mdcEquipmentOvertime.equipmentId}),'%') |
| | | AND t1.equipment_id LIKE CONCAT(CONCAT('%',#{mdcEquipmentOvertime.equipmentId}),'%') |
| | | </if> |
| | | <if test="mdcEquipmentOvertime.mdcSectionIds != null and mdcEquipmentOvertime.mdcSectionIds.size() > 0 "> |
| | | AND t2.equipment_id IN |
| | | AND t1.equipment_id IN |
| | | <foreach collection="mdcEquipmentOvertime.mdcSectionIds" item="id" index="index" open="(" close=")" separator=","> |
| | | #{ id } |
| | | </foreach> |
| | | </if> |
| | | <if test="mdcEquipmentOvertime.startTime != null and mdcEquipmentOvertime.startTime != '' and mdcEquipmentOvertime.endTime != null and mdcEquipmentOvertime.endTime != ''"> |
| | | AND t1.the_date BETWEEN #{ mdcEquipmentOvertime.startTime } AND #{ mdcEquipmentOvertime.endTime } |
| | | </if> |
| | | </where> |
| | | order by t2.effective_date asc |
| | | order by t1.the_date asc |
| | | </select> |
| | | |
| | | <!--查询加班时长--> |