From a6b236c4139e5b3dadabf7eb30b971c992d76e31 Mon Sep 17 00:00:00 2001 From: Bright Date: Tue, 9 Sep 2025 14:18:44 +0700 Subject: [PATCH] =?UTF-8?q?Fix=20=E0=B8=99=E0=B8=B3=E0=B9=80=E0=B8=82?= =?UTF-8?q?=E0=B9=89=E0=B8=B2=E0=B8=9C=E0=B8=A5=E0=B8=AA=E0=B8=AD=E0=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controllers/RecruitController.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Controllers/RecruitController.cs b/Controllers/RecruitController.cs index e00c4d1..c87924f 100644 --- a/Controllers/RecruitController.cs +++ b/Controllers/RecruitController.cs @@ -1566,6 +1566,9 @@ namespace BMA.EHR.Recruit.Service.Controllers // preload score var score = rec_import.ScoreImport.Scores .Where(s => !string.IsNullOrEmpty(s.ExamId)) + .GroupBy(x => x.ExamId) + .Where(g => g.Count() == 1) + .Select(g => g.First()) .ToDictionary(s => s.ExamId, s => s); // ถ้าไม่มีผลคะแนนสอบแข่งขันให้จบการทำงาน