เพิ่มรหัสตำแหน่ง
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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -235,6 +235,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
PositionLevelId = b.PositionLevelId,
|
||||
PositionLevelName = b.PositionLevelName,
|
||||
HighDegree = b.HighDegree,
|
||||
Code = b.Code,
|
||||
}).ToList(),
|
||||
Documents = x.PeriodExamDocuments.OrderBy(o => o.CreatedAt).Select(b => new FileListResponse
|
||||
{
|
||||
|
|
@ -401,6 +402,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
PositionLevelId = position.PositionLevelId,
|
||||
PositionLevelName = position.PositionLevelName,
|
||||
HighDegree = position.HighDegree,
|
||||
Code = position.Code,
|
||||
TypeId = position.TypeId,
|
||||
TypeName = position.TypeName,
|
||||
CreatedAt = DateTime.Now,
|
||||
|
|
@ -529,6 +531,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
position.PositionLevelId = positionData.PositionLevelId;
|
||||
position.PositionLevelName = positionData.PositionLevelName;
|
||||
position.HighDegree = positionData.HighDegree;
|
||||
position.Code = positionData.Code;
|
||||
position.TypeId = positionData.TypeId;
|
||||
position.TypeName = positionData.TypeName;
|
||||
position.LastUpdatedAt = DateTime.Now;
|
||||
|
|
@ -562,6 +565,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
PositionLevelId = position.PositionLevelId,
|
||||
PositionLevelName = position.PositionLevelName,
|
||||
HighDegree = position.HighDegree,
|
||||
Code = position.Code,
|
||||
TypeId = position.TypeId,
|
||||
TypeName = position.TypeName,
|
||||
CreatedAt = DateTime.Now,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue