diff --git a/Controllers/CandidateController.cs b/Controllers/CandidateController.cs
index 8c4c0c6..a7fb576 100644
--- a/Controllers/CandidateController.cs
+++ b/Controllers/CandidateController.cs
@@ -643,7 +643,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
/// เมื่อเจ้าหน้าที่ตรวจการชำระเงินสำเร็จ
/// ไม่ได้ Login เข้าระบบ
/// เมื่อเกิดข้อผิดพลาดในการทำงาน
- [HttpGet("pass-register/{candidate:length(36)}")]
+ [HttpPut("check-payment/{candidate:length(36)}")]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
diff --git a/Controllers/PeriodExamController.cs b/Controllers/PeriodExamController.cs
index 11f9ed0..91730b9 100644
--- a/Controllers/PeriodExamController.cs
+++ b/Controllers/PeriodExamController.cs
@@ -162,6 +162,84 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
}
}
+ // ///
+ // /// รายชื่อผู้สมัครสอบรอ ตรวจสอบคุณสมบัติ
+ // ///
+ // /// รหัสรอบสมัคร
+ // ///
+ // /// เมื่อทำการอ่านรายชื่อผู้สมัครสอบรอ ตรวจสอบคุณสมบัติสำเร็จ
+ // /// ไม่ได้ Login เข้าระบบ
+ // /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ // [HttpGet("register/{examId:length(36)}")]
+ // [ProducesResponseType(StatusCodes.Status200OK)]
+ // [ProducesResponseType(StatusCodes.Status401Unauthorized)]
+ // [ProducesResponseType(StatusCodes.Status500InternalServerError)]
+ // public async Task> GetsCandidateCheckRegisterAsync(string examId)
+ // {
+ // try
+ // {
+ // var items = await _periodExamService.GetsCandidateByStatusAsync(examId, "checkRegister");
+
+ // return Success(items);
+ // }
+ // catch (Exception ex)
+ // {
+ // return Error(ex);
+ // }
+ // }
+
+ // ///
+ // /// รายชื่อผู้สมัครสอบรอ ตรวจสอบการชำระเงิน
+ // ///
+ // /// รหัสรอบสมัคร
+ // ///
+ // /// เมื่อทำการอ่านรายชื่อผู้สมัครสอบรอ ตรวจสอบการชำระเงินสำเร็จ
+ // /// ไม่ได้ Login เข้าระบบ
+ // /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ // [HttpGet("payment/{examId:length(36)}")]
+ // [ProducesResponseType(StatusCodes.Status200OK)]
+ // [ProducesResponseType(StatusCodes.Status401Unauthorized)]
+ // [ProducesResponseType(StatusCodes.Status500InternalServerError)]
+ // public async Task> GetsCandidateCheckPaymentAsync(string examId)
+ // {
+ // try
+ // {
+ // var items = await _periodExamService.GetsCandidateByStatusAsync(examId, "checkPayment");
+
+ // return Success(items);
+ // }
+ // catch (Exception ex)
+ // {
+ // return Error(ex);
+ // }
+ // }
+
+ // ///
+ // /// รายชื่อผู้สมัครสอบรอ จัดการเลขที่นั่งสอบ
+ // ///
+ // /// รหัสรอบสมัคร
+ // ///
+ // /// เมื่อทำการอ่านรายชื่อผู้สมัครสอบรอ จัดการเลขที่นั่งสอบสำเร็จ
+ // /// ไม่ได้ Login เข้าระบบ
+ // /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ // [HttpGet("seat/{examId:length(36)}")]
+ // [ProducesResponseType(StatusCodes.Status200OK)]
+ // [ProducesResponseType(StatusCodes.Status401Unauthorized)]
+ // [ProducesResponseType(StatusCodes.Status500InternalServerError)]
+ // public async Task> GetsCandidateCheckSeatAsync(string examId)
+ // {
+ // try
+ // {
+ // var items = await _periodExamService.GetsCandidateByStatusAsync(examId, "checkSeat");
+
+ // return Success(items);
+ // }
+ // catch (Exception ex)
+ // {
+ // return Error(ex);
+ // }
+ // }
+
///
/// รายชื่อผู้สมัครสอบรอ ตรวจสอบคุณสมบัติ
///
@@ -170,67 +248,15 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
/// เมื่อทำการอ่านรายชื่อผู้สมัครสอบรอ ตรวจสอบคุณสมบัติสำเร็จ
/// ไม่ได้ Login เข้าระบบ
/// เมื่อเกิดข้อผิดพลาดในการทำงาน
- [HttpGet("register/{examId:length(36)}")]
+ [HttpGet("{status}/{examId:length(36)}")]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
- public async Task> GetsCandidateCheckRegisterAsync(string examId)
+ public async Task> GetsCandidateStatusAsync(string status, string examId)
{
try
{
- var items = await _periodExamService.GetsCandidateByStatusAsync(examId, "checkRegister");
-
- return Success(items);
- }
- catch (Exception ex)
- {
- return Error(ex);
- }
- }
-
- ///
- /// รายชื่อผู้สมัครสอบรอ ตรวจสอบการชำระเงิน
- ///
- /// รหัสรอบสมัคร
- ///
- /// เมื่อทำการอ่านรายชื่อผู้สมัครสอบรอ ตรวจสอบการชำระเงินสำเร็จ
- /// ไม่ได้ Login เข้าระบบ
- /// เมื่อเกิดข้อผิดพลาดในการทำงาน
- [HttpGet("payment/{examId:length(36)}")]
- [ProducesResponseType(StatusCodes.Status200OK)]
- [ProducesResponseType(StatusCodes.Status401Unauthorized)]
- [ProducesResponseType(StatusCodes.Status500InternalServerError)]
- public async Task> GetsCandidateCheckPaymentAsync(string examId)
- {
- try
- {
- var items = await _periodExamService.GetsCandidateByStatusAsync(examId, "checkPayment");
-
- return Success(items);
- }
- catch (Exception ex)
- {
- return Error(ex);
- }
- }
-
- ///
- /// รายชื่อผู้สมัครสอบรอ จัดการเลขที่นั่งสอบ
- ///
- /// รหัสรอบสมัคร
- ///
- /// เมื่อทำการอ่านรายชื่อผู้สมัครสอบรอ จัดการเลขที่นั่งสอบสำเร็จ
- /// ไม่ได้ Login เข้าระบบ
- /// เมื่อเกิดข้อผิดพลาดในการทำงาน
- [HttpGet("seat/{examId:length(36)}")]
- [ProducesResponseType(StatusCodes.Status200OK)]
- [ProducesResponseType(StatusCodes.Status401Unauthorized)]
- [ProducesResponseType(StatusCodes.Status500InternalServerError)]
- public async Task> GetsCandidateCheckSeatAsync(string examId)
- {
- try
- {
- var items = await _periodExamService.GetsCandidateByStatusAsync(examId, "checkSeat");
+ var items = await _periodExamService.GetsCandidateByStatusAsync(examId, status);
return Success(items);
}
diff --git a/Services/CandidateService.cs b/Services/CandidateService.cs
index 6d6bfcb..d326479 100644
--- a/Services/CandidateService.cs
+++ b/Services/CandidateService.cs
@@ -411,7 +411,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
}
candidate.RegistAddress = updated.RegistAddress;
- candidate.RegistSame = updated.RegistSame;
+ candidate.RegistSame = updated.RegistSame == null ? null : updated.RegistSame;
candidate.CurrentAddress = updated.CurrentAddress;
await _context.SaveChangesAsync();
@@ -457,7 +457,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
candidate.MotherPrefix = prefix;
}
- candidate.Marry = updated.Marry;
+ candidate.Marry = updated.Marry == null ? null : updated.Marry;
candidate.MarryFirstName = updated.MarryFirstName;
candidate.MarryLastName = updated.MarryLastName;
candidate.MarryOccupation = updated.MarryOccupation;