apiจัดสรร
This commit is contained in:
parent
0aa0aedba9
commit
15931fbaca
27 changed files with 64051 additions and 120 deletions
|
|
@ -560,6 +560,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
FutureWork = p.FutureWork,
|
||||
FutureWorkReason = p.FutureWorkReason,
|
||||
Suggestion = p.Suggestion,
|
||||
AppointDate = p.AppointDate,
|
||||
LastUpdatedAt = p.LastUpdatedAt,
|
||||
CreatedAt = p.CreatedAt,
|
||||
})
|
||||
|
|
@ -591,6 +592,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
data.FutureWork,
|
||||
data.FutureWorkReason,
|
||||
data.Suggestion,
|
||||
data.AppointDate,
|
||||
data.LastUpdatedAt,
|
||||
data.CreatedAt,
|
||||
};
|
||||
|
|
@ -717,5 +719,32 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
|
||||
return Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// แก้ไขกําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก
|
||||
/// </summary>
|
||||
/// <param name="id">Id กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก</param>
|
||||
/// <returns></returns>
|
||||
/// <response code="200"></response>
|
||||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPut("questionnaire/appoint/{id:length(36)}")]
|
||||
public async Task<ActionResult<ResponseObject>> UpdateAppointQuestion([FromBody] RetirementQuestionAppointRequest req, Guid id)
|
||||
{
|
||||
var uppdated = await _context.RetirementQuestions.AsQueryable()
|
||||
.FirstOrDefaultAsync(x => x.Id == id);
|
||||
if (uppdated == null)
|
||||
return Error(GlobalMessages.RetirementQuestionNotFound);
|
||||
|
||||
uppdated.AppointDate = req.AppointDate;
|
||||
uppdated.LastUpdateFullName = FullName ?? "System Administrator";
|
||||
uppdated.LastUpdateUserId = UserId ?? "";
|
||||
uppdated.LastUpdatedAt = DateTime.Now;
|
||||
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return Success();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue