Lius
2024-12-11 13552d0d5da5c990e037825f43cde55cbf00aa67
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
28
29
30
31
32
33
34
35
36
<?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.MdcPartProcessInfoMapper">
 
    <select id="pageList" resultType="org.jeecg.modules.mdc.entity.MdcPartProcessInfo">
        SELECT
            *
        FROM
            mdc_part_process_info
        <where>
            <if test="mdcPartProcessInfo.equipmentId != null and mdcPartProcessInfo.equipmentId != ''">
                AND equipment_id = #{ mdcPartProcessInfo.equipmentId }
            </if>
            <if test="mdcPartProcessInfo.partId != null and mdcPartProcessInfo.partId != ''">
                AND part_id = #{ mdcPartProcessInfo.partId }
            </if>
            <if test="mdcPartProcessInfo.theDate != null and mdcPartProcessInfo.theDate != ''">
                AND the_date LIKE CONCAT('%',#{ mdcPartProcessInfo.theDate },'%')
            </if>
            <if test="mdcPartProcessInfo.startTime != null and mdcPartProcessInfo.startTime != ''">
                AND the_date &gt;= #{ mdcPartProcessInfo.startTime }
            </if>
            <if test="mdcPartProcessInfo.endTime != null and mdcPartProcessInfo.endTime != ''">
                AND the_date &lt;= #{mdcPartProcessInfo.endTime }
            </if>
            <if test="mdcPartProcessInfo.equipmentIdList != null and mdcPartProcessInfo.equipmentIdList.size() > 0 ">
                AND equipment_id IN
                <foreach collection="mdcPartProcessInfo.equipmentIdList" item="id" index="index" open="(" close=")" separator=",">
                    #{ id }
                </foreach>
            </if>
        </where>
        ORDER BY the_date DESC, equipment_id ASC
    </select>
 
</mapper>