ปรับ ui สรรหาสอบคัดเลือก
This commit is contained in:
parent
c79bc39c86
commit
fbef67f33a
29 changed files with 7384 additions and 666 deletions
|
|
@ -78,11 +78,9 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
{
|
||||
switch (status.Trim().ToUpper())
|
||||
{
|
||||
case "OFFICIAL": return "ข้าราชการกรุงเทพมหานคร";
|
||||
case "PERSONNEL": return "บุคลากรกรุงเทพมหานคร";
|
||||
case "OFFICIALSOTHER": return "ข้าราชการประเภทอื่น";
|
||||
case "EMPLOYEE": return "ลูกจ้าง/พนักงานราชการของส่วนราชการอื่น";
|
||||
case "OTHER": return "อื่นๆ";
|
||||
case "prem": return "ลูกจ้างประจำ";
|
||||
case "temp": return "ลูกจ้างชั่วคราว";
|
||||
case "other": return "ผู้ปฏิบัติงานอื่นในกรุงเทพมหานคร";
|
||||
default: return status;
|
||||
}
|
||||
}
|
||||
|
|
@ -135,6 +133,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
CheckDisability = x.CheckDisability,
|
||||
CheckDocument = x.CheckDocument,
|
||||
Detail = x.Detail,
|
||||
EditorCondition = x.EditorCondition,
|
||||
EditorConfirm = x.EditorConfirm,
|
||||
Fee = x.Fee,
|
||||
Id = x.Id,
|
||||
IsActive = x.IsActive,
|
||||
|
|
@ -197,6 +197,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
CheckDisability = x.CheckDisability,
|
||||
CheckDocument = x.CheckDocument,
|
||||
Detail = x.Detail,
|
||||
EditorCondition = x.EditorCondition,
|
||||
EditorConfirm = x.EditorConfirm,
|
||||
Fee = x.Fee,
|
||||
Id = x.Id,
|
||||
IsActive = x.IsActive,
|
||||
|
|
@ -230,6 +232,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
TypeName = b.TypeName,
|
||||
PositionId = b.PositionId,
|
||||
PositionName = b.PositionName,
|
||||
PositionLevelId = b.PositionLevelId,
|
||||
PositionLevelName = b.PositionLevelName,
|
||||
HighDegree = b.HighDegree,
|
||||
}).ToList(),
|
||||
Documents = x.PeriodExamDocuments.OrderBy(o => o.CreatedAt).Select(b => new FileListResponse
|
||||
|
|
@ -300,6 +304,12 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
if (periodExam == null)
|
||||
throw new Exception(GlobalMessages.ExamNotFound);
|
||||
|
||||
var positionExam = await _context.PositionExams.AsQueryable()
|
||||
.FirstOrDefaultAsync(x => x.Id == Guid.Parse(positionId));
|
||||
|
||||
if (positionExam == null)
|
||||
throw new Exception(GlobalMessages.ExamNotFound);
|
||||
|
||||
if (positionId != "00000000-0000-0000-0000-000000000000")
|
||||
{
|
||||
return new RequestPositionName
|
||||
|
|
@ -307,7 +317,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
Name = periodExam.Name,
|
||||
Round = periodExam.Round,
|
||||
Year = periodExam.Year,
|
||||
Posiiton = periodExam.PositionExam.FirstOrDefault(x => x.Id == Guid.Parse(positionId) && x.PeriodExam == periodExam),
|
||||
Position = positionExam.PositionName,
|
||||
PositionLevel = positionExam.PositionLevelName,
|
||||
};
|
||||
}
|
||||
else
|
||||
|
|
@ -317,7 +328,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
Name = periodExam.Name,
|
||||
Round = periodExam.Round,
|
||||
Year = periodExam.Year,
|
||||
Posiiton = null,
|
||||
Position = null,
|
||||
PositionLevel = null,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -347,6 +359,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
AnnouncementExam = inserted.AnnouncementExam,
|
||||
Category = inserted.Category,
|
||||
Detail = inserted.Detail,
|
||||
EditorCondition = inserted.EditorCondition,
|
||||
EditorConfirm = inserted.EditorConfirm,
|
||||
Note = inserted.Note,
|
||||
CreatedAt = DateTime.Now,
|
||||
CreatedUserId = UserId ?? "",
|
||||
|
|
@ -384,6 +398,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
PeriodExam = periodExam,
|
||||
PositionId = position.PositionId,
|
||||
PositionName = position.PositionName,
|
||||
PositionLevelId = position.PositionLevelId,
|
||||
PositionLevelName = position.PositionLevelName,
|
||||
HighDegree = position.HighDegree,
|
||||
TypeId = position.TypeId,
|
||||
TypeName = position.TypeName,
|
||||
|
|
@ -438,6 +454,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
// periodExam.AnnouncementExam = updated.AnnouncementExam;
|
||||
periodExam.Category = updated.Category;
|
||||
periodExam.Detail = updated.Detail;
|
||||
periodExam.EditorCondition = updated.EditorCondition;
|
||||
periodExam.EditorConfirm = updated.EditorConfirm;
|
||||
periodExam.Note = updated.Note;
|
||||
periodExam.LastUpdatedAt = DateTime.Now;
|
||||
periodExam.LastUpdateUserId = UserId ?? "";
|
||||
|
|
@ -508,6 +526,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
{
|
||||
position.PositionId = positionData.PositionId;
|
||||
position.PositionName = positionData.PositionName;
|
||||
position.PositionLevelId = positionData.PositionLevelId;
|
||||
position.PositionLevelName = positionData.PositionLevelName;
|
||||
position.HighDegree = positionData.HighDegree;
|
||||
position.TypeId = positionData.TypeId;
|
||||
position.TypeName = positionData.TypeName;
|
||||
|
|
@ -539,6 +559,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
PeriodExam = periodExam,
|
||||
PositionId = position.PositionId,
|
||||
PositionName = position.PositionName,
|
||||
PositionLevelId = position.PositionLevelId,
|
||||
PositionLevelName = position.PositionLevelName,
|
||||
HighDegree = position.HighDegree,
|
||||
TypeId = position.TypeId,
|
||||
TypeName = position.TypeName,
|
||||
|
|
@ -660,6 +682,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
if (status == "all")
|
||||
{
|
||||
var candidate = await _context.Candidates.AsQueryable()
|
||||
.Include(x => x.PositionExam)
|
||||
.Include(x => x.ProfileImg)
|
||||
.OrderByDescending(d => d.CreatedAt)
|
||||
.Where(x => x.PeriodExam == periodExam && x.RegisterDate != null && x.Status != "register" && x.Status != "rejectRegister")
|
||||
|
|
@ -678,6 +701,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
else
|
||||
{
|
||||
var candidate = await _context.Candidates.AsQueryable()
|
||||
.Include(x => x.PositionExam)
|
||||
.Include(x => x.ProfileImg)
|
||||
.OrderByDescending(d => d.CreatedAt)
|
||||
.Where(x => x.PeriodExam == periodExam && x.Status == status)
|
||||
|
|
@ -707,8 +731,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
LastName = x.LastName,
|
||||
Nationality = x.Nationality,
|
||||
DateOfBirth = x.DateOfBirth,
|
||||
Relationship = x.RelationshipName,
|
||||
RelationshipId = x.RelationshipId != null ? x.RelationshipId.ToString() : null,
|
||||
Religion = x.ReligionName,
|
||||
ReligionId = x.ReligionId != null ? x.ReligionId.ToString() : null,
|
||||
CitizenProvince = x.CitizenProvinceName,
|
||||
CitizenProvinceId = x.CitizenProvinceId != null ? x.CitizenProvinceId.ToString() : null,
|
||||
CitizenDistrict = x.CitizenDistrictName,
|
||||
|
|
@ -754,12 +778,13 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
.Where(x => x.Id == Guid.Parse(candidateId))
|
||||
.Select(x => new CandidateOccupationResponseItem
|
||||
{
|
||||
OccupationType = x.OccupationType,
|
||||
OccupationCompany = x.OccupationCompany,
|
||||
OccupationDepartment = x.OccupationDepartment,
|
||||
OccupationEmail = x.OccupationEmail,
|
||||
OccupationTelephone = x.OccupationTelephone,
|
||||
OccupationOrg = x.OccupationOrg,
|
||||
OccupationPile = x.OccupationPile,
|
||||
OccupationGroup = x.OccupationGroup,
|
||||
OccupationSalary = x.OccupationSalary,
|
||||
OccupationPosition = x.OccupationPosition,
|
||||
OccupationPositionType = x.OccupationPositionType,
|
||||
OccupationTelephone = x.OccupationTelephone,
|
||||
})
|
||||
.FirstOrDefaultAsync();
|
||||
}
|
||||
|
|
@ -820,12 +845,17 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
.FirstOrDefaultAsync();
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<Education?>> GetsAsyncEducation(string candidateId)
|
||||
public async Task<Education?> GetsAsyncEducation(string candidateId)
|
||||
{
|
||||
var candidate = await _context.Candidates.AsQueryable()
|
||||
.FirstOrDefaultAsync(x => x.Id == Guid.Parse(candidateId));
|
||||
|
||||
if (candidate == null)
|
||||
throw new Exception(GlobalMessages.ExamNotFound);
|
||||
|
||||
return await _context.Educations.AsQueryable()
|
||||
.Where(x => x.Candidate.Id == Guid.Parse(candidateId))
|
||||
.OrderBy(d => d.DurationStart)
|
||||
.ToListAsync();
|
||||
.Where(x => x.Candidate == candidate)
|
||||
.FirstOrDefaultAsync();
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<Career?>> GetsAsyncCareer(string candidateId)
|
||||
|
|
@ -1319,7 +1349,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
Nationality = c.Nationality,
|
||||
DateOfBirth = c.DateOfBirth == null ? "" : c.DateOfBirth.Value.Date.ToThaiShortDate(),
|
||||
Age = c.DateOfBirth == null ? "" : c.DateOfBirth.Value.Date.CalculateAgeStrV2(0, 0),
|
||||
RelationshipName = c.RelationshipName,
|
||||
ReligionName = c.ReligionName,
|
||||
Telephone = c.Telephone,
|
||||
MobilePhone = c.MobilePhone,
|
||||
Email = c.Email,
|
||||
|
|
@ -1334,14 +1364,12 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
CurrentDistrictName = c.CurrentDistrictName,
|
||||
CurrentSubDistrictName = c.CurrentSubDistrictName,
|
||||
CurrentZipCode = c.CurrentZipCode,
|
||||
MarryFullName = $"{c.MarryPrefixName}{c.MarryFirstName} {c.MarryLastName}",
|
||||
FatherFullName = $"{c.FatherPrefixName}{c.FatherFirstName} {c.FatherLastName}",
|
||||
MotherFullName = $"{c.MotherPrefixName}{c.MotherFirstName} {c.MotherLastName}",
|
||||
OccupationType = c.OccupationType,
|
||||
OccupationOrg = c.OccupationOrg,
|
||||
OccupationPile = c.OccupationPile,
|
||||
OccupationGroup = c.OccupationGroup,
|
||||
OccupationSalary = c.OccupationSalary,
|
||||
OccupationPosition = c.OccupationPosition,
|
||||
OccupationCompany = c.OccupationCompany,
|
||||
OccupationDepartment = c.OccupationDepartment,
|
||||
OccupationEmail = c.OccupationEmail,
|
||||
OccupationPositionType = c.OccupationPositionType,
|
||||
OccupationTelephone = c.OccupationTelephone,
|
||||
RegisterDate = c.RegisterDate,
|
||||
|
||||
|
|
@ -1384,7 +1412,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
summarySheet.Cells[1, 4].Value = "สัญชาติ";
|
||||
summarySheet.Cells[1, 5].Value = "วันเกิด";
|
||||
summarySheet.Cells[1, 6].Value = "อายุ";
|
||||
summarySheet.Cells[1, 7].Value = "สถานภาพ";
|
||||
summarySheet.Cells[1, 7].Value = "ศาสนา";
|
||||
summarySheet.Cells[1, 8].Value = "โทรศัพท์";
|
||||
summarySheet.Cells[1, 9].Value = "โทรศัพท์มือถือ";
|
||||
summarySheet.Cells[1, 10].Value = "อีเมล";
|
||||
|
|
@ -1399,46 +1427,54 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
summarySheet.Cells[1, 19].Value = "เขต/อำเภอที่อยู่ปัจจุบัน";
|
||||
summarySheet.Cells[1, 20].Value = "ตำบล/แขวงที่อยู่ปัจจุบัน";
|
||||
summarySheet.Cells[1, 21].Value = "รหัสไปรษณีย์ที่อยู่ปัจจุบัน";
|
||||
summarySheet.Cells[1, 22].Value = "คู่สมรส";
|
||||
summarySheet.Cells[1, 23].Value = "บิดา";
|
||||
summarySheet.Cells[1, 24].Value = "มารดา";
|
||||
summarySheet.Cells[1, 25].Value = "อาชีพ";
|
||||
summarySheet.Cells[1, 26].Value = "ตำแหน่ง";
|
||||
summarySheet.Cells[1, 27].Value = "สำนัก/บริษัท";
|
||||
summarySheet.Cells[1, 28].Value = "กอง/ฝ่าย";
|
||||
summarySheet.Cells[1, 29].Value = "อีเมลบริษัท";
|
||||
summarySheet.Cells[1, 30].Value = "โทรศัพท์บริษัท";
|
||||
summarySheet.Cells[1, 31].Value = "วุฒิที่ได้รับ";
|
||||
summarySheet.Cells[1, 32].Value = "สาขา/วิชาเอก";
|
||||
summarySheet.Cells[1, 33].Value = "คะแนนเฉลี่ยตลอดหลักสูตร";
|
||||
summarySheet.Cells[1, 34].Value = "ชื่อสถานศีกษา";
|
||||
summarySheet.Cells[1, 35].Value = "ระยะเวลาเริ่มศึกษา";
|
||||
summarySheet.Cells[1, 36].Value = "ระยะเวลาสิ้นสุดศึกษา";
|
||||
summarySheet.Cells[1, 37].Value = "สถานที่ทำงาน/ฝึกงาน";
|
||||
summarySheet.Cells[1, 38].Value = "ตำแหน่ง/ลักษณะงาน";
|
||||
summarySheet.Cells[1, 39].Value = "เงินเดือนสุดท้านก่อนออก";
|
||||
summarySheet.Cells[1, 40].Value = "ระยะเวลาเริ่มทำงาน/ฝึกงาน";
|
||||
summarySheet.Cells[1, 41].Value = "ระยะเวลาสิ้นสุดทำงาน/ฝึกงาน";
|
||||
summarySheet.Cells[1, 42].Value = "เหตุผลที่ออก";
|
||||
summarySheet.Cells[1, 43].Value = "ลำดับที่สอบได้";
|
||||
summarySheet.Cells[1, 44].Value = "เลขประจำตัวสอบ";
|
||||
summarySheet.Cells[1, 45].Value = "เลขที่นั่งสอบ";
|
||||
summarySheet.Cells[1, 46].Value = "คะแนนเต็มภาค ข";
|
||||
summarySheet.Cells[1, 47].Value = "คะแนนภาค ข";
|
||||
summarySheet.Cells[1, 48].Value = "ผลสอบภาค ข";
|
||||
summarySheet.Cells[1, 49].Value = "คะแนนเต็มภาค ค";
|
||||
summarySheet.Cells[1, 50].Value = "คะแนนภาค ค";
|
||||
summarySheet.Cells[1, 51].Value = "ผลสอบภาค ค";
|
||||
summarySheet.Cells[1, 52].Value = "ผลการสอบ";
|
||||
summarySheet.Cells[1, 53].Value = "วันที่สมัคร";
|
||||
summarySheet.Cells[1, 54].Value = "วันเและเวลาที่สมัคร";
|
||||
|
||||
summarySheet.Cells[1, 22].Value = "ประเภทตำแหน่งปัจจุบัน";
|
||||
summarySheet.Cells[1, 23].Value = "ชื่อตำแหน่งปัจจุบัน";
|
||||
summarySheet.Cells[1, 24].Value = "เงินเดือน ตำแหน่งปัจจุบัน";
|
||||
summarySheet.Cells[1, 25].Value = "กลุ่ม/ฝ่าย ตำแหน่งปัจจุบัน";
|
||||
summarySheet.Cells[1, 26].Value = "กอง ตำแหน่งปัจจุบัน";
|
||||
summarySheet.Cells[1, 27].Value = "สังกัด ตำแหน่งปัจจุบัน";
|
||||
summarySheet.Cells[1, 28].Value = "เบอร์ที่ทำงาน ตำแหน่งปัจจุบัน";
|
||||
|
||||
summarySheet.Cells[1, 29].Value = "วุฒิที่ใช้สมัครสอบ";
|
||||
summarySheet.Cells[1, 30].Value = "ชื่อปริญญา";
|
||||
summarySheet.Cells[1, 31].Value = "สาขาวิชา/วิชาเอก";
|
||||
summarySheet.Cells[1, 32].Value = "ชื่อสถานศึกษา";
|
||||
summarySheet.Cells[1, 33].Value = "ประเภทสถานศึกษา";
|
||||
summarySheet.Cells[1, 34].Value = "วันที่สำเร็จการศึกษา";
|
||||
summarySheet.Cells[1, 35].Value = "คะแนนเฉลี่ยสะสม";
|
||||
summarySheet.Cells[1, 36].Value = "วุฒิการศึกษาสูงสุด";
|
||||
|
||||
summarySheet.Cells[1, 37].Value = "ตำแหน่งปัจจุบัน ชื่อตำแหน่ง";
|
||||
summarySheet.Cells[1, 38].Value = "ตำแหน่งปัจจุบัน กอง";
|
||||
summarySheet.Cells[1, 39].Value = "ตำแหน่งปัจจุบัน กลุ่ม/ฝ่าย";
|
||||
summarySheet.Cells[1, 40].Value = "ตำแหน่งปัจจุบัน เงินเดือน";
|
||||
summarySheet.Cells[1, 41].Value = "ตำแหน่งปัจจุบัน สังกัด";
|
||||
summarySheet.Cells[1, 42].Value = "ตำแหน่งปัจจุบัน ประเภทราชการ";
|
||||
summarySheet.Cells[1, 43].Value = "เบอร์โทรที่ทำงาน";
|
||||
|
||||
summarySheet.Cells[1, 44].Value = "ลำดับที่สอบได้";
|
||||
summarySheet.Cells[1, 45].Value = "เลขประจำตัวสอบ";
|
||||
summarySheet.Cells[1, 46].Value = "เลขที่นั่งสอบ";
|
||||
summarySheet.Cells[1, 47].Value = "คะแนนเต็มภาค ก";
|
||||
summarySheet.Cells[1, 48].Value = "คะแนนภาค ก";
|
||||
summarySheet.Cells[1, 49].Value = "ผลสอบภาค ก";
|
||||
summarySheet.Cells[1, 50].Value = "คะแนนเต็มภาค ข";
|
||||
summarySheet.Cells[1, 51].Value = "คะแนนภาค ข";
|
||||
summarySheet.Cells[1, 52].Value = "ผลสอบภาค ข";
|
||||
summarySheet.Cells[1, 53].Value = "คะแนนเต็มภาค ค";
|
||||
summarySheet.Cells[1, 54].Value = "คะแนนภาค ค";
|
||||
summarySheet.Cells[1, 55].Value = "ผลสอบภาค ค";
|
||||
summarySheet.Cells[1, 56].Value = "ผลการสอบ";
|
||||
summarySheet.Cells[1, 57].Value = "วันที่สมัคร";
|
||||
summarySheet.Cells[1, 58].Value = "วันเและเวลาที่สมัคร";
|
||||
int row = 2;
|
||||
|
||||
foreach (var item in candidates)
|
||||
{
|
||||
var educations = await _context.Educations
|
||||
.AsQueryable()
|
||||
.OrderBy(x => x.DurationStart)
|
||||
.OrderBy(x => x.EducationEndDate)
|
||||
.Where(x => x.Candidate.Id == item.Id)
|
||||
.ToListAsync();
|
||||
|
||||
|
|
@ -1450,7 +1486,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
summarySheet.Cells[row, 4].Value = item.Nationality;
|
||||
summarySheet.Cells[row, 5].Value = item.DateOfBirth;
|
||||
summarySheet.Cells[row, 6].Value = item.Age;
|
||||
summarySheet.Cells[row, 7].Value = item.RelationshipName;
|
||||
summarySheet.Cells[row, 7].Value = item.ReligionName;
|
||||
summarySheet.Cells[row, 8].Value = item.Telephone;
|
||||
summarySheet.Cells[row, 9].Value = item.MobilePhone;
|
||||
summarySheet.Cells[row, 10].Value = item.Email;
|
||||
|
|
@ -1465,36 +1501,39 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
summarySheet.Cells[row, 19].Value = item.CurrentDistrictName;
|
||||
summarySheet.Cells[row, 20].Value = item.CurrentSubDistrictName;
|
||||
summarySheet.Cells[row, 21].Value = item.CurrentZipCode;
|
||||
summarySheet.Cells[row, 22].Value = item.MarryFullName;
|
||||
summarySheet.Cells[row, 23].Value = item.FatherFullName;
|
||||
summarySheet.Cells[row, 24].Value = item.MotherFullName;
|
||||
summarySheet.Cells[row, 25].Value = item.OccupationType == null ? null : GenerateStatusOccupation(item.OccupationType);
|
||||
summarySheet.Cells[row, 26].Value = item.OccupationPosition;
|
||||
summarySheet.Cells[row, 27].Value = item.OccupationCompany;
|
||||
summarySheet.Cells[row, 28].Value = item.OccupationDepartment;
|
||||
summarySheet.Cells[row, 29].Value = item.OccupationEmail;
|
||||
summarySheet.Cells[row, 30].Value = item.OccupationTelephone;
|
||||
summarySheet.Cells[row, 31].Value = education.EducationLevelName;
|
||||
summarySheet.Cells[row, 32].Value = education.Major;
|
||||
summarySheet.Cells[row, 33].Value = education.Scores;
|
||||
summarySheet.Cells[row, 34].Value = education.Name;
|
||||
summarySheet.Cells[row, 35].Value = education.DurationStart == null ? "" : education.DurationStart.Date.ToThaiShortDate();
|
||||
summarySheet.Cells[row, 36].Value = education.DurationEnd == null ? "" : education.DurationEnd.Date.ToThaiShortDate();
|
||||
summarySheet.Cells[row, 43].Value = item.Number;
|
||||
summarySheet.Cells[row, 44].Value = item.ExamIdenNumber;
|
||||
summarySheet.Cells[row, 45].Value = item.SeatNumber;
|
||||
summarySheet.Cells[row, 46].Value = item.PointTotalA;
|
||||
summarySheet.Cells[row, 47].Value = item.PointA;
|
||||
summarySheet.Cells[row, 48].Value = item.ResultA;
|
||||
summarySheet.Cells[row, 49].Value = item.PointTotalB;
|
||||
summarySheet.Cells[row, 50].Value = item.PointB;
|
||||
summarySheet.Cells[row, 51].Value = item.ResultB;
|
||||
summarySheet.Cells[row, 52].Value = item.PointTotalC;
|
||||
summarySheet.Cells[row, 53].Value = item.PointC;
|
||||
summarySheet.Cells[row, 54].Value = item.ResultC;
|
||||
summarySheet.Cells[row, 55].Value = item.Pass;
|
||||
summarySheet.Cells[row, 56].Value = item.CreatedAt.Date.ToThaiShortDate();
|
||||
summarySheet.Cells[row, 57].Value = item.RegisterDate;
|
||||
|
||||
summarySheet.Cells[row, 22].Value = item.OccupationPosition;
|
||||
summarySheet.Cells[row, 23].Value = item.OccupationSalary;
|
||||
summarySheet.Cells[row, 24].Value = item.OccupationGroup;
|
||||
summarySheet.Cells[row, 25].Value = item.OccupationPile;
|
||||
summarySheet.Cells[row, 26].Value = item.OccupationOrg;
|
||||
summarySheet.Cells[row, 27].Value = item.OccupationPositionType == null ? null : GenerateStatusOccupation(item.OccupationPositionType);
|
||||
summarySheet.Cells[row, 28].Value = item.OccupationTelephone;
|
||||
|
||||
summarySheet.Cells[row, 29].Value = education.EducationLevelExamName;
|
||||
summarySheet.Cells[row, 30].Value = education.EducationName;
|
||||
summarySheet.Cells[row, 31].Value = education.EducationMajor;
|
||||
summarySheet.Cells[row, 32].Value = education.EducationLocation;
|
||||
summarySheet.Cells[row, 33].Value = education.EducationType;
|
||||
summarySheet.Cells[row, 34].Value = education.EducationEndDate == null ? "-" : education.EducationEndDate.Value.Date.ToThaiShortDate();
|
||||
summarySheet.Cells[row, 35].Value = education.EducationScores;
|
||||
summarySheet.Cells[row, 36].Value = education.EducationLevelHighName;
|
||||
|
||||
summarySheet.Cells[row, 44].Value = item.Number;
|
||||
summarySheet.Cells[row, 45].Value = item.ExamIdenNumber;
|
||||
summarySheet.Cells[row, 46].Value = item.SeatNumber;
|
||||
summarySheet.Cells[row, 47].Value = item.PointTotalA;
|
||||
summarySheet.Cells[row, 48].Value = item.PointA;
|
||||
summarySheet.Cells[row, 49].Value = item.ResultA;
|
||||
summarySheet.Cells[row, 50].Value = item.PointTotalB;
|
||||
summarySheet.Cells[row, 51].Value = item.PointB;
|
||||
summarySheet.Cells[row, 52].Value = item.ResultB;
|
||||
summarySheet.Cells[row, 53].Value = item.PointTotalC;
|
||||
summarySheet.Cells[row, 54].Value = item.PointC;
|
||||
summarySheet.Cells[row, 55].Value = item.ResultC;
|
||||
summarySheet.Cells[row, 56].Value = item.Pass;
|
||||
summarySheet.Cells[row, 57].Value = item.CreatedAt.Date.ToThaiShortDate();
|
||||
summarySheet.Cells[row, 58].Value = item.RegisterDate;
|
||||
row++;
|
||||
}
|
||||
var careers = await _context.Careers
|
||||
|
|
@ -1511,7 +1550,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
summarySheet.Cells[row, 4].Value = item.Nationality;
|
||||
summarySheet.Cells[row, 5].Value = item.DateOfBirth;
|
||||
summarySheet.Cells[row, 6].Value = item.Age;
|
||||
summarySheet.Cells[row, 7].Value = item.RelationshipName;
|
||||
summarySheet.Cells[row, 7].Value = item.ReligionName;
|
||||
summarySheet.Cells[row, 8].Value = item.Telephone;
|
||||
summarySheet.Cells[row, 9].Value = item.MobilePhone;
|
||||
summarySheet.Cells[row, 10].Value = item.Email;
|
||||
|
|
@ -1526,36 +1565,38 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
summarySheet.Cells[row, 19].Value = item.CurrentDistrictName;
|
||||
summarySheet.Cells[row, 20].Value = item.CurrentSubDistrictName;
|
||||
summarySheet.Cells[row, 21].Value = item.CurrentZipCode;
|
||||
summarySheet.Cells[row, 22].Value = item.MarryFullName;
|
||||
summarySheet.Cells[row, 23].Value = item.FatherFullName;
|
||||
summarySheet.Cells[row, 24].Value = item.MotherFullName;
|
||||
summarySheet.Cells[row, 25].Value = item.OccupationType == null ? null : GenerateStatusOccupation(item.OccupationType);
|
||||
summarySheet.Cells[row, 26].Value = item.OccupationPosition;
|
||||
summarySheet.Cells[row, 27].Value = item.OccupationCompany;
|
||||
summarySheet.Cells[row, 28].Value = item.OccupationDepartment;
|
||||
summarySheet.Cells[row, 29].Value = item.OccupationEmail;
|
||||
summarySheet.Cells[row, 30].Value = item.OccupationTelephone;
|
||||
summarySheet.Cells[row, 37].Value = career.Name;
|
||||
summarySheet.Cells[row, 38].Value = career.Position;
|
||||
summarySheet.Cells[row, 39].Value = career.Salary;
|
||||
summarySheet.Cells[row, 40].Value = career.DurationStart == null ? "" : career.DurationStart.Date.ToThaiShortDate();
|
||||
summarySheet.Cells[row, 41].Value = career.DurationEnd == null ? "" : career.DurationEnd.Date.ToThaiShortDate();
|
||||
summarySheet.Cells[row, 42].Value = career.Reason;
|
||||
summarySheet.Cells[row, 43].Value = item.Number;
|
||||
summarySheet.Cells[row, 44].Value = item.ExamIdenNumber;
|
||||
summarySheet.Cells[row, 45].Value = item.SeatNumber;
|
||||
summarySheet.Cells[row, 46].Value = item.PointTotalA;
|
||||
summarySheet.Cells[row, 47].Value = item.PointA;
|
||||
summarySheet.Cells[row, 48].Value = item.ResultA;
|
||||
summarySheet.Cells[row, 49].Value = item.PointTotalB;
|
||||
summarySheet.Cells[row, 50].Value = item.PointB;
|
||||
summarySheet.Cells[row, 51].Value = item.ResultB;
|
||||
summarySheet.Cells[row, 52].Value = item.PointTotalC;
|
||||
summarySheet.Cells[row, 53].Value = item.PointC;
|
||||
summarySheet.Cells[row, 54].Value = item.ResultC;
|
||||
summarySheet.Cells[row, 55].Value = item.Pass;
|
||||
summarySheet.Cells[row, 56].Value = item.CreatedAt.Date.ToThaiShortDate();
|
||||
summarySheet.Cells[row, 57].Value = item.RegisterDate;
|
||||
|
||||
summarySheet.Cells[row, 22].Value = item.OccupationPosition;
|
||||
summarySheet.Cells[row, 23].Value = item.OccupationSalary;
|
||||
summarySheet.Cells[row, 24].Value = item.OccupationGroup;
|
||||
summarySheet.Cells[row, 25].Value = item.OccupationPile;
|
||||
summarySheet.Cells[row, 26].Value = item.OccupationOrg;
|
||||
summarySheet.Cells[row, 27].Value = item.OccupationPositionType == null ? null : GenerateStatusOccupation(item.OccupationPositionType);
|
||||
summarySheet.Cells[row, 28].Value = item.OccupationTelephone;
|
||||
|
||||
summarySheet.Cells[row, 37].Value = career.Position;
|
||||
summarySheet.Cells[row, 38].Value = career.Group;
|
||||
summarySheet.Cells[row, 39].Value = career.Pile;
|
||||
summarySheet.Cells[row, 40].Value = career.Org;
|
||||
summarySheet.Cells[row, 41].Value = career.DurationStart == null ? "-" : career.DurationStart.Date.ToThaiShortDate();
|
||||
summarySheet.Cells[row, 42].Value = career.DurationEnd == null ? "-" : career.DurationEnd.Date.ToThaiShortDate();
|
||||
summarySheet.Cells[row, 43].Value = career.RangeDate;
|
||||
|
||||
summarySheet.Cells[row, 44].Value = item.Number;
|
||||
summarySheet.Cells[row, 45].Value = item.ExamIdenNumber;
|
||||
summarySheet.Cells[row, 46].Value = item.SeatNumber;
|
||||
summarySheet.Cells[row, 47].Value = item.PointTotalA;
|
||||
summarySheet.Cells[row, 48].Value = item.PointA;
|
||||
summarySheet.Cells[row, 49].Value = item.ResultA;
|
||||
summarySheet.Cells[row, 50].Value = item.PointTotalB;
|
||||
summarySheet.Cells[row, 51].Value = item.PointB;
|
||||
summarySheet.Cells[row, 52].Value = item.ResultB;
|
||||
summarySheet.Cells[row, 53].Value = item.PointTotalC;
|
||||
summarySheet.Cells[row, 54].Value = item.PointC;
|
||||
summarySheet.Cells[row, 55].Value = item.ResultC;
|
||||
summarySheet.Cells[row, 56].Value = item.Pass;
|
||||
summarySheet.Cells[row, 57].Value = item.CreatedAt.Date.ToThaiShortDate();
|
||||
summarySheet.Cells[row, 58].Value = item.RegisterDate;
|
||||
row++;
|
||||
}
|
||||
if (educations.Count() == 0 && careers.Count() == 0)
|
||||
|
|
@ -1566,7 +1607,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
summarySheet.Cells[row, 4].Value = item.Nationality;
|
||||
summarySheet.Cells[row, 5].Value = item.DateOfBirth;
|
||||
summarySheet.Cells[row, 6].Value = item.Age;
|
||||
summarySheet.Cells[row, 7].Value = item.RelationshipName;
|
||||
summarySheet.Cells[row, 7].Value = item.ReligionName;
|
||||
summarySheet.Cells[row, 8].Value = item.Telephone;
|
||||
summarySheet.Cells[row, 9].Value = item.MobilePhone;
|
||||
summarySheet.Cells[row, 10].Value = item.Email;
|
||||
|
|
@ -1581,31 +1622,30 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
summarySheet.Cells[row, 19].Value = item.CurrentDistrictName;
|
||||
summarySheet.Cells[row, 20].Value = item.CurrentSubDistrictName;
|
||||
summarySheet.Cells[row, 21].Value = item.CurrentZipCode;
|
||||
summarySheet.Cells[row, 22].Value = item.MarryFullName;
|
||||
summarySheet.Cells[row, 23].Value = item.FatherFullName;
|
||||
summarySheet.Cells[row, 24].Value = item.MotherFullName;
|
||||
summarySheet.Cells[row, 25].Value = item.OccupationType == null ? null : GenerateStatusOccupation(item.OccupationType);
|
||||
summarySheet.Cells[row, 26].Value = item.OccupationPosition;
|
||||
summarySheet.Cells[row, 27].Value = item.OccupationCompany;
|
||||
summarySheet.Cells[row, 28].Value = item.OccupationDepartment;
|
||||
summarySheet.Cells[row, 29].Value = item.OccupationEmail;
|
||||
summarySheet.Cells[row, 30].Value = item.OccupationTelephone;
|
||||
|
||||
summarySheet.Cells[row, 43].Value = item.Number;
|
||||
summarySheet.Cells[row, 44].Value = item.ExamIdenNumber;
|
||||
summarySheet.Cells[row, 45].Value = item.SeatNumber;
|
||||
summarySheet.Cells[row, 46].Value = item.PointTotalA;
|
||||
summarySheet.Cells[row, 47].Value = item.PointA;
|
||||
summarySheet.Cells[row, 48].Value = item.ResultA;
|
||||
summarySheet.Cells[row, 49].Value = item.PointTotalB;
|
||||
summarySheet.Cells[row, 50].Value = item.PointB;
|
||||
summarySheet.Cells[row, 51].Value = item.ResultB;
|
||||
summarySheet.Cells[row, 52].Value = item.PointTotalC;
|
||||
summarySheet.Cells[row, 53].Value = item.PointC;
|
||||
summarySheet.Cells[row, 54].Value = item.ResultC;
|
||||
summarySheet.Cells[row, 55].Value = item.Pass;
|
||||
summarySheet.Cells[row, 56].Value = item.CreatedAt.Date.ToThaiShortDate();
|
||||
summarySheet.Cells[row, 57].Value = item.RegisterDate;
|
||||
summarySheet.Cells[row, 22].Value = item.OccupationPosition;
|
||||
summarySheet.Cells[row, 23].Value = item.OccupationSalary;
|
||||
summarySheet.Cells[row, 24].Value = item.OccupationGroup;
|
||||
summarySheet.Cells[row, 25].Value = item.OccupationPile;
|
||||
summarySheet.Cells[row, 26].Value = item.OccupationOrg;
|
||||
summarySheet.Cells[row, 27].Value = item.OccupationPositionType == null ? null : GenerateStatusOccupation(item.OccupationPositionType);
|
||||
summarySheet.Cells[row, 28].Value = item.OccupationTelephone;
|
||||
|
||||
summarySheet.Cells[row, 44].Value = item.Number;
|
||||
summarySheet.Cells[row, 45].Value = item.ExamIdenNumber;
|
||||
summarySheet.Cells[row, 46].Value = item.SeatNumber;
|
||||
summarySheet.Cells[row, 47].Value = item.PointTotalA;
|
||||
summarySheet.Cells[row, 48].Value = item.PointA;
|
||||
summarySheet.Cells[row, 49].Value = item.ResultA;
|
||||
summarySheet.Cells[row, 50].Value = item.PointTotalB;
|
||||
summarySheet.Cells[row, 51].Value = item.PointB;
|
||||
summarySheet.Cells[row, 52].Value = item.ResultB;
|
||||
summarySheet.Cells[row, 53].Value = item.PointTotalC;
|
||||
summarySheet.Cells[row, 54].Value = item.PointC;
|
||||
summarySheet.Cells[row, 55].Value = item.ResultC;
|
||||
summarySheet.Cells[row, 56].Value = item.Pass;
|
||||
summarySheet.Cells[row, 57].Value = item.CreatedAt.Date.ToThaiShortDate();
|
||||
summarySheet.Cells[row, 58].Value = item.RegisterDate;
|
||||
row++;
|
||||
}
|
||||
}
|
||||
|
|
@ -1641,7 +1681,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
Nationality = c.Nationality,
|
||||
DateOfBirth = c.DateOfBirth == null ? "" : c.DateOfBirth.Value.Date.ToThaiShortDate(),
|
||||
Age = c.DateOfBirth == null ? 0 : DateTime.Now.Date.Year - c.DateOfBirth.Value.Date.Year,
|
||||
RelationshipName = c.RelationshipName,
|
||||
ReligionName = c.ReligionName,
|
||||
Telephone = c.Telephone,
|
||||
MobilePhone = c.MobilePhone,
|
||||
Email = c.Email,
|
||||
|
|
@ -1656,14 +1696,12 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
CurrentDistrictName = c.CurrentDistrictName,
|
||||
CurrentSubDistrictName = c.CurrentSubDistrictName,
|
||||
CurrentZipCode = c.CurrentZipCode,
|
||||
MarryFullName = $"{c.MarryPrefixName}{c.MarryFirstName} {c.MarryLastName}",
|
||||
FatherFullName = $"{c.FatherPrefixName}{c.FatherFirstName} {c.FatherLastName}",
|
||||
MotherFullName = $"{c.MotherPrefixName}{c.MotherFirstName} {c.MotherLastName}",
|
||||
OccupationType = c.OccupationType,
|
||||
OccupationOrg = c.OccupationOrg,
|
||||
OccupationPile = c.OccupationPile,
|
||||
OccupationGroup = c.OccupationGroup,
|
||||
OccupationSalary = c.OccupationSalary,
|
||||
OccupationPosition = c.OccupationPosition,
|
||||
OccupationCompany = c.OccupationCompany,
|
||||
OccupationDepartment = c.OccupationDepartment,
|
||||
OccupationEmail = c.OccupationEmail,
|
||||
OccupationPositionType = c.OccupationPositionType,
|
||||
OccupationTelephone = c.OccupationTelephone,
|
||||
Number = c.Number,
|
||||
ExamIdenNumber = c.ExamIdenNumber,
|
||||
|
|
@ -1729,7 +1767,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
.Where(x => x.Candidate.PeriodExam == periodExam)
|
||||
.Where(x => x.Candidate.CreatedAt.Date <= item.DateEnd.Date)
|
||||
.Where(x => x.Candidate.CreatedAt.Date >= item.DateStart.Date)
|
||||
.GroupBy(x => x.EducationLevelName)
|
||||
.GroupBy(x => x.EducationLevelExamName)
|
||||
.Select(x => new
|
||||
{
|
||||
Name = x.Key,
|
||||
|
|
@ -1746,7 +1784,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
}
|
||||
if (educations.Count() != 0)
|
||||
{
|
||||
summarySheet.Cells[5, fixMerge, 5, rowName - 1].Value = "วุฒิการศึกษา";
|
||||
summarySheet.Cells[5, fixMerge, 5, rowName - 1].Value = "วุฒิที่ใช้สมัครสอบ";
|
||||
summarySheet.Cells[5, fixMerge, 5, rowName - 1].Merge = true;
|
||||
fixMerge = rowCount;
|
||||
}
|
||||
|
|
@ -1755,7 +1793,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
.Where(x => x.Candidate.PeriodExam == periodExam)
|
||||
.Where(x => x.Candidate.CreatedAt.Date <= item.DateEnd.Date)
|
||||
.Where(x => x.Candidate.CreatedAt.Date >= item.DateStart.Date)
|
||||
.GroupBy(x => x.Name)
|
||||
.GroupBy(x => x.Position)
|
||||
.Select(x => new
|
||||
{
|
||||
Name = x.Key,
|
||||
|
|
@ -1866,8 +1904,6 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
public async Task UpdateAsyncCandidateToPlacement(Guid examId)
|
||||
{
|
||||
var periodExam = await _context.PeriodExams.AsQueryable()
|
||||
.Include(x => x.Candidate)
|
||||
.ThenInclude(x => x.Educations)
|
||||
.Include(x => x.Candidate)
|
||||
.ThenInclude(x => x.PositionExam)
|
||||
.Include(x => x.Candidate)
|
||||
|
|
@ -1911,7 +1947,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
Lastname = candidate.LastName,
|
||||
Nationality = candidate.Nationality,
|
||||
DateOfBirth = candidate.DateOfBirth,
|
||||
Relationship = await _contextMetadata.Relationships.FirstOrDefaultAsync(x => x.Id == candidate.RelationshipId),
|
||||
Religion = await _contextMetadata.Religions.FirstOrDefaultAsync(x => x.Id == candidate.ReligionId),
|
||||
Email = candidate.Email,
|
||||
CitizenId = candidate.CitizenId,
|
||||
CitizenDistrict = await _contextMetadata.Districts.FirstOrDefaultAsync(x => x.Id == candidate.CitizenDistrictId),
|
||||
|
|
@ -1947,12 +1983,13 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
MotherLastName = candidate.MotherLastName,
|
||||
MotherOccupation = candidate.MotherOccupation,
|
||||
MotherNationality = candidate.MotherNationality,
|
||||
OccupationType = candidate.OccupationType,
|
||||
OccupationCompany = candidate.OccupationCompany,
|
||||
OccupationDepartment = candidate.OccupationDepartment,
|
||||
OccupationEmail = candidate.OccupationEmail,
|
||||
OccupationTelephone = candidate.OccupationTelephone,
|
||||
OccupationOrg = candidate.OccupationOrg,
|
||||
OccupationPile = candidate.OccupationPile,
|
||||
OccupationGroup = candidate.OccupationGroup,
|
||||
OccupationSalary = candidate.OccupationSalary,
|
||||
OccupationPosition = candidate.OccupationPosition,
|
||||
OccupationPositionType = candidate.OccupationPositionType,
|
||||
OccupationTelephone = candidate.OccupationTelephone,
|
||||
PointTotalA = candidate.PointTotalA == null ? null : Convert.ToDouble(candidate.PointTotalA),
|
||||
PointA = candidate.PointA == null ? null : Convert.ToDouble(candidate.PointA),
|
||||
PointTotalB = candidate.PointTotalB == null ? null : Convert.ToDouble(candidate.PointTotalB),
|
||||
|
|
@ -1978,13 +2015,12 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
var placementEducation = new PlacementEducation
|
||||
{
|
||||
PlacementProfile = placementProfile,
|
||||
EducationLevel = await _contextMetadata.EducationLevels.FirstOrDefaultAsync(x => x.Id == education.EducationLevelId),
|
||||
Field = education.Major,
|
||||
Gpa = education.Scores.ToString(),
|
||||
Institute = education.Name,
|
||||
EducationLevel = await _contextMetadata.EducationLevels.FirstOrDefaultAsync(x => x.Id == education.EducationLevelExamId),
|
||||
Field = education.EducationMajor,
|
||||
Gpa = education.EducationScores,
|
||||
Institute = education.EducationLocation,
|
||||
IsDate = true,
|
||||
StartDate = education.DurationStart,
|
||||
EndDate = education.DurationEnd,
|
||||
FinishDate = education.EducationEndDate,
|
||||
CreatedAt = DateTime.Now,
|
||||
CreatedUserId = UserId ?? "",
|
||||
LastUpdatedAt = DateTime.Now,
|
||||
|
|
@ -2103,12 +2139,14 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
// MotherLastName = candidate.MotherLastName,
|
||||
// MotherOccupation = candidate.MotherOccupation,
|
||||
// MotherNationality = candidate.MotherNationality,
|
||||
OccupationType = "other",
|
||||
|
||||
OccupationPositionType = "other",
|
||||
// OccupationCompany = candidate.OccupationCompany,
|
||||
OccupationDepartment = candidate.Occupations.FirstOrDefault() == null ? null : candidate.Occupations.FirstOrDefault().Workplace,
|
||||
// OccupationDepartment = candidate.Occupations.FirstOrDefault() == null ? null : candidate.Occupations.FirstOrDefault().Workplace,
|
||||
// OccupationEmail = candidate.OccupationEmail,
|
||||
OccupationTelephone = candidate.Occupations.FirstOrDefault() == null ? null : candidate.Occupations.FirstOrDefault().Telephone,
|
||||
OccupationPosition = candidate.Occupations.FirstOrDefault() == null ? null : candidate.Occupations.FirstOrDefault().Position,
|
||||
|
||||
PointTotalA = disableScore == null ? null : Convert.ToDouble(disableScore.FullA),
|
||||
PointA = disableScore == null ? null : Convert.ToDouble(disableScore.SumA),
|
||||
PointTotalB = disableScore == null ? null : Convert.ToDouble(disableScore.FullB),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue