เพิ่มรับคืนเครื่องราช
This commit is contained in:
parent
59f782e8cf
commit
1619a502d4
22 changed files with 33518 additions and 41 deletions
|
|
@ -71,7 +71,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
period_round = p.Round,
|
||||
period_start = p.StartDate,
|
||||
period_end = p.EndDate,
|
||||
period_status = _repository.CalStatusByDate(p.StartDate, p.EndDate, p.Year.ToString()),
|
||||
period_status = p.IsLock == true ? "DONE" : (p.InsigniaRequests.Count() == 0 ? "WAITTING" : "PENDING"),
|
||||
period_year = p.Year,
|
||||
period_isActive = p.IsActive,
|
||||
period_doc = p.ReliefDoc == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.ReliefDoc.Id,
|
||||
|
|
@ -121,7 +121,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
period_round = p.Round,
|
||||
period_start = p.StartDate,
|
||||
period_end = p.EndDate,
|
||||
period_status = _repository.CalStatusByDate(p.StartDate, p.EndDate, p.Year.ToString()),
|
||||
period_status = p.IsLock == true ? "DONE" : (p.InsigniaRequests.Count() == 0 ? "WAITTING" : "PENDING"),
|
||||
period_year = p.Year,
|
||||
period_isActive = p.IsActive,
|
||||
period_doc = p.ReliefDoc == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.ReliefDoc.Id,
|
||||
|
|
|
|||
|
|
@ -432,6 +432,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
RequestNote = result.RequestNote,
|
||||
IsLock = result.IsLock,
|
||||
OrganizationName = result.OrganizationName,
|
||||
Document = result.Document,
|
||||
Items = new List<InsigniaRequestItem>()
|
||||
};
|
||||
if (RoleAdmin == true && result.RequestStatus != "st5")
|
||||
|
|
@ -664,7 +665,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpGet("officer/approve/{id:length(36)}/{ocId:length(36)}")]
|
||||
public async Task<ActionResult<ResponseObject>> ApproveChangeStatusToSt2(Guid id, Guid ocId)
|
||||
public async Task<ActionResult<ResponseObject>> ApproveChangeStatusToSt3(Guid id, Guid ocId)
|
||||
{
|
||||
await _repository.SaveAprove(id, ocId);
|
||||
var requestId = await _repository.GetRequestId(id, ocId);
|
||||
|
|
@ -673,6 +674,13 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
{
|
||||
requestNew.RequestStatus = "st3";
|
||||
requestNew.RequestNote = "";
|
||||
await _repositoryNoti.PushNotificationAsync(
|
||||
Guid.Parse("08db721d-ae15-40a2-8331-3e2e6d9d9a86"),
|
||||
$"{(requestNew.Organization.OrganizationOrganization == null ? null : requestNew.Organization.OrganizationOrganization.Name)} ยื่นข้อมูลขอมูลผู้มีสิทธิ์ได้รับเครื่องราชฯ {requestNew.Period.Name}",
|
||||
$"{(requestNew.Organization.OrganizationOrganization == null ? null : requestNew.Organization.OrganizationOrganization.Name)} ยื่นข้อมูลขอมูลผู้มีสิทธิ์ได้รับเครื่องราชฯ {requestNew.Period.Name}",
|
||||
"",
|
||||
true
|
||||
);
|
||||
_context.SaveChanges();
|
||||
return Success();
|
||||
}
|
||||
|
|
@ -689,7 +697,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPut("officer/reject/{id:length(36)}/{ocId:length(36)}")]
|
||||
public async Task<ActionResult<ResponseObject>> RejectChangeStatusToSt1([FromBody] InsigniaReasonRequest req, Guid id, Guid ocId)
|
||||
public async Task<ActionResult<ResponseObject>> RejectChangeStatusToSt2([FromBody] InsigniaReasonRequest req, Guid id, Guid ocId)
|
||||
{
|
||||
await _repository.SaveAprove(id, ocId);
|
||||
var requestId = await _repository.GetRequestId(id, ocId);
|
||||
|
|
@ -706,7 +714,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// เปลี่ยน status เป็น st5 ผอ.หน่วยอนุมัติ "
|
||||
/// เปลี่ยน status เป็น st6 ผอ.หน่วยอนุมัติ "
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <response code="200"></response>
|
||||
|
|
@ -714,14 +722,28 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpGet("director/approve/{id:length(36)}/{ocId:length(36)}")]
|
||||
public async Task<ActionResult<ResponseObject>> ApproveChangeStatusToSt3(Guid id, Guid ocId)
|
||||
public async Task<ActionResult<ResponseObject>> ApproveChangeStatusToSt6(Guid id, Guid ocId)
|
||||
{
|
||||
var requestId = await _repository.GetRequestId(id, ocId);
|
||||
var requestNew = await _context.InsigniaRequests.FirstOrDefaultAsync(i => i.Id == requestId);
|
||||
if (requestNew != null)
|
||||
{
|
||||
requestNew.RequestStatus = "st5";
|
||||
requestNew.RequestStatus = "st6";
|
||||
requestNew.RequestNote = "";
|
||||
await _repositoryNoti.PushNotificationAsync(
|
||||
Guid.Parse("08db721d-ada0-4e64-89d3-7584a893d8b8"),
|
||||
$"{(requestNew.Organization.OrganizationOrganization == null ? null : requestNew.Organization.OrganizationOrganization.Name)} ยื่นข้อมูลขอมูลผู้มีสิทธิ์ได้รับเครื่องราชฯ {requestNew.Period.Name}",
|
||||
$"{(requestNew.Organization.OrganizationOrganization == null ? null : requestNew.Organization.OrganizationOrganization.Name)} ยื่นข้อมูลขอมูลผู้มีสิทธิ์ได้รับเครื่องราชฯ {requestNew.Period.Name}",
|
||||
"",
|
||||
true
|
||||
);
|
||||
await _repositoryNoti.PushNotificationAsync(
|
||||
Guid.Parse("08db721d-ae67-4ed1-8b3c-490f44a73e658"),
|
||||
$"{(requestNew.Organization.OrganizationOrganization == null ? null : requestNew.Organization.OrganizationOrganization.Name)} ยื่นข้อมูลขอมูลผู้มีสิทธิ์ได้รับเครื่องราชฯ {requestNew.Period.Name}",
|
||||
$"{(requestNew.Organization.OrganizationOrganization == null ? null : requestNew.Organization.OrganizationOrganization.Name)} ยื่นข้อมูลขอมูลผู้มีสิทธิ์ได้รับเครื่องราชฯ {requestNew.Period.Name}",
|
||||
"",
|
||||
true
|
||||
);
|
||||
_context.SaveChanges();
|
||||
return Success();
|
||||
}
|
||||
|
|
@ -738,14 +760,60 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPut("director/reject/{id:length(36)}/{ocId:length(36)}")]
|
||||
public async Task<ActionResult<ResponseObject>> RejectChangeStatusToSt2([FromBody] InsigniaReasonRequest req, Guid id, Guid ocId)
|
||||
public async Task<ActionResult<ResponseObject>> RejectChangeStatusToSt4([FromBody] InsigniaReasonRequest req, Guid id, Guid ocId)
|
||||
{
|
||||
var requestId = await _repository.GetRequestId(id, ocId);
|
||||
var requestNew = await _context.InsigniaRequests.FirstOrDefaultAsync(i => i.Id == requestId);
|
||||
var requestNew = await _context.InsigniaRequests
|
||||
.Include(x => x.Organization)
|
||||
.ThenInclude(x => x.OrganizationOrganization)
|
||||
.Include(x => x.Period)
|
||||
.FirstOrDefaultAsync(i => i.Id == requestId);
|
||||
if (requestNew != null)
|
||||
{
|
||||
requestNew.RequestStatus = "st4";
|
||||
requestNew.RequestNote = req.Reason;
|
||||
await _repositoryNoti.PushNotificationAsync(
|
||||
Guid.Parse("08db721d-adff-47b0-8762-41cd5c991001"),
|
||||
$"{(requestNew.Organization.OrganizationOrganization == null ? null : requestNew.Organization.OrganizationOrganization.Name)} ตีกลับข้อมูลผู้มีสิทธิ์ได้รับเครื่องราชฯ {requestNew.Period.Name}",
|
||||
$"{(requestNew.Organization.OrganizationOrganization == null ? null : requestNew.Organization.OrganizationOrganization.Name)} ตีกลับข้อมูลผู้มีสิทธิ์ได้รับเครื่องราชฯ {requestNew.Period.Name}",
|
||||
"",
|
||||
true
|
||||
);
|
||||
_context.SaveChanges();
|
||||
return Success();
|
||||
}
|
||||
else
|
||||
return Error(GlobalMessages.InsigniaRequestNotFound);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// เปลี่ยน status เป็น st5 สกจ. หน่วยไม่อนุมัติ "
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <response code="200"></response>
|
||||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPut("head/reject/{id:length(36)}/{ocId:length(36)}")]
|
||||
public async Task<ActionResult<ResponseObject>> RejectChangeStatusToSt5([FromBody] InsigniaReasonRequest req, Guid id, Guid ocId)
|
||||
{
|
||||
var requestId = await _repository.GetRequestId(id, ocId);
|
||||
var requestNew = await _context.InsigniaRequests
|
||||
.Include(x => x.Organization)
|
||||
.ThenInclude(x => x.OrganizationOrganization)
|
||||
.Include(x => x.Period)
|
||||
.FirstOrDefaultAsync(i => i.Id == requestId);
|
||||
if (requestNew != null)
|
||||
{
|
||||
requestNew.RequestStatus = "st5";
|
||||
requestNew.RequestNote = req.Reason;
|
||||
await _repositoryNoti.PushNotificationAsync(
|
||||
Guid.Parse("08db721d-ae15-40a2-8331-3e2e6d9d9a86"),
|
||||
$"สกจ. ตีกลับข้อมูลผู้มีสิทธิ์ได้รับเครื่องราชฯ {requestNew.Period.Name}",
|
||||
$"สกจ. ตีกลับข้อมูลผู้มีสิทธิ์ได้รับเครื่องราชฯ {requestNew.Period.Name}",
|
||||
"",
|
||||
true
|
||||
);
|
||||
_context.SaveChanges();
|
||||
return Success();
|
||||
}
|
||||
|
|
@ -814,7 +882,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
if (insigniaRequestProfile == null)
|
||||
return Error(GlobalMessages.InsigniaPeriodNotFound);
|
||||
insigniaRequestProfile.Status = "REJECT";
|
||||
insigniaRequestProfile.Reason = req.Reason;
|
||||
insigniaRequestProfile.ReasonReject = req.Reason;
|
||||
insigniaRequestProfile.LastUpdateFullName = FullName ?? "System Administrator";
|
||||
insigniaRequestProfile.LastUpdateUserId = UserId ?? "";
|
||||
insigniaRequestProfile.LastUpdatedAt = DateTime.Now;
|
||||
|
|
@ -838,7 +906,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
if (insigniaRequestProfile == null)
|
||||
return Error(GlobalMessages.InsigniaPeriodNotFound);
|
||||
insigniaRequestProfile.Status = "DELETE";
|
||||
insigniaRequestProfile.Reason = req.Reason;
|
||||
insigniaRequestProfile.ReasonReject = req.Reason;
|
||||
insigniaRequestProfile.LastUpdateFullName = FullName ?? "System Administrator";
|
||||
insigniaRequestProfile.LastUpdateUserId = UserId ?? "";
|
||||
insigniaRequestProfile.LastUpdatedAt = DateTime.Now;
|
||||
|
|
@ -992,6 +1060,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
Profile = profile,
|
||||
RequestInsignia = insignia,
|
||||
Request = insigniaRequest,
|
||||
Reason = req.Reason,
|
||||
RequestDate = DateTime.Now,
|
||||
MatchingConditions = System.Text.Json.JsonSerializer.Serialize(new List<dynamic>()), // serialize to string
|
||||
CreatedUserId = UserId ?? "System Administrator",
|
||||
|
|
@ -1261,6 +1330,12 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
Address = x.Address,
|
||||
Number = x.Number,
|
||||
Salary = x.Salary,
|
||||
DateReceiveInsignia = x.DateReceiveInsignia,
|
||||
DocReceiveInsignia = x.DocReceiveInsignia == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.DocReceiveInsignia.Id,
|
||||
OrgReceiveInsignia = x.OrgReceiveInsignia == null ? "-" : x.OrgReceiveInsignia.Name,
|
||||
DateReturnInsignia = x.DateReturnInsignia,
|
||||
DocReturnInsignia = x.DocReturnInsignia == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.DocReturnInsignia.Id,
|
||||
OrgReturnInsignia = x.OrgReturnInsignia == null ? "-" : x.OrgReturnInsignia.Name,
|
||||
}).ToListAsync();
|
||||
var _insigniaNoteProfiles = new List<dynamic>();
|
||||
foreach (var insigniaNoteProfile in insigniaNoteProfiles)
|
||||
|
|
@ -1292,6 +1367,12 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
insigniaNoteProfile.Address,
|
||||
insigniaNoteProfile.Number,
|
||||
insigniaNoteProfile.Salary,
|
||||
insigniaNoteProfile.DateReceiveInsignia,
|
||||
DocReceiveInsignia = insigniaNoteProfile.DocReceiveInsignia == Guid.Parse("00000000-0000-0000-0000-000000000000") ? null : await _documentService.ImagesPath(insigniaNoteProfile.DocReceiveInsignia),
|
||||
insigniaNoteProfile.OrgReceiveInsignia,
|
||||
insigniaNoteProfile.DateReturnInsignia,
|
||||
DocReturnInsignia = insigniaNoteProfile.DocReturnInsignia == Guid.Parse("00000000-0000-0000-0000-000000000000") ? null : await _documentService.ImagesPath(insigniaNoteProfile.DocReturnInsignia),
|
||||
insigniaNoteProfile.OrgReturnInsignia,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
@ -2042,8 +2123,8 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
{
|
||||
workSheet.Cells[row, 1].Value = insigniaPeriod.Organization.OrganizationOrganization == null ? "-" : insigniaPeriod.Organization.OrganizationOrganization.Name;
|
||||
workSheet.Cells[row, 2].Value = item.Profile.CitizenId;
|
||||
workSheet.Cells[row, 3].Value = item.Profile.Prefix == null ? "-" : item.Profile.Prefix.Name;
|
||||
workSheet.Cells[row, 4].Value = "-";
|
||||
workSheet.Cells[row, 3].Value = item.Profile.Prefix == null ? "-" : ((item.Profile.Prefix.Name == "นาย" || item.Profile.Prefix.Name == "นาง" || item.Profile.Prefix.Name == "นางสาว") ? item.Profile.Prefix.Name : "-");
|
||||
workSheet.Cells[row, 4].Value = item.Profile.Prefix == null ? "-" : ((item.Profile.Prefix.Name == "นาย" || item.Profile.Prefix.Name == "นาง" || item.Profile.Prefix.Name == "นางสาว") ? "-" : item.Profile.Prefix.Name);
|
||||
workSheet.Cells[row, 5].Value = item.Profile.FirstName;
|
||||
workSheet.Cells[row, 6].Value = item.Profile.LastName;
|
||||
workSheet.Cells[row, 7].Value = item.Profile.Gender == null ? "-" : item.Profile.Gender.Name;
|
||||
|
|
@ -2090,5 +2171,105 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
System.IO.File.Delete(exportFile);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Upload เอกสาร เครื่องราชฯ
|
||||
/// </summary>
|
||||
/// <param name="requestId">Id รอบเครื่องราช</param>
|
||||
/// <returns></returns>
|
||||
/// <response code="200"></response>
|
||||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPut("upload/{requestId:length(36)}"), DisableRequestSizeLimit]
|
||||
public async Task<ActionResult<ResponseObject>> UpdatePersonDeferment([FromForm] ImportFileRequest req, Guid requestId)
|
||||
{
|
||||
var insigniaRequest = await _context.InsigniaRequests.Where(x => x.Id == requestId).FirstOrDefaultAsync();
|
||||
if (insigniaRequest == null)
|
||||
return Error(GlobalMessages.InsigniaRequestNotFound, 404);
|
||||
|
||||
if (Request.Form.Files != null && Request.Form.Files.Count != 0)
|
||||
{
|
||||
var file = Request.Form.Files[0];
|
||||
var fileExtension = Path.GetExtension(file.FileName);
|
||||
|
||||
var doc = await _documentService.UploadFileAsync(file, file.FileName);
|
||||
insigniaRequest.Document = doc;
|
||||
}
|
||||
insigniaRequest.LastUpdateFullName = FullName ?? "System Administrator";
|
||||
insigniaRequest.LastUpdateUserId = UserId ?? "";
|
||||
insigniaRequest.LastUpdatedAt = DateTime.Now;
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ยื่นรายการคืนเครื่องราชฯ
|
||||
/// </summary>
|
||||
/// <param name="insigniaNoteProfileId">Id บุคคลบันทึกผลเครื่องราชฯ</param>
|
||||
/// <returns></returns>
|
||||
/// <response code="200"></response>
|
||||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPut("note/return/{insigniaNoteProfileId:length(36)}"), DisableRequestSizeLimit]
|
||||
public async Task<ActionResult<ResponseObject>> UpdateReturnNoteInsignia([FromForm] InsigniaNoteReturnRequest req, Guid insigniaNoteProfileId)
|
||||
{
|
||||
var insigniaNoteProfile = await _context.InsigniaNoteProfiles.Where(x => x.Id == insigniaNoteProfileId).FirstOrDefaultAsync();
|
||||
if (insigniaNoteProfile == null)
|
||||
return Error(GlobalMessages.InsigniaRequestProfileNotFound, 404);
|
||||
|
||||
if (Request.Form.Files != null && Request.Form.Files.Count != 0)
|
||||
{
|
||||
var file = Request.Form.Files[0];
|
||||
var fileExtension = Path.GetExtension(file.FileName);
|
||||
|
||||
var doc = await _documentService.UploadFileAsync(file, file.FileName);
|
||||
insigniaNoteProfile.DocReturnInsignia = doc;
|
||||
}
|
||||
insigniaNoteProfile.OrgReturnInsignia = await _context.OrganizationOrganizations.Where(x => x.Id == req.OrgId).FirstOrDefaultAsync();
|
||||
insigniaNoteProfile.DateReturnInsignia = req.Date;
|
||||
insigniaNoteProfile.LastUpdateFullName = FullName ?? "System Administrator";
|
||||
insigniaNoteProfile.LastUpdateUserId = UserId ?? "";
|
||||
insigniaNoteProfile.LastUpdatedAt = DateTime.Now;
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ยื่นรายการรับเครื่องราชฯ
|
||||
/// </summary>
|
||||
/// <param name="insigniaNoteProfileId">Id บุคคลบันทึกผลเครื่องราชฯ</param>
|
||||
/// <returns></returns>
|
||||
/// <response code="200"></response>
|
||||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPut("note/receive/{insigniaNoteProfileId:length(36)}"), DisableRequestSizeLimit]
|
||||
public async Task<ActionResult<ResponseObject>> UpdateReceiveNoteInsignia([FromForm] InsigniaNoteReturnRequest req, Guid insigniaNoteProfileId)
|
||||
{
|
||||
var insigniaNoteProfile = await _context.InsigniaNoteProfiles.Where(x => x.Id == insigniaNoteProfileId).FirstOrDefaultAsync();
|
||||
if (insigniaNoteProfile == null)
|
||||
return Error(GlobalMessages.InsigniaRequestProfileNotFound, 404);
|
||||
|
||||
if (Request.Form.Files != null && Request.Form.Files.Count != 0)
|
||||
{
|
||||
var file = Request.Form.Files[0];
|
||||
var fileExtension = Path.GetExtension(file.FileName);
|
||||
|
||||
var doc = await _documentService.UploadFileAsync(file, file.FileName);
|
||||
insigniaNoteProfile.DocReceiveInsignia = doc;
|
||||
}
|
||||
insigniaNoteProfile.OrgReceiveInsignia = await _context.OrganizationOrganizations.Where(x => x.Id == req.OrgId).FirstOrDefaultAsync();
|
||||
insigniaNoteProfile.DateReceiveInsignia = req.Date;
|
||||
insigniaNoteProfile.LastUpdateFullName = FullName ?? "System Administrator";
|
||||
insigniaNoteProfile.LastUpdateUserId = UserId ?? "";
|
||||
insigniaNoteProfile.LastUpdatedAt = DateTime.Now;
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return Success();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -159,6 +159,8 @@ var app = builder.Build();
|
|||
if (manager != null)
|
||||
{
|
||||
manager.AddOrUpdate("แจ้งเตือนรอบเครื่องราชฯ", Job.FromExpression<InsigniaReportRepository>(x => x.NotifyInsignia()), Cron.Daily(Int32.Parse(builder.Configuration["KeycloakCron:Hour"]), Int32.Parse(builder.Configuration["KeycloakCron:Minute"])), TimeZoneInfo.Local);
|
||||
manager.AddOrUpdate("ล็อกข้อมูลรอบเครื่องราชฯ", Job.FromExpression<InsigniaReportRepository>(x => x.LockInsignia()), Cron.Daily(Int32.Parse(builder.Configuration["KeycloakCron:Hour"]), Int32.Parse(builder.Configuration["KeycloakCron:Minute"])), TimeZoneInfo.Local);
|
||||
manager.AddOrUpdate("คำนวนผู้ได้รับเครื่องราชฯ", Job.FromExpression<InsigniaReportRepository>(x => x.CalInsignaiRequestBkk()), Cron.Daily(Int32.Parse(builder.Configuration["KeycloakCron:Hour"]), Int32.Parse(builder.Configuration["KeycloakCron:Minute"])), TimeZoneInfo.Local);
|
||||
}
|
||||
|
||||
// apply migrations
|
||||
|
|
|
|||
|
|
@ -8,5 +8,6 @@ namespace BMA.EHR.Insignia.Service.Requests
|
|||
public Guid ProfileId { get; set; }
|
||||
public Guid insigniaId { get; set; }
|
||||
public Guid insigniaPeriodId { get; set; }
|
||||
public string? Reason { get; set; }
|
||||
}
|
||||
}
|
||||
12
BMA.EHR.Insignia.Service/Requests/InsigniaReturnRequest.cs
Normal file
12
BMA.EHR.Insignia.Service/Requests/InsigniaReturnRequest.cs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
using BMA.EHR.Domain.Models.MetaData;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace BMA.EHR.Insignia.Service.Requests
|
||||
{
|
||||
public class InsigniaNoteReturnRequest
|
||||
{
|
||||
public List<FormFile>? File { get; set; }
|
||||
public DateTime? Date { get; set; }
|
||||
public Guid OrgId { get; set; }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue