From a6430ffc4448d79a95fb28f1ac464f0f35f2a10c Mon Sep 17 00:00:00 2001 From: zhangherong <571457620@qq.com> Date: 星期三, 02 七月 2025 11:00:03 +0800 Subject: [PATCH] art:点检工单、点检标准数据库设计修改 --- 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..88b331d 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