แสดงรูปหลักฐานชำระ
This commit is contained in:
parent
43898213b2
commit
ab86c20b84
6 changed files with 75 additions and 8 deletions
|
|
@ -492,9 +492,23 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
return candidate.PaymentImg == null ? "" : candidate.PaymentImg.Id.ToString();
|
||||
}
|
||||
|
||||
public async Task<string> GetsAsyncPaymentImgCandidate(string candidateId)
|
||||
{
|
||||
var candidate = await _context.Candidates.AsQueryable()
|
||||
.Include(x => x.PaymentImg)
|
||||
.Where(x => x.Id == Guid.Parse(candidateId))
|
||||
.FirstOrDefaultAsync();
|
||||
|
||||
if (candidate == null)
|
||||
throw new Exception(GlobalMessages.CandidateNotFound);
|
||||
|
||||
return candidate.PaymentImg == null ? "" : candidate.PaymentImg.Id.ToString();
|
||||
}
|
||||
|
||||
public async Task<RequestStatusRegistry> GetsAsyncRegisterExam(string examId, string positionId)
|
||||
{
|
||||
var exam = await _context.PeriodExams.AsQueryable()
|
||||
.Include(x => x.BankExam)
|
||||
.FirstOrDefaultAsync(x => x.Id == Guid.Parse(examId));
|
||||
|
||||
if (exam == null)
|
||||
|
|
@ -503,10 +517,13 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
var candidate = await _context.Candidates.AsQueryable()
|
||||
.FirstOrDefaultAsync(x => x.PeriodExam == exam && x.UserId == UserId);
|
||||
|
||||
var position = await _context.PositionExams.AsQueryable()
|
||||
.FirstOrDefaultAsync(x => x.Id == Guid.Parse(positionId) && x.PeriodExam == exam);
|
||||
|
||||
if (positionId != "00000000-0000-0000-0000-000000000000")
|
||||
{
|
||||
var position = await _context.PositionExams.AsQueryable()
|
||||
.FirstOrDefaultAsync(x => x.Id == Guid.Parse(positionId) && x.PeriodExam == exam);
|
||||
// var position = await _context.PositionExams.AsQueryable()
|
||||
// .FirstOrDefaultAsync(x => x.Id == Guid.Parse(positionId) && x.PeriodExam == exam);
|
||||
|
||||
if (position == null)
|
||||
throw new Exception(GlobalMessages.PositionExamNotFound);
|
||||
|
|
@ -523,7 +540,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
{
|
||||
Consend = candidate != null,
|
||||
Status = candidate == null ? null : candidate.Status,
|
||||
PositionExam = candidatePosition?.PositionExam,
|
||||
PositionExam = position,
|
||||
Bank = exam.BankExam.Count() > 0,
|
||||
Position = candidatePosition == null ? false : true
|
||||
};
|
||||
}
|
||||
|
|
@ -1279,9 +1297,9 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
if (candidate.PeriodExam == null)
|
||||
throw new Exception(GlobalMessages.ExamNotFound);
|
||||
|
||||
var periodExam = await _context.PeriodExams.AsQueryable()
|
||||
.Include(x => x.Candidate)
|
||||
.FirstOrDefaultAsync(x => x.Id == candidate.PeriodExam.Id);
|
||||
var periodExam = await _context.Candidates.AsQueryable()
|
||||
.Where(x => x.PeriodExam == candidate.PeriodExam && x.ExamIdenNumber != null)
|
||||
.ToListAsync();
|
||||
|
||||
if (periodExam == null)
|
||||
throw new Exception(GlobalMessages.ExamNotFound);
|
||||
|
|
@ -1299,7 +1317,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
}
|
||||
if (candidate.Status == "checkSeat")
|
||||
{
|
||||
var num = periodExam.Candidate.Count() + 1;
|
||||
var num = periodExam.Count() + 1;
|
||||
candidate.ExamIdenNumber = "CDC-" + num;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue