修改稽查
This commit is contained in:
@@ -7,6 +7,8 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public Guid Id { get; set;}
|
||||
public Guid StudyId { get; set; }
|
||||
public Guid SeriesId { get; set; }
|
||||
|
||||
public int NumberOfFrames { get; set; }
|
||||
public string StudyInstanceUid { get; set; } = string.Empty;
|
||||
public string SeriesInstanceUid { get; set; } = string.Empty;
|
||||
public string SopInstanceUid { get; set; } = string.Empty;
|
||||
|
||||
@@ -40,13 +40,33 @@ namespace IRaCIS.Core.Application.Services
|
||||
|
||||
var idList = await _instanceRepository.Where(s => s.StudyId == studyId).OrderBy(t => t.SeriesId).ThenBy(t => t.InstanceNumber)
|
||||
.ThenBy(s => s.InstanceTime).ThenBy(s => s.CreateTime)
|
||||
.Select(t => new { t.SeriesId, t.Id, t.Path }).ToListAsync();//.GroupBy(u => u.SeriesId);
|
||||
.Select(t => new { t.SeriesId, t.Id, t.Path, t.NumberOfFrames }).ToListAsync();//.GroupBy(u => u.SeriesId);
|
||||
|
||||
foreach (var item in seriesList)
|
||||
{
|
||||
item.InstanceList = idList.Where(s => s.SeriesId == item.Id).Select(u => u.Id).ToList();
|
||||
|
||||
item.InstancePathList = idList.Where(s => s.SeriesId == item.Id).Select(u => u.Path).ToList();
|
||||
//处理多帧
|
||||
item.InstancePathList = idList.Where(s => s.SeriesId == item.Id)
|
||||
.SelectMany(u =>
|
||||
{
|
||||
|
||||
if (u.NumberOfFrames == 1)
|
||||
{
|
||||
return new List<string>{u.Path};
|
||||
}
|
||||
else
|
||||
{
|
||||
var pathList = new List<string>();
|
||||
|
||||
for (int i = 1; i <= u.NumberOfFrames; i++)
|
||||
{
|
||||
pathList.Add(u.Path+ "?NumberOfFrames="+i);
|
||||
}
|
||||
return pathList;
|
||||
}
|
||||
})
|
||||
.ToList();
|
||||
}
|
||||
|
||||
#region 暂时废弃
|
||||
|
||||
Reference in New Issue
Block a user