返回成功列表和错误列表
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
d807fe0126
commit
f2adb16189
|
|
@ -92,7 +92,9 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
idPathList = await _dicomInstanceRepository.Where(t => t.SeriesId == inCommand.SeriesId).Select(t => new InstanceIdPath { Id = t.Id, Path = t.Path }).ToListAsync();
|
||||
}
|
||||
|
||||
var errorPathList = new List<string>();
|
||||
var errorList = new List<InstanceIdPath>();
|
||||
|
||||
var okList = new List<InstanceIdPath>();
|
||||
|
||||
var batchId = Guid.NewGuid();
|
||||
|
||||
|
|
@ -121,11 +123,14 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
|
||||
var newPath = $"/{prefix}/{maskFileName}";
|
||||
|
||||
okList.Add(new InstanceIdPath() { Id = item.Id, Path = newPath });
|
||||
|
||||
await _dicomInstanceRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Id, u => new DicomInstance() { Path = newPath, IsMasked = true });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
errorPathList.Add(path);
|
||||
|
||||
errorList.Add(new InstanceIdPath() { Id = item.Id, Path = path });
|
||||
|
||||
Log.Logger.Error(ex, $"StudyMaskImage Error for InstanceIdList Path:{path} {ex.Message}");
|
||||
}
|
||||
|
|
@ -134,7 +139,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
|
||||
await _dicomInstanceRepository.SaveChangesAsync();
|
||||
|
||||
return ResponseOutput.Ok(errorPathList);
|
||||
return ResponseOutput.Ok(new { OkList = okList, ErrorList = errorList });
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue