diff --git a/SolarPower/Controllers/StationOverviewController.cs b/SolarPower/Controllers/StationOverviewController.cs index bc5d830..fdc4547 100644 --- a/SolarPower/Controllers/StationOverviewController.cs +++ b/SolarPower/Controllers/StationOverviewController.cs @@ -215,6 +215,7 @@ namespace SolarPower.Controllers powerIrradianceTodayChart.Labels = powerIrradianceToday.Select(x => x.Label).ToList(); powerIrradianceTodayChart.PowerDatas = powerIrradianceToday.Select(x => x.PowerData).ToList(); powerIrradianceTodayChart.IrradianceDatas = powerIrradianceToday.Select(x => x.IrradianceData).ToList(); + powerIrradianceTodayChart.TemperatureDatas = powerIrradianceToday.Select(x => x.TemperatureData).ToList(); chartUptoDate.ChartToday = powerIrradianceTodayChart; //7日發電量日照度List @@ -224,24 +225,27 @@ namespace SolarPower.Controllers powerIrradiance7dayChart.Labels = powerIrradiance7day.Select(x => x.Label).ToList(); powerIrradiance7dayChart.PowerDatas = powerIrradiance7day.Select(x => x.PowerData).ToList(); powerIrradiance7dayChart.IrradianceDatas = powerIrradiance7day.Select(x => x.IrradianceData).ToList(); + powerIrradiance7dayChart.TemperatureDatas = powerIrradiance7day.Select(x => x.TemperatureData).ToList(); chartUptoDate.Chart7day = powerIrradiance7dayChart; //本月發電量日照度List var powerIrradianceMonth = await overviewRepository.GetListPowerIrradianceMonthByPowerStationId(id, nowDay); - //今日資料轉換 + //本月資料轉換 PowerIrradianceChart powerIrradianceMonthChart = new PowerIrradianceChart(); powerIrradianceMonthChart.Labels = powerIrradianceMonth.Select(x => x.Label).ToList(); powerIrradianceMonthChart.PowerDatas = powerIrradianceMonth.Select(x => x.PowerData).ToList(); powerIrradianceMonthChart.IrradianceDatas = powerIrradianceMonth.Select(x => x.IrradianceData).ToList(); + powerIrradianceMonthChart.TemperatureDatas = powerIrradianceMonth.Select(x => x.TemperatureData).ToList(); chartUptoDate.ChartMonth = powerIrradianceMonthChart; //本年發電量日照度List var powerIrradianceYear = await overviewRepository.GetListPowerIrradianceYearByPowerStationId(id, nowDay); - //今日資料轉換 + //本月資料轉換 PowerIrradianceChart powerIrradianceYearChart = new PowerIrradianceChart(); powerIrradianceYearChart.Labels = powerIrradianceYear.Select(x => x.Label).ToList(); powerIrradianceYearChart.PowerDatas = powerIrradianceYear.Select(x => x.PowerData).ToList(); powerIrradianceYearChart.IrradianceDatas = powerIrradianceYear.Select(x => x.IrradianceData).ToList(); + powerIrradianceYearChart.TemperatureDatas = powerIrradianceYear.Select(x => x.TemperatureData).ToList(); chartUptoDate.ChartYear = powerIrradianceYearChart; apiResult.Code = "0000"; diff --git a/SolarPower/Controllers/StationReportController.cs b/SolarPower/Controllers/StationReportController.cs index acd4e08..e99c45b 100644 --- a/SolarPower/Controllers/StationReportController.cs +++ b/SolarPower/Controllers/StationReportController.cs @@ -7,6 +7,7 @@ using NPOI.SS.Util; using NPOI.XSSF.UserModel; using SolarPower.Models; using SolarPower.Models.PowerStation; +using SolarPower.Models.Role; using SolarPower.Repository.Interface; using System; using System.Collections.Generic; @@ -49,7 +50,7 @@ namespace SolarPower.Controllers } else { - powerStations = await powerStationRepository.GetPowerStationsByCompanyIdWithfilter(myUser.CompanyId,filter); + powerStations = await powerStationRepository.GetPowerStationsByCompanyIdWithfilter(myUser,filter); } var siteDBNamePowerStationId = new Dictionary>(); diff --git a/SolarPower/DBSchema/solar_power_schema.sql b/SolarPower/DBSchema/solar_power_schema.sql index 7ad62a7..e9d2291 100644 --- a/SolarPower/DBSchema/solar_power_schema.sql +++ b/SolarPower/DBSchema/solar_power_schema.sql @@ -428,12 +428,12 @@ INSERT INTO `auth_page` (`AuthCode`, `MainName`, `SubName`, `TagName`, `ControlN ('L', '交叉分析', '合併電站', NULL, 'AnalysisStationCombine'), ('M', '交叉分析', '電站交叉分析', NULL, 'AnalysisStationInfo'), ('N', '交叉分析', '逆變器交叉分析', NULL, 'AnalysisInverter'), - ('P', '報表查詢', '電站報表', NULL, 'CCC'), + ('P', '報表查詢', '電站報表', NULL, 'StationReport'), ('Q', '報表查詢', '電廠發電效能統計', NULL, 'HHH'), - ('R', '報表查詢', '輸入台電售電紀錄', NULL, 'JJJ'), + ('R', '報表查詢', '輸入台電售電紀錄', NULL, 'ElectricitySoldRecord'), ('S', '報表查詢', '報告發送設定', NULL, 'JJJ'), ('T', '即時告警', '異常事件查詢', NULL, 'KKK'), - ('U', '運維管理', '電站管理', NULL, 'PowerStationManager'), + ('U', '運維管理', '電站管理', NULL, 'PowerStation'), ('V', '運維管理', '定期計畫建立', NULL, 'Operation'), ('W', '運維管理', '運維作業記錄', NULL, 'OperationRecord'), ('X', '系統管理', '公司管理', NULL, 'Company'), @@ -1262,7 +1262,7 @@ CREATE TABLE IF NOT EXISTS `weather_description` ( `WeatherValue` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '分類代碼', `WeatherKey` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'icon代號', PRIMARY KEY (`Id`) -) ENGINE=InnoDB AUTO_INCREMENT=355 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='天氣描述分類'; +) ENGINE=InnoDB AUTO_INCREMENT=355 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='天氣描述分類'; -- 正在傾印表格 solar_power_test.weather_description 的資料:~0 rows (近似值) DELETE FROM `weather_description`; @@ -1636,7 +1636,7 @@ CREATE TABLE IF NOT EXISTS `weather_forecast` ( `CreatedAt` timestamp NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`Id`), KEY `IDX_01` (`LocationName`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='天氣預報'; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='天氣預報'; @@ -1648,7 +1648,7 @@ CREATE TABLE IF NOT EXISTS `weather_observation` ( `Temp` double DEFAULT NULL COMMENT '溫度', PRIMARY KEY (`Id`), KEY `IDX_01` (`PowerStationId`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='天氣觀測'; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='天氣觀測'; diff --git a/SolarPower/Models/AnalysisStationCombine.cs b/SolarPower/Models/AnalysisStationCombine.cs index 2c480ce..d78b9f0 100644 --- a/SolarPower/Models/AnalysisStationCombine.cs +++ b/SolarPower/Models/AnalysisStationCombine.cs @@ -27,6 +27,7 @@ namespace SolarPower.Models public class Chartoutput { public double Irradiance { get; set; } + public double Temperature { get; set; } public double KWH { get; set; } public string Time { get; set; } } diff --git a/SolarPower/Models/NoticeSchedule.cs b/SolarPower/Models/NoticeSchedule.cs index f80d5a7..e121f95 100644 --- a/SolarPower/Models/NoticeSchedule.cs +++ b/SolarPower/Models/NoticeSchedule.cs @@ -16,6 +16,7 @@ namespace SolarPower.Models public string Attachment { get; set; } public byte IsDelivery { get; set; } public string DeliveryAt { get; set; } + public string Reason { get; set; } } public class OperationPersonnel diff --git a/SolarPower/Models/Overview.cs b/SolarPower/Models/Overview.cs index 640e473..e8abc06 100644 --- a/SolarPower/Models/Overview.cs +++ b/SolarPower/Models/Overview.cs @@ -77,6 +77,7 @@ namespace SolarPower.Models public string Label { get; set; } public double PowerData { get; set; } public double IrradianceData { get; set; } + public double TemperatureData { get; set; } } public class PowerIrradianceChart @@ -84,6 +85,7 @@ namespace SolarPower.Models public List Labels { get; set; } public List PowerDatas { get; set; } public List IrradianceDatas { get; set; } + public List TemperatureDatas { get; set; } } public class ExceptionSent diff --git a/SolarPower/Quartz/Jobs/CalcPowerStationJob.cs b/SolarPower/Quartz/Jobs/CalcPowerStationJob.cs index a37afa6..63c979c 100644 --- a/SolarPower/Quartz/Jobs/CalcPowerStationJob.cs +++ b/SolarPower/Quartz/Jobs/CalcPowerStationJob.cs @@ -194,7 +194,7 @@ namespace SolarPower.Quartz.Jobs logger.LogInformation("【CalcPowerStationJob】【取得成功電站[{0}]在{1}的日照計設備資訊】", powerStation.Code, dateTime); logger.LogInformation("【CalcPowerStationJob】【電站[{0}]在{1}的日照計設備資訊】 - {2}", powerStation.Code, dateTime, System.Text.Json.JsonSerializer.Serialize(deviceInfos)); - if (deviceInfos != null) + if (deviceInfos != null && deviceInfos.Count() > 0) { //2. 計算該電站所有日照計設的每小時的平均在依照日照計數量平均 logger.LogInformation("【CalcPowerStationJob】【開始計算電站[{0}]在{1}的日照計的日照度】", powerStation.Code, dateTime); @@ -216,7 +216,7 @@ namespace SolarPower.Quartz.Jobs var tempdeviceInfos = await powerStationRepository.GetListTempByPowerStationId(powerStation.Id, powerStation.SiteDB); logger.LogInformation("【CalcPowerStationJob】【取得成功電站[{0}]在{1}的溫度計設備資訊】", powerStation.Code, dateTime); logger.LogInformation("【CalcPowerStationJob】【電站[{0}]在{1}的溫度計設備資訊】 - {2}", powerStation.Code, dateTime, System.Text.Json.JsonSerializer.Serialize(tempdeviceInfos)); - if (tempdeviceInfos != null) + if (tempdeviceInfos != null && tempdeviceInfos.Count() > 0) { logger.LogInformation("【CalcPowerStationJob】【開始計算電站[{0}]在{1}的溫度計的平均溫度】", powerStation.Code, dateTime); var tempHistory = await powerStationRepository.GetPyrheliometerHistoryPerHour(dateTime, tempdeviceInfos, 1); @@ -244,7 +244,7 @@ namespace SolarPower.Quartz.Jobs var full_inverter_table_name = String.Format("`{0}`.`{1}`", powerStation.SiteDB, inverter_table_name); var exist_inverter_table = await powerStationRepository.ExistTable(powerStation.SiteDB, inverter_table_name); - if (!string.IsNullOrEmpty(exist_inverter_table)) + if (!string.IsNullOrEmpty(exist_inverter_table) && inverterIds !=null && inverterIds.Count() > 0) { logger.LogInformation("【CalcPowerStationJob】【開始計算電站[{0}]在{1}的逆變器的資訊】", powerStation.Code, dateTime); inverterHistories = await powerStationRepository.CalcInverterHisyortHourData(dateTime, powerStation.SiteDB, full_inverter_table_name, inverterIds); @@ -322,10 +322,11 @@ namespace SolarPower.Quartz.Jobs { if (Location.StationId == powerStation.WeathersStationId) { + calcPowerStation.TodayWeatherTemp = Convert.ToDouble(Location.WeatherElement[0].ElementValue); weatherObservation.PowerStationId = powerStation.Id; weatherObservation.Temp = Convert.ToDouble(Location.WeatherElement[0].ElementValue); - weatherObservation.ObsTime = Location.Time.ObsTime.ToString(); + weatherObservation.ObsTime = Convert.ToInt32(Location.Time.ObsTime.Substring(0, 4)) < 1970? null : Location.Time.ObsTime; calcPowerStation.WeathersStationId = powerStation.WeathersStationId; break; } diff --git a/SolarPower/Quartz/Jobs/SendEmailJob.cs b/SolarPower/Quartz/Jobs/SendEmailJob.cs index e5fb2df..3808b40 100644 --- a/SolarPower/Quartz/Jobs/SendEmailJob.cs +++ b/SolarPower/Quartz/Jobs/SendEmailJob.cs @@ -55,7 +55,7 @@ namespace SolarPower.Quartz.Jobs var result = Send(recipientEmails, notice.Subject, notice.Content, attachments); - if(result) + if (result.CompareTo("成功") == 0) { NoticeSchedule noticeSchedule = new NoticeSchedule(); noticeSchedule.Id = notice.Id; @@ -64,6 +64,16 @@ namespace SolarPower.Quartz.Jobs updateNoticeSchedules.Add(noticeSchedule); } + else + { + NoticeSchedule noticeSchedule = new NoticeSchedule(); + noticeSchedule.Id = notice.Id; + noticeSchedule.IsDelivery = 2; + noticeSchedule.DeliveryAt = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); + noticeSchedule.Reason = result; + + updateNoticeSchedules.Add(noticeSchedule); + } List properties = new List() { @@ -83,8 +93,10 @@ namespace SolarPower.Quartz.Jobs } } - private bool Send(List recipientEmails, string subject, string content, List attachments) + private string Send(List recipientEmails, string subject, string content, List attachments) { + var reason = string.Empty; + var CanDoSend = true; MailMessage MyMail = new MailMessage(); MyMail.SubjectEncoding = System.Text.Encoding.UTF8;//郵件標題編碼 @@ -100,37 +112,53 @@ namespace SolarPower.Quartz.Jobs MyMail.Subject = subject; //主題 MyMail.Body = content; //設定信件內容 - foreach(var attachment in attachments) + foreach (var attachment in attachments) { var directoryBase = Directory.GetCurrentDirectory(); var filePath = @$"{directoryBase}\wwwroot{attachment}"; - var data = new Attachment(filePath); - MyMail.Attachments.Add(data); + if (File.Exists(filePath)) + { + var data = new Attachment(filePath); + MyMail.Attachments.Add(data); + } + else + { + CanDoSend = false; + reason = "失敗 - 檔案遺失"; + break; + } } //讀取 SMTP Config - SmtpClient MySMTP = new SmtpClient(smtp.Host, smtp.Port); - MySMTP.EnableSsl = smtp.EnableSsl; - MySMTP.Credentials = new System.Net.NetworkCredential(smtp.UserName, smtp.Password); - try + if (CanDoSend) { - MySMTP.Send(MyMail); - MySMTP.Dispose(); - MyMail.Dispose(); //釋放資源 + SmtpClient MySMTP = new SmtpClient(smtp.Host, smtp.Port); + MySMTP.EnableSsl = smtp.EnableSsl; + MySMTP.Credentials = new System.Net.NetworkCredential(smtp.UserName, smtp.Password); + try + { + MySMTP.Send(MyMail); + MySMTP.Dispose(); + MyMail.Dispose(); //釋放資源 - return true; + return "成功"; + } + catch (Exception ex) + { + string json = System.Text.Json.JsonSerializer.Serialize(recipientEmails); + logger.LogError("【SendEmailJob】 " + "寄送信件失敗"); + logger.LogError("【SendEmailJob】 - Emails:" + json); + logger.LogError("【SendEmailJob】 - Exception:" + ex.Message); + + return "失敗 - " + ex.Message; + } } - catch (Exception ex) + else { - string json = System.Text.Json.JsonSerializer.Serialize(recipientEmails); - logger.LogError("【SendEmailJob】 " + "寄送信件失敗"); - logger.LogError("【SendEmailJob】 - Emails:" + json); - logger.LogError("【SendEmailJob】 - Exception:" + ex.Message); - - return false; + return reason; } - + } } } diff --git a/SolarPower/Repository/Implement/AnalysisStationCombineRepository.cs b/SolarPower/Repository/Implement/AnalysisStationCombineRepository.cs index 5571d49..800b4d2 100644 --- a/SolarPower/Repository/Implement/AnalysisStationCombineRepository.cs +++ b/SolarPower/Repository/Implement/AnalysisStationCombineRepository.cs @@ -159,7 +159,10 @@ namespace SolarPower.Repository.Implement switch (post.SeacrhType) { case 0: - sql = $@"SELECT DATE_FORMAT(ps.TIMESTAMP,'%h %p') AS `Time`,SUM(ps.KWH) AS KWH,SUM(sh.Irradiance) AS Irradiance + sql = $@"SELECT DATE_FORMAT(ps.TIMESTAMP,'%h %p') AS `Time`, + SUM(ps.KWH) AS KWH, + SUM(sh.Irradiance) AS Irradiance, + AVG(sh.Temperature) AS Temperature FROM power_station_history_hour ps LEFT JOIN sensor_history_hour sh ON sh.TIMESTAMP = ps.TIMESTAMP AND sh.PowerStationId = ps.PowerStationId @@ -171,7 +174,8 @@ namespace SolarPower.Repository.Implement sql = $@"SELECT DATE_FORMAT(ps.TIMESTAMP,'%Y-%m-%d') AS `Time`, SUM(ps.TODAYKWH) AS KWH, - SUM(sh.Irradiance) AS Irradiance + SUM(sh.Irradiance) AS Irradiance, + AVG(sh.Temperature) AS Temperature FROM power_station_history_day ps LEFT JOIN sensor_history_day sh ON sh.TIMESTAMP = ps.TIMESTAMP @@ -182,7 +186,8 @@ namespace SolarPower.Repository.Implement sql = $@"SELECT DATE_FORMAT(ps.TIMESTAMP,'%Y-%m-%d') AS `Time`, SUM(ps.TODAYKWH) AS KWH, - SUM(sh.Irradiance) AS Irradiance + SUM(sh.Irradiance) AS Irradiance, + AVG(sh.Temperature) AS Temperature FROM power_station_history_day ps LEFT JOIN sensor_history_day sh ON sh.TIMESTAMP = ps.TIMESTAMP @@ -193,7 +198,8 @@ namespace SolarPower.Repository.Implement sql = $@"SELECT DATE_FORMAT(ps.TIMESTAMP,'%Y-%m') AS `Time`, SUM(ps.MONTHKWH) AS KWH, - SUM(sh.Irradiance) AS Irradiance + SUM(sh.Irradiance) AS Irradiance, + AVG(sh.Temperature) AS Temperature FROM power_station_history_month ps LEFT JOIN sensor_history_month sh ON sh.TIMESTAMP = ps.TIMESTAMP diff --git a/SolarPower/Repository/Implement/OverviewRepository.cs b/SolarPower/Repository/Implement/OverviewRepository.cs index 8eaf39e..d9ecd60 100644 --- a/SolarPower/Repository/Implement/OverviewRepository.cs +++ b/SolarPower/Repository/Implement/OverviewRepository.cs @@ -110,11 +110,16 @@ namespace SolarPower.Repository.Implement var dateNow = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); var sql = @$"SELECT - w.Wx, + wf.Wx, ps.* FROM power_station ps LEFT JOIN city c ON ps.CityId = c.Id - LEFT JOIN weather_forecast w ON c.Name = w.LocationName AND w.StartTime < @DateNow AND w.EndTime > @DateNow + LEFT JOIN (SELECT * FROM ( + SELECT MAX(w.Id) AS aa FROM weather_forecast w + WHERE w.StartTime < @DateNow AND w.EndTime > @DateNow + GROUP BY w.LocationName + ) A + LEFT JOIN weather_forecast B ON A.aa = B.Id) wf ON c.Name = wf.LocationName WHERE ps.Id IN @PowerStationIds "; @@ -206,7 +211,7 @@ namespace SolarPower.Repository.Implement { try { - var sql_power = @$"SELECT DATE_FORMAT(ps.timestamp,'%H %p') AS Label, ps.KWH AS PowerData, pyr.Irradiance AS IrradianceData + var sql_power = @$"SELECT DATE_FORMAT(ps.timestamp,'%H %p') AS Label, ps.KWH AS PowerData, pyr.Irradiance AS IrradianceData, pyr.Temperature AS TemperatureData FROM power_station_history_hour ps LEFT JOIN sensor_history_hour pyr ON ps.PowerStationId = pyr.PowerStationId AND DATE_FORMAT(ps.timestamp, '%Y-%m-%d %H') = DATE_FORMAT(pyr.timestamp, '%Y-%m-%d %H') WHERE ps.PowerStationId = @PowerStationId @@ -231,7 +236,7 @@ namespace SolarPower.Repository.Implement { var startDay = Convert.ToDateTime(nowDay).AddDays(-7).ToString("yyyy-MM-dd"); - var sql_power = @$"SELECT DATE_FORMAT(ps.timestamp, '%Y-%m-%d') AS Label, ps.TODAYKWH AS PowerData, pyr.Irradiance AS IrradianceData + var sql_power = @$"SELECT DATE_FORMAT(ps.timestamp, '%Y-%m-%d') AS Label, ps.TODAYKWH AS PowerData, pyr.Irradiance AS IrradianceData, pyr.Temperature AS TemperatureData FROM power_station_history_day ps LEFT JOIN sensor_history_day pyr ON ps.PowerStationId = pyr.PowerStationId AND DATE_FORMAT(ps.timestamp, '%Y-%m-%d') = DATE_FORMAT(pyr.timestamp, '%Y-%m-%d') WHERE ps.PowerStationId = @PowerStationId @@ -256,7 +261,7 @@ namespace SolarPower.Repository.Implement { var startDay = Convert.ToDateTime(nowDay).ToString("yyyy-MM-01"); - var sql_power = @$"SELECT DATE_FORMAT(ps.timestamp, '%Y-%m-%d') AS Label, ps.TODAYKWH AS PowerData, pyr.Irradiance AS IrradianceData + var sql_power = @$"SELECT DATE_FORMAT(ps.timestamp, '%Y-%m-%d') AS Label, ps.TODAYKWH AS PowerData, pyr.Irradiance AS IrradianceData, pyr.Temperature AS TemperatureData FROM power_station_history_day ps LEFT JOIN sensor_history_day pyr ON ps.PowerStationId = pyr.PowerStationId AND DATE_FORMAT(ps.timestamp, '%Y-%m-%d') = DATE_FORMAT(pyr.timestamp, '%Y-%m-%d') WHERE ps.PowerStationId = @PowerStationId @@ -282,7 +287,7 @@ namespace SolarPower.Repository.Implement { var startyear = Convert.ToDateTime(nowDay).ToString("yyyy"); - var sql_power = @$"SELECT DATE_FORMAT(ps.timestamp, '%Y-%m') AS Label, ps.MONTHKWH AS PowerData, pyr.Irradiance AS IrradianceData + var sql_power = @$"SELECT DATE_FORMAT(ps.timestamp, '%Y-%m') AS Label, ps.MONTHKWH AS PowerData, pyr.Irradiance AS IrradianceData, pyr.Temperature AS TemperatureData FROM power_station_history_month ps LEFT JOIN sensor_history_month pyr ON ps.PowerStationId = pyr.PowerStationId AND DATE_FORMAT(ps.timestamp, '%Y-%m') = DATE_FORMAT(pyr.timestamp, '%Y-%m') WHERE ps.PowerStationId = @PowerStationId diff --git a/SolarPower/Repository/Implement/PowerStationRepository.cs b/SolarPower/Repository/Implement/PowerStationRepository.cs index b67b99f..f155e30 100644 --- a/SolarPower/Repository/Implement/PowerStationRepository.cs +++ b/SolarPower/Repository/Implement/PowerStationRepository.cs @@ -3287,7 +3287,7 @@ namespace SolarPower.Repository.Implement FROM city c LEFT JOIN weather_forecast wf ON wf.LocationName = c.`Name` LEFT JOIN weather_description wd ON wd.WeatherName = wf.Wx - WHERE c.Priority = {CityId} AND '{now}' BETWEEN wf.StartTime AND wf.EndTime ORDER BY wf.CreatedAt desc"; + WHERE c.Id = {CityId} AND '{now}' BETWEEN wf.StartTime AND wf.EndTime ORDER BY wf.CreatedAt desc"; result = await conn.QueryFirstOrDefaultAsync(sql); } @@ -3754,7 +3754,7 @@ namespace SolarPower.Repository.Implement FROM power_station ps LEFT JOIN `city` c ON ps.CityId = c.Id LEFT JOIN {powerStationDic.Key}.controller con ON ps.Id = con.PowerStationId - LEFT JOIN {powerStationDic.Key}.inverter inv ON con.Id = inv.ControllerId + LEFT JOIN {powerStationDic.Key}.inverter inv ON con.Id = inv.ControllerId AND inv.Enabled = 1 AND inv.status != 0 WHERE ps.Deleted = 0 AND ps.Id IN ({powerStationIds})"; if (!string.IsNullOrEmpty(filter)) @@ -4010,7 +4010,7 @@ namespace SolarPower.Repository.Implement } - public async Task> GetPowerStationsByCompanyIdWithfilter(int companyId, string filter) + public async Task> GetPowerStationsByCompanyIdWithfilter(MyUser myUser, string filter) { List result; using (IDbConnection conn = this._databaseHelper.GetConnection()) @@ -4018,14 +4018,23 @@ namespace SolarPower.Repository.Implement try { var sql = $@"SELECT ps.Id AS PowerStationId , ps.`Name` AS PowerStationName,city.Name AS CityName FROM {tableName} ps - LEFT JOIN city ON city.Id = ps.CityId WHERE ps.Deleted = 0 AND ps.CompanyId = @CompanyId "; + LEFT JOIN city ON city.Id = ps.CityId"; + if (myUser.Role.Layer == 2) + { + sql += " WHERE ps.Deleted = 0 AND ps.CompanyId = @CompanyId "; + } + else + { + sql += @" LEFT JOIN power_station_operation_personnel op ON ps.Id = op.PowerStationId + WHERE ps.Deleted = 0 AND op.Deleted = 0 AND op.UserId = @UserId "; + } if (!string.IsNullOrEmpty(filter)) { sql += @" AND ps.Name LIKE CONCAT('%', @Filter, '%')"; } - result = (await conn.QueryAsync(sql, new { CompanyId = companyId, Filter = filter })).ToList(); + result = (await conn.QueryAsync(sql, new { CompanyId = myUser.CompanyId, UserId = myUser.Id, Filter = filter })).ToList(); } catch (Exception exception) { diff --git a/SolarPower/Repository/Interface/IPowerStationRepository.cs b/SolarPower/Repository/Interface/IPowerStationRepository.cs index 51e7d95..4fdd185 100644 --- a/SolarPower/Repository/Interface/IPowerStationRepository.cs +++ b/SolarPower/Repository/Interface/IPowerStationRepository.cs @@ -552,7 +552,7 @@ namespace SolarPower.Repository.Interface Task> GetInverterHistoryRowData(string nowDay, List entities); Task> GetInverterHistoryByDate(string startDay, string endDay, List entities); Task> GetInverterHistoryByYear(string year, List entities); - Task> GetPowerStationsByCompanyIdWithfilter(int companyId, string filter); + Task> GetPowerStationsByCompanyIdWithfilter(MyUser myUser, string filter); Task> GetPowerStationsAllWithfilter(string filter); Task> GetDeviceByPowerStationIdAndDeviceIds(string db_name, int powerStationId, List deviceIds); Task GetSensorAvgByDevices(string date, byte searchType, List devices); diff --git a/SolarPower/Views/AnalysisInverter/Index.cshtml b/SolarPower/Views/AnalysisInverter/Index.cshtml index 312c60d..76adb1f 100644 --- a/SolarPower/Views/AnalysisInverter/Index.cshtml +++ b/SolarPower/Views/AnalysisInverter/Index.cshtml @@ -429,7 +429,7 @@ $.post(url, send_data, function (rel) { if (rel.code != "0000") { - toast_error(rel.data.msg); + toast_error(rel.msg); return; } diff --git a/SolarPower/Views/AnalysisStationCombine/Index.cshtml b/SolarPower/Views/AnalysisStationCombine/Index.cshtml index 23d75bc..a9c6d13 100644 --- a/SolarPower/Views/AnalysisStationCombine/Index.cshtml +++ b/SolarPower/Views/AnalysisStationCombine/Index.cshtml @@ -6,196 +6,226 @@ @using SolarPower.Models.Role @model RoleLayerEnum - -
-

