แก้ระบบบรรจุผูกโครงสร้างใหม่
This commit is contained in:
parent
57164f5d45
commit
18d75f4b04
37 changed files with 79295 additions and 3904 deletions
|
|
@ -70,16 +70,16 @@ namespace BMA.EHR.Application.Repositories
|
|||
public async Task NotifyOut()
|
||||
{
|
||||
var cronjobNotis = await _dbContext.Set<RetirementOut>()
|
||||
.Include(x => x.Profile)
|
||||
.ThenInclude(x => x.Prefix)
|
||||
//.Include(x => x.Profile)
|
||||
//.ThenInclude(x => x.Prefix)
|
||||
.Where(x => x.Date != null && x.Date.Value.Date == DateTime.Now.Date)
|
||||
.AsQueryable()
|
||||
.ToListAsync();
|
||||
foreach (var cronjobNoti in cronjobNotis)
|
||||
{
|
||||
cronjobNoti.Profile.IsLeave = true;
|
||||
cronjobNoti.Profile.LeaveReason = "LAYOFF";
|
||||
cronjobNoti.Profile.LeaveDate = DateTime.Now;
|
||||
//cronjobNoti.Profile.IsLeave = true;
|
||||
//cronjobNoti.Profile.LeaveReason = "LAYOFF";
|
||||
//cronjobNoti.Profile.LeaveDate = DateTime.Now;
|
||||
// await _repositoryNoti.PushNotificationAsync(
|
||||
// Guid.Parse("08db721d-ada0-4e64-89d3-7584a893d8b8"),
|
||||
// $"แจ้งเตือนการปลดออกของ {cronjobNoti.Profile.Prefix?.Name}{cronjobNoti.Profile.FirstName} {cronjobNoti.Profile.LastName}",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue