From 9f40c4992a429fa2ef85bc1a0c5b943c15694541 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Wed, 22 Jun 2022 17:01:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=80=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/IRaCIS.Core.Application.xml | 2 +- IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs | 2 ++ .../Service/Reading/ReadingPeriodSetService.cs | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index e9cc5f089..b87d72bcc 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -4247,7 +4247,7 @@ - + 完成阅片修改状态 diff --git a/IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs b/IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs index cd53c4b04..32a64b3c0 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs @@ -393,7 +393,9 @@ namespace IRaCIS.Application.Services var readModulequery = _readModuleRepository.AsQueryable(); var resultlist= await visitQuery.WhereIf(finalVisitNum != null&& finalVisitNum!=0, x => x.VisitNum <= finalVisitNum) + .WhereIf(inDto.ReadingSetType== ReadingSetType.TumorReading, x => readModulequery.Where(y => y.SubjectVisitId == x.Id && y.ReadingSetType == ReadingSetType.ImageReading).Count() > 0) .Where(x=>x.VisitNum> maxReadVisitNum) + .Where(x => readModulequery.Where(y => y.SubjectVisitId == x.Id && y.ReadingSetType == inDto.ReadingSetType).Count() == 0).OrderBy(x => finalVisitNum) .Select(x => new GetSubjectReadVisitsOutDto() { diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingPeriodSetService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingPeriodSetService.cs index 42dce5de8..c78b1e6ad 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingPeriodSetService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingPeriodSetService.cs @@ -115,6 +115,7 @@ namespace IRaCIS.Application.Services [HttpPost] public async Task> GetPreviewTheReadingList(PreviewTheReadingListInDto inDto) { + var readModulequery = _readModuleRepository.AsQueryable(); // 当前项目 最晚拍片日期不为null 中心筛选 var visitQuery = _subjectVisitRepository.Where(x => x.TrialId == inDto.TrialId &&x.LatestScanDate!=null&&!x.IsLostVisit) @@ -124,7 +125,8 @@ namespace IRaCIS.Application.Services var existsBubjectVisitsQuery= _readModuleRepository.Where(y => y.ReadingSetType == inDto.ReadingSetType && y.TrialId == inDto.TrialId).Select(x => x.SubjectVisitId); visitQuery = visitQuery.Where(x => !existsBubjectVisitsQuery.Contains(x.Id)) .WhereIf(inDto.ExpirationDate != null, x => x.LatestScanDate <= inDto.ExpirationDate.Value) - .WhereIf(inDto.ExpirationVisitNum != null, x => x.VisitNum == inDto.ExpirationVisitNum); + .WhereIf(inDto.ExpirationVisitNum != null, x => x.VisitNum == inDto.ExpirationVisitNum) + .WhereIf(inDto.ReadingSetType==ReadingSetType.TumorReading,x => readModulequery.Where(y => y.SubjectVisitId == x.Id && y.ReadingSetType == ReadingSetType.ImageReading).Count() > 0); var subjectIdlist = await visitQuery.OrderBy(x => x.SubjectId).Select(x => x.SubjectId).Distinct().Skip((inDto.PageIndex - 1) * inDto.PageSize).Take(inDto.PageSize).ToListAsync();