Lius
2023-12-07 4337640b7ab86136baed2fd6aa959e4828a75cea
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>