From 8da421258a4c986a9620260f61139811cb494e32 Mon Sep 17 00:00:00 2001 From: "wanling040@gmail.com" Date: Fri, 26 Aug 2022 15:31:17 +0800 Subject: [PATCH] =?UTF-8?q?solar=5FApp:=20=E6=9B=B4=E6=94=B9=E5=8D=8A?= =?UTF-8?q?=E5=A4=9C=E6=AD=B8=E6=AA=94(=E6=97=A5=E5=A0=B1=E8=A1=A8)?= =?UTF-8?q?=E5=9F=B7=E8=A1=8C=E9=A0=86=E5=BA=8F=E3=80=81=E7=95=B0=E5=B8=B8?= =?UTF-8?q?=E8=99=95=E7=90=86=E7=9A=84=E6=99=82=E9=96=93=E5=88=A4=E6=96=B7?= =?UTF-8?q?=E5=A4=9A=E5=8A=A0=E7=A7=92=E6=95=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- solarApp/fmArchive.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/solarApp/fmArchive.cs b/solarApp/fmArchive.cs index e7db969..1ef2021 100644 --- a/solarApp/fmArchive.cs +++ b/solarApp/fmArchive.cs @@ -117,7 +117,7 @@ namespace solarApp } //異常處理 每 5分鐘跑一次 - if ((DateTime.Now.Minute % 5) == 0 && autoTask == false) + if ((DateTime.Now.Minute % 5) == 0 && (DateTime.Now.Second) < 30 && autoTask == false) { autoTask = true; lbMsgTitle.Text = "異常處理 " + DateTime.Now.ToString() + " timer start"; @@ -306,7 +306,6 @@ namespace solarApp sensorSvc.archiveData(item.SiteID.Substring(0, 9), day.ToString("yyyy-MM-dd")); invSvc.archiveData(item.SiteID.Substring(0, 9), day.ToString("yyyy-MM-dd")); siteSvc.archiveData(item.SiteID.Substring(0, 9), day.ToString("yyyy-MM-dd")); - invSvc.report_invDay(item.SiteID.Substring(0, 9), day.ToString("yyyy-MM-dd")); } } sensorSvc.isFirst = true; @@ -317,6 +316,7 @@ namespace solarApp { sensorSvc.archiveSensorHistoryHourData(item.SiteID.Substring(0, 9), day.ToString("yyyy-MM-dd")); sensorSvc.isFirst = false; + invSvc.report_invDay(item.SiteID.Substring(0, 9), day.ToString("yyyy-MM-dd")); } } autoTask = true;