1492 lines
75 KiB
C#
1492 lines
75 KiB
C#
// using BMA.EHR.Core;
|
|
using BMA.EHR.Recurit.Exam.Service.Core;
|
|
using BMA.EHR.Recurit.Exam.Service.Request;
|
|
using BMA.EHR.Recurit.Exam.Service.Response;
|
|
using BMA.EHR.Recurit.Exam.Service.Services;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Swashbuckle.AspNetCore.Annotations;
|
|
|
|
namespace BMA.EHR.Recurit.Exam.Service.Controllers
|
|
{
|
|
[Route("api/v{version:apiVersion}/candidate")]
|
|
[ApiVersion("1.0")]
|
|
[ApiController]
|
|
[Produces("application/json")]
|
|
[Authorize]
|
|
[SwaggerTag("จัดการข้อมูลสมัครสอบ เพื่อนำไปใช้งานในระบบ")]
|
|
public class CandidateController : BaseController
|
|
{
|
|
#region " Fields "
|
|
|
|
private readonly CandidateService _candidateService;
|
|
private readonly MinIOService _minioService;
|
|
#endregion
|
|
|
|
#region " Constructor and Destructor "
|
|
|
|
public CandidateController(CandidateService candidateService,
|
|
MinIOService minioService)
|
|
{
|
|
_candidateService = candidateService;
|
|
_minioService = minioService;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region " Methods "
|
|
|
|
/// <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("status/{examId:length(36)}/{positionId:length(36)}")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> GetStatusCandidateService(string examId, string positionId)
|
|
{
|
|
try
|
|
{
|
|
var item = await _candidateService.GetStatusCandidateService(examId, positionId);
|
|
|
|
return Success(item);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// ข้อมูลผู้สมัครสอบ
|
|
/// </summary>
|
|
/// <param name="candidateId">Id ผู้สมัคร</param>
|
|
/// <returns></returns>
|
|
/// <response code="200">เมื่อทำการดึง ข้อมูลผู้สมัคร สำเร็จ</response>
|
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
|
[HttpGet("{candidateId:length(36)}")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> GetsAsync(string candidateId)
|
|
{
|
|
try
|
|
{
|
|
var items = await _candidateService.GetsAsync(candidateId);
|
|
|
|
return Success(items);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <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("information/{examId:length(36)}/{positionId:length(36)}")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> GetsAsyncInformation(string examId, string positionId)
|
|
{
|
|
try
|
|
{
|
|
var items = await _candidateService.GetsAsyncInformation(examId, positionId);
|
|
|
|
return Success(items);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <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("address/{examId:length(36)}/{positionId:length(36)}")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> GetsAsyncAddress(string examId, string positionId)
|
|
{
|
|
try
|
|
{
|
|
var items = await _candidateService.GetsAsyncAddress(examId, positionId);
|
|
|
|
return Success(items);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <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("family/{examId:length(36)}/{positionId:length(36)}")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> GetsAsyncFamily(string examId, string positionId)
|
|
{
|
|
try
|
|
{
|
|
var items = await _candidateService.GetsAsyncFamily(examId, positionId);
|
|
|
|
return Success(items);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <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("occupation/{examId:length(36)}/{positionId:length(36)}")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> GetsAsyncOccupation(string examId, string positionId)
|
|
{
|
|
try
|
|
{
|
|
var items = await _candidateService.GetsAsyncOccupation(examId, positionId);
|
|
|
|
return Success(items);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <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>
|
|
/// <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("career/{examId:length(36)}/{positionId:length(36)}")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> GetsAsyncCareer(string examId, string positionId)
|
|
{
|
|
try
|
|
{
|
|
var items = await _candidateService.GetsAsyncCareer(examId, positionId);
|
|
|
|
return Success(items);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <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("education/{examId:length(36)}/{positionId:length(36)}")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> GetsAsyncEducation(string examId, string positionId)
|
|
{
|
|
try
|
|
{
|
|
var items = await _candidateService.GetsAsyncEducation(examId, positionId);
|
|
|
|
return Success(items);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <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("check/{examId:length(36)}/{positionId:length(36)}")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> GetsAsyncRegisterExam(Guid examId, Guid positionId)
|
|
{
|
|
try
|
|
{
|
|
var items = await _candidateService.GetsAsyncRegisterExam(examId, positionId);
|
|
|
|
return Success(items);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// อัพเดทข้อมูล ข้อมูลส่วนตัว ผู้สมัคร
|
|
/// </summary>
|
|
/// <param name="examId">รหัสรอบสมัคร</param>
|
|
/// <param name="positionId">Id ตำแหน่งสมัครสอบ</param>
|
|
/// <param name="candidateInformation">ข้อมูลส่วนตัว</param>
|
|
/// <returns></returns>
|
|
/// <response code="200">เมื่อทำการอัพเดทข้อมูล ข้อมูลส่วนตัว ผู้สมัคร สำเร็จ</response>
|
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
|
[HttpPost("{examId:length(36)}/{positionId:length(36)}")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> UpdateAsync(string examId, string positionId, CandidateResponseItem candidateInformation)
|
|
{
|
|
try
|
|
{
|
|
await _candidateService.UpdateAsync(examId, positionId, candidateInformation);
|
|
|
|
return Success();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// อัพเดทข้อมูล ข้อมูลส่วนตัว ผู้สมัคร
|
|
/// </summary>
|
|
/// <param name="candidateId">รหัสผู้สมัคร</param>
|
|
/// <param name="candidateInformation">ข้อมูลส่วนตัว</param>
|
|
/// <returns></returns>
|
|
/// <response code="200">เมื่อทำการอัพเดทข้อมูล ข้อมูลส่วนตัว ผู้สมัคร สำเร็จ</response>
|
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
|
[HttpPost("{candidateId:length(36)}")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> UpdateAdminAsync(string candidateId, CandidateResponseItem candidateInformation)
|
|
{
|
|
try
|
|
{
|
|
await _candidateService.UpdateAdminAsync(candidateId, candidateInformation);
|
|
|
|
return Success();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// อัพเดทข้อมูล ข้อมูลส่วนตัว ผู้สมัคร
|
|
/// </summary>
|
|
/// <param name="examId">รหัสรอบสมัคร</param>
|
|
/// <param name="positionId">Id ตำแหน่งสมัครสอบ</param>
|
|
/// <param name="candidateInformation">ข้อมูลส่วนตัว</param>
|
|
/// <returns></returns>
|
|
/// <response code="200">เมื่อทำการอัพเดทข้อมูล ข้อมูลส่วนตัว ผู้สมัคร สำเร็จ</response>
|
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
|
[HttpPost("information/{examId:length(36)}/{positionId:length(36)}")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> UpdateAsyncInformation(string examId, string positionId, CandidateInformationResponseItem candidateInformation)
|
|
{
|
|
try
|
|
{
|
|
await _candidateService.UpdateAsyncInformation(examId, positionId, candidateInformation);
|
|
|
|
return Success();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// อัพเดทข้อมูล ข้อมูลที่อยู่ ผู้สมัคร
|
|
/// </summary>
|
|
/// <param name="examId">รหัสรอบสมัคร</param>
|
|
/// <param name="positionId">Id ตำแหน่งสมัครสอบ</param>
|
|
/// <param name="candidateAddress">ข้อมูลที่อยู่</param>
|
|
/// <returns></returns>
|
|
/// <response code="200">เมื่อทำการอัพเดทข้อมูล ข้อมูลที่อยู่ ผู้สมัคร สำเร็จ</response>
|
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
|
[HttpPost("address/{examId:length(36)}/{positionId:length(36)}")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> UpdateAsyncAddress(string examId, string positionId, CandidateAddressResponseItem candidateAddress)
|
|
{
|
|
try
|
|
{
|
|
await _candidateService.UpdateAsyncAddress(examId, positionId, candidateAddress);
|
|
|
|
return Success();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// อัพเดทข้อมูล ข้อมูลครอบครัว ผู้สมัคร
|
|
/// </summary>
|
|
/// <param name="examId">รหัสรอบสมัคร</param>
|
|
/// <param name="positionId">Id ตำแหน่งสมัครสอบ</param>
|
|
/// <param name="candidateFamily">ข้อมูลครอบครัว</param>
|
|
/// <returns></returns>
|
|
/// <response code="200">เมื่อทำการอัพเดทข้อมูล ข้อมูลครอบครัว ผู้สมัคร สำเร็จ</response>
|
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
|
[HttpPost("family/{examId:length(36)}/{positionId:length(36)}")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> UpdateAsyncFamily(string examId, string positionId, CandidateFamilyResponseItem candidateFamily)
|
|
{
|
|
try
|
|
{
|
|
await _candidateService.UpdateAsyncFamily(examId, positionId, candidateFamily);
|
|
|
|
return Success();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// อัพเดทข้อมูล อาชีพ ผู้สมัคร
|
|
/// </summary>
|
|
/// <param name="examId">รหัสรอบสมัคร</param>
|
|
/// <param name="positionId">Id ตำแหน่งสมัครสอบ</param>
|
|
/// <param name="candidateOccupation">อาชีพ</param>
|
|
/// <returns></returns>
|
|
/// <response code="200">เมื่อทำการอัพเดทข้อมูล อาชีพ ผู้สมัคร สำเร็จ</response>
|
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
|
[HttpPost("occupation/{examId:length(36)}/{positionId:length(36)}")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> UpdateAsyncOccupation(string examId, string positionId, CandidateOccupationResponseItem candidateOccupation)
|
|
{
|
|
try
|
|
{
|
|
await _candidateService.UpdateAsyncOccupation(examId, positionId, candidateOccupation);
|
|
|
|
return Success();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <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>
|
|
/// <param name="examId">รหัสรอบสมัคร</param>
|
|
/// <param name="positionId">Id ตำแหน่งสมัครสอบ</param>
|
|
/// <param name="candidateCareer">ข้อมูลประวัติการทำงาน/ฝึกงาน</param>
|
|
/// <returns></returns>
|
|
/// <response code="200">เมื่อทำการสร้างข้อมูล ประวัติการทำงาน/ฝึกงาน ผู้สมัคร สำเร็จ</response>
|
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
|
[HttpPost("career/{examId:length(36)}/{positionId:length(36)}")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> CreateAsyncCareer(string examId, string positionId, CandidateCareerResponseItem candidateCareer)
|
|
{
|
|
try
|
|
{
|
|
await _candidateService.CreateAsyncCareer(examId, positionId, candidateCareer);
|
|
|
|
return Success();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// อัพเดทข้อมูล ประวัติการทำงาน/ฝึกงาน ผู้สมัคร
|
|
/// </summary>
|
|
/// <param name="careerId">รหัสประวัติการทำงาน/ฝึกงาน</param>
|
|
/// <param name="candidateCareer">ข้อมูลประวัติการทำงาน/ฝึกงาน</param>
|
|
/// <returns></returns>
|
|
/// <response code="200">เมื่อทำการอัพเดทข้อมูล ประวัติการทำงาน/ฝึกงาน ผู้สมัคร สำเร็จ</response>
|
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
|
[HttpPut("career/{careerId:length(36)}")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> UpdateAsyncCareer(string careerId, CandidateCareerResponseItem candidateCareer)
|
|
{
|
|
try
|
|
{
|
|
await _candidateService.UpdateAsyncCareer(careerId, candidateCareer);
|
|
|
|
return Success();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// ลบข้อมูล ประวัติการทำงาน/ฝึกงาน ผู้สมัคร
|
|
/// </summary>
|
|
/// <param name="careerId">รหัสประวัติการทำงาน/ฝึกงาน</param>
|
|
/// <param name="candidateCareer">ข้อมูลประวัติการทำงาน/ฝึกงาน</param>
|
|
/// <returns></returns>
|
|
/// <response code="200">เมื่อทำการลบข้อมูล ประวัติการทำงาน/ฝึกงาน ผู้สมัคร สำเร็จ</response>
|
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
|
[HttpDelete("career/{careerId:length(36)}")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> UpdateAsyncCareer(string careerId)
|
|
{
|
|
try
|
|
{
|
|
await _candidateService.DeleteAsyncCareer(careerId);
|
|
|
|
return Success();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// สร้างข้อมูล ประวัติการศีกษา ผู้สมัคร
|
|
/// </summary>
|
|
/// <param name="examId">รหัสรอบสมัคร</param>
|
|
/// <param name="positionId">Id ตำแหน่งสมัครสอบ</param>
|
|
/// <param name="candidateEducation">ข้อมูลประวัติการศีกษา</param>
|
|
/// <returns></returns>
|
|
/// <response code="200">เมื่อทำการสร้างข้อมูล ประวัติการศีกษา ผู้สมัคร สำเร็จ</response>
|
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
|
[HttpPost("education/{examId:length(36)}/{positionId:length(36)}")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> CreateAsyncEducation(string examId, string positionId, CandidateEducationResponseItem candidateEducation)
|
|
{
|
|
try
|
|
{
|
|
await _candidateService.CreateAsyncEducation(examId, positionId, candidateEducation);
|
|
|
|
return Success();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
// /// <summary>
|
|
// /// อัพเดทข้อมูล ประวัติการศีกษา ผู้สมัคร
|
|
// /// </summary>
|
|
// /// <param name="educationId">รหัสประวัติการศีกษา</param>
|
|
// /// <param name="candidateEducation">ข้อมูลประวัติการศีกษา</param>
|
|
// /// <returns></returns>
|
|
// /// <response code="200">เมื่อทำการอัพเดทข้อมูล ประวัติการศีกษา ผู้สมัคร สำเร็จ</response>
|
|
// /// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
|
// /// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
|
// [HttpPut("education/{educationId:length(36)}")]
|
|
// [ProducesResponseType(StatusCodes.Status200OK)]
|
|
// [ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
// [ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
// public async Task<ActionResult<ResponseObject>> UpdateAsyncEducation(string educationId, CandidateEducationResponseItem candidateEducation)
|
|
// {
|
|
// try
|
|
// {
|
|
// await _candidateService.UpdateAsyncEducation(educationId, candidateEducation);
|
|
|
|
// return Success();
|
|
// }
|
|
// catch (Exception ex)
|
|
// {
|
|
// return Error(ex);
|
|
// }
|
|
// }
|
|
|
|
/// <summary>
|
|
/// ลบข้อมูล ประวัติการศีกษา ผู้สมัคร
|
|
/// </summary>
|
|
/// <param name="educationId">รหัสประวัติการศีกษา</param>
|
|
/// <param name="candidateEducation">ข้อมูลประวัติการศีกษา</param>
|
|
/// <returns></returns>
|
|
/// <response code="200">เมื่อทำการลบข้อมูล ประวัติการศีกษา ผู้สมัคร สำเร็จ</response>
|
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
|
[HttpDelete("education/{educationId:length(36)}")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> DeleteAsyncEducation(string educationId)
|
|
{
|
|
try
|
|
{
|
|
await _candidateService.DeleteAsyncEducation(educationId);
|
|
|
|
return Success();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// สร้างข้อมูล ประวัติการทำงาน/ฝึกงาน ผู้สมัคร
|
|
/// </summary>
|
|
/// <param name="candidateId">รหัสผู้สมัคร</param>
|
|
/// <param name="candidateCareer">ข้อมูลประวัติการทำงาน/ฝึกงาน</param>
|
|
/// <returns></returns>
|
|
/// <response code="200">เมื่อทำการสร้างข้อมูล ประวัติการทำงาน/ฝึกงาน ผู้สมัคร สำเร็จ</response>
|
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
|
[HttpPost("career/{candidateId:length(36)}")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> CreateAsyncAdminCareer(string candidateId, CandidateCareerResponseItem candidateCareer)
|
|
{
|
|
try
|
|
{
|
|
await _candidateService.CreateAsyncAdminCareer(candidateId, candidateCareer);
|
|
|
|
return Success();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// สร้างข้อมูล ประวัติการศีกษา ผู้สมัคร
|
|
/// </summary>
|
|
/// <param name="candidateId">รหัสผู้สมัคร</param>
|
|
/// <param name="candidateEducation">ข้อมูลประวัติการศีกษา</param>
|
|
/// <returns></returns>
|
|
/// <response code="200">เมื่อทำการสร้างข้อมูล ประวัติการศีกษา ผู้สมัคร สำเร็จ</response>
|
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
|
[HttpPost("education/{candidateId:length(36)}")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> CreateAsyncAdminEducation(string candidateId, CandidateEducationResponseItem candidateEducation)
|
|
{
|
|
try
|
|
{
|
|
await _candidateService.CreateAsyncAdminEducation(candidateId, candidateEducation);
|
|
|
|
return Success();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <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("register/{examId:length(36)}/{positionId:length(36)}")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> RegisterCandidateService(string examId, string positionId)
|
|
{
|
|
try
|
|
{
|
|
await _candidateService.UserCheckCandidateService(examId, positionId, "checkRegister");
|
|
|
|
return Success();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// เจ้าหน้าที่ตรวจคุณสมบัติผู้สมัคร
|
|
/// </summary>
|
|
/// <param name="candidateId">รหัสใบสมัคร</param>
|
|
/// <returns></returns>
|
|
/// <response code="200">เมื่อเจ้าหน้าที่ตรวจคุณสมบัติผู้สมัครสำเร็จ</response>
|
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
|
[HttpPut("check-register/{candidateId:length(36)}")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> CheckRegisterCandidateService(string candidateId, RequestApprove item)
|
|
{
|
|
try
|
|
{
|
|
await _candidateService.AdminCheckCandidateService(candidateId, item.Status ? "payment" : "rejectRegister", item);
|
|
|
|
return Success();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// เจ้าหน้าที่ตรวจคุณสมบัติผู้สมัครหลายคน
|
|
/// </summary>
|
|
/// <param name="candidateId">รหัสใบสมัคร</param>
|
|
/// <returns></returns>
|
|
/// <response code="200">เมื่อเจ้าหน้าที่ตรวจคุณสมบัติผู้สมัครสำเร็จ</response>
|
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
|
[HttpPost("check-registers")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> CheckRegistersCandidateService(RequestApproves item)
|
|
{
|
|
try
|
|
{
|
|
var _item = new RequestApprove();
|
|
|
|
if (item.CandidateId != null)
|
|
{
|
|
await _candidateService.AdminCheckCandidatesService(item.CandidateId);
|
|
}
|
|
|
|
return Success();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// เจ้าหน้าที่ตรวจคุณสมบัติผู้สมัครไม่ผ่านและให้สมัครใหม่
|
|
/// </summary>
|
|
/// <param name="candidateId">รหัสใบสมัคร</param>
|
|
/// <returns></returns>
|
|
/// <response code="200">เมื่อเจ้าหน้าที่ตรวจคุณสมบัติผู้สมัครไม่ผ่านและให้สมัครใหม่สำเร็จ</response>
|
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
|
[HttpPut("reject-register/{candidateId:length(36)}")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> RejectRegisterCandidateService(string candidateId, RequestApprove item)
|
|
{
|
|
try
|
|
{
|
|
await _candidateService.AdminCheckCandidateService(candidateId, "rejectDelete", item);
|
|
|
|
return Success();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// เจ้าหน้าที่ตรวจการชำระเงิน
|
|
/// </summary>
|
|
/// <param name="candidateId">รหัสใบสมัคร</param>
|
|
/// <returns></returns>
|
|
/// <response code="200">เมื่อเจ้าหน้าที่ตรวจการชำระเงินสำเร็จ</response>
|
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
|
[HttpPut("check-payment/{candidateId:length(36)}")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> CheckPaymentCandidateService(string candidateId, RequestApprove item)
|
|
{
|
|
try
|
|
{
|
|
await _candidateService.AdminCheckCandidateService(candidateId, item.Status ? "checkSeat" : "rejectPayment", item);
|
|
|
|
return Success();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// เจ้าหน้าที่บันทึกสถานที่สอบ
|
|
/// </summary>
|
|
/// <param name="candidateId">รหัสใบสมัคร</param>
|
|
/// <returns></returns>
|
|
/// <response code="200">เมื่อเจ้าหน้าที่บันทึกสถานที่สอบสำเร็จ</response>
|
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
|
[HttpGet("pass-seat/{candidateId:length(36)}")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> CheckCheckSeatCandidateService(string candidateId)
|
|
{
|
|
try
|
|
{
|
|
await _candidateService.AdminPassCandidateService(candidateId, "checkPoint");
|
|
|
|
return Success();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// เจ้าหน้าที่บันทึกคะแนนสอบ
|
|
/// </summary>
|
|
/// <param name="candidateId">รหัสใบสมัคร</param>
|
|
/// <returns></returns>
|
|
/// <response code="200">เมื่อเจ้าหน้าที่บันทึกคะแนนสอบสำเร็จ</response>
|
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
|
[HttpGet("pass-point/{candidateId:length(36)}")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> CheckPointCandidateService(string candidateId)
|
|
{
|
|
try
|
|
{
|
|
await _candidateService.AdminPassCandidateService(candidateId, "done");
|
|
|
|
return Success();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// get id รูปถ่าย
|
|
/// </summary>
|
|
/// <param name="examId">รหัสรอบสมัคร</param>
|
|
/// <param name="positionId">Id ตำแหน่งสมัครสอบ</param>
|
|
/// <returns></returns>
|
|
/// <response code="200">เมื่อ get id รูปถ่ายสำเร็จ</response>
|
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
|
[HttpGet("profile-image/{examId:length(36)}/{positionId:length(36)}")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> GetsAsyncProfileImage(string examId, string positionId)
|
|
{
|
|
try
|
|
{
|
|
var path = await _candidateService.GetsAsyncProfileImage(examId, positionId);
|
|
|
|
return Success(GlobalMessages.Success, path);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// get id รูปถ่าย
|
|
/// </summary>
|
|
/// <param name="candidateId">รหัสผู้สมัคร</param>
|
|
/// <returns></returns>
|
|
/// <response code="200">เมื่อ get id รูปถ่ายสำเร็จ</response>
|
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
|
[HttpGet("profile-image/{candidateId:length(36)}")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> GetsAsyncAdminProfileImage(string candidateId)
|
|
{
|
|
try
|
|
{
|
|
var path = await _candidateService.GetsAsyncAdminProfileImage(candidateId);
|
|
|
|
return Success(GlobalMessages.Success, path);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// อัปโหลดรูปถ่ายผู้สมัคร
|
|
/// </summary>
|
|
/// <param name="examId">รหัสรอบสมัคร</param>
|
|
/// <param name="positionId">Id ตำแหน่งสมัครสอบ</param>
|
|
/// <returns></returns>
|
|
/// <response code="200">เมื่ออัปโหลดรูปถ่ายผู้สมัครสำเร็จ</response>
|
|
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
|
[HttpPut("profile-image/{examId:length(36)}/{positionId:length(36)}"), DisableRequestSizeLimit]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status400BadRequest)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
[AllowAnonymous]
|
|
public async Task<ActionResult<ResponseObject>> UpdateProfileImageCandidateService(string examId, string positionId)
|
|
{
|
|
try
|
|
{
|
|
if (Request.Form.Files == null || Request.Form.Files.Count == 0)
|
|
{
|
|
return Error(GlobalMessages.NoFileToUpload);
|
|
}
|
|
|
|
var file = Request.Form.Files[0];
|
|
await _candidateService.UpdateAsyncProfileImage(examId, positionId, file);
|
|
|
|
return Success();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// อัปโหลดรูปถ่ายผู้สมัคร
|
|
/// </summary>
|
|
/// <param name="candidateId">รหัสผู้สมัคร</param>
|
|
/// <returns></returns>
|
|
/// <response code="200">เมื่ออัปโหลดรูปถ่ายผู้สมัครสำเร็จ</response>
|
|
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
|
[HttpPut("profile-image/{candidateId:length(36)}"), DisableRequestSizeLimit]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status400BadRequest)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
[AllowAnonymous]
|
|
public async Task<ActionResult<ResponseObject>> UpdateAsyncAdminProfileImage(string candidateId)
|
|
{
|
|
try
|
|
{
|
|
if (Request.Form.Files == null || Request.Form.Files.Count == 0)
|
|
{
|
|
return Error(GlobalMessages.NoFileToUpload);
|
|
}
|
|
|
|
var file = Request.Form.Files[0];
|
|
await _candidateService.UpdateAsyncAdminProfileImage(candidateId, file);
|
|
|
|
return Success();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// get id หลักฐานชำระ
|
|
/// </summary>
|
|
/// <param name="examId">รหัสรอบสมัคร</param>
|
|
/// <param name="positionId">Id ตำแหน่งสมัครสอบ</param>
|
|
/// <returns></returns>
|
|
/// <response code="200">เมื่อ get id หลักฐานชำระสำเร็จ</response>
|
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
|
[HttpGet("payment-image/{examId:length(36)}/{positionId:length(36)}")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> GetsAsyncPaymentImg(string examId, string positionId)
|
|
{
|
|
try
|
|
{
|
|
var path = await _candidateService.GetsAsyncPaymentImg(examId, positionId);
|
|
|
|
return Success(GlobalMessages.Success, path);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// get id หลักฐานชำระ
|
|
/// </summary>
|
|
/// <param name="candidateId">รหัสผู้สมัครสอบ</param>
|
|
/// <returns></returns>
|
|
/// <response code="200">เมื่อ get id หลักฐานชำระสำเร็จ</response>
|
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
|
[HttpGet("payment-image/{candidateId:length(36)}")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> GetsAsyncPaymentImgCandidate(string candidateId)
|
|
{
|
|
try
|
|
{
|
|
var path = await _candidateService.GetsAsyncPaymentImgCandidate(candidateId);
|
|
|
|
return Success(GlobalMessages.Success, path);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <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>
|
|
[HttpPut("payment-image/{examId:length(36)}/{positionId:length(36)}"), DisableRequestSizeLimit]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> UploadPaymentCandidateService(string examId, string positionId)
|
|
{
|
|
try
|
|
{
|
|
if (Request.Form.Files == null || Request.Form.Files.Count == 0)
|
|
{
|
|
return Error(GlobalMessages.NoFileToUpload);
|
|
}
|
|
|
|
var file = Request.Form.Files[0];
|
|
await _candidateService.UpdateAsyncPaymentImage(examId, positionId, file);
|
|
// await _candidateService.UserCheckCandidateService(examId, positionId, "checkPayment");
|
|
|
|
return Success();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <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>
|
|
[HttpPost("payment-image/{examId:length(36)}/{positionId:length(36)}"), DisableRequestSizeLimit]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> ConfirmPaymentCandidateService(string examId, string positionId)
|
|
{
|
|
try
|
|
{
|
|
// if (Request.Form.Files == null || Request.Form.Files.Count == 0)
|
|
// {
|
|
// return Error(GlobalMessages.NoFileToUpload);
|
|
// }
|
|
|
|
// var file = Request.Form.Files[0];
|
|
// await _candidateService.UpdateAsyncPaymentImage(examId, positionId, file);
|
|
await _candidateService.UserCheckCandidateService(examId, positionId, "checkPayment");
|
|
|
|
return Success();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// list เอกสารหลักฐาน
|
|
/// </summary>
|
|
/// <param name="examId">รหัสรอบสมัคร</param>
|
|
/// <param name="positionId">Id ตำแหน่งสมัครสอบ</param>
|
|
/// <returns></returns>
|
|
/// <response code="200">เมื่อ list เอกสารหลักฐานสำเร็จ</response>
|
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
|
[HttpGet("upload/{examId:length(36)}/{positionId:length(36)}")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> GetFileCandidateService(string examId, string positionId)
|
|
{
|
|
try
|
|
{
|
|
var doc = await _candidateService.GetsAsyncFileUpload(examId, positionId);
|
|
|
|
return Success(doc);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <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>
|
|
[HttpPut("upload/{examId:length(36)}/{positionId:length(36)}"), DisableRequestSizeLimit]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> CreateFileCandidateService(string examId, string positionId)
|
|
{
|
|
try
|
|
{
|
|
if (Request.Form.Files == null || Request.Form.Files.Count == 0)
|
|
{
|
|
return Error(GlobalMessages.NoFileToUpload);
|
|
}
|
|
|
|
var file = Request.Form.Files[0];
|
|
await _candidateService.UpdateAsyncDocument(examId, positionId, file);
|
|
|
|
return Success();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// ลบเอกสารหลักฐาน
|
|
/// </summary>
|
|
/// <param name="examId">รหัสรอบสมัคร</param>
|
|
/// <param name="positionId">Id ตำแหน่งสมัครสอบ</param>
|
|
/// <param name="documentId">รหัสไฟล์เอกสาร</param>
|
|
/// <returns></returns>
|
|
/// <response code="200">เมื่อลบเอกสารหลักฐานสำเร็จ</response>
|
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
|
[HttpDelete("upload/{examId:length(36)}/{positionId:length(36)}"), DisableRequestSizeLimit]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> DeleteFileCandidateService(string examId, string positionId, string documentId)
|
|
{
|
|
try
|
|
{
|
|
await _candidateService.DeleteAsyncDocument(examId, positionId, documentId);
|
|
return Success();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// list เอกสารหลักฐาน
|
|
/// </summary>
|
|
/// <param name="candidateId">รหัสผู้สมัคร</param>
|
|
/// <returns></returns>
|
|
/// <response code="200">เมื่อ list เอกสารหลักฐานสำเร็จ</response>
|
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
|
[HttpGet("upload/{candidateId:length(36)}")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> GetsAsyncAdminFileUpload(string candidateId)
|
|
{
|
|
try
|
|
{
|
|
var doc = await _candidateService.GetsAsyncAdminFileUpload(candidateId);
|
|
|
|
return Success(doc);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// อัปโหลดเอกสารหลักฐาน
|
|
/// </summary>
|
|
/// <param name="candidateId">รหัสผู้สมัคร</param>
|
|
/// <returns></returns>
|
|
/// <response code="200">เมื่ออัปโหลดเอกสารหลักฐานสำเร็จ</response>
|
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
|
[HttpPut("upload/{candidateId:length(36)}"), DisableRequestSizeLimit]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> UpdateAsyncAdminDocument(string candidateId)
|
|
{
|
|
try
|
|
{
|
|
if (Request.Form.Files == null || Request.Form.Files.Count == 0)
|
|
{
|
|
return Error(GlobalMessages.NoFileToUpload);
|
|
}
|
|
|
|
var file = Request.Form.Files[0];
|
|
await _candidateService.UpdateAsyncAdminDocument(candidateId, file);
|
|
|
|
return Success();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// ลบเอกสารหลักฐาน
|
|
/// </summary>
|
|
/// <param name="candidateId">รหัสผู้สมัคร</param>
|
|
/// <param name="documentId">รหัสไฟล์เอกสาร</param>
|
|
/// <returns></returns>
|
|
/// <response code="200">เมื่อลบเอกสารหลักฐานสำเร็จ</response>
|
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
|
[HttpDelete("upload/{candidateId:length(36)}"), DisableRequestSizeLimit]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> DeleteAsyncAdminDocument(string candidateId, string documentId)
|
|
{
|
|
try
|
|
{
|
|
await _candidateService.DeleteAsyncAdminDocument(candidateId, documentId);
|
|
return Success();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// โหลดไฟล์
|
|
/// </summary>
|
|
/// <param name="id">Id ไฟล์ที่ต้องการโหลด</param>
|
|
/// <returns></returns>
|
|
/// <response code="200">เมื่อโหลดไฟล์สำเร็จ</response>
|
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
|
[HttpGet("download/{id:length(36)}")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> DownloadFile(Guid id)
|
|
{
|
|
try
|
|
{
|
|
var file_data = await _minioService.DownloadFileAsync(id);
|
|
Response.Headers["Content-Disposition"] = $"inline; filename={file_data.FileName}";
|
|
var ret = new FileContentResult(file_data.FileContent, file_data.FileType)
|
|
{
|
|
FileDownloadName = file_data.FileName
|
|
};
|
|
|
|
return ret;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <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("card/{examId:length(36)}/{positionId:length(36)}")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> GetsAsyncCardCandidate(string examId, string positionId)
|
|
{
|
|
try
|
|
{
|
|
var items = await _candidateService.GetsAsyncCardCandidate(examId, positionId);
|
|
|
|
return Success(items);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// ใบสมัครสอบ
|
|
/// </summary>
|
|
/// <param name="candidateId">รหัสผู้สมัคร</param>
|
|
/// <returns></returns>
|
|
/// <response code="200">เมื่อทำการใบสมัครสอบ สำเร็จ</response>
|
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
|
[HttpGet("card/{candidateId:length(36)}")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> GetsAsyncAdminCardCandidate(string candidateId)
|
|
{
|
|
try
|
|
{
|
|
var items = await _candidateService.GetsAsyncAdminCardCandidate(candidateId);
|
|
|
|
return Success(items);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <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("bill/{examId:length(36)}/{positionId:length(36)}")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> GetsAsyncBillCandidate(string examId, string positionId)
|
|
{
|
|
try
|
|
{
|
|
var items = await _candidateService.GetsAsyncBillCandidate(examId, positionId);
|
|
|
|
return Success(GlobalMessages.Success, items);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <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>
|
|
[HttpPut("review/{examId:length(36)}/{positionId:length(36)}")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> UpdateReviewAsyncCandidate(string examId, string positionId, RequestReview item)
|
|
{
|
|
try
|
|
{
|
|
await _candidateService.UpdateReviewAsyncCandidate(examId, positionId, item);
|
|
|
|
return Success();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
|
|
/// <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>
|
|
[HttpPut("check/citizen/{examId:length(36)}/{positionId:length(36)}")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
|
public async Task<ActionResult<ResponseObject>> CheckCitizen(string examId, string positionId, RequestCitizen item)
|
|
{
|
|
try
|
|
{
|
|
await _candidateService.CheckCitizen(examId, positionId, item.CitizenId);
|
|
|
|
return Success();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex);
|
|
}
|
|
}
|
|
#endregion
|
|
}
|
|
}
|