From f5be10dc0c90b1cbf264e0bd194f86474ea97412 Mon Sep 17 00:00:00 2001 From: Kai Date: Wed, 12 Jan 2022 16:27:09 +0800 Subject: [PATCH 1/3] =?UTF-8?q?1.=20=E8=83=8C=E6=99=AF=E5=9F=B7=E8=A1=8C?= =?UTF-8?q?=20=E9=80=86=E4=BE=BF=E5=99=A8=E6=AA=A2=E6=B8=AC=20=E6=8A=93?= =?UTF-8?q?=E5=8F=96=E6=89=80=E6=9C=89=E9=9B=BB=E7=AB=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Quartz/Jobs/CalcInverter15minJob.cs | 2 ++ .../Implement/PowerStationRepository.cs | 19 +++++++++++++++++++ .../Interface/IPowerStationRepository.cs | 2 ++ 3 files changed, 23 insertions(+) diff --git a/SolarPower/Quartz/Jobs/CalcInverter15minJob.cs b/SolarPower/Quartz/Jobs/CalcInverter15minJob.cs index 9a49fb4..8b25a1b 100644 --- a/SolarPower/Quartz/Jobs/CalcInverter15minJob.cs +++ b/SolarPower/Quartz/Jobs/CalcInverter15minJob.cs @@ -134,6 +134,8 @@ namespace SolarPower.Quartz.Jobs try { + powerStations = await powerStationRepository.GetAllNoStatusAsync(); + logger.LogInformation("【CalcInverter15minJob】開始檢測逆變器狀態"); var ps_groupby_SitDB = powerStations.GroupBy(x => x.SiteDB).ToList(); diff --git a/SolarPower/Repository/Implement/PowerStationRepository.cs b/SolarPower/Repository/Implement/PowerStationRepository.cs index ac15bf7..321f2a7 100644 --- a/SolarPower/Repository/Implement/PowerStationRepository.cs +++ b/SolarPower/Repository/Implement/PowerStationRepository.cs @@ -416,6 +416,25 @@ namespace SolarPower.Repository.Implement } } + public async Task> GetAllNoStatusAsync() + { + List result; + using (IDbConnection conn = this._databaseHelper.GetConnection()) + { + try + { + var sql = $"SELECT * FROM {tableName} WHERE Deleted = 0"; + + result = (await conn.QueryAsync(sql)).ToList(); + } + catch (Exception exception) + { + throw exception; + } + return result; + } + } + /// /// 透過電站編號,取得單一電站資訊(覆寫) /// diff --git a/SolarPower/Repository/Interface/IPowerStationRepository.cs b/SolarPower/Repository/Interface/IPowerStationRepository.cs index 5aed3fe..bb3a7d2 100644 --- a/SolarPower/Repository/Interface/IPowerStationRepository.cs +++ b/SolarPower/Repository/Interface/IPowerStationRepository.cs @@ -612,5 +612,7 @@ namespace SolarPower.Repository.Interface Task CheckSensorAvgTableColumn(string dbname, string code); Task AlertColInvTableColumn(string dbname, string code); Task AlertColSensoravgTableColumn(string dbname, string code); + + Task> GetAllNoStatusAsync(); } } From 6619ec231efeaa8e13f4e4e27b730a8290cde670 Mon Sep 17 00:00:00 2001 From: b110212000 Date: Thu, 13 Jan 2022 15:29:11 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E7=B6=9C=E5=90=88=E5=A0=B1=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SolarPower/Controllers/PowerStationController.cs | 2 +- SolarPower/Views/StationReport/Index.cshtml | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/SolarPower/Controllers/PowerStationController.cs b/SolarPower/Controllers/PowerStationController.cs index 0fdab4a..fe3c000 100644 --- a/SolarPower/Controllers/PowerStationController.cs +++ b/SolarPower/Controllers/PowerStationController.cs @@ -3256,7 +3256,7 @@ namespace SolarPower.Controllers var sitecheck = await powerStationRepository.Check4table(powerStation.Code, powerStation.SiteDB); if(powerStation.Code != sitecheck.Avg && sitecheck.Avg != null) { - status.Add($"s{powerStation.Code}01_avg SITEID錯誤"); + status.Add($"s{powerStation.Code}01_sensoravg SITEID錯誤"); } if (powerStation.Code != sitecheck.Inv_site && sitecheck.Inv_site != null) { diff --git a/SolarPower/Views/StationReport/Index.cshtml b/SolarPower/Views/StationReport/Index.cshtml index 44aba35..63b73e8 100644 --- a/SolarPower/Views/StationReport/Index.cshtml +++ b/SolarPower/Views/StationReport/Index.cshtml @@ -1285,11 +1285,11 @@ PowerStation: selecterd_invert } var url = "/StationReport/GetMaxForm"; - var StrInfoBody; + var StrInfoBody = ""; var CityArray = []; - var CityInfoBody; - var TotalHead; - var TotalBody; + var CityInfoBody = ""; + var TotalHead = ""; + var TotalBody = ""; var kwhkwp = 0; var kwp = 0; $.post(url, send_data, function (rel) { @@ -1365,7 +1365,8 @@ StrInfoBody += "" + data.avgIrradiance.toFixed(2) + ""; StrInfoBody += "" + data.avgPR.toFixed(2) + ""; if (showmoney == 1) { - StrInfoBody += "" + toThousands(main_system_guid) + ""; + + StrInfoBody += "" + toThousands(Math.round(data.todayMoney)) + ""; StrInfoBody += "" + toThousands(Math.round(data.todayMoney * hirerate * 0.01))+ ""; @@ -1426,6 +1427,7 @@ $('#detailtable').show(); nowform = 2; + $('#all').show(); }) } From afa81d62c595520937b6a5888ce93b9d93a00da0 Mon Sep 17 00:00:00 2001 From: b110212000 Date: Thu, 13 Jan 2022 15:46:09 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=AD=B7=E5=8F=B2=E8=B3=87=E6=96=99(?= =?UTF-8?q?=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StationOverviewInfo.cshtml | 2 + .../Views/StationOverview/_History.cshtml | 81 ++++++++++--------- 2 files changed, 43 insertions(+), 40 deletions(-) diff --git a/SolarPower/Views/StationOverview/StationOverviewInfo.cshtml b/SolarPower/Views/StationOverview/StationOverviewInfo.cshtml index 5adf90d..ed4c5c2 100644 --- a/SolarPower/Views/StationOverview/StationOverviewInfo.cshtml +++ b/SolarPower/Views/StationOverview/StationOverviewInfo.cshtml @@ -2426,6 +2426,7 @@ function getTable() { + $('#all').hide(); if (historyRange == "") { var today = new Date(); @@ -2793,6 +2794,7 @@ '' + tempALL.toFixed(2) + '' + ''); } + $('#all').show(); }) } diff --git a/SolarPower/Views/StationOverview/_History.cshtml b/SolarPower/Views/StationOverview/_History.cshtml index 727039e..4010d53 100644 --- a/SolarPower/Views/StationOverview/_History.cshtml +++ b/SolarPower/Views/StationOverview/_History.cshtml @@ -50,48 +50,49 @@ +
+
+
+
總結
+ + + + + + + + + + + + + +
時間發電量(kWh)有效日照時數日照度(kWh/m2)PR(%)溫度(℃)
+
+
+
+ +
-
-
-
總結
- - - - - - - - - - - - - -
時間發電量(kWh)有效日照時數日照度(kWh/m2)PR(%)溫度(℃)
+
+
+
詳細資訊
+ + + + + + + + + + + + + +
時間發電量(kWh)有效發電小時日照度(W/m2)PR(%)溫度(℃)
+
-
- -
- -
-
-
詳細資訊
- - - - - - - - - - - - - -
時間發電量(kWh)有效日照時數日照度(W/m2)PR(%)溫度(℃)
-
-
\ No newline at end of file