From 5fe972bd99d6bc5c1f9ba0fd6c53b5152c445c54 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 13 Feb 2025 16:40:34 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B4=A8=E6=8E=A7?= =?UTF-8?q?=E9=A2=84=E8=A7=88=E5=BD=B1=E5=83=8F=20uat=20=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/ImageAndDoc/InstanceService.cs | 2 +- .../Service/ImageAndDoc/SeriesService.cs | 4 ++-- .../Service/Visit/SubjectVisitService.cs | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/InstanceService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/InstanceService.cs index b9ab6ef92..179997232 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/InstanceService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/InstanceService.cs @@ -19,7 +19,7 @@ namespace IRaCIS.Core.Application.Services [HttpGet("{seriesId:guid}")] public async Task>> List(Guid seriesId) { - var list = await _instanceRepository.Where(s => s.SeriesId == seriesId)/*.OrderBy(s => s.SliceLocation)*/.OrderBy(s => s.InstanceNumber). + var list = await _instanceRepository.Where(s => s.SeriesId == seriesId).IgnoreQueryFilters().OrderBy(s => s.InstanceNumber). ThenBy(s => s.InstanceTime).ThenBy(s => s.CreateTime) .ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/SeriesService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/SeriesService.cs index 7931a1d82..5a2b7343b 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/SeriesService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/SeriesService.cs @@ -23,11 +23,11 @@ namespace IRaCIS.Core.Application.Services public async Task>> List(Guid studyId) { //断点 - var seriesList = await _seriesRepository.Where(s => s.StudyId == studyId).OrderBy(s => s.SeriesNumber). + 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).OrderBy(t => t.SeriesId).ThenBy(t => t.InstanceNumber) + 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); diff --git a/IRaCIS.Core.Application/Service/Visit/SubjectVisitService.cs b/IRaCIS.Core.Application/Service/Visit/SubjectVisitService.cs index 907bb76f8..9633222b5 100644 --- a/IRaCIS.Core.Application/Service/Visit/SubjectVisitService.cs +++ b/IRaCIS.Core.Application/Service/Visit/SubjectVisitService.cs @@ -236,13 +236,13 @@ namespace IRaCIS.Core.Application.Services }).ToListAsync(); var studyIds = studyList.Select(t => t.StudyId).ToList(); - var instanceList = await _dicomInstanceRepository.Where(t => studyIds.Contains(t.StudyId)) + var instanceList = await _dicomInstanceRepository.Where(t => studyIds.Contains(t.StudyId)).IgnoreQueryFilters() .WhereIf(isReading == 1, s => s.IsReading) - .Select(t => new { t.SeriesId, t.Id, t.InstanceNumber, t.Path, t.NumberOfFrames, t.HtmlPath, t.IsDeleted, t.IsReading }).ToListAsync(); + .Select(t => new { t.SeriesId, t.Id, t.InstanceNumber, t.Path, t.NumberOfFrames, t.HtmlPath, t.IsReading, t.IsDeleted }).ToListAsync(); foreach (var t in studyList) { - t.SeriesList = await _dicomSeriesRepository.Where(s => s.StudyId == t.StudyId) + t.SeriesList = await _dicomSeriesRepository.Where(s => s.StudyId == t.StudyId).IgnoreQueryFilters() .WhereIf(isReading == 1, s => s.IsReading).OrderBy(s => s.SeriesNumber).ThenBy(s => s.SeriesTime) .ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); @@ -262,7 +262,7 @@ namespace IRaCIS.Core.Application.Services IsDeleted = k.IsDeleted, }).ToList(); - series.InstanceCount = series.InstanceInfoList.Count; + series.InstanceCount = series.InstanceInfoList.Count(); } ); 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 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BA=8F=E5=88=97?= =?UTF-8?q?=E4=B8=8A=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 暂时废弃