ต่อ api บุคคลที่สามารถติดต่อได้

This commit is contained in:
Kittapath 2023-10-06 01:28:37 +07:00
parent 20b031c29f
commit b8f12139e1
11 changed files with 3384 additions and 64 deletions

View file

@ -197,6 +197,33 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
}
}
/// <summary>
/// ข้อมูล บุคคลที่สามารถติดต่อได้
/// </summary>
/// <param name="examId">รหัสรอบสมัคร</param>
/// <param name="positionId">Id ตำแหน่งสมัครสอบ</param>
/// <returns></returns>
/// <response code="200">เมื่อทำการดึง ข้อมูล บุคคลที่สามารถติดต่อได้ สำเร็จ</response>
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
[HttpGet("contact/{examId:length(36)}/{positionId:length(36)}")]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
public async Task<ActionResult<ResponseObject>> GetsAsyncContact(string examId, string positionId)
{
try
{
var items = await _candidateService.GetsAsyncContact(examId, positionId);
return Success(items);
}
catch (Exception ex)
{
return Error(ex);
}
}
/// <summary>
/// ข้อมูล ประวัติการทำงาน/ฝึกงาน ผู้สมัคร
/// </summary>
@ -445,6 +472,34 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
}
}
/// <summary>
/// อัพเดทข้อมูล บุคคลที่สามารถติดต่อได้
/// </summary>
/// <param name="examId">รหัสรอบสมัคร</param>
/// <param name="positionId">Id ตำแหน่งสมัครสอบ</param>
/// <param name="candidateContact">อาชีพ</param>
/// <returns></returns>
/// <response code="200">เมื่อทำการอัพเดทข้อมูล บุคคลที่สามารถติดต่อได้ สำเร็จ</response>
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
[HttpPost("contact/{examId:length(36)}/{positionId:length(36)}")]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
public async Task<ActionResult<ResponseObject>> UpdateAsyncContact(string examId, string positionId, CandidateContactResponseItem candidateContact)
{
try
{
await _candidateService.UpdateAsyncContact(examId, positionId, candidateContact);
return Success();
}
catch (Exception ex)
{
return Error(ex);
}
}
/// <summary>
/// สร้างข้อมูล ประวัติการทำงาน/ฝึกงาน ผู้สมัคร
/// </summary>