From f813d91421ff6a24b30ef3d1b5d123c08e8331a5 Mon Sep 17 00:00:00 2001
From: zhangherong <571457620@qq.com>
Date: 星期三, 14 五月 2025 10:21:46 +0800
Subject: [PATCH] art: 设备管理-数据库设计文件修改

---
 lxzn-module-mdc-common/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMapper.xml |   41 +++++++++++++++++++++++++++++++++++++++++
 1 files changed, 41 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 19bb11d..66e6ef5 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
@@ -340,4 +340,45 @@
         </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>
+
+    <select id="findByProIds" resultType="org.jeecg.modules.mdc.entity.MdcEquipment">
+        SELECT
+            t1.*
+        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>
+
+    <select id="getByEquipmentId" resultType="org.jeecg.modules.mdc.vo.MdcBoardEquRealTImeVo">
+        SELECT
+            t1.*,
+            t2.equipment_manager equipmentManager,
+            t2.installation_position installationPosition,
+            t3.oporation operation
+        FROM
+            mdc_equipment t1
+                LEFT JOIN eam_equipment t2 ON t1.equipment_id = t2.equipment_code
+                LEFT JOIN Equipment t3 ON t1.equipment_id = t3.EquipmentID
+        WHERE t1.equipment_id = #{equipmentId}
+    </select>
+
 </mapper>

--
Gitblit v1.9.3