<?xml version="1.0" encoding="UTF-8"?>
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<mapper namespace="org.jeecg.modules.mdc.mapper.MdcDowntimeMapper">
|
|
<select id="pageList" resultType="org.jeecg.modules.mdc.entity.MdcDowntime">
|
SELECT * FROM mdc_downtime
|
<where>
|
<if test="mdcDowntimeVo.equipmentId != null and mdcDowntimeVo.equipmentId != ''">
|
AND equipment_id = #{ mdcDowntimeVo.equipmentId }
|
</if>
|
<if test="mdcDowntimeVo.equipmentName != null and mdcDowntimeVo.equipmentName != ''">
|
AND equipment_name = #{ mdcDowntimeVo.equipmentName }
|
</if>
|
<if test="mdcDowntimeVo.startTime != null and mdcDowntimeVo.startTime != '' and mdcDowntimeVo.endTime != null and mdcDowntimeVo.endTime != ''">
|
AND the_date BETWEEN #{ mdcDowntimeVo.startTime } AND #{ mdcDowntimeVo.endTime }
|
</if>
|
<if test="mdcDowntimeVo.equipmentIdList != null and mdcDowntimeVo.equipmentIdList.size() > 0 ">
|
AND equipment_id IN
|
<foreach collection="mdcDowntimeVo.equipmentIdList" item="equipmentId" index="index" open="(" close=")" separator=",">
|
#{ equipmentId }
|
</foreach>
|
</if>
|
</where>
|
ORDER BY create_time DESC
|
</select>
|
</mapper>
|