get ผู้สมัครสอบตามstatus
This commit is contained in:
parent
bd0f02feb1
commit
db2d92732c
3 changed files with 84 additions and 58 deletions
|
|
@ -643,7 +643,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
|
||||||
/// <response code="200">เมื่อเจ้าหน้าที่ตรวจการชำระเงินสำเร็จ</response>
|
/// <response code="200">เมื่อเจ้าหน้าที่ตรวจการชำระเงินสำเร็จ</response>
|
||||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||||
[HttpGet("pass-register/{candidate:length(36)}")]
|
[HttpPut("check-payment/{candidate:length(36)}")]
|
||||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// รายชื่อผู้สมัครสอบรอ ตรวจสอบคุณสมบัติ
|
/// รายชื่อผู้สมัครสอบรอ ตรวจสอบคุณสมบัติ
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -170,67 +248,15 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
|
||||||
/// <response code="200">เมื่อทำการอ่านรายชื่อผู้สมัครสอบรอ ตรวจสอบคุณสมบัติสำเร็จ</response>
|
/// <response code="200">เมื่อทำการอ่านรายชื่อผู้สมัครสอบรอ ตรวจสอบคุณสมบัติสำเร็จ</response>
|
||||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||||
[HttpGet("register/{examId:length(36)}")]
|
[HttpGet("{status}/{examId:length(36)}")]
|
||||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||||
public async Task<ActionResult<ResponseObject>> GetsCandidateCheckRegisterAsync(string examId)
|
public async Task<ActionResult<ResponseObject>> GetsCandidateStatusAsync(string status, string examId)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var items = await _periodExamService.GetsCandidateByStatusAsync(examId, "checkRegister");
|
var items = await _periodExamService.GetsCandidateByStatusAsync(examId, status);
|
||||||
|
|
||||||
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);
|
return Success(items);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -411,7 +411,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
||||||
}
|
}
|
||||||
|
|
||||||
candidate.RegistAddress = updated.RegistAddress;
|
candidate.RegistAddress = updated.RegistAddress;
|
||||||
candidate.RegistSame = updated.RegistSame;
|
candidate.RegistSame = updated.RegistSame == null ? null : updated.RegistSame;
|
||||||
candidate.CurrentAddress = updated.CurrentAddress;
|
candidate.CurrentAddress = updated.CurrentAddress;
|
||||||
|
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
|
|
@ -457,7 +457,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
||||||
candidate.MotherPrefix = prefix;
|
candidate.MotherPrefix = prefix;
|
||||||
}
|
}
|
||||||
|
|
||||||
candidate.Marry = updated.Marry;
|
candidate.Marry = updated.Marry == null ? null : updated.Marry;
|
||||||
candidate.MarryFirstName = updated.MarryFirstName;
|
candidate.MarryFirstName = updated.MarryFirstName;
|
||||||
candidate.MarryLastName = updated.MarryLastName;
|
candidate.MarryLastName = updated.MarryLastName;
|
||||||
candidate.MarryOccupation = updated.MarryOccupation;
|
candidate.MarryOccupation = updated.MarryOccupation;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue