Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 38s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 38s
* develop: fixed
This commit is contained in:
commit
7e446bcc80
2 changed files with 26 additions and 26 deletions
|
|
@ -1575,7 +1575,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// await _candidateService.CheckCitizen(examId, positionId, item.CitizenId);
|
await _candidateService.CheckCitizen(examId, positionId, item.CitizenId);
|
||||||
|
|
||||||
return Success();
|
return Success();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -667,8 +667,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
||||||
EditorConfirm = exam.EditorConfirm,
|
EditorConfirm = exam.EditorConfirm,
|
||||||
Position = candidatePosition == null ? false : true,
|
Position = candidatePosition == null ? false : true,
|
||||||
//CanRegister = exam.RegisterStartDate == null || exam.RegisterEndDate == null ? true : DateOnly.FromDateTime(exam.RegisterStartDate.Value) <= DateOnly.FromDateTime(DateTime.Now) && DateOnly.FromDateTime(exam.RegisterEndDate.Value) >= DateOnly.FromDateTime(DateTime.Now),
|
//CanRegister = exam.RegisterStartDate == null || exam.RegisterEndDate == null ? true : DateOnly.FromDateTime(exam.RegisterStartDate.Value) <= DateOnly.FromDateTime(DateTime.Now) && DateOnly.FromDateTime(exam.RegisterEndDate.Value) >= DateOnly.FromDateTime(DateTime.Now),
|
||||||
CanRegister = exam.RegisterStartDate == null || exam.RegisterEndDate == null
|
CanRegister = exam.RegisterStartDate == null || exam.RegisterEndDate == null
|
||||||
? true
|
? true
|
||||||
: exam.RegisterStartDate.Value <= DateTime.Now && exam.RegisterEndDate.Value >= DateTime.Now,
|
: exam.RegisterStartDate.Value <= DateTime.Now && exam.RegisterEndDate.Value >= DateTime.Now,
|
||||||
RegisterEndDate = exam.RegisterEndDate,
|
RegisterEndDate = exam.RegisterEndDate,
|
||||||
RegisterStartDate = exam.RegisterStartDate,
|
RegisterStartDate = exam.RegisterStartDate,
|
||||||
|
|
@ -2282,7 +2282,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
||||||
var periodExam = await _context.PeriodExams.AsQueryable()
|
var periodExam = await _context.PeriodExams.AsQueryable()
|
||||||
.FirstOrDefaultAsync(x => x.Id == examGuid);
|
.FirstOrDefaultAsync(x => x.Id == examGuid);
|
||||||
|
|
||||||
if (periodExam == null)
|
if (periodExam == null)
|
||||||
throw new Exception(GlobalMessages.ExamNotFound);
|
throw new Exception(GlobalMessages.ExamNotFound);
|
||||||
|
|
||||||
var candidates = await _context.Candidates.AsQueryable()
|
var candidates = await _context.Candidates.AsQueryable()
|
||||||
|
|
@ -2594,12 +2594,12 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
||||||
|
|
||||||
public async Task CheckCitizen(string examId, string positionId, string citizenId)
|
public async Task CheckCitizen(string examId, string positionId, string citizenId)
|
||||||
{
|
{
|
||||||
// var exam = await _context.PeriodExams.AsQueryable()
|
var exam = await _context.PeriodExams.AsQueryable()
|
||||||
// .Where(p => p.CheckDisability == false)
|
.Where(p => p.CheckDisability == false)
|
||||||
// .FirstOrDefaultAsync(x => x.Id == Guid.Parse(examId));
|
.FirstOrDefaultAsync(x => x.Id == Guid.Parse(examId));
|
||||||
|
|
||||||
// if (exam == null)
|
if (exam == null)
|
||||||
// throw new Exception(GlobalMessages.ExamNotFound);
|
throw new Exception(GlobalMessages.ExamNotFound);
|
||||||
|
|
||||||
// if (citizenId.Length != 13)
|
// if (citizenId.Length != 13)
|
||||||
// throw new Exception(GlobalMessages.CitizenIncomplete);
|
// throw new Exception(GlobalMessages.CitizenIncomplete);
|
||||||
|
|
@ -2630,27 +2630,27 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
||||||
// if (citizenIdDigits[12] != chkDigit)
|
// if (citizenIdDigits[12] != chkDigit)
|
||||||
// throw new Exception(GlobalMessages.CitizenIncorrect);
|
// throw new Exception(GlobalMessages.CitizenIncorrect);
|
||||||
|
|
||||||
// if (positionId != "00000000-0000-0000-0000-000000000000")
|
if (positionId != "00000000-0000-0000-0000-000000000000")
|
||||||
// {
|
{
|
||||||
// var position = await _context.PositionExams.AsQueryable()
|
var position = await _context.PositionExams.AsQueryable()
|
||||||
// .FirstOrDefaultAsync(x => x.Id == Guid.Parse(positionId) && x.PeriodExam == exam);
|
.FirstOrDefaultAsync(x => x.Id == Guid.Parse(positionId) && x.PeriodExam == exam);
|
||||||
|
|
||||||
// if (position == null)
|
if (position == null)
|
||||||
// throw new Exception(GlobalMessages.PositionExamNotFound);
|
throw new Exception(GlobalMessages.PositionExamNotFound);
|
||||||
|
|
||||||
// var candidate1 = await _context.Candidates.AsQueryable()
|
var candidate1 = await _context.Candidates.AsQueryable()
|
||||||
// .Where(x => x.PeriodExam == exam && x.UserId != UserId /*&& x.PositionExam == position*/ && x.CitizenId == citizenId)
|
.Where(x => x.PeriodExam == exam && x.UserId != UserId /*&& x.PositionExam == position*/ && x.CitizenId == citizenId)
|
||||||
// .FirstOrDefaultAsync();
|
.FirstOrDefaultAsync();
|
||||||
// if (candidate1 != null)
|
if (candidate1 != null)
|
||||||
// throw new Exception(GlobalMessages.CitizanDupicate);
|
throw new Exception(GlobalMessages.CitizanDupicate);
|
||||||
return;
|
return;
|
||||||
// }
|
}
|
||||||
|
|
||||||
//var candidate2 = await _context.Candidates.AsQueryable()
|
var candidate2 = await _context.Candidates.AsQueryable()
|
||||||
// .Where(x => x.PeriodExam == exam && x.UserId != UserId && x.CitizenId == citizenId)
|
.Where(x => x.PeriodExam == exam && x.UserId != UserId && x.CitizenId == citizenId)
|
||||||
// .FirstOrDefaultAsync();
|
.FirstOrDefaultAsync();
|
||||||
//if (candidate2 != null)
|
if (candidate2 != null)
|
||||||
// throw new Exception(GlobalMessages.CitizanDupicate);
|
throw new Exception(GlobalMessages.CitizanDupicate);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task GetExamCandidateAsync(Guid id)
|
public async Task GetExamCandidateAsync(Guid id)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue