From 603af8f8c24e1a2b1e41310988b434f9f2926907 Mon Sep 17 00:00:00 2001 From: zhangherong <571457620@qq.com> Date: 星期五, 22 八月 2025 11:29:09 +0800 Subject: [PATCH] art: 故障选择转译 --- lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcOeeInfoMapper.xml | 34 ++++++++++++++++++++++++++++++++++ 1 files changed, 34 insertions(+), 0 deletions(-) diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcOeeInfoMapper.xml b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcOeeInfoMapper.xml index 664b2fa..be6712a 100644 --- a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcOeeInfoMapper.xml +++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcOeeInfoMapper.xml @@ -27,4 +27,38 @@ </where> ORDER BY the_date DESC, equipment_id ASC </select> + + <select id="findByEquIdsAndDate" resultType="org.jeecg.modules.mdc.entity.MdcOeeInfo"> + SELECT + the_date, + AVG ( oee ) oee + FROM + mdc_oee_info + <where> + the_date BETWEEN #{start} AND #{end} + AND equipment_id IN + <foreach collection="equipmentIdList" item="id" index="index" open="(" close=")" separator=","> + #{ id } + </foreach> + AND plan_close_long != 1440 + </where> + GROUP BY + the_date + ORDER BY + the_date + </select> + + <select id="findByEquIdAndDate" resultType="org.jeecg.modules.mdc.entity.MdcOeeInfo"> + SELECT * FROM mdc_oee_info WHERE the_date BETWEEN #{start} AND #{end} AND equipment_id = #{equipmentId} ORDER BY the_date + </select> + + <select id="findByEquIdAndMonth" resultType="java.math.BigDecimal"> + SELECT + AVG(oee) + FROM + mdc_oee_info + WHERE + the_date LIKE CONCAT(#{month}, '%') + AND equipment_id = #{equipmentId} AND plan_close_long != 1440 + </select> </mapper> \ No newline at end of file -- Gitblit v1.9.3