diff --git a/securitycontrol-model/securitycontrol-screen/src/main/resources/mapper/DeviceEnergyAnalysisMapper.xml b/securitycontrol-model/securitycontrol-screen/src/main/resources/mapper/DeviceEnergyAnalysisMapper.xml index 03bab3e..a3dc727 100644 --- a/securitycontrol-model/securitycontrol-screen/src/main/resources/mapper/DeviceEnergyAnalysisMapper.xml +++ b/securitycontrol-model/securitycontrol-screen/src/main/resources/mapper/DeviceEnergyAnalysisMapper.xml @@ -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