From 55f146a44a8df6ebe5142e47481fdb5c8a04e16e Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 13 Feb 2025 16:52:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BA=8F=E5=88=97=E4=B8=8A?= =?UTF-8?q?=E7=9A=84Instance=20=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/ImageAndDoc/SeriesService.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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 暂时废弃