เหตุผลอนุมัติระบบลา
This commit is contained in:
parent
2fd30e815c
commit
677ec75c66
5 changed files with 16019 additions and 6 deletions
|
|
@ -215,9 +215,11 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
p.PositionNumberOld,
|
||||
p.OrganizationPositionOld,
|
||||
p.OligarchReject,
|
||||
p.OligarchApproveReason,
|
||||
p.OligarchRejectReason,
|
||||
p.OligarchRejectDate,
|
||||
p.CommanderReject,
|
||||
p.CommanderApproveReason,
|
||||
p.CommanderRejectReason,
|
||||
p.CommanderRejectDate,
|
||||
RetirementResignDocs = p.RetirementResignDocs.Where(d => d.Document != null).Select(d => new { d.Document.Id, d.Document.FileName }),
|
||||
|
|
@ -259,9 +261,11 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
data.IsActive,
|
||||
data.CreatedAt,
|
||||
data.OligarchReject,
|
||||
data.OligarchApproveReason,
|
||||
data.OligarchRejectReason,
|
||||
data.OligarchRejectDate,
|
||||
data.CommanderReject,
|
||||
data.CommanderApproveReason,
|
||||
data.CommanderRejectReason,
|
||||
data.CommanderRejectDate,
|
||||
Docs = retirementResignDocs,
|
||||
|
|
@ -465,6 +469,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
|
||||
return Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ผู้บังคับบัญชา อนุมัติคำลาออก
|
||||
/// </summary>
|
||||
|
|
@ -475,7 +480,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPut("commander/confirm/{id:length(36)}")]
|
||||
public async Task<ActionResult<ResponseObject>> AdminConfirm([FromBody] RetirementReasonDateRequest req, Guid id)
|
||||
public async Task<ActionResult<ResponseObject>> CommanderConfirm([FromBody] RetirementReasonRequest req, Guid id)
|
||||
{
|
||||
var updated = await _context.RetirementResigns
|
||||
.FirstOrDefaultAsync(x => x.Id == id);
|
||||
|
|
@ -484,6 +489,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
|
||||
// updated.Status = "APPROVE";
|
||||
updated.CommanderReject = false;
|
||||
updated.CommanderApproveReason = req.Reason;
|
||||
updated.LastUpdateFullName = FullName ?? "System Administrator";
|
||||
updated.LastUpdateUserId = UserId ?? "";
|
||||
updated.LastUpdatedAt = DateTime.Now;
|
||||
|
|
@ -502,7 +508,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPut("commander/reject/{id:length(36)}")]
|
||||
public async Task<ActionResult<ResponseObject>> AdminReject([FromBody] RetirementReasonDateRequest req, Guid id)
|
||||
public async Task<ActionResult<ResponseObject>> CommanderReject([FromBody] RetirementReasonDateRequest req, Guid id)
|
||||
{
|
||||
var updated = await _context.RetirementResigns
|
||||
.FirstOrDefaultAsync(x => x.Id == id);
|
||||
|
|
@ -530,15 +536,16 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPut("oligarch/confirm/{id:length(36)}")]
|
||||
public async Task<ActionResult<ResponseObject>> AdminConfirm([FromBody] RetirementReasonDateRequest req, Guid id)
|
||||
public async Task<ActionResult<ResponseObject>> OligarchConfirm([FromBody] RetirementReasonRequest req, Guid id)
|
||||
{
|
||||
var updated = await _context.RetirementResigns
|
||||
.FirstOrDefaultAsync(x => x.Id == id);
|
||||
if (updated == null)
|
||||
return Error(GlobalMessages.RetirementResignNotFound, 404);
|
||||
|
||||
// updated.Status = "APPROVE";
|
||||
updated.Status = "APPROVE";
|
||||
updated.OligarchReject = false;
|
||||
updated.OligarchApproveReason = req.Reason;
|
||||
updated.LastUpdateFullName = FullName ?? "System Administrator";
|
||||
updated.LastUpdateUserId = UserId ?? "";
|
||||
updated.LastUpdatedAt = DateTime.Now;
|
||||
|
|
@ -557,14 +564,14 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPut("oligarch/reject/{id:length(36)}")]
|
||||
public async Task<ActionResult<ResponseObject>> AdminReject([FromBody] RetirementReasonDateRequest req, Guid id)
|
||||
public async Task<ActionResult<ResponseObject>> OligarchReject([FromBody] RetirementReasonDateRequest req, Guid id)
|
||||
{
|
||||
var updated = await _context.RetirementResigns
|
||||
.FirstOrDefaultAsync(x => x.Id == id);
|
||||
if (updated == null)
|
||||
return Error(GlobalMessages.RetirementResignNotFound, 404);
|
||||
|
||||
// updated.Status = "REJECT";
|
||||
updated.Status = "REJECT";
|
||||
updated.OligarchReject = true;
|
||||
updated.OligarchRejectReason = req.Reason;
|
||||
updated.OligarchRejectDate = req.Date;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue