lyh
2025-02-17 1dcf43467f34eb70002be3c2f3cd7605ceb5dcdd
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMapper.xml
@@ -71,6 +71,7 @@
        WHERE
            mpe.equipment_id = me.id
            AND mpe.production_id = #{ productionId }
            AND me.device_type_mdc = '1'
        ORDER BY me.equipment_id
    </select>
@@ -275,5 +276,23 @@
        WHERE
            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>
</mapper>