From ec077979f2d55b2a54e893085f4b845b729e69c3 Mon Sep 17 00:00:00 2001 From: yangbin <yangbin@qq.com> Date: 星期四, 20 二月 2025 14:50:10 +0800 Subject: [PATCH] 大屏看板2 --- lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/EquipmentStatisticalInfoMapper.xml | 68 ++++++++++++++++++++++++++++++++++ 1 files changed, 68 insertions(+), 0 deletions(-) diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/EquipmentStatisticalInfoMapper.xml b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/EquipmentStatisticalInfoMapper.xml index 50e63d3..72c783c 100644 --- a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/EquipmentStatisticalInfoMapper.xml +++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/EquipmentStatisticalInfoMapper.xml @@ -1,5 +1,73 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="org.jeecg.modules.mdc.mapper.EquipmentStatisticalInfoMapper"> + <select id="findDataRankingForBigScreen" resultType="org.jeecg.modules.mdc.subcontrol.vo.LastWeekDataVo"> + SELECT + equipment_id equipment, + SUM( open_long ) openingLong, + SUM( close_long ) closelong, + SUM( wait_long ) waitlong, + SUM( process_long ) processingLong, + SUM( error_long ) errorlong + FROM + mdc_equipment_statistical_info + <where> + <if test="equipmentIdList != null and equipmentIdList.size() > 0"> + AND equipment_id IN + <foreach collection="equipmentIdList" item="id" index="index" open="(" close=")" separator=","> + #{ id } + </foreach> + </if> + AND the_date >= #{ monday } + AND the_date <= #{ saturday } + </where> + GROUP BY + equipment_id; + </select> + + <select id="findDataForBigScreen" resultType="org.jeecg.modules.mdc.subcontrol.vo.LastWeekDataVo"> + SELECT + the_date thedate, + SUM( open_long ) openingLong, + SUM( close_long ) closelong, + SUM( wait_long ) waitlong, + SUM( process_long ) processingLong, + SUM( error_long ) errorlong + FROM + mdc_equipment_statistical_info + <where> + <if test="equipmentIdList != null and equipmentIdList.size() > 0"> + AND equipment_id IN + <foreach collection="equipmentIdList" item="id" index="index" open="(" close=")" separator=","> + #{ id } + </foreach> + </if> + AND the_date >= #{ monday } + AND the_date <= #{ saturday } + </where> + GROUP BY + the_date + ORDER BY + the_date ASC; + </select> + + <select id="findEquipmentId" resultType="java.lang.String"> + SELECT DISTINCT + equipment_id equipment + FROM + + mdc_equipment_statistical_info + <where> + <if test="equipmentIdList != null and equipmentIdList.size() > 0"> + AND equipment_id IN + <foreach collection="equipmentIdList" item="id" index="index" open="(" close=")" separator=","> + #{ id } + </foreach> + </if> + <if test="date != null and date != ''"> + AND the_date = #{ date } + </if> + </where> + </select> </mapper> \ No newline at end of file -- Gitblit v1.9.3