返回成功列表和错误列表
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();
|
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();
|
||||||
|
|
||||||
|
|
@ -116,16 +118,19 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||||
//清理缓存的里面的遮盖图,多次遮盖同一张图时,清除缓存很重要
|
//清理缓存的里面的遮盖图,多次遮盖同一张图时,清除缓存很重要
|
||||||
await _oSSService.DeleteFromPrefix(path, true); //清理缓存的里面的遮盖图,多次遮盖同一张图时,清除缓存很重要
|
await _oSSService.DeleteFromPrefix(path, true); //清理缓存的里面的遮盖图,多次遮盖同一张图时,清除缓存很重要
|
||||||
}
|
}
|
||||||
|
|
||||||
await _oSSService.UploadToOSSAsync(outPutStream, prefix, maskFileName, false);
|
await _oSSService.UploadToOSSAsync(outPutStream, prefix, maskFileName, false);
|
||||||
|
|
||||||
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 });
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue