diff --git a/Controllers/PeriodExamController.cs b/Controllers/PeriodExamController.cs
index d070ec5..3ccb5ac 100644
--- a/Controllers/PeriodExamController.cs
+++ b/Controllers/PeriodExamController.cs
@@ -269,7 +269,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
///
/// ข้อมูล ข้อมูลส่วนตัว ผู้สมัคร
///
- /// รหัสรอบสมัคร
+ /// รหัสผู้สมัคร
///
/// เมื่อทำการดึง ข้อมูล ข้อมูลส่วนตัว ผู้สมัคร สำเร็จ
/// ไม่ได้ Login เข้าระบบ
@@ -295,7 +295,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
///
/// ข้อมูล ข้อมูลที่อยู่ ผู้สมัคร
///
- /// รหัสรอบสมัคร
+ /// รหัสผู้สมัคร
///
/// เมื่อทำการดึง ข้อมูล ข้อมูลที่อยู่ ผู้สมัคร สำเร็จ
/// ไม่ได้ Login เข้าระบบ
@@ -321,7 +321,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
///
/// ข้อมูล ข้อมูลครอบครัว ผู้สมัคร
///
- /// รหัสรอบสมัคร
+ /// รหัสผู้สมัคร
///
/// เมื่อทำการดึง ข้อมูล ข้อมูลครอบครัว ผู้สมัคร สำเร็จ
/// ไม่ได้ Login เข้าระบบ
@@ -334,7 +334,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
{
try
{
- var items = await _candidateService.GetsAsyncFamily(candidate);
+ var items = await _periodExamService.GetsAsyncFamily(candidate);
return Success(items);
}
@@ -347,7 +347,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
///
/// ข้อมูล อาชีพ ผู้สมัคร
///
- /// รหัสรอบสมัคร
+ /// รหัสผู้สมัคร
///
/// เมื่อทำการดึง ข้อมูล อาชีพ ผู้สมัคร สำเร็จ
/// ไม่ได้ Login เข้าระบบ
@@ -360,7 +360,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
{
try
{
- var items = await _candidateService.GetsAsyncOccupation(candidate);
+ var items = await _periodExamService.GetsAsyncOccupation(candidate);
return Success(items);
}
@@ -373,7 +373,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
///
/// ข้อมูล ประวัติการทำงาน/ฝึกงาน ผู้สมัคร
///
- /// รหัสรอบสมัคร
+ /// รหัสผู้สมัคร
///
/// เมื่อทำการดึง ข้อมูล ประวัติการทำงาน/ฝึกงาน ผู้สมัคร สำเร็จ
/// ไม่ได้ Login เข้าระบบ
@@ -386,7 +386,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
{
try
{
- var items = await _candidateService.GetsAsyncCareer(candidate);
+ var items = await _periodExamService.GetsAsyncCareer(candidate);
return Success(items);
}
@@ -395,10 +395,11 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
return Error(ex);
}
}
+
///
/// ข้อมูล ประวัติการศีกษา ผู้สมัคร
///
- /// รหัสรอบสมัคร
+ /// รหัสผู้สมัคร
///
/// เมื่อทำการดึง ข้อมูล ประวัติการศีกษา ผู้สมัคร สำเร็จ
/// ไม่ได้ Login เข้าระบบ
diff --git a/Services/PeriodExamService.cs b/Services/PeriodExamService.cs
index a01634c..f99b6b9 100644
--- a/Services/PeriodExamService.cs
+++ b/Services/PeriodExamService.cs
@@ -2,6 +2,7 @@
using BMA.EHR.Recurit.Exam.Service.Core;
using BMA.EHR.Recurit.Exam.Service.Data;
using BMA.EHR.Recurit.Exam.Service.Models;
+using BMA.EHR.Recurit.Exam.Service.Response;
using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Recurit.Exam.Service.Services
@@ -170,6 +171,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
})
.FirstOrDefaultAsync();
}
+
public async Task GetsAsyncOccupation(string candidateId)
{
return await _context.Candidates.AsQueryable()
@@ -185,13 +187,6 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
})
.FirstOrDefaultAsync();
}
- public async Task> GetsAsyncCareer(string candidateId)
- {
- return await _context.Careers.AsQueryable()
- .Where(x => x.Id == Guid.Parse(candidateId))
- .OrderBy(d => d.DurationStart)
- .ToListAsync();
- }
public async Task GetsAsyncAddress(string candidateId)
{
@@ -219,6 +214,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
})
.FirstOrDefaultAsync();
}
+
public async Task GetsAsyncFamily(string candidateId)
{
return await _context.Candidates.AsQueryable()
@@ -247,12 +243,9 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
})
.FirstOrDefaultAsync();
}
+
public async Task> GetsAsyncEducation(string candidateId)
{
-
- var candidate = await _context.Candidates.AsQueryable()
- .FirstOrDefaultAsync(x => x.PeriodExam == exam && x.UserId == UserId);
-
return await _context.Educations.AsQueryable()
.Include(x => x.EducationLevel)
.Where(x => x.Id == Guid.Parse(candidateId))
@@ -260,6 +253,14 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
.ToListAsync();
}
+ public async Task> GetsAsyncCareer(string candidateId)
+ {
+ return await _context.Careers.AsQueryable()
+ .Where(x => x.Id == Guid.Parse(candidateId))
+ .OrderBy(d => d.DurationStart)
+ .ToListAsync();
+ }
+
#endregion
}