เช็คเมลก่อนส่งเมลสมัครสอบ
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)
|
||||
|
|
|
|||
|
|
@ -224,6 +224,29 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
return path;
|
||||
}
|
||||
|
||||
public async Task<string> ImagesPathString(string fileId)
|
||||
{
|
||||
if (fileId == null)
|
||||
return "";
|
||||
|
||||
var config = new AmazonS3Config
|
||||
{
|
||||
ServiceURL = Configuration.GetValue<string>("MinIO:Endpoint"),
|
||||
ForcePathStyle = true
|
||||
};
|
||||
|
||||
DateTime expires = DateTime.UtcNow.AddHours(6);
|
||||
GetPreSignedUrlRequest request = new GetPreSignedUrlRequest
|
||||
{
|
||||
BucketName = _bucketName,
|
||||
Key = fileId,
|
||||
Expires = expires,
|
||||
};
|
||||
string path = _s3Client.GetPreSignedURL(request);
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
@ -927,7 +927,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
candidate.SeatNumber = item.SeatNumber;
|
||||
var subject = "แจ้งผลการสมัครสอบคัดเลือก " + 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 = "checkPoint";
|
||||
}
|
||||
else
|
||||
|
|
@ -936,7 +936,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
{
|
||||
var subject = "แจ้งผลการสมัครสอบคัดเลือก " + 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 = "waiver";
|
||||
}
|
||||
|
|
@ -947,7 +947,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
{
|
||||
var subject = "แจ้งผลการสมัครสอบคัดเลือก " + 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 = "waiver";
|
||||
}
|
||||
|
|
@ -990,7 +990,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
candidate.Number = item.Number;
|
||||
var subject = "แจ้งผลการสมัครสอบคัดเลือก " + 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 = "done";
|
||||
}
|
||||
else
|
||||
|
|
@ -999,7 +999,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
{
|
||||
var subject = "แจ้งผลการสมัครสอบคัดเลือก " + 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 = "waiver";
|
||||
}
|
||||
|
|
@ -1010,7 +1010,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
{
|
||||
var subject = "แจ้งผลการสมัครสอบคัดเลือก " + 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 = "waiver";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"sdk": {
|
||||
"version": "7.0.201"
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue