เพิ่มรหัสตำแหน่ง
This commit is contained in:
parent
60eee3711d
commit
20b031c29f
8 changed files with 3023 additions and 6 deletions
|
|
@ -617,7 +617,10 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
Payment = exam.Fee > 0,
|
||||
EditorCondition = exam.EditorCondition,
|
||||
EditorConfirm = exam.EditorConfirm,
|
||||
Position = candidatePosition == null ? false : true
|
||||
Position = candidatePosition == null ? false : true,
|
||||
CanRegister = exam.RegisterStartDate == null || exam.RegisterEndDate == null ? true : exam.RegisterStartDate.Value.Date <= DateTime.Now.Date && exam.RegisterEndDate.Value.Date >= DateTime.Now.Date,
|
||||
RegisterEndDate = exam.RegisterEndDate,
|
||||
RegisterStartDate = exam.RegisterStartDate,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -1772,7 +1775,7 @@ 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.Email != null && candidate.Email != "") _mailService.SendMailToUser(subject, body, candidate.Email);
|
||||
if (candidate.RegisterDate == null)
|
||||
candidate.RegisterDate = DateTime.Now;
|
||||
}
|
||||
|
|
@ -1780,7 +1783,7 @@ 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.Email != null && candidate.Email != "") _mailService.SendMailToUser(subject, body, candidate.Email);
|
||||
}
|
||||
candidate.Status = status;
|
||||
|
||||
|
|
@ -1791,6 +1794,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
{
|
||||
var candidate = await _context.Candidates.AsQueryable()
|
||||
.Include(x => x.PeriodExam)
|
||||
.Include(x => x.PositionExam)
|
||||
.FirstOrDefaultAsync(x => x.Id == Guid.Parse(candidateId));
|
||||
|
||||
if (candidate == null)
|
||||
|
|
@ -1831,7 +1835,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
if (candidate.Email != null && candidate.Email != "") _mailService.SendMailToUser(subject, body, candidate.Email);
|
||||
candidate.Status = "checkSeat";
|
||||
var num = periodExam.Count() + 1;
|
||||
candidate.ExamIdenNumber = "CDC-" + num;
|
||||
candidate.ExamIdenNumber = candidate.PositionExam == null ? num.ToString() : candidate.PositionExam.Code + num;
|
||||
}
|
||||
else if (status == "payment" && candidate.PeriodExam.Fee != 0)
|
||||
{
|
||||
|
|
@ -1845,7 +1849,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
var body = candidate.FirstName + " " + candidate.LastName + " สถานะการสมัครสอบ: รอเจ้าหน้าที่จัดที่นั่งสอบ";
|
||||
if (candidate.Email != null && candidate.Email != "") _mailService.SendMailToUser(subject, body, candidate.Email);
|
||||
var num = periodExam.Count() + 1;
|
||||
candidate.ExamIdenNumber = "CDC-" + num;
|
||||
candidate.ExamIdenNumber = candidate.PositionExam == null ? num.ToString() : candidate.PositionExam.Code + num;
|
||||
candidate.PaymentDate = DateTime.Now;
|
||||
}
|
||||
}
|
||||
|
|
@ -1866,10 +1870,14 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
{
|
||||
var candidate = await _context.Candidates.AsQueryable()
|
||||
.Include(x => x.PeriodExam)
|
||||
.Include(x => x.PositionExam)
|
||||
.FirstOrDefaultAsync(x => x.Id == Guid.Parse(_candidateId));
|
||||
if (candidate == null)
|
||||
throw new Exception(GlobalMessages.CandidateNotFound);
|
||||
|
||||
if (candidate.Status.Trim().ToUpper() != "CHECKREGISTER")
|
||||
continue;
|
||||
|
||||
if (candidate.PeriodExam == null)
|
||||
throw new Exception(GlobalMessages.ExamNotFound);
|
||||
|
||||
|
|
@ -1889,7 +1897,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
if (candidate.Email != null && candidate.Email != "") _mailService.SendMailToUser(subject, body, candidate.Email);
|
||||
candidate.Status = "checkSeat";
|
||||
var num = periodExam.Count() + 1 + _num;
|
||||
candidate.ExamIdenNumber = "CDC-" + num;
|
||||
candidate.ExamIdenNumber = candidate.PositionExam == null ? num.ToString() : candidate.PositionExam.Code + num;
|
||||
}
|
||||
else if (candidate.PeriodExam.Fee != 0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue