<?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.MdcNoplanCloseMapper">
|
|
<!--分页查询-->
|
<select id="pageList" resultType="org.jeecg.modules.mdc.entity.MdcNoplanClose">
|
SELECT
|
*
|
FROM
|
mdc_noplan_close
|
<where>
|
<if test="mdcNoplanClose.equipmentName != null and mdcNoplanClose.equipmentName != '' ">
|
AND equipment_name LIKE '%' + #{mdcNoplanClose.equipmentName} + '%'
|
</if>
|
<if test="mdcNoplanClose.equipmentId != null and mdcNoplanClose.equipmentId != '' ">
|
AND equipment_id LIKE '%' + #{mdcNoplanClose.equipmentId} + '%'
|
</if>
|
<if test="mdcNoplanClose.startTime != null ">
|
AND end_time >= #{ mdcNoplanClose.startTime }
|
</if>
|
<if test="mdcNoplanClose.endTime != null ">
|
AND start_time <= #{ mdcNoplanClose.endTime }
|
</if>
|
<if test="mdcNoplanClose.mdcSectionIds != null and mdcNoplanClose.mdcSectionIds.size() > 0 ">
|
AND equipment_id IN
|
<foreach collection="mdcNoplanClose.mdcSectionIds" item="id" index="index" open="(" close=")" separator=",">
|
#{ id }
|
</foreach>
|
</if>
|
</where>
|
ORDER BY start_time ASC
|
</select>
|
|
|
<select id="findNoplanTimeDuration" resultType="org.jeecg.modules.mdc.entity.MdcNoplanClose">
|
SELECT
|
*
|
FROM
|
mdc_noplan_close
|
WHERE
|
equipment_id = #{ equipmentId }
|
AND ( ( start_time BETWEEN #{ startDate } AND #{ endDate } ) OR ( end_time BETWEEN #{ startDate } AND #{ endDate } ) )
|
AND noplan_type = #{ noplanType }
|
ORDER BY
|
start_time ASC
|
</select>
|
</mapper>
|