From 9363b7a09744b3003ad6163ac42591fe40c59c5e Mon Sep 17 00:00:00 2001 From: Lius <Lius2225@163.com> Date: 星期四, 14 三月 2024 15:50:06 +0800 Subject: [PATCH] 首页设备利用率和oee接口 --- lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/EquipmentLogMapper.xml | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/EquipmentLogMapper.xml b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/EquipmentLogMapper.xml index d31b630..42fffcd 100644 --- a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/EquipmentLogMapper.xml +++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/EquipmentLogMapper.xml @@ -9,4 +9,20 @@ <select id="selectEquipmentOporation" resultType="org.jeecg.modules.mdc.entity.EquipmentLog"> SELECT TOP 1 * FROM EquipmentLog WHERE EquipmentID = #{ equipmentId } 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