Uat_Study
{872297557@qq.com} 2022-12-08 14:38:23 +08:00
parent cd0093b8d8
commit 0bb49cbe6c
3 changed files with 27 additions and 18 deletions

View File

@ -51,20 +51,21 @@ namespace IRaCIS.Core.Application.Services
.SelectMany(u => .SelectMany(u =>
{ {
if (u.NumberOfFrames == 1) if (u.NumberOfFrames > 1)
{
return new List<string>{u.Path};
}
else
{ {
var pathList = new List<string>(); var pathList = new List<string>();
for (int i = 1; i <= u.NumberOfFrames; i++) for (int i = 1; i <= u.NumberOfFrames; i++)
{ {
pathList.Add(u.Path+ "?frame=" + (i - 1)); pathList.Add(u.Path + "?frame=" + (i - 1));
} }
return pathList; return pathList;
} }
else
{
return new List<string> { u.Path };
}
}) })
.ToList(); .ToList();
} }

View File

@ -316,18 +316,16 @@ namespace IRaCIS.Core.Application.Services
{ {
item.SeriesInstanceUid = string.Empty; 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 => item.InstancePathList = tempInstanceList.SelectMany(u =>
{ {
if (u.NumberOfFrames == 1) if (u.NumberOfFrames > 1)
{
return new List<string> { u.Path };
}
else
{ {
var pathList = new List<string>(); var pathList = new List<string>();
@ -337,6 +335,11 @@ namespace IRaCIS.Core.Application.Services
} }
return pathList; return pathList;
} }
else
{
return new List<string> { u.Path };
}
}) })
.ToList(); .ToList();
@ -392,11 +395,7 @@ namespace IRaCIS.Core.Application.Services
.SelectMany(u => .SelectMany(u =>
{ {
if (u.NumberOfFrames == 1) if (u.NumberOfFrames >1)
{
return new List<string> { u.Path };
}
else
{ {
var pathList = new List<string>(); var pathList = new List<string>();
@ -406,6 +405,11 @@ namespace IRaCIS.Core.Application.Services
} }
return pathList; return pathList;
} }
else
{
return new List<string> { u.Path };
}
}) })
.ToList(); .ToList();
}); });

View File

@ -15,6 +15,10 @@ namespace IRaCIS.Core.Domain.Models
[Table("ReadingTableAnswerRowInfo")] [Table("ReadingTableAnswerRowInfo")]
public class ReadingTableAnswerRowInfo : Entity, IAuditAdd public class ReadingTableAnswerRowInfo : Entity, IAuditAdd
{ {
[JsonIgnore]
[ForeignKey("InstanceId")]
public DicomInstance Instance { get; set; }
/// <summary> /// <summary>
/// 第一层的Question /// 第一层的Question
/// </summary> /// </summary>