เช็คซ้ำ

This commit is contained in:
kittapath 2025-10-12 14:53:35 +07:00
parent 13ad60d2e3
commit 90e86925ed

View file

@ -196,8 +196,8 @@ namespace BMA.EHR.Recruit.Service.Services
var _placement = await _contextMetadata.Placements.AsQueryable()
.FirstOrDefaultAsync(x => x.PlacementType.Name == "สอบแข่งขัน" && x.RefId == recruitImport.Id);
// if (_placement != null)
// throw new Exception("รอบการสอบนี้ได้ทำการบรรจุไปแล้ว");
if (_placement != null)
throw new Exception("รอบการสอบนี้ได้ทำการบรรจุไปแล้ว");
// 🚀 Pre-load all lookup data once
var placementTypesCache = await _contextMetadata.PlacementTypes.ToListAsync();