From 29dcac1a7bb5758b6f9a39fd0738f6ab367b5418 Mon Sep 17 00:00:00 2001
From: hyingbo <1363390067@qq.com>
Date: 星期二, 10 六月 2025 13:29:52 +0800
Subject: [PATCH] 操作工停机上报接口,操作工刷卡登录

---
 lxzn-module-mdc-common/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMapper.xml |   34 +++++++++++++++++++++++++++++++++-
 1 files changed, 33 insertions(+), 1 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..80df077 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
@@ -279,7 +293,8 @@
 
     <select id="queryByProductionIdAndType" resultType="org.jeecg.modules.mdc.entity.MdcEquipment">
         SELECT
-        me.*
+        me.*,
+        mpe.production_id
         FROM
         mdc_production_equipment mpe,
         mdc_equipment me
@@ -339,5 +354,22 @@
             #{equipmentType}
         </foreach>
     </select>
+    <select id="queryByDepartIdsAndType" resultType="org.jeecg.modules.mdc.entity.MdcEquipment">
+        SELECT
+            e.*,
+        ep.production_id
+        FROM
+        mdc_equipment e
+        INNER JOIN mdc_production_equipment ep ON e.id = ep.equipment_id
+        WHERE
+        ep.production_id IN
+        <foreach collection='productionIds' item='id' open='(' separator=',' close=')'>
+            #{id}
+        </foreach>
+        AND e.id IN
+        <foreach collection='deviceIds' item='deviceId' open='(' separator=',' close=')'>
+            #{deviceId}
+        </foreach>
+    </select>
 
 </mapper>

--
Gitblit v1.9.3