| | |
| | | <if test="mdcDowntimeVo.equipmentName != null and mdcDowntimeVo.equipmentName != ''"> |
| | | AND t1.equipment_name = #{ mdcDowntimeVo.equipmentName } |
| | | </if> |
| | | <if test="mdcDowntimeVo.startTime != null and mdcDowntimeVo.startTime != '' and mdcDowntimeVo.endTime != null and mdcDowntimeVo.endTime != ''"> |
| | | AND t1.the_date BETWEEN #{ mdcDowntimeVo.startTime } AND #{ mdcDowntimeVo.endTime } |
| | | <if test="mdcDowntimeVo.theDate != null and mdcDowntimeVo.theDate != ''"> |
| | | AND t1.the_date = #{ mdcDowntimeVo.theDate } |
| | | </if> |
| | | <if test="mdcDowntimeVo.equipmentIdList != null and mdcDowntimeVo.equipmentIdList.size() > 0 "> |
| | | AND t1.equipment_id IN |
| | |
| | | mdc_downtime t1 |
| | | LEFT JOIN mdc_downtime_reason t2 ON t1.reason_id = t2.id |
| | | WHERE |
| | | t1.status = 1 |
| | | AND t1.equipment_id = #{equipmentId} |
| | | t1.equipment_id = #{equipmentId} |
| | | AND t2.downtime_type = #{closeType} |
| | | AND t1.the_date = #{validDate} |
| | | </select> |