solar_App: 修改每小時更新的累積日照差,不為負數

This commit is contained in:
wanling040@gmail.com 2022-08-22 15:11:34 +08:00
parent d7586ff6a0
commit 3f009e7c12

View File

@ -270,6 +270,10 @@ namespace solarApp.Service
{ {
IrrDayHour = IrrDay - twoHourAgoIrrDay;// 前一小時的IrrDay - 前兩小時的IrrDay IrrDayHour = IrrDay - twoHourAgoIrrDay;// 前一小時的IrrDay - 前兩小時的IrrDay
} }
if(IrrDayHour < 0)
{
IrrDayHour = 0;
}
string ss = $@"UPDATE solar_master.sensor_history_hour string ss = $@"UPDATE solar_master.sensor_history_hour
SET IrrDayHour = {IrrDayHour} SET IrrDayHour = {IrrDayHour}