diff --git a/SolarPower/Quartz/Jobs/ExceptionSchedule.cs b/SolarPower/Quartz/Jobs/ExceptionSchedule.cs
index ae7bc8a..e12b1b6 100644
--- a/SolarPower/Quartz/Jobs/ExceptionSchedule.cs
+++ b/SolarPower/Quartz/Jobs/ExceptionSchedule.cs
@@ -48,29 +48,17 @@ namespace SolarPower.Quartz.Jobs
// 立刻發報
var ExceptionListex = ExceptionList.Where(x => x.priority == 1 ).ToList();
// 12小時後發報
- var ExceptionListex2 = ExceptionList.Where(x => x.sourceState == 1 &&
- x.priority == 2 &&
- (DateTime.Now.Subtract(DateTime.Parse(x.dev_time)).TotalMinutes/ 60) >= ExceptionTimes_Priority2).ToList();
+ var ExceptionListex2 = ExceptionList.Where(x => x.sourceState == 1 && x.priority == 2 &&
+ (DateTime.Now.Subtract(DateTime.Parse(x.dev_time)).TotalMinutes) >= ExceptionTimes_Priority2).ToList();
// 24小時後發報
var ExceptionListex3 = ExceptionList.Where(x => x.sourceState == 1 && x.priority == 3 &&
- (DateTime.Now.Subtract(DateTime.Parse(x.dev_time)).TotalSeconds / 60) >= ExceptionTimes_Priority3).ToList();
+ (DateTime.Now.Subtract(DateTime.Parse(x.dev_time)).TotalMinutes) >= ExceptionTimes_Priority3).ToList();
ExceptionListex.AddRange(ExceptionListex2);
ExceptionListex.AddRange(ExceptionListex3);
foreach (var Exception in ExceptionListex)
{
- var UserListWithPowerstation = await overviewRepository.GetUserListWithPowerstation(Exception.PowerStationId);
-
- //var Content = $"電站名稱:{Exception.PowerStationName}" + "
" +
- // $"設備編號:{Exception.errDevice}" + "
" +
- // $"異常ID編號:{Exception.id}" + "
" +
- // $"異常類別:{Exception.alarmClassName}" + "
" +
- // $"異常訊息:{Exception.errMsg}" + "
";
- //if(Exception.errMsgT == "d")
- //{
- // Content += $"當前數值:{Exception.errValue}" + "
";
- //}
- //Content += $"發生時間:{Exception.dev_time}";
+ var UserListWithPowerstation = await overviewRepository.GetUserListWithPowerstation(Exception.PowerStationId);
var Content = $"發生時間:{Exception.dev_time}" + "
" +
$"電站名稱:{Exception.PowerStationName}" + "
" +
$"異常類別:{Exception.alarmClassName}" + "
" +