2023-06-07 15:07:16 优化完善能耗统计查询接口!

master
魔神煜修罗皇 2 years ago
parent 50924d7d57
commit e65d1e51d6
  1. 6
      psdc-business/src/main/resources/mapper/business/PsdcStatisticsDayMapper.xml
  2. 6
      psdc-business/src/main/resources/mapper/business/PsdcStatisticsMonthMapper.xml
  3. 6
      psdc-business/src/main/resources/mapper/business/PsdcStatisticsYearMapper.xml

@ -42,9 +42,9 @@
<!--分页查询指定行数据-->
<select id="queryAllByLimit" resultMap="PsdcStatisticsDayMap">
select
day_id,day_date,device_id,device_name,hour_00,hour_01,hour_02,hour_03,hour_04,hour_05,hour_06,hour_07,hour_08,hour_09,hour_10,hour_11,hour_12,hour_13,hour_14,hour_15,hour_16,hour_17,hour_18,hour_19,hour_20,hour_21,hour_22,hour_23
from psdc_statistics_day
Select
day_id,day_date,pd.device_id,pd.device_name,hour_00,hour_01,hour_02,hour_03,hour_04,hour_05,hour_06,hour_07,hour_08,hour_09,hour_10,hour_11,hour_12,hour_13,hour_14,hour_15,hour_16,hour_17,hour_18,hour_19,hour_20,hour_21,hour_22,hour_23
From psdc_statistics_day psd Left Join psdc_device pd On pd.device_id = psd.device_id
<where>
<if test="deviceId != null and deviceId != ''">
and device_id = #{deviceId}

@ -82,9 +82,9 @@
<!--分页查询指定行数据-->
<select id="queryAllByLimit" resultMap="PsdcStatisticsMonthMap">
select
month_id,device_id,device_name,month_date,day_01,day_02,day_03,day_04,day_05,day_06,day_07,day_08,day_09,day_10,day_11,day_12,day_13,day_14,day_15,day_16,day_17,day_18,day_19,day_20,day_21,day_22,day_23,day_24,day_25,day_26,day_27,day_28,day_29,day_30,day_31
from psdc_statistics_month
Select
month_id,pd.device_id,pd.device_name,month_date,day_01,day_02,day_03,day_04,day_05,day_06,day_07,day_08,day_09,day_10,day_11,day_12,day_13,day_14,day_15,day_16,day_17,day_18,day_19,day_20,day_21,day_22,day_23,day_24,day_25,day_26,day_27,day_28,day_29,day_30,day_31
From psdc_statistics_month psm Left Join psdc_device pd On pd.device_id = psm.device_id
<where>
<if test="deviceId != null and deviceId != ''">
and device_id = #{deviceId}

@ -30,9 +30,9 @@
<!--分页查询指定行数据-->
<select id="queryAllByLimit" resultMap="PsdcStatisticsYearMap">
select
year_id,device_id,device_name,year_date,month_01,month_02,month_03,month_04,month_05,month_06,month_07,month_08,month_09,month_10,month_11,month_12
from psdc_statistics_year
Select
year_id,pd.device_id,pd.device_name,year_date,month_01,month_02,month_03,month_04,month_05,month_06,month_07,month_08,month_09,month_10,month_11,month_12
From psdc_statistics_year psy Left Join psdc_device pd On pd.device_id = psy.device_id
<where>
<if test="deviceId != null and deviceId != ''">
and device_id = #{deviceId}

Loading…
Cancel
Save