- 合併電站 -

-
-
-
-
-
-
-
-
- -
-
- -
+
+
+ -
+ +
+ +
+ +
+ +
+

+ 合併電站 +

+
+ +
+
+
+
+
+ @*
+
+ +
+
+ +
+ +
+
+
+ +
+
+ +
+
+
+ +
+
+
*@ + +
+
+
+ + + + +
+
+
+ + +
+ +
+
+ +
+
+ +
+
+
+ +
+
+
+ +
+
+

發電量

+
kW h
+
+
+
+

總發電量

+

126,161.72

+
+
+

今日發電量

+

4,069.73

+
+
+
+
+
+

發電金額

+
NTD
+
+
+
+

總發金額

+

126,161.72

+
+
+

今日發電金額

+

4,069.73

+
+
+
+ +
+
+

有效日照時數

+
hr
+
+
+
+

平均有效日照時數

+

140.39

+
+
+

今日有效日照時數

+

4.53

+
+
+
+
+
+

PR值

+
%
+
+
+
+

平均 PR 值

+

119.04

+
+
+

今日PR值

+

3.84

+
+
+
+ +
+
+

減碳量

+
kG
+
+
+
+

總減碳量

+

6,091.78

+
+
+

今日減碳量

+

985.98

+
+
+
+
+
+ +
+ +
+
+ +
+
+
+ +
+ + +
+
+
+
+
+
+ + + @section Scripts{ -} \ No newline at end of file +} diff --git a/SolarPower/Views/PowerStation/PowerStationEdit.cshtml b/SolarPower/Views/PowerStation/PowerStationEdit.cshtml index a39bb8f..e009f6a 100644 --- a/SolarPower/Views/PowerStation/PowerStationEdit.cshtml +++ b/SolarPower/Views/PowerStation/PowerStationEdit.cshtml @@ -967,54 +967,127 @@ $("#power_station_operation_personnel").select2(); + var ps_company_text = $("#select_power_station_company").find(':selected').text(); - var url = "/PowerStation/SavePowerStationInfo"; + @if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformUser) + { + + Swal.fire( + { + title: "", + text: "你確定是否要將該電站加入至【" + ps_company_text + "】?", + type: "question", + icon: 'question', + showCancelButton: true, + confirmButtonText: "是", + cancelButtonText: "否" + }).then(function (result) { + if (result.value) { + var url = "/PowerStation/SavePowerStationInfo"; - var send_data = { - Id: stationId, - CityId: $("#select_city").val(), - AreaId: $("#select_area").val(), - Address: $("#address_detail").val(), - Name: $("#power_station_name").val(), - IsEscrow: $('#check_escrow').is(':checked') ? 1 : 0, - ElectricityMeterAt: $("#electricity_meter_at").val(), - EstimatedRecoveryTime: $("#estimated_recovery_time").val(), - GeneratingCapacity: $("#generating_capacity").val(), - EscrowName: $('#check_escrow').is(':checked') ? $("#escrow_name").val() : "", - PowerRate: $("#power_rate").val(), - Coordinate: $("#coordinate").val(), - OperationPersonnelIds: $("#power_station_operation_personnel").val(), - InverterBrand: $("#inverter_brand").val(), - InverterProductModel: $("#inverter_product_model").val(), - InverterAmount: $("#inverter_amount").val(), - PhotovoltaicPanelBrand: $("#photovoltaic_panel_brand").val(), - PhotovoltaicPanelSpecification: $("#photovoltaic_panel_specification").val(), - PhotovoltaicPanelAmount: $("#photovoltaic_panel_amount").val(), - PhotovoltaicPanelProductModel: $("#photovoltaic_panel_product_model").val(), - SolarType: $("#select_solar_tpye").val(), - line_token: $("#line_token").val(), - Estimate_kwh: $("#estimate_kwh").val(), - EstimateEfficacy: $("#estimate_efficacy").val(), - CompanyId: $("#select_power_station_company").val(), + var send_data = { + Id: stationId, + CityId: $("#select_city").val(), + AreaId: $("#select_area").val(), + Address: $("#address_detail").val(), + Name: $("#power_station_name").val(), + IsEscrow: $('#check_escrow').is(':checked') ? 1 : 0, + ElectricityMeterAt: $("#electricity_meter_at").val(), + EstimatedRecoveryTime: $("#estimated_recovery_time").val(), + GeneratingCapacity: $("#generating_capacity").val(), + EscrowName: $('#check_escrow').is(':checked') ? $("#escrow_name").val() : "", + PowerRate: $("#power_rate").val(), + Coordinate: $("#coordinate").val(), + OperationPersonnelIds: $("#power_station_operation_personnel").val(), + InverterBrand: $("#inverter_brand").val(), + InverterProductModel: $("#inverter_product_model").val(), + InverterAmount: $("#inverter_amount").val(), + PhotovoltaicPanelBrand: $("#photovoltaic_panel_brand").val(), + PhotovoltaicPanelSpecification: $("#photovoltaic_panel_specification").val(), + PhotovoltaicPanelAmount: $("#photovoltaic_panel_amount").val(), + PhotovoltaicPanelProductModel: $("#photovoltaic_panel_product_model").val(), + SolarType: $("#select_solar_tpye").val(), + line_token: $("#line_token").val(), + Estimate_kwh: $("#estimate_kwh").val(), + EstimateEfficacy: $("#estimate_efficacy").val(), + CompanyId: $("#select_power_station_company").val(), + } + + $.post(url, send_data, function (rel) { + if (rel.code != "0000") { + toast_error(rel.msg); + return; + } + + toast_ok(rel.msg); + + if (stationId == "new") { + window.location = "/PowerStation/Edit?stationId=" + rel.data.id + } else { + //回填資料 + powerStationData = rel.data; + SetStationInfo(); + ChangeMode("station_info", "view"); + } + }, 'json'); + } + }); + + } + else + { + + var url = "/PowerStation/SavePowerStationInfo"; + + var send_data = { + Id: stationId, + CityId: $("#select_city").val(), + AreaId: $("#select_area").val(), + Address: $("#address_detail").val(), + Name: $("#power_station_name").val(), + IsEscrow: $('#check_escrow').is(':checked') ? 1 : 0, + ElectricityMeterAt: $("#electricity_meter_at").val(), + EstimatedRecoveryTime: $("#estimated_recovery_time").val(), + GeneratingCapacity: $("#generating_capacity").val(), + EscrowName: $('#check_escrow').is(':checked') ? $("#escrow_name").val() : "", + PowerRate: $("#power_rate").val(), + Coordinate: $("#coordinate").val(), + OperationPersonnelIds: $("#power_station_operation_personnel").val(), + InverterBrand: $("#inverter_brand").val(), + InverterProductModel: $("#inverter_product_model").val(), + InverterAmount: $("#inverter_amount").val(), + PhotovoltaicPanelBrand: $("#photovoltaic_panel_brand").val(), + PhotovoltaicPanelSpecification: $("#photovoltaic_panel_specification").val(), + PhotovoltaicPanelAmount: $("#photovoltaic_panel_amount").val(), + PhotovoltaicPanelProductModel: $("#photovoltaic_panel_product_model").val(), + SolarType: $("#select_solar_tpye").val(), + line_token: $("#line_token").val(), + Estimate_kwh: $("#estimate_kwh").val(), + EstimateEfficacy: $("#estimate_efficacy").val(), + CompanyId: $("#select_power_station_company").val(), + } + + $.post(url, send_data, function (rel) { + if (rel.code != "0000") { + toast_error(rel.msg); + return; + } + + toast_ok(rel.msg); + + if (stationId == "new") { + window.location = "/PowerStation/Edit?stationId=" + rel.data.id + } else { + //回填資料 + powerStationData = rel.data; + SetStationInfo(); + ChangeMode("station_info", "view"); + } + }, 'json'); + } - $.post(url, send_data, function (rel) { - if (rel.code != "0000") { - toast_error(rel.msg); - return; - } - toast_ok(rel.msg); - - if (stationId == "new") { - window.location = "/PowerStation/Edit?stationId=" + rel.data.id - } else { - //回填資料 - powerStationData = rel.data; - SetStationInfo(); - ChangeMode("station_info", "view"); - } - }, 'json'); } //#endregion diff --git a/SolarPower/Views/Shared/_Layout.cshtml b/SolarPower/Views/Shared/_Layout.cshtml index 0c6beb6..b69ef46 100644 --- a/SolarPower/Views/Shared/_Layout.cshtml +++ b/SolarPower/Views/Shared/_Layout.cshtml @@ -1252,8 +1252,8 @@
- - + + diff --git a/SolarPower/Views/StationOverview/Index.cshtml b/SolarPower/Views/StationOverview/Index.cshtml index b44c6b6..9a29d96 100644 --- a/SolarPower/Views/StationOverview/Index.cshtml +++ b/SolarPower/Views/StationOverview/Index.cshtml @@ -398,6 +398,7 @@ default: console.log(`Sorry, we are out of ${val.solarType}.`); } + $('#card_' + val.id).find('#editSolarUrl').find('#Solarimg').attr('src', val.mainDisplay); $('#card_' + val.id).find('#stationtype').html(type); var time = new Date(val.createdAt); $('#card_' + val.id).find('#editSolarUrl').attr('href', localurl + '/Info?stationId=' + val.id); diff --git a/SolarPower/Views/StationOverview/StationOverviewInfo.cshtml b/SolarPower/Views/StationOverview/StationOverviewInfo.cshtml index b101d7a..9980a74 100644 --- a/SolarPower/Views/StationOverview/StationOverviewInfo.cshtml +++ b/SolarPower/Views/StationOverview/StationOverviewInfo.cshtml @@ -303,7 +303,7 @@ label: '輸出功率', yAxisID: 'A', backgroundColor: 'rgb(103, 180, 172)', - order: 2, + order: 3, data: chartToday.powerDatas }, { type: 'line', @@ -317,8 +317,22 @@ pointRadius: 4, pointHoverRadius: 5, fill: false, - order: 1, + order: 2, data: chartToday.irradianceDatas, + }, { + type: 'line', + label: '模組溫度', + yAxisID: 'C', + borderColor: 'rgb(255, 192, 0)', + pointBackgroundColor: 'rgb(255, 192, 0)', + pointBorderColor: 'rgb(255, 192, 0)', + pointBorderWidth: 1, + borderWidth: 2, + pointRadius: 4, + pointHoverRadius: 5, + fill: false, + order: 1, + data: chartToday.temperatureDatas, }] }, options: { @@ -353,6 +367,17 @@ display: true, labelString: 'W/㎡' } + }, { + id: 'C', + type: 'linear', + position: 'right', + ticks: { + min: 0 + }, + scaleLabel: { + display: true, + labelString: '℃' + } }] } } @@ -370,7 +395,7 @@ label: '輸出功率', yAxisID: 'A', backgroundColor: 'rgb(103, 180, 172)', - order: 2, + order: 3, data: chart7day.powerDatas }, { type: 'line', @@ -383,9 +408,23 @@ borderWidth: 2, pointRadius: 4, pointHoverRadius: 5, - order: 1, + order: 2, fill: false, data: chart7day.irradianceDatas, + }, { + type: 'line', + label: '模組溫度', + yAxisID: 'C', + borderColor: 'rgb(255, 192, 0)', + pointBackgroundColor: 'rgb(255, 192, 0)', + pointBorderColor: 'rgb(255, 192, 0)', + pointBorderWidth: 1, + borderWidth: 2, + pointRadius: 4, + pointHoverRadius: 5, + fill: false, + order: 1, + data: chart7day.temperatureDatas, }] }, options: { @@ -420,6 +459,17 @@ display: true, labelString: 'W/㎡' } + }, { + id: 'C', + type: 'linear', + position: 'right', + ticks: { + min: 0 + }, + scaleLabel: { + display: true, + labelString: '℃' + } }] } } @@ -437,7 +487,7 @@ label: '輸出功率', yAxisID: 'A', backgroundColor: 'rgb(103, 180, 172)', - order: 2, + order: 3, data: chartMonth.powerDatas }, { type: 'line', @@ -450,9 +500,23 @@ borderWidth: 2, pointRadius: 4, pointHoverRadius: 5, - order: 1, + order: 2, fill: false, data: chartMonth.irradianceDatas, + }, { + type: 'line', + label: '模組溫度', + yAxisID: 'C', + borderColor: 'rgb(255, 192, 0)', + pointBackgroundColor: 'rgb(255, 192, 0)', + pointBorderColor: 'rgb(255, 192, 0)', + pointBorderWidth: 1, + borderWidth: 2, + pointRadius: 4, + pointHoverRadius: 5, + fill: false, + order: 1, + data: chartMonth.temperatureDatas, }] }, options: { @@ -487,6 +551,17 @@ display: true, labelString: 'W/㎡' } + }, { + id: 'C', + type: 'linear', + position: 'right', + ticks: { + min: 0 + }, + scaleLabel: { + display: true, + labelString: '℃' + } }] } } @@ -520,6 +595,20 @@ order: 1, fill: false, data: chartYear.irradianceDatas, + }, { + type: 'line', + label: '模組溫度', + yAxisID: 'C', + borderColor: 'rgb(255, 192, 0)', + pointBackgroundColor: 'rgb(255, 192, 0)', + pointBorderColor: 'rgb(255, 192, 0)', + pointBorderWidth: 1, + borderWidth: 2, + pointRadius: 4, + pointHoverRadius: 5, + fill: false, + order: 1, + data: chartYear.temperatureDatas, }] }, options: { @@ -554,6 +643,17 @@ display: true, labelString: 'W/㎡' } + }, { + id: 'C', + type: 'linear', + position: 'right', + ticks: { + min: 0 + }, + scaleLabel: { + display: true, + labelString: '℃' + } }] } } @@ -2216,6 +2316,9 @@ var listcolor = new Array(0); var listcolor2 = new Array(0); var listirradiance = new Array(0); + var listtemperature = new Array(0); + var listsolarhour = new Array(0); + var listpr = new Array(0); var color = rgba(1); var color2 = rgba(2); $.each(rel.data, function (index, val) { @@ -2241,10 +2344,13 @@ '' + val.temp.toFixed(2) + '' + ''); listmonth.push(val.timestamp); - listkwh.push(val.kwh); + listkwh.push(val.kwh.toFixed(2)); listcolor.push(color); listcolor2.push(color2); - listirradiance.push(val.irradiance); + listirradiance.push(val.irradiance.toFixed(2)); + listtemperature.push(val.temp.toFixed(2)); + listsolarhour.push(val.solarhour.toFixed(2)); + listpr.push(val.pr.toFixed(2)); } else { @@ -2259,10 +2365,13 @@ '' + val.temp.toFixed(2) + '' + ''); listmonth.push(val.timestamp); - listkwh.push(val.kwh); + listkwh.push(val.kwh.toFixed(2)); listcolor.push(color); listcolor2.push(color2); - listirradiance.push(val.irradiance); + listirradiance.push(val.irradiance.toFixed(2)); + listtemperature.push(val.temp.toFixed(2)); + listsolarhour.push(val.solarhour.toFixed(2)); + listpr.push(val.pr.toFixed(2)); } @@ -2280,12 +2389,57 @@ type: 'bar', data: { labels: listmonth, - datasets: [{ + datasets: [ + { + type: 'line', + label: '溫度(℃)', + yAxisID: 'E', + borderColor: 'rgb(255, 192, 0)', + pointBackgroundColor: 'rgb(255, 192, 0)', + pointBorderColor: 'rgb(255, 192, 0)', + pointBorderWidth: 1, + borderWidth: 2, + pointRadius: 4, + pointHoverRadius: 5, + fill: false, + data: listtemperature + },{ + type: 'line', + label: 'PR(%)', + yAxisID: 'D', + borderColor: 'rgba(68, 114, 196)', + pointBackgroundColor: 'rgb(68, 114, 196)', + pointBorderColor: 'rgb(68, 114, 196)', + pointBorderWidth: 1, + borderWidth: 2, + pointRadius: 4, + pointHoverRadius: 5, + fill: false, + data: listpr + },{ + type: 'line', + label: '發電小時', + yAxisID: 'C', + borderColor: 'rgba(165, 165, 165)', + pointBackgroundColor: 'rgb(165, 165, 165)', + pointBorderColor: 'rgb(165, 165, 165)', + pointBorderWidth: 1, + borderWidth: 2, + pointRadius: 4, + pointHoverRadius: 5, + fill: false, + data: listsolarhour + },{ type: 'line', label: '日照度(kWh/㎡)', - borderColor: 'rgba(190, 45, 45,1)', - pointRadius: 4, yAxisID: 'B', + borderColor: 'rgba(190, 45, 45,1)', + pointBackgroundColor: 'rgb(190, 45, 45,1)', + pointBorderColor: 'rgb(190, 45, 45,1)', + pointBorderWidth: 1, + borderWidth: 2, + pointRadius: 4, + pointHoverRadius: 5, fill: false, data: listirradiance }, { @@ -2329,6 +2483,39 @@ display: true, labelString: 'kWh/㎡' } + }, { + id: 'C', + type: 'linear', + position: 'right', + ticks: { + min: 0 + }, + scaleLabel: { + display: true, + labelString: 'hr' + } + }, { + id: 'D', + type: 'linear', + position: 'right', + ticks: { + min: 0 + }, + scaleLabel: { + display: true, + labelString: 'PR(%)' + } + }, { + id: 'E', + type: 'linear', + position: 'right', + ticks: { + min: 0 + }, + scaleLabel: { + display: true, + labelString: '℃' + } }] } } diff --git a/SolarPower/Views/StationReport/Index.cshtml b/SolarPower/Views/StationReport/Index.cshtml index fa84ed5..12d5210 100644 --- a/SolarPower/Views/StationReport/Index.cshtml +++ b/SolarPower/Views/StationReport/Index.cshtml @@ -557,7 +557,7 @@ $.post(url, send_data, function (rel) { if (rel.code != "0000") { - toast_error(rel.data.msg); + toast_error(rel.msg); return; } diff --git a/SolarPower/appsettings.Development.json b/SolarPower/appsettings.Development.json index 626a1a5..226ca35 100644 --- a/SolarPower/appsettings.Development.json +++ b/SolarPower/appsettings.Development.json @@ -7,26 +7,26 @@ } }, "LoginExpireMinute": 60, //nJɶA() - //"DBConfig": { - // "Server": "MVgHWzR3rGDgD57TUoFunA==", - // "port": "r4AoXMUDodcQjIzofGNCcg==", - // "Database": "z8TVtiXZ6MwgWbUEAOXA/fiHzd7c0iUhFqn1mHzxhKo=", - // "Root": "mWlR2HshQNhRRE34jg4kdg==", - // "Password": "y4uPqlH9ncTgR/I07qpwaA==" - //}, "DBConfig": { - "Server": "AVXfxd+IRlLtJ0MCi9HU1g==", - "port": "CrEmevYrUsSo7Mkb7Gxn8A==", - "Database": "CEyYZnO8B5+yTXQcFSsiBA==", - "Root": "Aph7AzoiwAmmBHCfS1rqeQ==", - "Password": "8WMHBEWuT0XoAB4kzduQHA==" + "Server": "MVgHWzR3rGDgD57TUoFunA==", + "port": "r4AoXMUDodcQjIzofGNCcg==", + "Database": "z8TVtiXZ6MwgWbUEAOXA/fiHzd7c0iUhFqn1mHzxhKo=", + "Root": "mWlR2HshQNhRRE34jg4kdg==", + "Password": "y4uPqlH9ncTgR/I07qpwaA==" }, + //"DBConfig": { + // "Server": "AVXfxd+IRlLtJ0MCi9HU1g==", + // "port": "CrEmevYrUsSo7Mkb7Gxn8A==", + // "Database": "CEyYZnO8B5+yTXQcFSsiBA==", + // "Root": "Aph7AzoiwAmmBHCfS1rqeQ==", + // "Password": "8WMHBEWuT0XoAB4kzduQHA==" + //}, "BackgroundServiceCron": { "CalcPowerStationJob": "0 5 * * * ?", "CalcAvgPowerStationJob": "0 0 2 * * ?", "OperationScheduleJob": "0 0 2 * * ?", "CalcInverter15minJob": "0 2/15 * * * ?", - "SendEmailJob": "0/10 * * * * ?" + "SendEmailJob": "0 15 2 * * ?" }, "SMTPConfig": { "Host": "smtp.gmail.com", diff --git a/SolarPower/wwwroot/upload/power_station/1/738117f3-640f-43a0-924d-071bff9df54f.png b/SolarPower/wwwroot/upload/power_station/1/main.png similarity index 100% rename from SolarPower/wwwroot/upload/power_station/1/738117f3-640f-43a0-924d-071bff9df54f.png rename to SolarPower/wwwroot/upload/power_station/1/main.png diff --git a/SolarPower/wwwroot/upload/report/20210803/FIC太陽能監控平台_日報表_120210803.xlsx b/SolarPower/wwwroot/upload/report/20210803/FIC太陽能監控平台_日報表_120210803.xlsx index 1ba9b21..edcf25b 100644 Binary files a/SolarPower/wwwroot/upload/report/20210803/FIC太陽能監控平台_日報表_120210803.xlsx and b/SolarPower/wwwroot/upload/report/20210803/FIC太陽能監控平台_日報表_120210803.xlsx differ diff --git a/SolarPower/wwwroot/upload/report/20210803/FIC太陽能監控平台_日報表_220210803.xlsx b/SolarPower/wwwroot/upload/report/20210803/FIC太陽能監控平台_日報表_220210803.xlsx new file mode 100644 index 0000000..74f9f24 Binary files /dev/null and b/SolarPower/wwwroot/upload/report/20210803/FIC太陽能監控平台_日報表_220210803.xlsx differ diff --git a/SolarPower/wwwroot/upload/report/20210803/FIC太陽能監控平台_日報表_320210803.xlsx b/SolarPower/wwwroot/upload/report/20210803/FIC太陽能監控平台_日報表_320210803.xlsx new file mode 100644 index 0000000..82b96df Binary files /dev/null and b/SolarPower/wwwroot/upload/report/20210803/FIC太陽能監控平台_日報表_320210803.xlsx differ diff --git a/SolarPower/wwwroot/upload/report/20210803/FIC太陽能監控平台_日報表_420210803.xlsx b/SolarPower/wwwroot/upload/report/20210803/FIC太陽能監控平台_日報表_420210803.xlsx new file mode 100644 index 0000000..23ea101 Binary files /dev/null and b/SolarPower/wwwroot/upload/report/20210803/FIC太陽能監控平台_日報表_420210803.xlsx differ