修復Line 次數問題
This commit is contained in:
parent
082850213d
commit
c9f1015060
@ -45,14 +45,14 @@ namespace SolarPower.Quartz.Jobs
|
||||
{
|
||||
var UserListWithPowerstation = await overviewRepository.GetUserListWithPowerstation(Exception.PowerStationId);
|
||||
|
||||
foreach (var user in UserListWithPowerstation)
|
||||
{
|
||||
var Content = $"電站名稱:{Exception.PowerStationName}" + "<br>" +
|
||||
$"設備編號:{Exception.errDevice}" + "<br>" +
|
||||
$"異常ID編號:{Exception.id}" + "<br>" +
|
||||
$"異常類別:{Exception.alarmClassName}" + "<br>" +
|
||||
$"設備訊息:{Exception.errMsg}" + "<br>" +
|
||||
$"發生時間:{Exception.dev_time}";
|
||||
foreach (var user in UserListWithPowerstation)
|
||||
{
|
||||
NoticeSchedule DaySchedule = new NoticeSchedule()
|
||||
{
|
||||
UserId = user.Id,
|
||||
@ -77,6 +77,9 @@ namespace SolarPower.Quartz.Jobs
|
||||
};
|
||||
await noticeScheduleRepository.AddOneAsync(DaySchedule, properties);
|
||||
|
||||
|
||||
}
|
||||
|
||||
var powerstation = await powerStationRepository.GetOneAsync(Exception.PowerStationId);
|
||||
if (powerstation.line_token != null)
|
||||
{
|
||||
@ -86,7 +89,6 @@ namespace SolarPower.Quartz.Jobs
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
logger.LogError("【{0}】{1}", nameof(logger), exception.Message);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user