no message
This commit is contained in:
parent
ab4c5988e8
commit
ec38ac5af1
1 changed files with 22 additions and 9 deletions
|
|
@ -13,6 +13,7 @@ using Microsoft.EntityFrameworkCore;
|
|||
using Newtonsoft.Json.Linq;
|
||||
using OfficeOpenXml;
|
||||
using BMA.EHR.Domain.Models.Placement;
|
||||
using OfficeOpenXml.Style;
|
||||
|
||||
namespace BMA.EHR.Recurit.Exam.Service.Services
|
||||
{
|
||||
|
|
@ -1074,6 +1075,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
.OrderBy(x => x.ExamIdenNumber)
|
||||
.Where(x => x.PeriodExam == periodExam)
|
||||
.Where(x => x.Status != "waiver")
|
||||
.Where(x => x.Status != "register")
|
||||
.ToListAsync();
|
||||
}
|
||||
else
|
||||
|
|
@ -1082,6 +1084,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
.AsQueryable()
|
||||
.OrderBy(x => x.ExamIdenNumber)
|
||||
.Where(x => x.PeriodExam == periodExam)
|
||||
.Where(x => x.Status != "register")
|
||||
.ToListAsync();
|
||||
}
|
||||
|
||||
|
|
@ -1306,6 +1309,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
.AsQueryable()
|
||||
.OrderBy(x => x.ExamIdenNumber)
|
||||
.Where(x => x.PeriodExam == periodExam)
|
||||
.Where(x => x.Status != "register")
|
||||
.Select(c => new
|
||||
{
|
||||
Id = c.Id,
|
||||
|
|
@ -1627,6 +1631,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
.Where(x => x.CreatedAt.Date <= item.DateEnd.Date)
|
||||
.Where(x => x.CreatedAt.Date >= item.DateStart.Date)
|
||||
.Where(x => x.PeriodExam == periodExam)
|
||||
.Where(x => x.Status != "register")
|
||||
.Select(c => new
|
||||
{
|
||||
Id = c.Id,
|
||||
|
|
@ -1694,6 +1699,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
// summarySheet.DefaultRowHeight = 17;
|
||||
summarySheet.Column(1).Style.Font.Bold = true;
|
||||
summarySheet.Row(5).Style.Font.Bold = true;
|
||||
summarySheet.Row(5).Style.HorizontalAlignment = ExcelHorizontalAlignment.Center;
|
||||
summarySheet.Row(6).Style.Font.Bold = true;
|
||||
summarySheet.Cells[1, 3].Style.Font.Bold = true;
|
||||
int rowName = 2;
|
||||
|
|
@ -1708,7 +1714,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
summarySheet.Cells[3, 1].Value = "ครั้งที่";
|
||||
summarySheet.Cells[3, 2].Value = $"{periodExam.Round}/{periodExam.Year + 543}";
|
||||
summarySheet.Cells[4, 1].Value = "จำนวนผู้สมัคร";
|
||||
summarySheet.Cells[4, 2].Value = candidates.Count();
|
||||
summarySheet.Cells[4, 2].Value = candidates.Count().ToString();
|
||||
if (candidates.Count() > 0)
|
||||
{
|
||||
summarySheet.Cells[7, 1].Value = "จำนวน";
|
||||
|
|
@ -1738,9 +1744,12 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
rowName++;
|
||||
rowCount++;
|
||||
}
|
||||
summarySheet.Cells[5, fixMerge, 5, rowName].Value = "วุฒิการศึกษา";
|
||||
summarySheet.Cells[5, fixMerge, 5, rowName].Merge = true;
|
||||
fixMerge = rowCount;
|
||||
if (educations.Count() != 0)
|
||||
{
|
||||
summarySheet.Cells[5, fixMerge, 5, rowName - 1].Value = "วุฒิการศึกษา";
|
||||
summarySheet.Cells[5, fixMerge, 5, rowName - 1].Merge = true;
|
||||
fixMerge = rowCount;
|
||||
}
|
||||
var careers = await _context.Careers
|
||||
.AsQueryable()
|
||||
.Where(x => x.Candidate.PeriodExam == periodExam)
|
||||
|
|
@ -1760,9 +1769,12 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
rowName++;
|
||||
rowCount++;
|
||||
}
|
||||
summarySheet.Cells[5, fixMerge, 5, rowName].Value = "สถานที่ทำงาน/ฝึกงาน";
|
||||
summarySheet.Cells[5, fixMerge, 5, rowName].Merge = true;
|
||||
fixMerge = rowCount;
|
||||
if (careers.Count() != 0)
|
||||
{
|
||||
summarySheet.Cells[5, fixMerge, 5, rowName - 1].Value = "สถานที่ทำงาน/ฝึกงาน";
|
||||
summarySheet.Cells[5, fixMerge, 5, rowName - 1].Merge = true;
|
||||
fixMerge = rowCount;
|
||||
}
|
||||
summarySheet.Cells[6, rowName].Value = "อายุ 1-20 ปี";
|
||||
summarySheet.Cells[7, rowCount].Value = candidates.Where(x => x.Age >= 1 && x.Age <= 20).Count();
|
||||
rowName++;
|
||||
|
|
@ -1787,8 +1799,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
summarySheet.Cells[7, rowCount].Value = candidates.Where(x => x.Age >= 81).Count();
|
||||
rowName++;
|
||||
rowCount++;
|
||||
summarySheet.Cells[5, fixMerge, 5, rowName].Value = "ช่วงอายุ";
|
||||
summarySheet.Cells[5, fixMerge, 5, rowName].Merge = true;
|
||||
summarySheet.Cells[5, fixMerge, 5, rowName - 1].Value = "ช่วงอายุ";
|
||||
summarySheet.Cells[5, fixMerge, 5, rowName - 1].Merge = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1814,6 +1826,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
var candidates = await _context.Candidates
|
||||
.AsQueryable()
|
||||
.Where(x => x.PeriodExam == periodExam)
|
||||
.Where(x => x.Status != "register")
|
||||
.Select(c => new
|
||||
{
|
||||
CitizenId = c.CitizenId,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue