no message

This commit is contained in:
kittapath 2025-01-28 14:01:53 +07:00
parent 276607aac0
commit d185369308

View file

@ -681,14 +681,14 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
public async Task UpdateQrcodeAsync(string examId, IFormFileCollection files) public async Task UpdateQrcodeAsync(string examId, IFormFileCollection files)
{ {
var periodExam = await _context.PeriodExams.AsQueryable() var periodExam = await _context.PeriodExams.AsQueryable()
.Include(x => x.PeriodExamBarCodes) .Include(x => x.PeriodExamQrCodes)
.ThenInclude(x => x.Document) .ThenInclude(x => x.Document)
.FirstOrDefaultAsync(x => x.Id == Guid.Parse(examId)); .FirstOrDefaultAsync(x => x.Id == Guid.Parse(examId));
if (periodExam == null) if (periodExam == null)
throw new Exception(GlobalMessages.ExamNotFound); throw new Exception(GlobalMessages.ExamNotFound);
if (periodExam.PeriodExamBarCodes != null && periodExam.PeriodExamBarCodes.Count() > 0 && periodExam.PeriodExamBarCodes[0] != null && periodExam.PeriodExamBarCodes[0].Document != null) if (periodExam.PeriodExamQrCodes != null && periodExam.PeriodExamQrCodes.Count() > 0 && periodExam.PeriodExamQrCodes[0] != null && periodExam.PeriodExamQrCodes[0].Document != null)
await _minioService.DeleteFileAsync(periodExam.PeriodExamBarCodes[0].Document.Id); await _minioService.DeleteFileAsync(periodExam.PeriodExamQrCodes[0].Document.Id);
foreach (var file in files) foreach (var file in files)
{ {