zhangherong
2025-06-07 f9b0a5f16a7445a7af82cfb9291e1157ee7f4909
lxzn-module-mdc-common/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMapper.xml
@@ -279,7 +279,8 @@
    <select id="queryByProductionIdAndType" resultType="org.jeecg.modules.mdc.entity.MdcEquipment">
        SELECT
        me.*
        me.*,
        mpe.production_id
        FROM
        mdc_production_equipment mpe,
        mdc_equipment me
@@ -339,5 +340,22 @@
            #{equipmentType}
        </foreach>
    </select>
    <select id="queryByDepartIdsAndType" resultType="org.jeecg.modules.mdc.entity.MdcEquipment">
        SELECT
            e.*,
        ep.production_id
        FROM
        mdc_equipment e
        INNER JOIN mdc_production_equipment ep ON e.id = ep.equipment_id
        WHERE
        ep.production_id IN
        <foreach collection='productionIds' item='id' open='(' separator=',' close=')'>
            #{id}
        </foreach>
        AND e.id IN
        <foreach collection='deviceIds' item='deviceId' open='(' separator=',' close=')'>
            #{deviceId}
        </foreach>
    </select>
</mapper>