cuilei
2025-06-11 cd00884c3db8fa6808b3b5949ab1a2b1459d6bdc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?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.EquipmentMapper">
 
    <select id="listByProds" resultType="org.jeecg.modules.mdc.entity.Equipment">
        SELECT
            t1.*
        FROM
            Equipment t1
            LEFT JOIN mdc_equipment t2 ON t1.EquipmentID = t2.equipment_id
            LEFT JOIN mdc_production_equipment t3 ON t2.id = t3.equipment_id
        <where>
            t3.production_id IN
            <foreach collection="proIds" index="index" item="id" open="(" separator="," close=")">
                #{id}
            </foreach>
        </where>
    </select>
 
    <select id="findByEquId" resultType="org.jeecg.modules.mdc.entity.Equipment">
        SELECT TOP 1 * FROM Equipment WHERE EquipmentID = #{equipmentId}
    </select>
</mapper>