diff --git a/solarApp/Service/procArchiveSensorHourly.cs b/solarApp/Service/procArchiveSensorHourly.cs index fe052f1..70756ae 100644 --- a/solarApp/Service/procArchiveSensorHourly.cs +++ b/solarApp/Service/procArchiveSensorHourly.cs @@ -270,6 +270,10 @@ namespace solarApp.Service { IrrDayHour = IrrDay - twoHourAgoIrrDay;// 前一小時的IrrDay - 前兩小時的IrrDay } + if(IrrDayHour < 0) + { + IrrDayHour = 0; + } string ss = $@"UPDATE solar_master.sensor_history_hour SET IrrDayHour = {IrrDayHour}