diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/SeriesService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/SeriesService.cs index 5a2b7343b..5323fab52 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/SeriesService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/SeriesService.cs @@ -9,7 +9,7 @@ namespace IRaCIS.Core.Application.Services [ApiExplorerSettings(GroupName = "Image")] [AllowAnonymous] public class SeriesService(IRepository _seriesRepository, - IRepository _instanceRepository, + IRepository _instanceRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer, IWebHostEnvironment _hostEnvironment) : BaseService { @@ -22,14 +22,14 @@ namespace IRaCIS.Core.Application.Services [HttpGet, Route("{studyId:guid}")] public async Task>> List(Guid studyId) { - //断点 + //断点 var seriesList = await _seriesRepository.Where(s => s.StudyId == studyId).IgnoreQueryFilters().OrderBy(s => s.SeriesNumber). ThenBy(s => s.SeriesTime).ThenBy(s => s.CreateTime) .ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); var instanceList = await _instanceRepository.Where(s => s.StudyId == studyId).IgnoreQueryFilters().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, t.NumberOfFrames, t.InstanceNumber, t.HtmlPath ,t.IsReading,t.IsDeleted}).ToListAsync();//.GroupBy(u => u.SeriesId); + .Select(t => new { t.SeriesId, t.Id, t.Path, t.NumberOfFrames, t.InstanceNumber, t.HtmlPath, t.IsReading, t.IsDeleted }).ToListAsync();//.GroupBy(u => u.SeriesId); foreach (var series in seriesList) { @@ -42,10 +42,12 @@ namespace IRaCIS.Core.Application.Services HtmlPath = k.HtmlPath, Path = k.Path, InstanceNumber = k.InstanceNumber, - IsReading=k.IsReading, - IsDeleted=k.IsDeleted + IsReading = k.IsReading, + IsDeleted = k.IsDeleted }).ToList(); + + series.InstanceCount = series.InstanceInfoList.Count; } #region 暂时废弃