api จัดรอบการสอบ
This commit is contained in:
parent
44d18ff74c
commit
bd0f02feb1
24 changed files with 8532 additions and 33 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using BMA.EHR.Recurit.Exam.Service.Request;
|
||||
using BMA.EHR.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;
|
||||
|
|
@ -50,6 +51,32 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
|
|||
{
|
||||
var items = await _candidateService.GetStatusCandidateService(examId);
|
||||
|
||||
return Success(GlobalMessages.Success, items);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return Error(ex);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ข้อมูลผู้สมัครสอบ
|
||||
/// </summary>
|
||||
/// <param name="examId">รหัสรอบสมัคร</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)
|
||||
|
|
@ -423,6 +450,33 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
|
|||
}
|
||||
}
|
||||
|
||||
/// <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>
|
||||
|
|
@ -432,7 +486,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
|
|||
/// <response code="200">เมื่อทำการอัพเดทข้อมูล ประวัติการศีกษา ผู้สมัคร สำเร็จ</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPut("career/{educationId:length(36)}")]
|
||||
[HttpPut("education/{educationId:length(36)}")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
|
|
@ -450,6 +504,33 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
|
|||
}
|
||||
}
|
||||
|
||||
/// <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>
|
||||
|
|
@ -492,7 +573,33 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
|
|||
{
|
||||
try
|
||||
{
|
||||
await _candidateService.AdminCheckCandidateService(candidate, item.Status ? "payment" : "rejectRegister");
|
||||
await _candidateService.AdminCheckCandidateService(candidate, item.Status ? "payment" : "rejectRegister", item);
|
||||
|
||||
return Success();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return Error(ex);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// เจ้าหน้าที่ตรวจคุณสมบัติผู้สมัครไม่ผ่านและให้สมัครใหม่
|
||||
/// </summary>
|
||||
/// <param name="candidate">รหัสใบสมัคร</param>
|
||||
/// <returns></returns>
|
||||
/// <response code="200">เมื่อเจ้าหน้าที่ตรวจคุณสมบัติผู้สมัครไม่ผ่านและให้สมัครใหม่สำเร็จ</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPut("reject-register/{candidate:length(36)}")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
public async Task<ActionResult<ResponseObject>> RejectRegisterCandidateService(string candidate, RequestApprove item)
|
||||
{
|
||||
try
|
||||
{
|
||||
await _candidateService.AdminCheckCandidateService(candidate, "rejectDelete", item);
|
||||
|
||||
return Success();
|
||||
}
|
||||
|
|
@ -544,7 +651,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
|
|||
{
|
||||
try
|
||||
{
|
||||
await _candidateService.AdminCheckCandidateService(candidate, item.Status ? "pending" : "rejectPayment");
|
||||
await _candidateService.AdminCheckCandidateService(candidate, item.Status ? "checkSeat" : "rejectPayment", item);
|
||||
|
||||
return Success();
|
||||
}
|
||||
|
|
@ -570,7 +677,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
|
|||
{
|
||||
try
|
||||
{
|
||||
await _candidateService.AdminCheckCandidateService(candidate, "done");
|
||||
await _candidateService.AdminPassCandidateService(candidate, "done");
|
||||
|
||||
return Success();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -162,6 +162,84 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// รายชื่อผู้สมัครสอบรอ ตรวจสอบคุณสมบัติ
|
||||
/// </summary>
|
||||
/// <param name="examId">รหัสรอบสมัคร</param>
|
||||
/// <returns></returns>
|
||||
/// <response code="200">เมื่อทำการอ่านรายชื่อผู้สมัครสอบรอ ตรวจสอบคุณสมบัติสำเร็จ</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpGet("register/{examId:length(36)}")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
public async Task<ActionResult<ResponseObject>> GetsCandidateCheckRegisterAsync(string examId)
|
||||
{
|
||||
try
|
||||
{
|
||||
var items = await _periodExamService.GetsCandidateByStatusAsync(examId, "checkRegister");
|
||||
|
||||
return Success(items);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return Error(ex);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// รายชื่อผู้สมัครสอบรอ ตรวจสอบการชำระเงิน
|
||||
/// </summary>
|
||||
/// <param name="examId">รหัสรอบสมัคร</param>
|
||||
/// <returns></returns>
|
||||
/// <response code="200">เมื่อทำการอ่านรายชื่อผู้สมัครสอบรอ ตรวจสอบการชำระเงินสำเร็จ</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpGet("payment/{examId:length(36)}")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
public async Task<ActionResult<ResponseObject>> GetsCandidateCheckPaymentAsync(string examId)
|
||||
{
|
||||
try
|
||||
{
|
||||
var items = await _periodExamService.GetsCandidateByStatusAsync(examId, "checkPayment");
|
||||
|
||||
return Success(items);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return Error(ex);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// รายชื่อผู้สมัครสอบรอ จัดการเลขที่นั่งสอบ
|
||||
/// </summary>
|
||||
/// <param name="examId">รหัสรอบสมัคร</param>
|
||||
/// <returns></returns>
|
||||
/// <response code="200">เมื่อทำการอ่านรายชื่อผู้สมัครสอบรอ จัดการเลขที่นั่งสอบสำเร็จ</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpGet("seat/{examId:length(36)}")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
public async Task<ActionResult<ResponseObject>> GetsCandidateCheckSeatAsync(string examId)
|
||||
{
|
||||
try
|
||||
{
|
||||
var items = await _periodExamService.GetsCandidateByStatusAsync(examId, "checkSeat");
|
||||
|
||||
return Success(items);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return Error(ex);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue