ไม่ validate วันที่สมัครสอบ
This commit is contained in:
parent
a207e5077c
commit
c11b3b68ae
17 changed files with 3276 additions and 312 deletions
|
|
@ -604,7 +604,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
|
||||
var candidatePosition = await _context.Candidates.AsQueryable()
|
||||
.Include(x => x.PositionExam)
|
||||
.FirstOrDefaultAsync(x => x.PeriodExam == exam && x.UserId == UserId && x.Status != "register" && x.Status != "rejectRegister");
|
||||
.FirstOrDefaultAsync(x => x.PeriodExam == exam && x.UserId == UserId && x.RegisterDate != null && x.Status != "register" && x.Status != "rejectRegister");
|
||||
|
||||
return new RequestStatusRegistry
|
||||
{
|
||||
|
|
@ -1731,6 +1731,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
var subject = "แจ้งผลการสมัครสอบคัดเลือก " + exam.Name;
|
||||
var body = candidate.FirstName + " " + candidate.LastName + " สถานะการสมัครสอบ: รอเจ้าหน้าที่ตรวจสอบข้อมูล";
|
||||
_mailService.SendMailToUser(subject, body, "ananda@frappet.com");
|
||||
if (candidate.RegisterDate == null)
|
||||
candidate.RegisterDate = DateTime.Now;
|
||||
}
|
||||
if (status == "checkPayment")
|
||||
{
|
||||
|
|
@ -1883,6 +1885,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
.Where(x => x.PeriodExam == exam && x.UserId == UserId)
|
||||
.FirstOrDefaultAsync();
|
||||
|
||||
var positionName = "";
|
||||
var highDegree = "";
|
||||
if (positionId != "00000000-0000-0000-0000-000000000000")
|
||||
{
|
||||
var position = await _context.PositionExams.AsQueryable()
|
||||
|
|
@ -1894,6 +1898,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
candidate = await _context.Candidates.AsQueryable()
|
||||
.Where(x => x.PeriodExam == exam && x.UserId == UserId && x.PositionExam == position)
|
||||
.FirstOrDefaultAsync();
|
||||
positionName = position.PositionName;
|
||||
highDegree = position.HighDegree == true ? "ปริญญาขึ้นไป" : "ต่ำกว่าปริญญาตรี";
|
||||
}
|
||||
|
||||
if (candidate == null)
|
||||
|
|
@ -1918,8 +1924,10 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
Number = candidate.Number,
|
||||
ReviewPoint = candidate.ReviewPoint,
|
||||
Review = candidate.Review,
|
||||
AnnouncementDate = exam.AnnouncementDate.AddYears(2),
|
||||
AnnouncementDate = exam.AnnouncementDate?.AddYears(2),
|
||||
Id = candidate.Id,
|
||||
Position = positionName,
|
||||
HighDegree = highDegree,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -1933,6 +1941,14 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
if (candidate == null)
|
||||
throw new Exception(GlobalMessages.CandidateNotFound);
|
||||
|
||||
var positionName = "";
|
||||
var highDegree = "";
|
||||
if (candidate.PositionExam != null)
|
||||
{
|
||||
positionName = candidate.PositionExam.PositionName;
|
||||
highDegree = candidate.PositionExam.HighDegree == true ? "ปริญญาขึ้นไป" : "ต่ำกว่าปริญญาตรี";
|
||||
}
|
||||
|
||||
return new RequestCardCandidate
|
||||
{
|
||||
Avatar = candidate.ProfileImg == null ? "" : _minioService.ImagesPath(candidate.ProfileImg.Id).Result,
|
||||
|
|
@ -1952,8 +1968,10 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
Number = candidate.Number,
|
||||
ReviewPoint = candidate.ReviewPoint,
|
||||
Review = candidate.Review,
|
||||
AnnouncementDate = candidate.PeriodExam?.AnnouncementDate.AddYears(2),
|
||||
AnnouncementDate = candidate.PeriodExam?.AnnouncementDate?.AddYears(2),
|
||||
Id = candidate.Id,
|
||||
Position = positionName,
|
||||
HighDegree = highDegree,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue