返回成功列表和错误列表
continuous-integration/drone/push Build is passing Details

Test_IRC_Net10
hang 2026-04-24 09:57:46 +08:00
parent d807fe0126
commit f2adb16189
1 changed files with 9 additions and 4 deletions

View File

@ -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(); 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(); var batchId = Guid.NewGuid();
@ -121,11 +123,14 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
var newPath = $"/{prefix}/{maskFileName}"; 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 }); await _dicomInstanceRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Id, u => new DicomInstance() { Path = newPath, IsMasked = true });
} }
catch (Exception ex) 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}"); 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(); await _dicomInstanceRepository.SaveChangesAsync();
return ResponseOutput.Ok(errorPathList); return ResponseOutput.Ok(new { OkList = okList, ErrorList = errorList });
} }