返回成功列表和错误列表
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();
}
var errorPathList = new List<string>();
var errorList = new List<InstanceIdPath>();
var okList = new List<InstanceIdPath>();
var batchId = Guid.NewGuid();
@ -116,16 +118,19 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
//清理缓存的里面的遮盖图,多次遮盖同一张图时,清除缓存很重要
await _oSSService.DeleteFromPrefix(path, true); //清理缓存的里面的遮盖图,多次遮盖同一张图时,清除缓存很重要
}
await _oSSService.UploadToOSSAsync(outPutStream, prefix, maskFileName, false);
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 });
}