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/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(); } } 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 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(); }) }