Merge remote-tracking branch 'origin/main'

This commit is contained in:
sxu 2025-07-24 23:15:27 +08:00
commit d46ffbf02f
1 changed files with 2 additions and 1 deletions

View File

@ -10,7 +10,8 @@
SUM(consumption_kwh) AS consumptionKwh,
SUM(renewable_used_kwh * 0.9) AS renewableUsedKwh
FROM device_energy_analysis
WHERE stat_date BETWEEN #{startDate} AND #{endDate}
WHERE stat_date >= #{startDate}
AND stat_date < DATE_ADD(#{endDate}, INTERVAL 1 DAY)
and pro_id = #{proId}
GROUP BY DATE(stat_date)
ORDER BY statDate ASC