no message
This commit is contained in:
parent
276607aac0
commit
d185369308
1 changed files with 3 additions and 3 deletions
|
|
@ -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)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue