This commit is contained in:
2022-12-08 14:38:23 +08:00
parent cd0093b8d8
commit 0bb49cbe6c
3 changed files with 27 additions and 18 deletions
@@ -316,18 +316,16 @@ namespace IRaCIS.Core.Application.Services
{
item.SeriesInstanceUid = string.Empty;
item.InstanceList = thisRowinfo.Where(y => y.InstanceId != null).Select(y => y.InstanceId.Value).Distinct().ToList();
var tempInstanceList = await _dicomInstanceRepository.Where(x => item.InstanceList.Contains(x.Id)).OrderBy(t => t.InstanceNumber).Select(x => new { x.Path, x.NumberOfFrames }).ToListAsync();
var tempInstanceList = thisRowinfo.Where(y => y.InstanceId != null).Select(y => new { InstanceId = y.InstanceId.Value, y.Instance.Path, y.Instance.NumberOfFrames }).Distinct().ToList();
item.InstanceList = tempInstanceList.Select(y => y.InstanceId).ToList();
item.InstancePathList = tempInstanceList.SelectMany(u =>
{
if (u.NumberOfFrames == 1)
{
return new List<string> { u.Path };
}
else
if (u.NumberOfFrames > 1)
{
var pathList = new List<string>();
@@ -337,6 +335,11 @@ namespace IRaCIS.Core.Application.Services
}
return pathList;
}
else
{
return new List<string> { u.Path };
}
})
.ToList();
@@ -392,11 +395,7 @@ namespace IRaCIS.Core.Application.Services
.SelectMany(u =>
{
if (u.NumberOfFrames == 1)
{
return new List<string> { u.Path };
}
else
if (u.NumberOfFrames >1)
{
var pathList = new List<string>();
@@ -406,6 +405,11 @@ namespace IRaCIS.Core.Application.Services
}
return pathList;
}
else
{
return new List<string> { u.Path };
}
})
.ToList();
});