cuilei
2025-06-11 cd00884c3db8fa6808b3b5949ab1a2b1459d6bdc
lxzn-module-mdc-common/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMapper.xml
@@ -89,6 +89,20 @@
        </foreach>
    </select>
    <!--根据产线id查询设备id集合-->
    <select id="getEquipmentList" resultType="org.jeecg.modules.mdc.entity.MdcEquipment">
        SELECT
        me.*
        FROM
        mdc_equipment me
        LEFT JOIN mdc_production_equipment mpe ON me.id = mpe.equipment_id
        WHERE
        mpe.production_id IN
        <foreach collection="allProductionIds" index="index" item="id" open="(" separator="," close=")">
            #{id}
        </foreach>
    </select>
    <!--查询设备监控信息-->
    <select id="checkStatusFromEquipmentIds" resultType="org.jeecg.modules.mdc.entity.MdcEquipmentMonitor">
        SELECT
@@ -340,6 +354,7 @@
            #{equipmentType}
        </foreach>
    </select>
    <select id="queryByDepartIdsAndType" resultType="org.jeecg.modules.mdc.entity.MdcEquipment">
        SELECT
            e.*,
@@ -358,4 +373,18 @@
        </foreach>
    </select>
    <select id="getEquIdsByProIds" resultType="java.lang.String">
        SELECT
        t1.equipment_id
        FROM
        mdc_equipment t1
        LEFT JOIN mdc_production_equipment t2 ON t1.id = t2.equipment_id
        <where>
            t2.production_id IN
            <foreach collection="proIds" index="index" item="id" open="(" separator="," close=")">
                #{id}
            </foreach>
        </where>
    </select>
</mapper>