Lius
2025-03-03 75d26035001d85c12dc3ca93455b0fee477c3f77
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMapper.xml
@@ -107,6 +107,7 @@
        <foreach collection="equipmentIds" index="index" item="id" open="(" separator="," close=")">
            #{id}
        </foreach>
        ORDER BY t1.equipment_id
    </select>
    <!--根据部门id查询设备id集合-->
@@ -142,6 +143,7 @@
            <foreach collection="equipmentIdList" index="index" item="id" open="(" separator="," close=")">
                #{id}
            </foreach>
            AND me.equipment_status = 0
        </where>
        ORDER BY sd.depart_order
    </select>
@@ -165,6 +167,7 @@
            <foreach collection="equipmentIdList" index="index" item="id" open="(" separator="," close=")">
                #{id}
            </foreach>
            AND me.equipment_status = 0
        </where>
        ORDER BY mp.production_order
    </select>
@@ -276,4 +279,31 @@
            t1.id = #{ id }
    </select>
    <!--根据产线id获取设备状态列表-->
    <select id="getEquipmentMonitorList" resultType="org.jeecg.modules.mdc.entity.MdcEquipmentMonitor">
        SELECT
            t1.equipment_id,
            t2.CollectTime,
            t1.equipment_name,
            t2.Oporation,
            t1.id,
            t1.equipment_status,
            t1.equipment_type AS equipmentType,
            t3.equipment_type_pictures
        FROM
            mdc_equipment t1
                JOIN
            mdc_workshop_equipment t4
            ON t1.equipment_id = t4.equipment_id
                JOIN
            mdc_workshop_info t5
            ON t4.workshop_id = t5.id AND t5.production_id = #{productionId}
                LEFT JOIN
            Equipment t2
            ON t1.equipment_id = t2.EquipmentID
                LEFT JOIN
            mdc_equipment_type t3
            ON t1.equipment_type = t3.equipment_type_name
    </select>
</mapper>