diff --git a/Controllers/RecruitController.cs b/Controllers/RecruitController.cs index fb74b0e..7a2f04d 100644 --- a/Controllers/RecruitController.cs +++ b/Controllers/RecruitController.cs @@ -1414,23 +1414,22 @@ namespace BMA.EHR.Recruit.Service.Controllers // ภาคความรู้ความสามารถที่ใช้เฉพาะตำแหน่ง r.FullA = 200; - r.SumA = string.IsNullOrWhiteSpace(workSheet?.Cells[row, 5]?.GetValue()) ? 0.00 : (double)workSheet?.Cells[row, 5]?.GetValue(); - r.PercentageA = string.IsNullOrWhiteSpace(workSheet?.Cells[row, 6]?.GetValue()) ? 0.00 : (double)workSheet?.Cells[row, 6]?.GetValue(); + r.SumA = string.IsNullOrWhiteSpace(workSheet?.Cells[row, 5]?.GetValue()) ? 0.00 : Math.Round(workSheet.Cells[row, 5].GetValue(), 2); + r.PercentageA = string.IsNullOrWhiteSpace(workSheet?.Cells[row, 6]?.GetValue()) ? 0.00 : Math.Round(workSheet.Cells[row, 6].GetValue(), 2); r.AStatus = string.IsNullOrWhiteSpace(workSheet?.Cells[row, 7]?.GetValue()) ? "" : workSheet?.Cells[row, 7]?.GetValue(); - r.SumAB = string.IsNullOrWhiteSpace(workSheet?.Cells[row, 5]?.GetValue()) ? 0.00 : (double)workSheet?.Cells[row, 5]?.GetValue(); + r.SumAB = string.IsNullOrWhiteSpace(workSheet?.Cells[row, 5]?.GetValue()) ? 0.00 : Math.Round(workSheet.Cells[row, 5].GetValue(), 2); r.ABStatus = string.IsNullOrWhiteSpace(workSheet?.Cells[row, 7]?.GetValue()) ? "" : workSheet?.Cells[row, 7]?.GetValue(); // ภาคความเหมาะสมกับตำแหน่ง r.FullC = 50; - r.SumC = string.IsNullOrWhiteSpace(workSheet?.Cells[row, 8]?.GetValue()) ? 0.00 : (double)workSheet?.Cells[row, 8]?.GetValue(); + r.SumC = string.IsNullOrWhiteSpace(workSheet?.Cells[row, 8]?.GetValue()) ? 0.00 : Math.Round(workSheet.Cells[row, 8].GetValue(), 2); r.FullD = 50; - r.SumD = string.IsNullOrWhiteSpace(workSheet?.Cells[row, 9]?.GetValue()) ? 0.00 : (double)workSheet?.Cells[row, 9]?.GetValue(); - r.SumCD = string.IsNullOrWhiteSpace(workSheet?.Cells[row, 10]?.GetValue()) ? 0.00 : (double)workSheet?.Cells[row, 10]?.GetValue(); - r.PercentageC = string.IsNullOrWhiteSpace(workSheet?.Cells[row, 11]?.GetValue()) ? 0.00 : (double)workSheet?.Cells[row, 11]?.GetValue(); + r.SumD = string.IsNullOrWhiteSpace(workSheet?.Cells[row, 9]?.GetValue()) ? 0.00 : Math.Round(workSheet.Cells[row, 9].GetValue(), 2); + r.SumCD = string.IsNullOrWhiteSpace(workSheet?.Cells[row, 10]?.GetValue()) ? 0.00 : Math.Round(workSheet.Cells[row, 10].GetValue(), 2); + r.PercentageC = string.IsNullOrWhiteSpace(workSheet?.Cells[row, 11]?.GetValue()) ? 0.00 : Math.Round(workSheet.Cells[row, 11].GetValue(), 2); r.CStatus = string.IsNullOrWhiteSpace(workSheet?.Cells[row, 12]?.GetValue()) ? "" : workSheet?.Cells[row, 12]?.GetValue(); - r.FullScore = 300; - r.TotalScore = string.IsNullOrWhiteSpace(workSheet?.Cells[row, 13]?.GetValue()) ? 0.00 : (double)workSheet?.Cells[row, 13]?.GetValue(); ; + r.TotalScore = string.IsNullOrWhiteSpace(workSheet?.Cells[row, 13]?.GetValue()) ? 0.00 : Math.Round(workSheet.Cells[row, 13].GetValue(), 2); if (workSheet?.Cells[row, 7]?.GetValue() == "ขาดสอบ") {