เช็คเลขบัตร
This commit is contained in:
parent
b8f12139e1
commit
77d397a8d8
6 changed files with 267 additions and 126 deletions
|
|
@ -1460,6 +1460,33 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
|
|||
return Error(ex);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// โหลดใบชำระเงิน
|
||||
/// </summary>
|
||||
/// <param name="examId">รหัสรอบสมัคร</param>
|
||||
/// <param name="positionId">Id ตำแหน่งสมัครสอบ</param>
|
||||
/// <returns></returns>
|
||||
/// <response code="200">เมื่อทำการโหลดใบชำระเงิน สำเร็จ</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPut("check/citizen/{examId:length(36)}/{positionId:length(36)}")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
public async Task<ActionResult<ResponseObject>> CheckCitizen(string examId, string positionId, RequestCitizen item)
|
||||
{
|
||||
try
|
||||
{
|
||||
await _candidateService.CheckCitizen(examId, positionId, item.CitizenId);
|
||||
|
||||
return Success();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return Error(ex);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,5 +24,6 @@
|
|||
public const string SubDistrictNotFound = "ไม่พบข้อมูลตำบล/แขวง";
|
||||
public const string CMSNotFound = "ไม่พบข้อมูล CMS";
|
||||
public const string OrganizationNotFound = "ไม่พบข้อมูลสังกัด";
|
||||
public const string CitizanDupicate = "เลขบัตรประชาชนนี้ได้ทำการสมัครไว้แล้ว";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
9
Request/RequestCitizen.cs
Normal file
9
Request/RequestCitizen.cs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
using System.Net;
|
||||
|
||||
namespace BMA.EHR.Recurit.Exam.Service.Request
|
||||
{
|
||||
public class RequestCitizen
|
||||
{
|
||||
public string CitizenId { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -86,5 +86,11 @@ namespace BMA.EHR.Recurit.Exam.Service.Response
|
|||
public DateTime EducationEndDate { get; set; }
|
||||
public string EducationScores { get; set; } = string.Empty;
|
||||
public Guid EducationLevelHighId { get; set; }
|
||||
|
||||
public Guid? ContactPrefixId { get; set; }
|
||||
public string? ContactFirstname { get; set; }
|
||||
public string? ContactLastname { get; set; }
|
||||
public string? ContactRelations { get; set; }
|
||||
public string? ContactTel { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -751,6 +751,18 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
candidate.PrefixName = prefix.Name;
|
||||
}
|
||||
|
||||
if (updated.ContactPrefixId != null)
|
||||
{
|
||||
var prefix = await _contextMetadata.Prefixes.AsQueryable()
|
||||
.FirstOrDefaultAsync(x => x.Id == updated.ContactPrefixId);
|
||||
|
||||
if (prefix == null)
|
||||
throw new Exception(GlobalMessages.PrefixNotFound);
|
||||
|
||||
candidate.ContactPrefixId = prefix.Id;
|
||||
candidate.ContactPrefixName = prefix.Name;
|
||||
}
|
||||
|
||||
if (updated.ReligionId != null)
|
||||
{
|
||||
var religion = await _contextMetadata.Religions.AsQueryable()
|
||||
|
|
@ -859,6 +871,11 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
candidate.OccupationPositionType = updated.OccupationPositionType;
|
||||
candidate.OccupationTelephone = updated.OccupationTelephone;
|
||||
|
||||
candidate.ContactFirstname = updated.ContactFirstname;
|
||||
candidate.ContactLastname = updated.ContactLastname;
|
||||
candidate.ContactRelations = updated.ContactRelations;
|
||||
candidate.ContactTel = updated.ContactTel;
|
||||
|
||||
var educationLevelExam = await _contextMetadata.EducationLevels.AsQueryable()
|
||||
.FirstOrDefaultAsync(x => x.Id == updated.EducationLevelExamId);
|
||||
|
||||
|
|
@ -936,6 +953,18 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
candidate.PrefixName = prefix.Name;
|
||||
}
|
||||
|
||||
if (updated.ContactPrefixId != null)
|
||||
{
|
||||
var prefix = await _contextMetadata.Prefixes.AsQueryable()
|
||||
.FirstOrDefaultAsync(x => x.Id == updated.ContactPrefixId);
|
||||
|
||||
if (prefix == null)
|
||||
throw new Exception(GlobalMessages.PrefixNotFound);
|
||||
|
||||
candidate.ContactPrefixId = prefix.Id;
|
||||
candidate.ContactPrefixName = prefix.Name;
|
||||
}
|
||||
|
||||
if (updated.ReligionId != null)
|
||||
{
|
||||
var religion = await _contextMetadata.Religions.AsQueryable()
|
||||
|
|
@ -1044,6 +1073,11 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
candidate.OccupationPositionType = updated.OccupationPositionType;
|
||||
candidate.OccupationTelephone = updated.OccupationTelephone;
|
||||
|
||||
candidate.ContactFirstname = updated.ContactFirstname;
|
||||
candidate.ContactLastname = updated.ContactLastname;
|
||||
candidate.ContactRelations = updated.ContactRelations;
|
||||
candidate.ContactTel = updated.ContactTel;
|
||||
|
||||
var educationLevelExam = await _contextMetadata.EducationLevels.AsQueryable()
|
||||
.FirstOrDefaultAsync(x => x.Id == updated.EducationLevelExamId);
|
||||
|
||||
|
|
@ -1856,7 +1890,10 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
candidate.RegisterDate = DateTime.Now;
|
||||
|
||||
var periodExam = await _context.Candidates.AsQueryable()
|
||||
.Where(x => x.PeriodExam == candidate.PeriodExam && x.PositionExam == candidate.PositionExam && x.ExamIdenNumber != null)
|
||||
.Where(x => x.PeriodExam == candidate.PeriodExam)
|
||||
.Where(x => x.PositionExam == candidate.PositionExam)
|
||||
.Where(x => x.ExamIdenNumber != null)
|
||||
.Where(x => x.Status == "checkRegister")
|
||||
.OrderByDescending(d => d.CreatedAt)
|
||||
.ToListAsync();
|
||||
|
||||
|
|
@ -2263,6 +2300,38 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
await _context.SaveChangesAsync();
|
||||
}
|
||||
|
||||
public async Task CheckCitizen(string examId, string positionId, string citizenId)
|
||||
{
|
||||
var exam = await _context.PeriodExams.AsQueryable()
|
||||
.Where(p => p.CheckDisability == false)
|
||||
.FirstOrDefaultAsync(x => x.Id == Guid.Parse(examId));
|
||||
|
||||
if (exam == null)
|
||||
throw new Exception(GlobalMessages.ExamNotFound);
|
||||
|
||||
if (positionId != "00000000-0000-0000-0000-000000000000")
|
||||
{
|
||||
var position = await _context.PositionExams.AsQueryable()
|
||||
.FirstOrDefaultAsync(x => x.Id == Guid.Parse(positionId) && x.PeriodExam == exam);
|
||||
|
||||
if (position == null)
|
||||
throw new Exception(GlobalMessages.PositionExamNotFound);
|
||||
|
||||
var candidate1 = await _context.Candidates.AsQueryable()
|
||||
.Where(x => x.PeriodExam == exam && x.UserId != UserId && x.PositionExam == position && x.CitizenId == citizenId)
|
||||
.FirstOrDefaultAsync();
|
||||
if (candidate1 != null)
|
||||
throw new Exception(GlobalMessages.CitizanDupicate);
|
||||
return;
|
||||
}
|
||||
|
||||
var candidate2 = await _context.Candidates.AsQueryable()
|
||||
.Where(x => x.PeriodExam == exam && x.UserId != UserId && x.CitizenId == citizenId)
|
||||
.FirstOrDefaultAsync();
|
||||
if (candidate2 != null)
|
||||
throw new Exception(GlobalMessages.CitizanDupicate);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1121,6 +1121,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
{
|
||||
candidates = await _context.Candidates
|
||||
.AsQueryable()
|
||||
.Include(x => x.PositionExam)
|
||||
.OrderBy(x => x.ExamIdenNumber)
|
||||
.Where(x => x.PeriodExam == periodExam)
|
||||
.Where(x => x.Status != "waiver")
|
||||
|
|
@ -1131,6 +1132,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
{
|
||||
candidates = await _context.Candidates
|
||||
.AsQueryable()
|
||||
.Include(x => x.PositionExam)
|
||||
.OrderBy(x => x.ExamIdenNumber)
|
||||
.Where(x => x.PeriodExam == periodExam)
|
||||
.Where(x => x.Status != "register")
|
||||
|
|
@ -1144,70 +1146,76 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
summarySheet.TabColor = System.Drawing.Color.Black;
|
||||
// summarySheet.DefaultRowHeight = 17;
|
||||
summarySheet.Row(1).Style.Font.Bold = true;
|
||||
summarySheet.Cells[1, 1, 1, 5].Value = "ข้อมูลผู้สมัครสอบ";
|
||||
summarySheet.Cells[1, 1, 1, 5].Merge = true;
|
||||
summarySheet.Cells[1, 1, 1, 8].Value = "ข้อมูลผู้สมัครสอบ";
|
||||
summarySheet.Cells[1, 1, 1, 8].Merge = true;
|
||||
summarySheet.Cells[2, 1, 3, 1].Value = "ลำดับที่สอบได้";
|
||||
summarySheet.Cells[2, 1, 3, 1].Merge = true;
|
||||
summarySheet.Cells[2, 2, 3, 2].Value = "เลขประจำตัวสอบ";
|
||||
summarySheet.Cells[2, 2, 3, 2].Merge = true;
|
||||
summarySheet.Cells[2, 3, 3, 3].Value = "เลขบัตรประชาชน";
|
||||
summarySheet.Cells[2, 3, 3, 3].Merge = true;
|
||||
summarySheet.Cells[2, 4, 3, 4].Value = "เลขนั่งสอบ";
|
||||
summarySheet.Cells[2, 4, 3, 4].Value = "สนามสอบ";
|
||||
summarySheet.Cells[2, 4, 3, 4].Merge = true;
|
||||
summarySheet.Cells[2, 5, 3, 5].Value = "ชื่อ-ชื่อสกุล";
|
||||
summarySheet.Cells[2, 5, 3, 5].Value = "คำนำหน้า";
|
||||
summarySheet.Cells[2, 5, 3, 5].Merge = true;
|
||||
summarySheet.Cells[2, 6, 3, 6].Value = "ชื่อ-ชื่อสกุล";
|
||||
summarySheet.Cells[2, 6, 3, 6].Merge = true;
|
||||
summarySheet.Cells[2, 7, 3, 7].Value = "ตำแหน่ง";
|
||||
summarySheet.Cells[2, 7, 3, 7].Merge = true;
|
||||
summarySheet.Cells[2, 8, 3, 8].Value = "ระดับ";
|
||||
summarySheet.Cells[2, 8, 3, 8].Merge = true;
|
||||
|
||||
summarySheet.Cells[1, 6, 1, 11].Value = "ความรู้ความสามารถทั่วไป (ภาค ก.)";
|
||||
summarySheet.Cells[1, 6, 1, 11].Merge = true;
|
||||
summarySheet.Cells[2, 6].Value = "ความสามารถในการคิดวิเคราะห์";
|
||||
summarySheet.Cells[3, 6].Value = "100 คะแนน";
|
||||
summarySheet.Cells[2, 7].Value = "ภาษาอังกฤษ";
|
||||
summarySheet.Cells[3, 7].Value = "50 คะแนน";
|
||||
summarySheet.Cells[2, 8].Value = "ความรู้และลักษณะการเป็นข้าราชการที่ดี";
|
||||
summarySheet.Cells[3, 8].Value = "50 คะแนน";
|
||||
summarySheet.Cells[1, 9, 1, 14].Value = "ความรู้ความสามารถทั่วไป (ภาค ก.)";
|
||||
summarySheet.Cells[1, 9, 1, 14].Merge = true;
|
||||
summarySheet.Cells[2, 9].Value = "ความสามารถในการคิดวิเคราะห์";
|
||||
summarySheet.Cells[3, 9].Value = "100 คะแนน";
|
||||
summarySheet.Cells[2, 10].Value = "ภาษาอังกฤษ";
|
||||
summarySheet.Cells[3, 10].Value = "50 คะแนน";
|
||||
summarySheet.Cells[2, 11].Value = "ความรู้และลักษณะการเป็นข้าราชการที่ดี";
|
||||
summarySheet.Cells[3, 11].Value = "50 คะแนน";
|
||||
// summarySheet.Cells[2, 9].Value = "คะแนนเต็มภาค ก";
|
||||
// summarySheet.Cells[3, 9].Value = "100 คะแนน";
|
||||
summarySheet.Cells[2, 9].Value = "คะแนนรวม";
|
||||
summarySheet.Cells[3, 9].Value = "200 คะแนน";
|
||||
summarySheet.Cells[2, 10, 3, 10].Value = "ร้อยละ";
|
||||
summarySheet.Cells[2, 10, 3, 10].Merge = true;
|
||||
summarySheet.Cells[2, 11, 3, 11].Value = "ผลประเมิน ภาค ก";
|
||||
summarySheet.Cells[2, 11, 3, 11].Merge = true;
|
||||
|
||||
summarySheet.Cells[1, 12, 1, 14].Value = "ภาคความรู้ความสามารถที่ใช้เฉพาะตำแหน่ง(ภาค ข)";
|
||||
summarySheet.Cells[1, 12, 1, 14].Merge = true;
|
||||
// summarySheet.Cells[1, 13].Value = "คะแนนเต็มภาค ข";
|
||||
summarySheet.Cells[2, 12].Value = "คะแนนรวม";
|
||||
summarySheet.Cells[3, 12].Value = "200 คะแนน";
|
||||
summarySheet.Cells[2, 13, 3, 13].Value = "ร้อยละ";
|
||||
summarySheet.Cells[2, 13, 3, 13].Merge = true;
|
||||
summarySheet.Cells[2, 14, 3, 14].Value = "ผลประเมิน ภาค ข";
|
||||
summarySheet.Cells[2, 14, 3, 14].Value = "ผลประเมิน ภาค ก";
|
||||
summarySheet.Cells[2, 14, 3, 14].Merge = true;
|
||||
|
||||
summarySheet.Cells[1, 15, 1, 19].Value = "ภาคความเหมาะสมกับตำแหน่ง (ภาค ค)";
|
||||
summarySheet.Cells[1, 15, 1, 19].Merge = true;
|
||||
summarySheet.Cells[2, 15].Value = "ทดสอบสมรรถนะหลัก";
|
||||
summarySheet.Cells[3, 15].Value = "50 คะแนน";
|
||||
summarySheet.Cells[2, 16].Value = "สัมภาษณ์";
|
||||
summarySheet.Cells[3, 16].Value = "50 คะแนน";
|
||||
// summarySheet.Cells[1, 19].Value = "คะแนนเต็มภาค ค";
|
||||
summarySheet.Cells[2, 17].Value = "คะแนนรวม";
|
||||
summarySheet.Cells[3, 17].Value = "100 คะแนน";
|
||||
summarySheet.Cells[2, 18, 3, 18].Value = "ร้อยละ";
|
||||
summarySheet.Cells[2, 18, 3, 18].Merge = true;
|
||||
summarySheet.Cells[2, 19, 3, 19].Value = "ผลประเมิน ภาค ค";
|
||||
summarySheet.Cells[2, 19, 3, 19].Merge = true;
|
||||
summarySheet.Cells[1, 15, 1, 17].Value = "ภาคความรู้ความสามารถที่ใช้เฉพาะตำแหน่ง(ภาค ข)";
|
||||
summarySheet.Cells[1, 15, 1, 17].Merge = true;
|
||||
// summarySheet.Cells[1, 15].Value = "คะแนนเต็มภาค ข";
|
||||
summarySheet.Cells[2, 15].Value = "คะแนนรวม";
|
||||
summarySheet.Cells[3, 15].Value = "200 คะแนน";
|
||||
summarySheet.Cells[2, 16, 3, 16].Value = "ร้อยละ";
|
||||
summarySheet.Cells[2, 16, 3, 16].Merge = true;
|
||||
summarySheet.Cells[2, 17, 3, 17].Value = "ผลประเมิน ภาค ข";
|
||||
summarySheet.Cells[2, 17, 3, 17].Merge = true;
|
||||
|
||||
summarySheet.Cells[1, 20, 3, 20].Value = "ได้ / ตก";
|
||||
summarySheet.Cells[1, 20, 3, 20].Merge = true;
|
||||
summarySheet.Cells[1, 21, 3, 21].Value = "ชำระค่าธรรมเนียม";
|
||||
summarySheet.Cells[1, 21, 3, 21].Merge = true;
|
||||
summarySheet.Cells[1, 22, 3, 22].Value = "วันเวลาชำระ";
|
||||
summarySheet.Cells[1, 22, 3, 22].Merge = true;
|
||||
summarySheet.Cells[1, 23, 3, 23].Value = "วันและเวลาที่สมัคร";
|
||||
summarySheet.Cells[1, 18, 1, 22].Value = "ภาคความเหมาะสมกับตำแหน่ง (ภาค ค)";
|
||||
summarySheet.Cells[1, 18, 1, 22].Merge = true;
|
||||
summarySheet.Cells[2, 18].Value = "ทดสอบสมรรถนะหลัก";
|
||||
summarySheet.Cells[3, 18].Value = "50 คะแนน";
|
||||
summarySheet.Cells[2, 19].Value = "สัมภาษณ์";
|
||||
summarySheet.Cells[3, 19].Value = "50 คะแนน";
|
||||
// summarySheet.Cells[1, 19].Value = "คะแนนเต็มภาค ค";
|
||||
summarySheet.Cells[2, 20].Value = "คะแนนรวม";
|
||||
summarySheet.Cells[3, 20].Value = "100 คะแนน";
|
||||
summarySheet.Cells[2, 21, 3, 21].Value = "ร้อยละ";
|
||||
summarySheet.Cells[2, 21, 3, 21].Merge = true;
|
||||
summarySheet.Cells[2, 22, 3, 22].Value = "ผลประเมิน ภาค ค";
|
||||
summarySheet.Cells[2, 22, 3, 22].Merge = true;
|
||||
|
||||
summarySheet.Cells[1, 23, 3, 23].Value = "ได้ / ตก";
|
||||
summarySheet.Cells[1, 23, 3, 23].Merge = true;
|
||||
summarySheet.Cells[1, 24, 3, 24].Value = "หมายเหตุ";
|
||||
summarySheet.Cells[1, 24, 3, 24].Value = "ชำระค่าธรรมเนียม";
|
||||
summarySheet.Cells[1, 24, 3, 24].Merge = true;
|
||||
summarySheet.Cells[1, 25, 3, 25].Value = "วันเวลาชำระ";
|
||||
summarySheet.Cells[1, 25, 3, 25].Merge = true;
|
||||
summarySheet.Cells[1, 26, 3, 26].Value = "วันและเวลาที่สมัคร";
|
||||
summarySheet.Cells[1, 26, 3, 26].Merge = true;
|
||||
summarySheet.Cells[1, 27, 3, 27].Value = "หมายเหตุ";
|
||||
summarySheet.Cells[1, 27, 3, 27].Merge = true;
|
||||
int row = 4;
|
||||
|
||||
foreach (var item in candidates)
|
||||
|
|
@ -1216,33 +1224,36 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
summarySheet.Cells[row, 2].Value = item.ExamIdenNumber;
|
||||
summarySheet.Cells[row, 3].Value = item.CitizenId;
|
||||
summarySheet.Cells[row, 4].Value = item.SeatNumber;
|
||||
summarySheet.Cells[row, 5].Value = $"{item.FirstName} {item.LastName}";
|
||||
summarySheet.Cells[row, 5].Value = item.PrefixName;
|
||||
summarySheet.Cells[row, 6].Value = $"{item.FirstName} {item.LastName}";
|
||||
summarySheet.Cells[row, 7].Value = item.PositionExam == null ? "-" : item.PositionExam.PositionName;
|
||||
summarySheet.Cells[row, 8].Value = item.PositionExam == null ? "-" : item.PositionExam.PositionLevelName;
|
||||
|
||||
summarySheet.Cells[row, 6].Value = item.PointPath1A;
|
||||
summarySheet.Cells[row, 7].Value = item.PointPath2A;
|
||||
summarySheet.Cells[row, 8].Value = item.PointPath3A;
|
||||
summarySheet.Cells[row, 9].Value = item.PointPath1A;
|
||||
summarySheet.Cells[row, 10].Value = item.PointPath2A;
|
||||
summarySheet.Cells[row, 11].Value = item.PointPath3A;
|
||||
// summarySheet.Cells[row, 9].Value = item.PointTotalA;
|
||||
summarySheet.Cells[row, 9].Value = item.PointA;
|
||||
summarySheet.Cells[row, 10].Value = item.PointPerA;
|
||||
summarySheet.Cells[row, 11].Value = item.ResultA;
|
||||
summarySheet.Cells[row, 12].Value = item.PointA;
|
||||
summarySheet.Cells[row, 13].Value = item.PointPerA;
|
||||
summarySheet.Cells[row, 14].Value = item.ResultA;
|
||||
|
||||
// summarySheet.Cells[row, 13].Value = item.PointTotalB;
|
||||
summarySheet.Cells[row, 12].Value = item.PointB;
|
||||
summarySheet.Cells[row, 13].Value = item.PointPerB;
|
||||
summarySheet.Cells[row, 14].Value = item.ResultB;
|
||||
// summarySheet.Cells[row, 15].Value = item.PointTotalB;
|
||||
summarySheet.Cells[row, 15].Value = item.PointB;
|
||||
summarySheet.Cells[row, 16].Value = item.PointPerB;
|
||||
summarySheet.Cells[row, 17].Value = item.ResultB;
|
||||
|
||||
summarySheet.Cells[row, 15].Value = item.PointPath1C;
|
||||
summarySheet.Cells[row, 16].Value = item.PointPath2C;
|
||||
// summarySheet.Cells[row, 19].Value = item.PointTotalC;
|
||||
summarySheet.Cells[row, 17].Value = item.PointC;
|
||||
summarySheet.Cells[row, 18].Value = item.PointPerC;
|
||||
summarySheet.Cells[row, 19].Value = item.ResultC;
|
||||
summarySheet.Cells[row, 17].Value = item.PointPath1C;
|
||||
summarySheet.Cells[row, 19].Value = item.PointPath2C;
|
||||
// summarySheet.Cells[row, 20].Value = item.PointTotalC;
|
||||
summarySheet.Cells[row, 20].Value = item.PointC;
|
||||
summarySheet.Cells[row, 21].Value = item.PointPerC;
|
||||
summarySheet.Cells[row, 22].Value = item.ResultC;
|
||||
|
||||
summarySheet.Cells[row, 20].Value = item.Pass;
|
||||
summarySheet.Cells[row, 21].Value = item.PaymentDate == null ? "ยังไม่ชำระเงิน" : "ชำระแล้ว";
|
||||
summarySheet.Cells[row, 22].Value = item.PaymentDate == null ? "" : item.PaymentDate.Value.ToThaiShortDateTime();
|
||||
summarySheet.Cells[row, 23].Value = item.RegisterDate == null ? "" : item.RegisterDate.Value.ToThaiShortDateTime();
|
||||
summarySheet.Cells[row, 24].Value = item.ExamReason;
|
||||
summarySheet.Cells[row, 23].Value = item.Pass;
|
||||
summarySheet.Cells[row, 24].Value = item.PaymentDate == null ? "ยังไม่ชำระเงิน" : "ชำระแล้ว";
|
||||
summarySheet.Cells[row, 25].Value = item.PaymentDate == null ? "" : item.PaymentDate.Value.ToThaiShortDateTime();
|
||||
summarySheet.Cells[row, 26].Value = item.RegisterDate == null ? "" : item.RegisterDate.Value.ToThaiShortDateTime();
|
||||
summarySheet.Cells[row, 27].Value = item.ExamReason;
|
||||
row++;
|
||||
}
|
||||
summarySheet.Cells[summarySheet.Dimension.Address].AutoFitColumns();
|
||||
|
|
@ -1484,75 +1495,75 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
summarySheet.Cells[1, 53].Value = "ผลสอบภาค ค";
|
||||
summarySheet.Cells[1, 54].Value = "ผลการสอบ";
|
||||
summarySheet.Cells[1, 55].Value = "วันที่สมัคร";
|
||||
summarySheet.Cells[1, 56].Value = "วันเและเวลาที่สมัคร";
|
||||
summarySheet.Cells[1, 56].Value = "วันและเวลาที่สมัคร";
|
||||
int row = 2;
|
||||
|
||||
foreach (var item in candidates)
|
||||
{
|
||||
var educations = await _context.Educations
|
||||
var education = await _context.Educations
|
||||
.AsQueryable()
|
||||
.OrderBy(x => x.EducationEndDate)
|
||||
.Where(x => x.Candidate.Id == item.Id)
|
||||
.ToListAsync();
|
||||
.FirstOrDefaultAsync();
|
||||
|
||||
foreach (var education in educations)
|
||||
{
|
||||
summarySheet.Cells[row, 1].Value = GenerateStatusCandidate(item.Status);
|
||||
summarySheet.Cells[row, 2].Value = item.CitizenId;
|
||||
summarySheet.Cells[row, 3].Value = item.FullName;
|
||||
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.ReligionName;
|
||||
summarySheet.Cells[row, 8].Value = item.Telephone;
|
||||
summarySheet.Cells[row, 9].Value = item.MobilePhone;
|
||||
summarySheet.Cells[row, 10].Value = item.Email;
|
||||
summarySheet.Cells[row, 11].Value = item.Knowledge;
|
||||
summarySheet.Cells[row, 12].Value = item.RegistAddress;
|
||||
summarySheet.Cells[row, 13].Value = item.RegistProvinceName;
|
||||
summarySheet.Cells[row, 14].Value = item.RegistDistrictName;
|
||||
summarySheet.Cells[row, 15].Value = item.RegistSubDistrictName;
|
||||
summarySheet.Cells[row, 16].Value = item.RegistZipCode;
|
||||
summarySheet.Cells[row, 17].Value = item.CurrentAddress;
|
||||
summarySheet.Cells[row, 18].Value = item.CurrentProvinceName;
|
||||
summarySheet.Cells[row, 19].Value = item.CurrentDistrictName;
|
||||
summarySheet.Cells[row, 20].Value = item.CurrentSubDistrictName;
|
||||
summarySheet.Cells[row, 21].Value = item.CurrentZipCode;
|
||||
// foreach (var education in educations)
|
||||
// {
|
||||
// summarySheet.Cells[row, 1].Value = GenerateStatusCandidate(item.Status);
|
||||
// summarySheet.Cells[row, 2].Value = item.CitizenId;
|
||||
// summarySheet.Cells[row, 3].Value = item.FullName;
|
||||
// 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.ReligionName;
|
||||
// summarySheet.Cells[row, 8].Value = item.Telephone;
|
||||
// summarySheet.Cells[row, 9].Value = item.MobilePhone;
|
||||
// summarySheet.Cells[row, 10].Value = item.Email;
|
||||
// summarySheet.Cells[row, 11].Value = item.Knowledge;
|
||||
// summarySheet.Cells[row, 12].Value = item.RegistAddress;
|
||||
// summarySheet.Cells[row, 13].Value = item.RegistProvinceName;
|
||||
// summarySheet.Cells[row, 14].Value = item.RegistDistrictName;
|
||||
// summarySheet.Cells[row, 15].Value = item.RegistSubDistrictName;
|
||||
// summarySheet.Cells[row, 16].Value = item.RegistZipCode;
|
||||
// summarySheet.Cells[row, 17].Value = item.CurrentAddress;
|
||||
// summarySheet.Cells[row, 18].Value = item.CurrentProvinceName;
|
||||
// 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.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, 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, 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, 42].Value = item.Number;
|
||||
summarySheet.Cells[row, 43].Value = item.ExamIdenNumber;
|
||||
summarySheet.Cells[row, 44].Value = item.SeatNumber;
|
||||
summarySheet.Cells[row, 45].Value = item.PointTotalA;
|
||||
summarySheet.Cells[row, 46].Value = item.PointA;
|
||||
summarySheet.Cells[row, 47].Value = item.ResultA;
|
||||
summarySheet.Cells[row, 48].Value = item.PointTotalB;
|
||||
summarySheet.Cells[row, 49].Value = item.PointB;
|
||||
summarySheet.Cells[row, 50].Value = item.ResultB;
|
||||
summarySheet.Cells[row, 51].Value = item.PointTotalC;
|
||||
summarySheet.Cells[row, 52].Value = item.PointC;
|
||||
summarySheet.Cells[row, 53].Value = item.ResultC;
|
||||
summarySheet.Cells[row, 54].Value = item.Pass;
|
||||
summarySheet.Cells[row, 55].Value = item.CreatedAt.Date.ToThaiShortDate();
|
||||
summarySheet.Cells[row, 56].Value = item.RegisterDate;
|
||||
row++;
|
||||
}
|
||||
// summarySheet.Cells[row, 42].Value = item.Number;
|
||||
// summarySheet.Cells[row, 43].Value = item.ExamIdenNumber;
|
||||
// summarySheet.Cells[row, 44].Value = item.SeatNumber;
|
||||
// summarySheet.Cells[row, 45].Value = item.PointTotalA;
|
||||
// summarySheet.Cells[row, 46].Value = item.PointA;
|
||||
// summarySheet.Cells[row, 47].Value = item.ResultA;
|
||||
// summarySheet.Cells[row, 48].Value = item.PointTotalB;
|
||||
// summarySheet.Cells[row, 49].Value = item.PointB;
|
||||
// summarySheet.Cells[row, 50].Value = item.ResultB;
|
||||
// summarySheet.Cells[row, 51].Value = item.PointTotalC;
|
||||
// summarySheet.Cells[row, 52].Value = item.PointC;
|
||||
// summarySheet.Cells[row, 53].Value = item.ResultC;
|
||||
// summarySheet.Cells[row, 54].Value = item.Pass;
|
||||
// summarySheet.Cells[row, 55].Value = item.CreatedAt.Date.ToThaiShortDate();
|
||||
// summarySheet.Cells[row, 56].Value = item.RegisterDate;
|
||||
// row++;
|
||||
// }
|
||||
var careers = await _context.Careers
|
||||
.AsQueryable()
|
||||
.OrderBy(x => x.DurationStart)
|
||||
|
|
@ -1591,6 +1602,15 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
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 == null ? "-" : education.EducationLevelExamName;
|
||||
summarySheet.Cells[row, 30].Value = education == null ? "-" : education.EducationName;
|
||||
summarySheet.Cells[row, 31].Value = education == null ? "-" : education.EducationMajor;
|
||||
summarySheet.Cells[row, 32].Value = education == null ? "-" : education.EducationLocation;
|
||||
summarySheet.Cells[row, 33].Value = education == null ? "-" : education.EducationType;
|
||||
summarySheet.Cells[row, 34].Value = education == null ? "-" : (education.EducationEndDate == null ? "-" : education.EducationEndDate.Value.Date.ToThaiShortDate());
|
||||
summarySheet.Cells[row, 35].Value = education == null ? "-" : education.EducationScores;
|
||||
summarySheet.Cells[row, 36].Value = education == null ? "-" : education.EducationLevelHighName;
|
||||
|
||||
summarySheet.Cells[row, 37].Value = career.Position;
|
||||
summarySheet.Cells[row, 38].Value = career.Type;
|
||||
// summarySheet.Cells[row, 39].Value = career.Pile;
|
||||
|
|
@ -1616,7 +1636,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
summarySheet.Cells[row, 56].Value = item.RegisterDate;
|
||||
row++;
|
||||
}
|
||||
if (educations.Count() == 0 && careers.Count() == 0)
|
||||
if (careers.Count() == 0)
|
||||
{
|
||||
summarySheet.Cells[row, 1].Value = GenerateStatusCandidate(item.Status);
|
||||
summarySheet.Cells[row, 2].Value = item.CitizenId;
|
||||
|
|
@ -1648,6 +1668,15 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
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 == null ? "-" : education.EducationLevelExamName;
|
||||
summarySheet.Cells[row, 30].Value = education == null ? "-" : education.EducationName;
|
||||
summarySheet.Cells[row, 31].Value = education == null ? "-" : education.EducationMajor;
|
||||
summarySheet.Cells[row, 32].Value = education == null ? "-" : education.EducationLocation;
|
||||
summarySheet.Cells[row, 33].Value = education == null ? "-" : education.EducationType;
|
||||
summarySheet.Cells[row, 34].Value = education == null ? "-" : (education.EducationEndDate == null ? "-" : education.EducationEndDate.Value.Date.ToThaiShortDate());
|
||||
summarySheet.Cells[row, 35].Value = education == null ? "-" : education.EducationScores;
|
||||
summarySheet.Cells[row, 36].Value = education == null ? "-" : education.EducationLevelHighName;
|
||||
|
||||
summarySheet.Cells[row, 42].Value = item.Number;
|
||||
summarySheet.Cells[row, 43].Value = item.ExamIdenNumber;
|
||||
summarySheet.Cells[row, 44].Value = item.SeatNumber;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue