admin แก้ไขสมัครสอบคัดเลือก

This commit is contained in:
Kittapath 2023-04-26 03:16:49 +07:00
parent 0273a37503
commit ae60457a3e
6 changed files with 986 additions and 289 deletions

View file

@ -614,6 +614,22 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
return candidate;
}
public async Task<string> GetsAsyncProfileImage(string candidateId)
{
var candidate = await _context.Candidates.AsQueryable()
.Include(x => x.ProfileImg)
.Where(x => x.Id == Guid.Parse(candidateId))
.FirstOrDefaultAsync();
if (candidate == null)
throw new Exception(GlobalMessages.CandidateNotFound);
if (candidate.ProfileImg != null)
candidate.ProfileImg.Detail = _minioService.ImagesPath(candidate.ProfileImg.Id).Result;
return candidate.ProfileImg == null ? "" : candidate.ProfileImg.Detail;
}
public async Task<CandidateOccupationResponseItem?> GetsAsyncOccupation(string candidateId)
{
return await _context.Candidates.AsQueryable()
@ -789,7 +805,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
foreach (var candidate in candidates)
{
var item = items.FirstOrDefault(x => x.CitizenId == candidate.CitizenId && x.ExamIdenNumber == candidate.ExamIdenNumber);
var item = items.FirstOrDefault(x => x.CitizenId == candidate.CitizenId && x.ExamIdenNumber.Trim().ToUpper() == candidate.ExamIdenNumber.Trim().ToUpper());
if (item != null)
{
@ -896,10 +912,10 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
summarySheet.Cells[1, 2].Value = "เลขประจำตัวสอบ";
summarySheet.Cells[1, 3].Value = "เลขที่นั่งสอบ";
summarySheet.Cells[1, 4].Value = "คะแนนเต็มภาค ข";
summarySheet.Cells[1, 5].Value = "คะแนนเต็มภาค ข";
summarySheet.Cells[1, 5].Value = "คะแนนภาค ข";
summarySheet.Cells[1, 6].Value = "ผลสอบภาค ข";
summarySheet.Cells[1, 7].Value = "คะแนนเต็มภาค ค";
summarySheet.Cells[1, 8].Value = "คะแนนเต็มภาค ค";
summarySheet.Cells[1, 8].Value = "คะแนนภาค ค";
summarySheet.Cells[1, 9].Value = "ผลสอบภาค ค";
summarySheet.Cells[1, 10].Value = "ผลการสอบ";
int row = 2;
@ -979,25 +995,25 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
{
Id = 4,
Name = "ผ่านการสอบ",
Count = periodExam.Candidate.Where(x=>x.Pass.Contains("ผ่าน")).Count()
Count = periodExam.Candidate.Where(x=>x.Pass=="ผ่าน").Count()
},
new DashboardResponseItem
{
Id = 5,
Name = "ไม่ผ่านการสอบ",
Count = periodExam.Candidate.Where(x=>!x.Pass.Contains("ผ่าน")).Count()
Count = periodExam.Candidate.Where(x=>x.Pass!=null && x.Pass!="ผ่าน").Count()
},
new DashboardResponseItem
{
Id = 6,
Name = "เพศชาย",
Count = periodExam.Candidate.Where(x=>x.PrefixName != null && x.PrefixName.Contains("ชาย")).Count()
Count = periodExam.Candidate.Where(x=>x.PrefixName != null && x.PrefixName=="นาย").Count()
},
new DashboardResponseItem
{
Id = 7,
Name = "เพศหญิง",
Count = periodExam.Candidate.Where(x=>x.PrefixName != null && x.PrefixName.Contains("หญิง")).Count()
Count = periodExam.Candidate.Where(x=>x.PrefixName != null && (x.PrefixName=="นาง" || x.PrefixName=="นางสาว")).Count()
},
// new DashboardResponseItem
// {