แก้ report เกษียณ
This commit is contained in:
parent
320fb3386e
commit
8d700d273f
2 changed files with 53 additions and 27 deletions
|
|
@ -15,6 +15,7 @@ using Swashbuckle.AspNetCore.Annotations;
|
|||
using System.Net.Http.Headers;
|
||||
using System.Security.Claims;
|
||||
using System.Security.Cryptography;
|
||||
using static Microsoft.EntityFrameworkCore.DbLoggerCategory;
|
||||
|
||||
namespace BMA.EHR.Retirement.Service.Controllers
|
||||
{
|
||||
|
|
@ -748,13 +749,14 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
"",
|
||||
true
|
||||
);
|
||||
await _repositoryNoti.PushNotificationAsync(
|
||||
updated.profileId,
|
||||
$"คำขอลาออกขอ {updated.prefix}{updated.firstName} {updated.lastName} ได้รับการอนุมัติจากการเจ้าหน้าที่",
|
||||
$"คำขอลาออกขอ {updated.prefix}{updated.firstName} {updated.lastName} ได้รับการอนุมัติจากการเจ้าหน้าที่",
|
||||
"",
|
||||
true
|
||||
);
|
||||
if (updated.profileId != null) {
|
||||
await _repositoryNoti.PushNotificationAsync(
|
||||
Guid.Parse(updated.profileId),
|
||||
$"คำขอลาออกขอ {updated.prefix}{updated.firstName} {updated.lastName} ได้รับการอนุมัติจากการเจ้าหน้าที่",
|
||||
$"คำขอลาออกขอ {updated.prefix}{updated.firstName} {updated.lastName} ได้รับการอนุมัติจากการเจ้าหน้าที่",
|
||||
"",
|
||||
true
|
||||
); }
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return Success();
|
||||
|
|
@ -792,13 +794,16 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
"",
|
||||
true
|
||||
);
|
||||
await _repositoryNoti.PushNotificationAsync(
|
||||
updated.profileId,
|
||||
if (updated.profileId != null)
|
||||
{
|
||||
await _repositoryNoti.PushNotificationAsync(
|
||||
Guid.Parse(updated.profileId),
|
||||
$"คำขอลาออกขอ {updated.prefix}{updated.firstName} {updated.lastName} ถูกยับยั้งจากการเจ้าหน้าที่",
|
||||
$"คำขอลาออกขอ {updated.prefix}{updated.firstName} {updated.lastName} ถูกยับยั้งจากการเจ้าหน้าที่",
|
||||
"",
|
||||
true
|
||||
);
|
||||
}
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return Success();
|
||||
|
|
@ -834,14 +839,17 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
"",
|
||||
true
|
||||
);
|
||||
await _repositoryNoti.PushNotificationAsync(
|
||||
updated.profileId,
|
||||
if (updated.profileId != null)
|
||||
{
|
||||
await _repositoryNoti.PushNotificationAsync(
|
||||
Guid.Parse(updated.profileId),
|
||||
$"คำขอลาออกขอ {updated.prefix}{updated.firstName} {updated.lastName} ได้รับการอนุมัติจากผู้บังคับบัญชา",
|
||||
$"คำขอลาออกขอ {updated.prefix}{updated.firstName} {updated.lastName} ได้รับการอนุมัติจากผู้บังคับบัญชา",
|
||||
"",
|
||||
true
|
||||
);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return Success();
|
||||
}
|
||||
|
|
@ -878,14 +886,17 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
"",
|
||||
true
|
||||
);
|
||||
await _repositoryNoti.PushNotificationAsync(
|
||||
updated.profileId,
|
||||
if (updated.profileId != null)
|
||||
{
|
||||
await _repositoryNoti.PushNotificationAsync(
|
||||
Guid.Parse(updated.profileId),
|
||||
$"คำขอลาออกขอ {updated.prefix}{updated.firstName} {updated.lastName} ถูกยับยั้งจากผู้บังคับบัญชา",
|
||||
$"คำขอลาออกขอ {updated.prefix}{updated.firstName} {updated.lastName} ถูกยับยั้งจากผู้บังคับบัญชา",
|
||||
"",
|
||||
true
|
||||
);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return Success();
|
||||
}
|
||||
|
|
@ -919,14 +930,17 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
"",
|
||||
true
|
||||
);
|
||||
await _repositoryNoti.PushNotificationAsync(
|
||||
updated.profileId,
|
||||
if (updated.profileId != null)
|
||||
{
|
||||
await _repositoryNoti.PushNotificationAsync(
|
||||
Guid.Parse(updated.profileId),
|
||||
$"คำขอลาออกขอ {updated.prefix}{updated.firstName} {updated.lastName} ได้รับการอนุมัติจากผู้มีอำนาจ",
|
||||
$"คำขอลาออกขอ {updated.prefix}{updated.firstName} {updated.lastName} ได้รับการอนุมัติจากผู้มีอำนาจ",
|
||||
"",
|
||||
true
|
||||
);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return Success();
|
||||
}
|
||||
|
|
@ -963,13 +977,16 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
"",
|
||||
true
|
||||
);
|
||||
await _repositoryNoti.PushNotificationAsync(
|
||||
updated.profileId,
|
||||
if (updated.profileId != null)
|
||||
{
|
||||
await _repositoryNoti.PushNotificationAsync(
|
||||
Guid.Parse(updated.profileId),
|
||||
$"คำขอลาออกขอ {updated.prefix}{updated.firstName} {updated.lastName} ถูกยับยั้งจากผู้มีอำนาจ",
|
||||
$"คำขอลาออกขอ {updated.prefix}{updated.firstName} {updated.lastName} ถูกยับยั้งจากผู้มีอำนาจ",
|
||||
"",
|
||||
true
|
||||
);
|
||||
}
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return Success();
|
||||
|
|
@ -1345,14 +1362,16 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
uppdated.LastUpdateFullName = FullName ?? "System Administrator";
|
||||
uppdated.LastUpdateUserId = UserId ?? "";
|
||||
uppdated.LastUpdatedAt = DateTime.Now;
|
||||
await _repositoryNoti.PushNotificationAsync(
|
||||
uppdated.RetirementResign.profileId,
|
||||
if (uppdated.RetirementResign != null && uppdated.RetirementResign.profileId != null)
|
||||
{
|
||||
await _repositoryNoti.PushNotificationAsync(
|
||||
Guid.Parse(uppdated.RetirementResign.profileId),
|
||||
$"การนัดสัมภาษณ์เหตุผลการลาออก {req.AppointDate.ToThaiFullDate()}",
|
||||
$"การนัดสัมภาษณ์เหตุผลการลาออก {req.AppointDate.ToThaiFullDate()}",
|
||||
"",
|
||||
true
|
||||
);
|
||||
|
||||
}
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return Success();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue