Compare commits

..

No commits in common. "4827906d1d53a6032b4d52fdf33d7c0674935689" and "71a4748d39bc29b1eb9cd6bf2f60520ba88654df" have entirely different histories.

View file

@ -2444,15 +2444,6 @@ namespace BMA.EHR.Leave.Service.Controllers
var workTotal = 0;
var seminarTotal = 0;
var wfaTotal = 0; //ปฏิบัติงานนอกสถานที่
var outOfficeTotal = 0; //ขออนุญาติิิออกนอกสถานที่
var oneStopSrvrTotal = 0; //จุดบริการด่วนมหานคร
var otherTotal = 0; //อื่นๆ
var defaultRound = await _dutyTimeRepository.GetDefaultAsync();
if (defaultRound == null)
{
@ -2636,18 +2627,10 @@ namespace BMA.EHR.Leave.Service.Controllers
workTotal += 1;
if (!timeStamps.IsLocationCheckIn)
{
if (timeStamps.CheckInLocationName!.Contains("ปฏิบัติงานที่บ้าน"))
if (timeStamps.CheckInLocationName == "ปฏิบัติงานที่บ้าน")
wfhTotal += 1;
else if (timeStamps.CheckInLocationName == "ไปประชุม / อบรม / สัมมนา")
seminarTotal += 1;
else if (timeStamps.CheckInLocationName.Contains("ปฏิบัติงานนอกสถานที่"))
wfaTotal += 1;
else if (timeStamps.CheckInLocationName.Contains("ขออนุญาตออกนอกสถานที่"))
outOfficeTotal += 1;
else if (timeStamps.CheckInLocationName.Contains("ปฏิบัติงานในจุดบริการด่วนมหานคร"))
oneStopSrvrTotal += 1;
else if (timeStamps.CheckInLocationName.Contains("อื่นๆ"))
otherTotal += 1;
}
}
@ -2798,36 +2781,19 @@ namespace BMA.EHR.Leave.Service.Controllers
worksheet.Cells[lastRow + 2, 8].Value = "อบรม ประชุม สัมมนาฯ";
worksheet.Cells[lastRow + 2, 9].Value = seminarTotal;
worksheet.Cells[lastRow + 2, 10].Value = "คน";
worksheet.Cells[lastRow + 3, 8].Value = "ปฎิบัติงานนอกสถานที่";
worksheet.Cells[lastRow + 3, 9].Value = wfaTotal;
worksheet.Cells[lastRow + 3, 10].Value = "คน";
worksheet.Cells[lastRow + 4, 8].Value = "ขออนุญาตออกนอกสถานที่";
worksheet.Cells[lastRow + 4, 9].Value = outOfficeTotal;
worksheet.Cells[lastRow + 4, 10].Value = "คน";
worksheet.Cells[lastRow + 5, 8].Value = "ปฎิบัติงานในจุดบริการด่วนมหานคร";
worksheet.Cells[lastRow + 5, 9].Value = oneStopSrvrTotal;
worksheet.Cells[lastRow + 5, 10].Value = "คน";
worksheet.Cells[lastRow + 6, 8].Value = "อื่นๆ";
worksheet.Cells[lastRow + 6, 9].Value = otherTotal;
worksheet.Cells[lastRow + 6, 10].Value = "คน";
worksheet.Cells[lastRow + 3, 2].Value = "ลาป่วย/ลากิจ";
worksheet.Cells[lastRow + 3, 5].Value = sickTotal;
worksheet.Cells[lastRow + 3, 6].Value = "คน";
worksheet.Cells[lastRow + 4, 2].Value = "มาสาย";
worksheet.Cells[lastRow + 4, 5].Value = lateTotal;
worksheet.Cells[lastRow + 4, 6].Value = "คน";
worksheet.Cells[lastRow + 8, 2].Value = "เรียน";
worksheet.Cells[lastRow + 9, 2].Value = "เพื่อโปรดทราบ";
worksheet.Cells[lastRow + 9, 9].Value = "ทราบ";
worksheet.Cells[lastRow + 9, 9].Style.Font.Bold = true;
worksheet.Cells[lastRow + 9, 9].Style.Font.Size = 22;
worksheet.Cells[lastRow + 10, 2].Value = "................................";
worksheet.Cells[lastRow + 10, 9].Value = "................................";
worksheet.Cells[lastRow + 6, 2].Value = "เรียน";
worksheet.Cells[lastRow + 7, 2].Value = "เพื่อโปรดทราบ";
worksheet.Cells[lastRow + 7, 9].Value = "ทราบ";
worksheet.Cells[lastRow + 7, 9].Style.Font.Bold = true;
worksheet.Cells[lastRow + 7, 9].Style.Font.Size = 22;
worksheet.Cells[lastRow + 8, 2].Value = "................................";
worksheet.Cells[lastRow + 8, 9].Value = "................................";
worksheet.Cells[worksheet.Dimension.Address].AutoFitColumns();
var fileBytes = package.GetAsByteArray();
return File(fileBytes, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "TimeStampRecords.xlsx");