| | |
| | | <!-- 根据车间层级查询设备维修列表 --> |
| | | <select id="pageList" resultType="org.jeecg.modules.mdc.entity.MdcEquipmentRepair"> |
| | | SELECT |
| | | mer.* |
| | | * |
| | | FROM |
| | | MDC_EQUIPMENT_REPAIR mer |
| | | LEFT JOIN MDC_EQUIPMENT me ON mer.EQUIPMENT_ID = me.EQUIPMENT_ID |
| | | mdc_equipment_repair |
| | | WHERE 1=1 |
| | | <if test="repair.equipmentName != null and repair.equipmentName != '' "> |
| | | AND mer.EQUIPMENT_NAME LIKE CONCAT(CONCAT('%',#{repair.equipmentName}),'%') |
| | | AND equipment_name LIKE CONCAT(CONCAT('%',#{repair.equipmentName}),'%') |
| | | </if> |
| | | <if test="repair.equipmentId != null and repair.equipmentId != '' "> |
| | | AND mer.EQUIPMENT_ID LIKE CONCAT(CONCAT('%',#{repair.equipmentId}),'%') |
| | | AND equipment_id LIKE CONCAT(CONCAT('%',#{repair.equipmentId}),'%') |
| | | </if> |
| | | <if test="repair.startTime != null "> |
| | | AND mer.END_TIME >= #{ repair.startTime } |
| | | AND end_time >= #{ repair.startTime } |
| | | </if> |
| | | <if test="repair.endTime != null "> |
| | | AND mer.START_TIME <= #{ repair.endTime } |
| | | AND start_time <= #{ repair.endTime } |
| | | </if> |
| | | <if test="repair.mdcSectionIds != null and repair.mdcSectionIds.size() > 0 "> |
| | | AND mer.EQUIPMENT_ID IN |
| | | AND equipment_id IN |
| | | <foreach collection="repair.mdcSectionIds" item="id" index="index" open="(" close=")" separator=","> |
| | | #{ id } |
| | | </foreach> |
| | | </if> |
| | | ORDER BY START_TIME ASC |
| | | ORDER BY start_time ASC,equipment_id ASC |
| | | </select> |
| | | |
| | | <!--查询某段时间内是否有维修休班数据--> |