Fix รายชื่อผู้สอบผ่านรูปภาพผู้สมัครสอบไม่แสดง issue #908

This commit is contained in:
Bright 2025-07-04 14:00:36 +07:00
parent 3e1701cfdf
commit 55128d5b43
2 changed files with 111 additions and 0 deletions

View file

@ -2959,6 +2959,19 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
posLevelIdOld = org?.result?.posLevelId ?? null,
posLevelNameOld = org?.result?.posLevelName ?? null,
};
if (candidate.ProfileImg != null && candidate.ProfileImg.ObjectRefId != null)
{
IFormFile imageFile = await _minioService.GetImageToFormFileAsync(candidate.ProfileImg.ObjectRefId.ToString());
var doc = await _minioService.UploadImageFileAsync(imageFile, imageFile.FileName);
var _doc = await _contextMetadata.Documents.AsQueryable()
.FirstOrDefaultAsync(x => x.Id == doc.Id);
if (_doc != null)
{
placementProfile.ProfileImg = _doc;
}
}
await _contextMetadata.PlacementProfiles.AddAsync(placementProfile);
foreach (var education in candidate.Educations)