From 3f009e7c12c6ee287b6b25895dc9bf3188073003 Mon Sep 17 00:00:00 2001 From: "wanling040@gmail.com" Date: Mon, 22 Aug 2022 15:11:34 +0800 Subject: [PATCH] =?UTF-8?q?solar=5FApp:=20=E4=BF=AE=E6=94=B9=E6=AF=8F?= =?UTF-8?q?=E5=B0=8F=E6=99=82=E6=9B=B4=E6=96=B0=E7=9A=84=E7=B4=AF=E7=A9=8D?= =?UTF-8?q?=E6=97=A5=E7=85=A7=E5=B7=AE=EF=BC=8C=E4=B8=8D=E7=82=BA=E8=B2=A0?= =?UTF-8?q?=E6=95=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- solarApp/Service/procArchiveSensorHourly.cs | 4 ++++ 1 file changed, 4 insertions(+) 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}