แก้ คิวรี่ excel สมัครสอบ

This commit is contained in:
Kittapath 2023-10-18 19:31:57 +07:00
parent d1ca7e9ab1
commit abd7fb6628

View file

@ -79,9 +79,9 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
{
switch (status.Trim().ToUpper())
{
case "prem": return "ลูกจ้างประจำ";
case "temp": return "ลูกจ้างชั่วคราว";
case "other": return "ผู้ปฏิบัติงานอื่นในกรุงเทพมหานคร";
case "PREM": return "ลูกจ้างประจำ";
case "TEMP": return "ลูกจ้างชั่วคราว";
case "OTHER": return "ผู้ปฏิบัติงานอื่นในกรุงเทพมหานคร";
default: return status;
}
}
@ -1297,7 +1297,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
summarySheet.Cells[row, 22].Value = item.ResultC;
summarySheet.Cells[row, 23].Value = item.Pass;
summarySheet.Cells[row, 24].Value = item.PeriodExam.Fee <= 0 ? "ไม่มีชำระเงิน" : (item.PaymentDate == null ? "ยังไม่ชำระเงิน" : "ชำระแล้ว");
summarySheet.Cells[row, 24].Value = item.PeriodExam == null || item.PeriodExam.Fee <= 0 ? "ไม่มีชำระเงิน" : (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;
@ -1481,7 +1481,6 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
CreatedAt = c.CreatedAt,
})
.ToListAsync();
var stream = new MemoryStream();
using (var package = new ExcelPackage(stream))
{
@ -1731,6 +1730,9 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
}
row++;
}
if (careers.Count == 0)
row++;
Console.WriteLine(num);
num = num + 1;
}
summarySheet.Cells[summarySheet.Dimension.Address].AutoFitColumns();