From 44f74fd9e6ad36f8d8210ddd2e9f59e93b3f5d62 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 13 Feb 2025 18:01:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E9=A2=84=E8=A7=88?= =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E8=B4=A8=E6=8E=A7=E7=8A=B6=E6=80=81=E8=BF=87?= =?UTF-8?q?=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/ImageAndDoc/SeriesService.cs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/SeriesService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/SeriesService.cs index 5323fab52..9d3e264b3 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/SeriesService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/SeriesService.cs @@ -22,13 +22,20 @@ namespace IRaCIS.Core.Application.Services [HttpGet, Route("{studyId:guid}")] public async Task>> List(Guid studyId) { + //质控的时候,要标记序列,和instance 删除 ,所以要返回全部,但是 质控通过后,pm 进去看的时候要看过滤后的 + + var isInQC = await _seriesRepository.Where(s => s.StudyId == studyId).AnyAsync(t => t.DicomStudy.SubjectVisit.AuditState > AuditStateEnum.ToAudit); + //断点 - var seriesList = await _seriesRepository.Where(s => s.StudyId == studyId).IgnoreQueryFilters().OrderBy(s => s.SeriesNumber). - ThenBy(s => s.SeriesTime).ThenBy(s => s.CreateTime) + var seriesList = await _seriesRepository.Where(s => s.StudyId == studyId).IgnoreQueryFilters() + .WhereIf(isInQC, t => t.IsDeleted == false) + .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) + var instanceList = await _instanceRepository.Where(s => s.StudyId == studyId).IgnoreQueryFilters() + .WhereIf(isInQC, t => t.IsDeleted == false) + .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); foreach (var series in seriesList)