From c34fc83655b146b40802e1fce22db37b7367c83d Mon Sep 17 00:00:00 2001 From: Houjie <714924425@qq.com> Date: 星期一, 30 六月 2025 09:23:12 +0800 Subject: [PATCH] 企业微信登录 --- lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentStatisticalInfoMapper.xml | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 42 insertions(+), 0 deletions(-) diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentStatisticalInfoMapper.xml b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentStatisticalInfoMapper.xml index 2d4f020..a91e6f0 100644 --- a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentStatisticalInfoMapper.xml +++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentStatisticalInfoMapper.xml @@ -13,6 +13,10 @@ SELECT TOP 1 process_long FROM mdc_equipment_statistical_info WHERE equipment_id = #{equipmentId} AND the_date = #{validDate} </select> + <select id="findMdcEquipmentStatisticalInfo" resultType="org.jeecg.modules.mdc.entity.MdcEquipmentStatisticalInfo"> + SELECT * FROM mdc_equipment_statistical_info WHERE equipment_id = #{equipmentId} AND the_date BETWEEN #{start} AND #{end} + </select> + <select id="findByEquipmentAndMonth" resultType="org.jeecg.modules.mdc.dto.MdcEquipmentStatisticalDto"> SELECT SUM(open_long) openLong, @@ -26,4 +30,42 @@ WHERE equipment_id = #{equipmentId} AND the_date LIKE CONCAT(#{date}, '%') </select> + + <select id="findByEquipmentAndDate" resultType="org.jeecg.modules.mdc.entity.MdcEquipmentStatisticalInfo"> + SELECT + the_date, + AVG ( open_long ) openLong, + AVG ( wait_long ) waitLong, + AVG ( process_long ) processLong, + AVG ( close_long ) closeLong, + AVG ( error_long ) errorLong + FROM + mdc_equipment_statistical_info + <where> + the_date BETWEEN #{start} AND #{end} + AND equipment_id IN + <foreach collection="equipmentList" index="index" item="id" open="(" separator="," close=")"> + #{id} + </foreach> + </where> + GROUP BY + the_date + </select> + + <select id="findByEquIdAndDate" resultType="org.jeecg.modules.mdc.entity.MdcEquipmentStatisticalInfo"> + SELECT * FROM mdc_equipment_statistical_info WHERE equipment_id = #{equipmentId} AND the_date BETWEEN #{start} AND #{end} ORDER BY the_date + </select> + + <select id="findByEquIdAndMonth" resultType="org.jeecg.modules.mdc.entity.MdcEquipmentStatisticalInfo"> + SELECT + AVG(open_long) openLong, + AVG(close_long) closeLong, + AVG(wait_long) waitLong, + AVG(process_long) processLong, + AVG(error_long) errorLong + FROM + mdc_equipment_statistical_info + WHERE + equipment_id = #{equipmentId} AND the_date LIKE CONCAT(#{month}, '%') + </select> </mapper> \ No newline at end of file -- Gitblit v1.9.3