累計日照 debug

This commit is contained in:
JiaHao Liu 2021-12-21 11:31:51 +08:00
parent 6d3bcb7d0d
commit 705a671398

View File

@ -242,7 +242,7 @@ namespace solarApp.Service
select a.powerstationID, a.reportdate, ifnull(b.Irradiance, 0) irrAvg, a.Temperature, a.envTemperature, a.humidity, a.Vane, a.Dust, a.WingDirection, a.irrDay from
(
select powerStationID , concat(DATE_FORMAT(`TIMESTAMP`,'%Y-%m-%d'), ' 00:00') reportdate, round(avg(Temperature), 6) Temperature,
envTemperature, humidity, Vane, Dust, WingDirection, irrDay
envTemperature, humidity, Vane, Dust, avg(WingDirection) WingDirection, max(irrDay) irrDay
from solar_master.sensor_history_hour
where powerstationID = @powerstationID and DATE_FORMAT(`TIMESTAMP`,'%Y-%m-%d') = @date1
group by DATE_FORMAT(`TIMESTAMP`,'%Y-%m-%d')
@ -266,7 +266,7 @@ namespace solarApp.Service
select a.powerstationID, a.reportdate, ifnull(b.Irradiance, 0) irrAvg, a.Temperature, a.envTemperature, a.humidity, a.Vane, a.Dust, WingDirection, irrDay from
(
select powerStationID , concat(DATE_FORMAT(`TIMESTAMP`,'%Y-%m'), '-01 00:00') reportdate, round(avg(Temperature), 6) Temperature,
envTemperature, humidity, Vane, Dust, WingDirection, irrDay
avg(envTemperature) envTemperature, avg(humidity) humidity, avg(Vane) Vane, avg(Dust) Dust, avg(WingDirection) WingDirection, max(irrDay) irrDay
from solar_master.sensor_history_day
where powerstationID = @powerstationID and DATE_FORMAT(`TIMESTAMP`,'%Y-%m') = @date1
group by DATE_FORMAT(`TIMESTAMP`,'%Y-%m')