From 96be94fc3c33c49e15b538bebbea455e839a7a7b Mon Sep 17 00:00:00 2001
From: Lius <Lius2225@163.com>
Date: 星期二, 10 六月 2025 16:32:12 +0800
Subject: [PATCH] 数字孪生看板接口 维修service提取到公共模块

---
 lxzn-module-mdc-common/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMapper.xml |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/lxzn-module-mdc-common/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMapper.xml b/lxzn-module-mdc-common/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMapper.xml
index 8440226..3d0755f 100644
--- a/lxzn-module-mdc-common/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMapper.xml
+++ b/lxzn-module-mdc-common/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMapper.xml
@@ -89,6 +89,20 @@
         </foreach>
     </select>
 
+    <!--鏍规嵁浜х嚎id鏌ヨ璁惧id闆嗗悎-->
+    <select id="getEquipmentList" resultType="org.jeecg.modules.mdc.entity.MdcEquipment">
+        SELECT
+        me.*
+        FROM
+        mdc_equipment me
+        LEFT JOIN mdc_production_equipment mpe ON me.id = mpe.equipment_id
+        WHERE
+        mpe.production_id IN
+        <foreach collection="allProductionIds" index="index" item="id" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </select>
+
     <!--鏌ヨ璁惧鐩戞帶淇℃伅-->
     <select id="checkStatusFromEquipmentIds" resultType="org.jeecg.modules.mdc.entity.MdcEquipmentMonitor">
         SELECT
@@ -340,6 +354,7 @@
             #{equipmentType}
         </foreach>
     </select>
+
     <select id="queryByDepartIdsAndType" resultType="org.jeecg.modules.mdc.entity.MdcEquipment">
         SELECT
             e.*,
@@ -358,4 +373,18 @@
         </foreach>
     </select>
 
+    <select id="getEquIdsByProIds" resultType="java.lang.String">
+        SELECT
+        t1.equipment_id
+        FROM
+        mdc_equipment t1
+        LEFT JOIN mdc_production_equipment t2 ON t1.id = t2.equipment_id
+        <where>
+            t2.production_id IN
+            <foreach collection="proIds" index="index" item="id" open="(" separator="," close=")">
+                #{id}
+            </foreach>
+        </where>
+    </select>
+
 </mapper>

--
Gitblit v1.9.3