แก้ report เกษียณ
This commit is contained in:
parent
320fb3386e
commit
8d700d273f
2 changed files with 53 additions and 27 deletions
|
|
@ -20,6 +20,7 @@ using System.Net.Http.Headers;
|
|||
using System.Reflection.Metadata;
|
||||
using System.Security.Claims;
|
||||
using System.Security.Cryptography;
|
||||
using static Microsoft.EntityFrameworkCore.DbLoggerCategory;
|
||||
|
||||
namespace BMA.EHR.Retirement.Service.Controllers
|
||||
{
|
||||
|
|
@ -669,28 +670,34 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
var profile = req.Persons.FirstOrDefault(x => x.ProfileId == item.profileId);
|
||||
if (profile != null)
|
||||
{
|
||||
await _repositoryNoti.PushNotificationAsync(
|
||||
item.profileId,
|
||||
if (item.profileId != null)
|
||||
{
|
||||
await _repositoryNoti.PushNotificationAsync(
|
||||
Guid.Parse(item.profileId),
|
||||
$"หนังสือเวียนถึงแก่กรรมของ {item.RetirementDeceased.prefix}{item.RetirementDeceased.firstName} {item.RetirementDeceased.lastName}",
|
||||
$"แจ้งข่าวการถึงแก่กรรมของ {item.RetirementDeceased.prefix}{item.RetirementDeceased.firstName} {item.RetirementDeceased.lastName}",
|
||||
payload_str,
|
||||
profile.IsSendInbox,
|
||||
profile.IsSendMail
|
||||
);
|
||||
}
|
||||
item.IsSendMail = profile.IsSendMail;
|
||||
item.IsSendInbox = profile.IsSendInbox;
|
||||
item.IsSendNotification = profile.IsSendNotification;
|
||||
}
|
||||
else
|
||||
{
|
||||
await _repositoryNoti.PushNotificationAsync(
|
||||
item.profileId,
|
||||
if (item.profileId != null)
|
||||
{
|
||||
await _repositoryNoti.PushNotificationAsync(
|
||||
Guid.Parse(item.profileId),
|
||||
$"หนังสือเวียนถึงแก่กรรมของ {item.RetirementDeceased.prefix}{item.RetirementDeceased.firstName} {item.RetirementDeceased.lastName}",
|
||||
$"แจ้งข่าวการถึงแก่กรรมของ {item.RetirementDeceased.prefix}{item.RetirementDeceased.firstName} {item.RetirementDeceased.lastName}",
|
||||
payload_str,
|
||||
item.IsSendInbox,
|
||||
item.IsSendMail
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
await _context.SaveChangesAsync();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue