import ไฟล์สมัครสอบ
This commit is contained in:
parent
b7e814e0cf
commit
c76f29934b
2 changed files with 22 additions and 20 deletions
|
|
@ -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<CandidateOccupationResponseItem?> GetsAsyncOccupation(string candidateId)
|
||||
{
|
||||
return await _context.Candidates.AsQueryable()
|
||||
|
|
@ -185,13 +187,6 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
})
|
||||
.FirstOrDefaultAsync();
|
||||
}
|
||||
public async Task<IEnumerable<Career?>> GetsAsyncCareer(string candidateId)
|
||||
{
|
||||
return await _context.Careers.AsQueryable()
|
||||
.Where(x => x.Id == Guid.Parse(candidateId))
|
||||
.OrderBy(d => d.DurationStart)
|
||||
.ToListAsync();
|
||||
}
|
||||
|
||||
public async Task<CandidateAddressResponseItem?> GetsAsyncAddress(string candidateId)
|
||||
{
|
||||
|
|
@ -219,6 +214,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
})
|
||||
.FirstOrDefaultAsync();
|
||||
}
|
||||
|
||||
public async Task<CandidateFamilyResponseItem?> GetsAsyncFamily(string candidateId)
|
||||
{
|
||||
return await _context.Candidates.AsQueryable()
|
||||
|
|
@ -247,12 +243,9 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
})
|
||||
.FirstOrDefaultAsync();
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<Education?>> 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<IEnumerable<Career?>> GetsAsyncCareer(string candidateId)
|
||||
{
|
||||
return await _context.Careers.AsQueryable()
|
||||
.Where(x => x.Id == Guid.Parse(candidateId))
|
||||
.OrderBy(d => d.DurationStart)
|
||||
.ToListAsync();
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue