diff --git a/SolarPower/Controllers/ElectricitySoldRecordController.cs b/SolarPower/Controllers/ElectricitySoldRecordController.cs index 03f083b..6f54833 100644 --- a/SolarPower/Controllers/ElectricitySoldRecordController.cs +++ b/SolarPower/Controllers/ElectricitySoldRecordController.cs @@ -572,7 +572,7 @@ namespace SolarPower.Controllers cell = row.CreateCell(4); if (index == 25){ cell.CellStyle = style0; - cell.SetCellValue(bill.Result.Money); + cell.SetCellValue(Math.Round(bill.Result.Money,2)); } else{ cell.CellStyle = style14body; @@ -604,7 +604,7 @@ namespace SolarPower.Controllers region = new CellRangeAddress(27, 29, 1, 6); sheet.AddMergedRegion(region); cell = row.CreateCell(1); - cell.SetCellValue($"{bill.Result.PowerName}-太陽光電售電收入 \r計算期間:{bill.Result.StartAt}-{bill.Result.EndAt} \r售電收入 = ( 度數 {bill.Result.Kwh} * 費率{bill.Result.PowerRate}) * 1.05 = {bill.Result.Kwh * bill.Result.PowerRate * 1.05} 元"); + cell.SetCellValue($"{bill.Result.PowerName}-太陽光電售電收入 \r計算期間:{bill.Result.StartAt}-{bill.Result.EndAt} \r售電收入 = ( 度數 {bill.Result.Kwh} * 費率{bill.Result.PowerRate}) * 1.05 = {Math.Round(bill.Result.Kwh * bill.Result.PowerRate * 1.05,2) } 元"); cell.CellStyle = style14bodyleftnoborder; cell = row.CreateCell(6); cell.CellStyle = style14bodyrightnoborder; diff --git a/SolarPower/Models/Overview.cs b/SolarPower/Models/Overview.cs index 061b09f..fd8ac40 100644 --- a/SolarPower/Models/Overview.cs +++ b/SolarPower/Models/Overview.cs @@ -189,6 +189,7 @@ namespace SolarPower.Models public string errMsg { get; set; }//錯誤原因 public string PowerStationName { get; set; }//電站名稱 public int PowerStationId { get; set; }//電站流水號 + public string normalTime { get; set; } } public class UserPowerStationTo diff --git a/SolarPower/Quartz/Jobs/ExceptionSchedule.cs b/SolarPower/Quartz/Jobs/ExceptionSchedule.cs index 5c0cdf9..eb72fa6 100644 --- a/SolarPower/Quartz/Jobs/ExceptionSchedule.cs +++ b/SolarPower/Quartz/Jobs/ExceptionSchedule.cs @@ -33,10 +33,14 @@ namespace SolarPower.Quartz.Jobs var ExceptionList = await overviewRepository.GetEmailExceptionList(); if(ExceptionList.Count > 0 ) { - foreach(var Exception in ExceptionList) + var ExceptionListex = ExceptionList.Where(x => x.normalTime == null && DateTime.Now.Subtract(DateTime.Parse(x.dev_time)).Hours >= 4).ToList(); + + + foreach (var Exception in ExceptionListex) { var UserListWithPowerstation = await overviewRepository.GetUserListWithPowerstation(Exception.PowerStationId); - foreach(var user in UserListWithPowerstation) + + foreach (var user in UserListWithPowerstation) { var Content = $"電站名稱:{Exception.PowerStationName}" + "
" + $"設備編號:{Exception.errDevice}" + "
" + diff --git a/SolarPower/Views/StationOverview/Index.cshtml b/SolarPower/Views/StationOverview/Index.cshtml index fdfac6d..60619cc 100644 --- a/SolarPower/Views/StationOverview/Index.cshtml +++ b/SolarPower/Views/StationOverview/Index.cshtml @@ -192,7 +192,7 @@

65

-

Pr值

+

PR值

65 %

06-30 17:50