From 0d0c698839c739f6ed001835a521b899c7ff0cec Mon Sep 17 00:00:00 2001
From: Lius <Lius2225@163.com>
Date: 星期四, 15 五月 2025 16:34:29 +0800
Subject: [PATCH] 设备属性字典翻译

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

diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMapper.xml b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMapper.xml
index e29c675..05d4b7d 100644
--- a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMapper.xml
+++ b/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>
@@ -263,4 +266,44 @@
         select top 1 spindlespeed, actualspindlespeed from [${tableName}] order by CollectTime  desc
     </select>
 
+    <!--鏍规嵁id鑾峰彇璁惧淇℃伅-->
+    <select id="findById" resultType="org.jeecg.modules.mdc.dto.MdcEquipmentDetailedDto">
+        SELECT
+            t1.*,
+            t2.MaxAxis maxAxis,
+            t2.ValidAxis validAxis
+        FROM
+            mdc_equipment t1
+                LEFT JOIN EquipmentBaseInfo t2 ON t1.equipment_id = t2.EquipmentID
+        WHERE
+            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>
\ No newline at end of file

--
Gitblit v1.9.3