From 1292cf73f7db223f35ab450eabeeedbf8802eb5a Mon Sep 17 00:00:00 2001
From: Lius <Lius2225@163.com>
Date: 星期四, 14 三月 2024 09:35:32 +0800
Subject: [PATCH] 首页设备状态计数接口

---
 lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMapper.xml |   16 ++++++++++++++++
 1 files changed, 16 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 4e0ace6..480d71e 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
@@ -286,4 +286,20 @@
         select top 1 spindlespeed, actualspindlespeed from [${tableName}] order by CollectTime  desc
     </select>
 
+    <!--鏌ヨ璁惧鏈�鏂颁竴鏉℃暟鎹�-->
+    <select id="getEquipmentStatusList" resultType="org.jeecg.modules.mdc.entity.EquipmentLog">
+        SELECT
+            t1.*
+        FROM
+            EquipmentLog t1
+            INNER JOIN ( SELECT MAX ( CollectTime ) AS CollectTime, EquipmentID FROM EquipmentLog GROUP BY EquipmentID ) t2 ON t1.CollectTime= t2.CollectTime
+            AND t1.EquipmentID= t2.EquipmentID
+        <if test="equipmentIdList != null and equipmentIdList.size() > 0">
+            AND t1.EquipmentID IN
+            <foreach collection="equipmentIdList" index="index" item="id" open="(" separator="," close=")">
+                #{id}
+            </foreach>
+        </if>
+    </select>
+
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3