เช็คเมลก่อนส่งเมลสมัครสอบ
This commit is contained in:
parent
6a2fda2a62
commit
a207e5077c
5 changed files with 296 additions and 276 deletions
|
|
@ -1444,11 +1444,13 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
if (exam == null)
|
||||
throw new Exception(GlobalMessages.ExamNotFound);
|
||||
|
||||
var position = exam.PositionExam.Where(x => x.Id == Guid.Parse(positionId)).FirstOrDefault();
|
||||
|
||||
if (position == null)
|
||||
throw new Exception(GlobalMessages.PositionExamNotFound);
|
||||
// if (exam.PositionExam != null)
|
||||
// {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
// var position = exam.PositionExam.Where(x => x.Id == Guid.Parse(positionId)).FirstOrDefault();
|
||||
|
||||
// if (position == null)
|
||||
// throw new Exception(GlobalMessages.PositionExamNotFound);
|
||||
// }
|
||||
await _minioService.DeleteFileAsync(Guid.Parse(documentId));
|
||||
}
|
||||
|
||||
|
|
@ -1768,21 +1770,21 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
{
|
||||
var subject = "แจ้งผลการสมัครสอบคัดเลือก " + candidate.PeriodExam.Name;
|
||||
var body = candidate.FirstName + " " + candidate.LastName + " มีคุณสมบัติสมัครสอบไม่ผ่านกรุณาตรวจสอบข้อมูล เนื่องจาก: " + item.Reason;
|
||||
if (candidate.Email != null) _mailService.SendMailToUser(subject, body, candidate.Email);
|
||||
if (candidate.Email != null && candidate.Email != "") _mailService.SendMailToUser(subject, body, candidate.Email);
|
||||
candidate.RejectDetail = item.Reason;
|
||||
}
|
||||
if (status == "rejectPayment")
|
||||
{
|
||||
var subject = "แจ้งผลการสมัครสอบคัดเลือก " + candidate.PeriodExam.Name;
|
||||
var body = candidate.FirstName + " " + candidate.LastName + " มีหลักฐานชำระเงินไม่ถูกต้องกรุณาตรวจสอบข้อมูล เนื่องจาก: " + item.Reason;
|
||||
if (candidate.Email != null) _mailService.SendMailToUser(subject, body, candidate.Email);
|
||||
if (candidate.Email != null && candidate.Email != "") _mailService.SendMailToUser(subject, body, candidate.Email);
|
||||
candidate.RejectDetail = item.Reason;
|
||||
}
|
||||
else if (status == "payment" && candidate.PeriodExam.Fee == 0)
|
||||
{
|
||||
var subject = "แจ้งผลการสมัครสอบคัดเลือก " + candidate.PeriodExam.Name;
|
||||
var body = candidate.FirstName + " " + candidate.LastName + " สถานะการสมัครสอบ: รอเจ้าหน้าที่จัดที่นั่งสอบ";
|
||||
if (candidate.Email != null) _mailService.SendMailToUser(subject, body, candidate.Email);
|
||||
if (candidate.Email != null && candidate.Email != "") _mailService.SendMailToUser(subject, body, candidate.Email);
|
||||
candidate.Status = "checkSeat";
|
||||
var num = periodExam.Count() + 1;
|
||||
candidate.ExamIdenNumber = "CDC-" + num;
|
||||
|
|
@ -1791,13 +1793,13 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
{
|
||||
var subject = "แจ้งผลการสมัครสอบคัดเลือก " + candidate.PeriodExam.Name;
|
||||
var body = candidate.FirstName + " " + candidate.LastName + " สถานะการสมัครสอบ: รอชำระค่าสมัครสอบ";
|
||||
if (candidate.Email != null) _mailService.SendMailToUser(subject, body, candidate.Email);
|
||||
if (candidate.Email != null && candidate.Email != "") _mailService.SendMailToUser(subject, body, candidate.Email);
|
||||
}
|
||||
if (candidate.Status == "checkSeat")
|
||||
{
|
||||
var subject = "แจ้งผลการสมัครสอบคัดเลือก " + candidate.PeriodExam.Name;
|
||||
var body = candidate.FirstName + " " + candidate.LastName + " สถานะการสมัครสอบ: รอเจ้าหน้าที่จัดที่นั่งสอบ";
|
||||
if (candidate.Email != null) _mailService.SendMailToUser(subject, body, candidate.Email);
|
||||
if (candidate.Email != null && candidate.Email != "") _mailService.SendMailToUser(subject, body, candidate.Email);
|
||||
var num = periodExam.Count() + 1;
|
||||
candidate.ExamIdenNumber = "CDC-" + num;
|
||||
}
|
||||
|
|
@ -1806,7 +1808,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
{
|
||||
var subject = "แจ้งผลการสมัครสอบคัดเลือก " + candidate.PeriodExam.Name;
|
||||
var body = candidate.FirstName + " " + candidate.LastName + " มีคุณสมบัติไม่ผ่านตามเงื่อนไข";
|
||||
if (candidate.Email != null) _mailService.SendMailToUser(subject, body, candidate.Email);
|
||||
if (candidate.Email != null && candidate.Email != "") _mailService.SendMailToUser(subject, body, candidate.Email);
|
||||
_context.Candidates.Remove(candidate);
|
||||
}
|
||||
|
||||
|
|
@ -1829,13 +1831,13 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
{
|
||||
var subject = "แจ้งผลการสมัครสอบคัดเลือก " + candidate.PeriodExam.Name;
|
||||
var body = candidate.FirstName + " " + candidate.LastName + " สถานะการสมัครสอบ: สอบคัดเลือกสำเร็จ";
|
||||
if (candidate.Email != null) _mailService.SendMailToUser(subject, body, candidate.Email);
|
||||
if (candidate.Email != null && candidate.Email != "") _mailService.SendMailToUser(subject, body, candidate.Email);
|
||||
}
|
||||
if (status == "checkPoint")
|
||||
{
|
||||
var subject = "แจ้งผลการสมัครสอบคัดเลือก " + candidate.PeriodExam.Name;
|
||||
var body = candidate.FirstName + " " + candidate.LastName + " สถานะการสมัครสอบ: รอเจ้าหน้าที่สรุปคะแนนสอบ";
|
||||
if (candidate.Email != null) _mailService.SendMailToUser(subject, body, candidate.Email);
|
||||
if (candidate.Email != null && candidate.Email != "") _mailService.SendMailToUser(subject, body, candidate.Email);
|
||||
}
|
||||
candidate.Status = status;
|
||||
|
||||
|
|
@ -1994,7 +1996,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
// })
|
||||
// .ToListAsync();
|
||||
|
||||
return _minioService.ImagesPath(Guid.Parse("08db463c-9bf7-494f-8b35-e9b777256dae")).Result;
|
||||
return _minioService.ImagesPathString("ใบจ่ายเงิน.pdf").Result;
|
||||
}
|
||||
|
||||
public async Task UpdateReviewAsyncCandidate(string examId, string positionId, RequestReview item)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue