From ef37d4a78583019f834bfa9c2a5a4422f3f46b76 Mon Sep 17 00:00:00 2001 From: 潘晓明 <hahagongzi2006@163.com> Date: 星期三, 12 二月 2025 23:08:38 +0800 Subject: [PATCH] 成本趋势分析页面接口。 --- zhitan-system/src/main/resources/mapper/peakvalley/ElectricityDataItemMapper.xml | 26 ++++++++++++++++++++++++++ 1 files changed, 26 insertions(+), 0 deletions(-) diff --git a/zhitan-system/src/main/resources/mapper/peakvalley/ElectricityDataItemMapper.xml b/zhitan-system/src/main/resources/mapper/peakvalley/ElectricityDataItemMapper.xml index 2676c7d..449019b 100644 --- a/zhitan-system/src/main/resources/mapper/peakvalley/ElectricityDataItemMapper.xml +++ b/zhitan-system/src/main/resources/mapper/peakvalley/ElectricityDataItemMapper.xml @@ -49,4 +49,30 @@ AND time_type = #{timeType} </select> + <select id="getCostTrends" + resultType="com.zhitan.peakvalley.domain.ElectricityDataItem"> + SELECT + di.index_code, + di.time_code, + di.electricity_type, + di.data_time, + di.electricity, + di.cost, + di.time_type, + di.price, + di.remark + FROM + "electricity_data_item" di + JOIN energy_index ei ON di.index_id = ei.index_id + WHERE + di.index_id IN ( SELECT index_id FROM node_index WHERE node_id = #{indexId}) + <if test="emissionType !='' and emissionType !=null and emissionType =='allType'"> + AND ei.energy_id != '' + </if> + <if test="emissionType !='' and emissionType !=null and emissionType !='allType'"> + AND ei.energy_id = #{emissionType} + </if> + AND (di.data_time BETWEEN #{beginTime} AND #{endTime}) + AND di.time_type = #{timeType} + </select> </mapper> \ No newline at end of file -- Gitblit v1.9.3