แก้สถานะยกเลิกลา
This commit is contained in:
parent
489a350ff1
commit
0df7f2ebf3
2 changed files with 4 additions and 5 deletions
|
|
@ -255,7 +255,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
{
|
{
|
||||||
var placementOfficers = await _context.PlacementOfficers.AsQueryable()
|
var placementOfficers = await _context.PlacementOfficers.AsQueryable()
|
||||||
.OrderByDescending(x => x.CreatedAt)
|
.OrderByDescending(x => x.CreatedAt)
|
||||||
.Where(x => x.Status == "DONE")
|
.Where(x => x.Status == "DONE")
|
||||||
.Where(x => x.profileId == id)
|
.Where(x => x.profileId == id)
|
||||||
.Select(p => new
|
.Select(p => new
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -227,7 +227,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
||||||
return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden);
|
return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden);
|
||||||
}
|
}
|
||||||
var retirementResigns = await _context.RetirementResigns.AsQueryable()
|
var retirementResigns = await _context.RetirementResigns.AsQueryable()
|
||||||
.Where(x => x.Status == type.Trim().ToUpper())
|
.Where(x => x.Status == type.Trim().ToUpper())
|
||||||
.OrderByDescending(x => x.CreatedAt)
|
.OrderByDescending(x => x.CreatedAt)
|
||||||
.Select(p => new
|
.Select(p => new
|
||||||
{
|
{
|
||||||
|
|
@ -278,7 +278,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
||||||
return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden);
|
return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden);
|
||||||
}
|
}
|
||||||
var retirementResigns = await _context.RetirementResignCancels.AsQueryable()
|
var retirementResigns = await _context.RetirementResignCancels.AsQueryable()
|
||||||
.Where(x => x.Status == type.Trim().ToUpper())
|
.Where(x => x.Status == type.Trim().ToUpper())
|
||||||
.OrderByDescending(x => x.CreatedAt)
|
.OrderByDescending(x => x.CreatedAt)
|
||||||
.Select(p => new
|
.Select(p => new
|
||||||
{
|
{
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue