From 9fa13f13bc33a95b53d03cfd2bfc1dad2beab905 Mon Sep 17 00:00:00 2001 From: qushaowei <qushaowei@163.com> Date: 星期二, 16 四月 2024 09:42:24 +0800 Subject: [PATCH] 修改排序 --- lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcHomeMapper.xml | 83 +++++++++++++++++++++++++++++++++++++++++ 1 files changed, 83 insertions(+), 0 deletions(-) diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcHomeMapper.xml b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcHomeMapper.xml index b358a64..6dd9f0c 100644 --- a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcHomeMapper.xml +++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcHomeMapper.xml @@ -47,6 +47,7 @@ <select id="getUtilizationByMonth" resultType="java.util.Map"> SELECT SUM(process_long) processLong, + SUM(open_long) openLong, COUNT(*) processDay FROM mdc_equipment_statistical_info @@ -61,4 +62,86 @@ </where> </select> + <select id="getEquipmentDayUtilizationStatistics" resultType="org.jeecg.modules.mdc.entity.MdcEquipmentStatisticalInfo"> + SELECT + the_date, + SUM ( process_long ) processLong, + SUM ( open_long ) openLong + FROM + mdc_equipment_statistical_info + <where> + <if test="equipmentIdList != null and equipmentIdList.size() > 0 "> + AND equipment_id IN + <foreach collection="equipmentIdList" index="index" item="id" open="(" separator="," close=")"> + #{id} + </foreach> + </if> + <if test="dateList != null and dateList.size() > 0 "> + AND the_date IN + <foreach collection="dateList" index="index" item="date" open="(" separator="," close=")"> + #{date} + </foreach> + </if> + </where> + GROUP BY + the_date + </select> + + <select id="getEquipmentOEEMonthStatistics" resultType="org.jeecg.modules.mdc.entity.MdcOverallEquipmentEfficiency"> + SELECT + * + FROM + mdc_overall_equipment_efficiency + <where> + AND valid_date = #{validDate} + <if test="equipmentIdList != null and equipmentIdList.size() > 0 "> + AND equipment_id IN + <foreach collection="equipmentIdList" index="index" item="id" open="(" separator="," close=")"> + #{id} + </foreach> + </if> + </where> + </select> + + <select id="getUtilizationByDay" resultType="org.jeecg.modules.mdc.entity.MdcEquipmentStatisticalInfo"> + SELECT + the_date, + SUM ( process_long ) processLong, + SUM ( open_long ) openLong + FROM + mdc_equipment_statistical_info + <where> + AND the_date = #{date} + <if test="equipmentIdList != null and equipmentIdList.size() > 0 "> + AND equipment_id IN + <foreach collection="equipmentIdList" index="index" item="id" open="(" separator="," close=")"> + #{id} + </foreach> + </if> + </where> + GROUP BY + the_date + </select> + + <select id="getEquipmentSevenUtilizationStatistics" resultType="org.jeecg.modules.mdc.entity.MdcEquipmentStatisticalInfo"> + SELECT + equipment_id, + SUM ( process_long ) processLong, + SUM ( open_long ) openLong + FROM + mdc_equipment_statistical_info + <where> + AND the_date BETWEEN #{start} AND #{end} + <if test="equipmentIdList != null and equipmentIdList.size() > 0 "> + AND equipment_id IN + <foreach collection="equipmentIdList" index="index" item="id" open="(" separator="," close=")"> + #{id} + </foreach> + </if> + </where> + GROUP BY + equipment_id + </select> + + </mapper> \ No newline at end of file -- Gitblit v1.9.3