debug 異常發佈時間
This commit is contained in:
parent
f614fd07f0
commit
a2d702780f
@ -48,29 +48,17 @@ namespace SolarPower.Quartz.Jobs
|
|||||||
// 立刻發報
|
// 立刻發報
|
||||||
var ExceptionListex = ExceptionList.Where(x => x.priority == 1 ).ToList();
|
var ExceptionListex = ExceptionList.Where(x => x.priority == 1 ).ToList();
|
||||||
// 12小時後發報
|
// 12小時後發報
|
||||||
var ExceptionListex2 = ExceptionList.Where(x => x.sourceState == 1 &&
|
var ExceptionListex2 = ExceptionList.Where(x => x.sourceState == 1 && x.priority == 2 &&
|
||||||
x.priority == 2 &&
|
(DateTime.Now.Subtract(DateTime.Parse(x.dev_time)).TotalMinutes) >= ExceptionTimes_Priority2).ToList();
|
||||||
(DateTime.Now.Subtract(DateTime.Parse(x.dev_time)).TotalMinutes/ 60) >= ExceptionTimes_Priority2).ToList();
|
|
||||||
// 24小時後發報
|
// 24小時後發報
|
||||||
var ExceptionListex3 = ExceptionList.Where(x => x.sourceState == 1 && x.priority == 3 &&
|
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(ExceptionListex2);
|
||||||
ExceptionListex.AddRange(ExceptionListex3);
|
ExceptionListex.AddRange(ExceptionListex3);
|
||||||
|
|
||||||
foreach (var Exception in ExceptionListex)
|
foreach (var Exception in ExceptionListex)
|
||||||
{
|
{
|
||||||
var UserListWithPowerstation = await overviewRepository.GetUserListWithPowerstation(Exception.PowerStationId);
|
var UserListWithPowerstation = await overviewRepository.GetUserListWithPowerstation(Exception.PowerStationId);
|
||||||
|
|
||||||
//var Content = $"電站名稱:{Exception.PowerStationName}" + "<br>" +
|
|
||||||
// $"設備編號:{Exception.errDevice}" + "<br>" +
|
|
||||||
// $"異常ID編號:{Exception.id}" + "<br>" +
|
|
||||||
// $"異常類別:{Exception.alarmClassName}" + "<br>" +
|
|
||||||
// $"異常訊息:{Exception.errMsg}" + "<br>";
|
|
||||||
//if(Exception.errMsgT == "d")
|
|
||||||
//{
|
|
||||||
// Content += $"當前數值:{Exception.errValue}" + "<br>";
|
|
||||||
//}
|
|
||||||
//Content += $"發生時間:{Exception.dev_time}";
|
|
||||||
var Content = $"發生時間:{Exception.dev_time}" + "<br>" +
|
var Content = $"發生時間:{Exception.dev_time}" + "<br>" +
|
||||||
$"電站名稱:{Exception.PowerStationName}" + "<br>" +
|
$"電站名稱:{Exception.PowerStationName}" + "<br>" +
|
||||||
$"異常類別:{Exception.alarmClassName}" + "<br>" +
|
$"異常類別:{Exception.alarmClassName}" + "<br>" +
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user