lius
2023-07-18 90f563ff5d3b0462e8013f4621148fffabec2d9f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?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.MdcPassRateMapper">
 
    <!--分页查询-->
    <select id="pageList" resultType="org.jeecg.modules.mdc.entity.MdcPassRate">
        SELECT * FROM mdc_pass_date
        <where>
            <if test="mdcPassRate.equipmentName != null and mdcPassRate.equipmentName != '' ">
                AND equipment_name LIKE CONCAT(CONCAT('%',#{mdcPassRate.equipmentName}),'%')
            </if>
            <if test="mdcPassRate.equipmentId != null and mdcPassRate.equipmentId != '' ">
                AND equipment_id LIKE CONCAT(CONCAT('%',#{mdcPassRate.equipmentId}),'%')
            </if>
            <if test="mdcPassRate.startTime != null and mdcPassRate.endTime != null">
                AND efficient_date BETWEEN #{ mdcPassRate.startTime } AND #{ mdcPassRate.endTime }
            </if>
            <if test="mdcPassRate.mdcSectionIds != null and mdcPassRate.mdcSectionIds.size() > 0 ">
                AND equipment_id IN
                <foreach collection="mdcPassRate.mdcSectionIds" item="id" index="index" open="(" close=")" separator=",">
                    #{ id }
                </foreach>
            </if>
        </where>
        ORDER BY equipment_name ASC, efficient_date DESC
    </select>
</mapper>