diff --git a/SolarPower/Repository/Implement/OverviewRepository.cs b/SolarPower/Repository/Implement/OverviewRepository.cs index 876ed87..da9db0c 100644 --- a/SolarPower/Repository/Implement/OverviewRepository.cs +++ b/SolarPower/Repository/Implement/OverviewRepository.cs @@ -237,7 +237,7 @@ namespace SolarPower.Repository.Implement { var startDay = Convert.ToDateTime(nowDay).AddDays(-7).ToString("yyyy-MM-dd"); - var sql_power = @$"SELECT DATE_FORMAT(ps.timestamp, '%Y-%m-%d') AS Label, ps.TODAYKWH AS PowerData, pyr.Irradiance AS IrradianceData, pyr.Temperature AS TemperatureData + var sql_power = @$"SELECT DATE_FORMAT(ps.timestamp, '%Y-%m-%d') AS Label, ps.TODAYKWH AS PowerData, pyr.IrrDayHour AS IrradianceData, pyr.Temperature AS TemperatureData FROM power_station_history_day ps LEFT JOIN sensor_history_day pyr ON ps.PowerStationId = pyr.PowerStationId AND DATE_FORMAT(ps.timestamp, '%Y-%m-%d') = DATE_FORMAT(pyr.timestamp, '%Y-%m-%d') WHERE ps.PowerStationId = @PowerStationId @@ -262,7 +262,7 @@ namespace SolarPower.Repository.Implement { var startDay = Convert.ToDateTime(nowDay).ToString("yyyy-MM-01"); - var sql_power = @$"SELECT DATE_FORMAT(ps.timestamp, '%Y-%m-%d') AS Label, ps.TODAYKWH AS PowerData, pyr.Irradiance AS IrradianceData, pyr.Temperature AS TemperatureData + var sql_power = @$"SELECT DATE_FORMAT(ps.timestamp, '%Y-%m-%d') AS Label, ps.TODAYKWH AS PowerData, pyr.IrrDayHour AS IrradianceData, pyr.Temperature AS TemperatureData FROM power_station_history_day ps LEFT JOIN sensor_history_day pyr ON ps.PowerStationId = pyr.PowerStationId AND DATE_FORMAT(ps.timestamp, '%Y-%m-%d') = DATE_FORMAT(pyr.timestamp, '%Y-%m-%d') WHERE ps.PowerStationId = @PowerStationId @@ -288,7 +288,7 @@ namespace SolarPower.Repository.Implement { var startyear = Convert.ToDateTime(nowDay).ToString("yyyy"); - var sql_power = @$"SELECT DATE_FORMAT(ps.timestamp, '%Y-%m') AS Label, ps.MONTHKWH AS PowerData, pyr.Irradiance AS IrradianceData, pyr.Temperature AS TemperatureData + var sql_power = @$"SELECT DATE_FORMAT(ps.timestamp, '%Y-%m') AS Label, ps.MONTHKWH AS PowerData, pyr.IrrDay AS IrradianceData, pyr.Temperature AS TemperatureData FROM power_station_history_month ps LEFT JOIN sensor_history_month pyr ON ps.PowerStationId = pyr.PowerStationId AND DATE_FORMAT(ps.timestamp, '%Y-%m') = DATE_FORMAT(pyr.timestamp, '%Y-%m') WHERE ps.PowerStationId = @PowerStationId diff --git a/SolarPower/Views/StationOverview/StationOverviewInfo.cshtml b/SolarPower/Views/StationOverview/StationOverviewInfo.cshtml index 62c1bb2..af188e6 100644 --- a/SolarPower/Views/StationOverview/StationOverviewInfo.cshtml +++ b/SolarPower/Views/StationOverview/StationOverviewInfo.cshtml @@ -31,7 +31,7 @@

-

27°C
降雨幾率: 0%

+

27°C
降雨機率: 0%