Lius
2023-12-13 56e8ccde7c982bc2a5b9746edb2e596c895f63e6
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMapper.xml
@@ -168,7 +168,7 @@
                #{id}
            </foreach>
        </where>
        ORDER BY me.equipment_id
        ORDER BY sd.depart_order
    </select>
    <!--根据设备编号查询设备信息和产线信息-->
@@ -191,6 +191,22 @@
                #{id}
            </foreach>
        </where>
        ORDER BY mp.production_order
    </select>
    <!--根据大屏车间id查询设备列表-->
    <select id="getEquipmentByWorkshopId" resultType="org.jeecg.modules.mdc.entity.MdcEquipment">
        SELECT
            me.*
        FROM
            mdc_workshop_equipment mwe
            LEFT JOIN mdc_equipment me ON me.equipment_id = mwe.equipment_id
        <where>
            AND mwe.workshop_id = #{ workshopEquipmentVo.workshopId }
            <if test="workshopEquipmentVo.equipmentId != null and workshopEquipmentVo.equipmentId != ''">
                AND mwe.equipment_id = #{ workshopEquipmentVo.equipmentId }
            </if>
        </where>
        ORDER BY me.equipment_id
    </select>