Lius
2025-03-17 f658dc1089f6bf292e6f855d6aa04f89d576572d
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMapper.xml
@@ -71,12 +71,7 @@
        WHERE
            mpe.equipment_id = me.id
            AND mpe.production_id = #{ productionId }
        <if test="type == 'DNC'">
            AND me.device_type_dnc = '1'
        </if>
        <if test="type == 'MDC'">
            AND me.device_type_mdc = '1'
        </if>
        ORDER BY me.equipment_id
    </select>
@@ -282,4 +277,23 @@
            t1.id = #{ id }
    </select>
    <select id="queryByProductionIdAndType" resultType="org.jeecg.modules.mdc.entity.MdcEquipment">
        SELECT
        me.*
        FROM
        mdc_production_equipment mpe,
        mdc_equipment me
        WHERE
        mpe.equipment_id = me.id
        AND mpe.production_id = #{ productionId }
        AND me.device_type_dnc = '1'
        <if test="deviceIds != null and deviceIds.size() > 0">
            AND me.id IN
            <foreach collection = "deviceIds" item = "id" index = "index" open = "(" close= ")" separator = ",">
                #{id}
            </foreach>
        </if>
        ORDER BY me.equipment_id
    </select>
</mapper>