0918优化-电表报表-尖峰平谷日差值显示

This commit is contained in:
2025-10-10 17:32:15 +08:00
parent b861ad7593
commit 158bc1a51d
5 changed files with 82 additions and 61 deletions

View File

@ -178,4 +178,27 @@
calc_time = #{calcTime},
update_time = NOW();
</insert>
<select id="getDataBySiteId" resultType="com.xzzn.ems.domain.vo.AmmeterStatisListVo">
select t.data_date as dataTime,
t.peak_charge_diff as activePeakKwh,
t.peak_discharge_diff as reActivePeakKwh,
t.high_charge_diff as activeHighKwh,
t.high_discharge_diff as reActiveHighKwh,
t.flat_charge_diff as activeFlatKwh,
t.flat_discharge_diff as reActiveFlatKwh,
t.valley_charge_diff as activeValleyKwh,
t.valley_discharge_diff as reActiveValleyKwh
from ems_daily_energy_data t
where 1=1
<if test="siteId != null">
and t.site_id = #{siteId}
</if>
<if test="startTime != null">
and t.data_date &gt;= #{startTime}
</if>
<if test="endTime != null">
and t.data_date &gt;= #{endTime}
</if>
</select>
</mapper>