修復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);
|
var UserListWithPowerstation = await overviewRepository.GetUserListWithPowerstation(Exception.PowerStationId);
|
||||||
|
|
||||||
foreach (var user in UserListWithPowerstation)
|
var Content = $"電站名稱:{Exception.PowerStationName}" + "<br>" +
|
||||||
{
|
|
||||||
var Content = $"電站名稱:{Exception.PowerStationName}" + "<br>" +
|
|
||||||
$"設備編號:{Exception.errDevice}" + "<br>" +
|
$"設備編號:{Exception.errDevice}" + "<br>" +
|
||||||
$"異常ID編號:{Exception.id}" + "<br>" +
|
$"異常ID編號:{Exception.id}" + "<br>" +
|
||||||
$"異常類別:{Exception.alarmClassName}" + "<br>" +
|
$"異常類別:{Exception.alarmClassName}" + "<br>" +
|
||||||
$"設備訊息:{Exception.errMsg}" + "<br>" +
|
$"設備訊息:{Exception.errMsg}" + "<br>" +
|
||||||
$"發生時間:{Exception.dev_time}" ;
|
$"發生時間:{Exception.dev_time}";
|
||||||
|
foreach (var user in UserListWithPowerstation)
|
||||||
|
{
|
||||||
NoticeSchedule DaySchedule = new NoticeSchedule()
|
NoticeSchedule DaySchedule = new NoticeSchedule()
|
||||||
{
|
{
|
||||||
UserId = user.Id,
|
UserId = user.Id,
|
||||||
@ -77,12 +77,14 @@ namespace SolarPower.Quartz.Jobs
|
|||||||
};
|
};
|
||||||
await noticeScheduleRepository.AddOneAsync(DaySchedule, properties);
|
await noticeScheduleRepository.AddOneAsync(DaySchedule, properties);
|
||||||
|
|
||||||
var powerstation = await powerStationRepository.GetOneAsync(Exception.PowerStationId);
|
|
||||||
if(powerstation.line_token != null)
|
}
|
||||||
{
|
|
||||||
Content = " %0D%0A " + Content.Replace("<br>", " %0D%0A ");
|
var powerstation = await powerStationRepository.GetOneAsync(Exception.PowerStationId);
|
||||||
CallLineToken(Content, powerstation.line_token);
|
if (powerstation.line_token != null)
|
||||||
}
|
{
|
||||||
|
Content = " %0D%0A " + Content.Replace("<br>", " %0D%0A ");
|
||||||
|
CallLineToken(Content, powerstation.line_token);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user