แก้สถานะยกเลิกลา

This commit is contained in:
kittapath 2024-11-01 10:10:33 +07:00
parent 489a350ff1
commit 0df7f2ebf3
2 changed files with 4 additions and 5 deletions

View file

@ -1159,7 +1159,6 @@ namespace BMA.EHR.Retirement.Service.Controllers
updated.CancelReason = req.Reason; updated.CancelReason = req.Reason;
if (updated.Status == "DONE") if (updated.Status == "DONE")
{ {
// updated.Status = "CANCEL";
var retirementResignCancel = new RetirementResignCancel var retirementResignCancel = new RetirementResignCancel
{ {
Location = updated.Location, Location = updated.Location,
@ -1620,7 +1619,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
return Error(GlobalMessages.RetirementResignNotFound, 404); return Error(GlobalMessages.RetirementResignNotFound, 404);
if ((DateTime.Now - updated.CreatedAt).TotalDays >= 90) if ((DateTime.Now - updated.CreatedAt).TotalDays >= 90)
return Error("สามารถยับยั้งได้ไม่เกิน 90 วัน"); return Error("สามารถยับยั้งได้ไม่เกิน 90 วัน");
updated.Status = "REJECT"; updated.Status = "APPROVE";
updated.OligarchReject = true; updated.OligarchReject = true;
updated.OligarchRejectReason = req.Reason; updated.OligarchRejectReason = req.Reason;
updated.OligarchRejectDate = req.Date; updated.OligarchRejectDate = req.Date;