From fe1d7724bca38f9dc71bee7b77cffe2390f5f755 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 16 Dec 2025 09:30:41 +0800 Subject: [PATCH] =?UTF-8?q?uat-ivus-oct-=E5=86=8D=E6=AC=A1=E4=BF=AE?= =?UTF-8?q?=E6=94=B96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MassTransit/Consumer/ConsistencyCheckConsumer.cs | 2 +- .../Service/ImageAndDoc/DownloadAndUploadService.cs | 2 +- .../Service/ImageAndDoc/NoneDicomStudyService.cs | 11 ++++++++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/IRaCIS.Core.Application/MassTransit/Consumer/ConsistencyCheckConsumer.cs b/IRaCIS.Core.Application/MassTransit/Consumer/ConsistencyCheckConsumer.cs index d3e7c50e6..3e4431d1c 100644 --- a/IRaCIS.Core.Application/MassTransit/Consumer/ConsistencyCheckConsumer.cs +++ b/IRaCIS.Core.Application/MassTransit/Consumer/ConsistencyCheckConsumer.cs @@ -82,7 +82,7 @@ namespace IRaCIS.Core.Application.MassTransit.Consumer var noneDicomQuey = from sv in _subjectVisitRepository.Where(subjectVisitLambda) join subject in _subjectRepository.AsQueryable() on sv.SubjectId equals subject.Id - join noneDicomStudy in _noneDicomStudyRepository.AsQueryable() on sv.Id equals noneDicomStudy.SubjectVisitId + join noneDicomStudy in _noneDicomStudyRepository.Where(t => t.FileCount > 0) on sv.Id equals noneDicomStudy.SubjectVisitId select new CheckDBModel() { SubjectVisitId = sv.Id, diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs index 71fa83622..291419561 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs @@ -936,7 +936,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc { //存在ivus 和oct 这两种的项目 if (_readingQuestionCriterionTrialRepository.Where(t => t.TrialId == info.TrialId && - (t.CriterionType == CriterionType.IVUS || t.CriterionType == CriterionType.OCT)).Distinct().Count() > 2 + (t.CriterionType == CriterionType.IVUS || t.CriterionType == CriterionType.OCT)).Distinct().Count() == 2 && !_noneDicomStudyReposiotry.Any(t => t.SubjectId == inQuery.SubjectId && t.Modality != "IVUS")) { #region ivus 自动创建非dicom检查 diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/NoneDicomStudyService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/NoneDicomStudyService.cs index bf23ed095..41faa94a0 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/NoneDicomStudyService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/NoneDicomStudyService.cs @@ -3,6 +3,7 @@ // 生成时间 2021-12-06 10:54:55 // 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。 //-------------------------------------------------------------------- +using DocumentFormat.OpenXml.EMMA; using IRaCIS.Core.Application.Filter; using IRaCIS.Core.Application.Service.Reading.Dto; using IRaCIS.Core.Domain.Models; @@ -96,8 +97,16 @@ namespace IRaCIS.Core.Application.Contracts } + var isFilterIVUSNoneDicom = false; + if (_subjectVisitRepository.Where(t => t.Id == subjectVisitId).SelectMany(t => t.Trial.TrialReadingCriterionList) + .Where(t => t.CriterionType == CriterionType.IVUS || t.CriterionType == CriterionType.OCT).Distinct().Count() == 2 + ) + { + isFilterIVUSNoneDicom = true; + } - var list = await noneDicomStudyQueryable.OrderBy(x => x.ImageDate).ThenBy(x => x.CreateTime).ToListAsync(); + var list = await noneDicomStudyQueryable.Where(t => isFilterIVUSNoneDicom ? t.Modality != "IVUS" : true) + .OrderBy(x => x.ImageDate).ThenBy(x => x.CreateTime).ToListAsync(); var config = await _subjectVisitRepository.Where(t => t.Id == subjectVisitId).Select(t => new { t.Trial.ImageFormatList, t.Trial.StudyNameList, t.Trial.IsShowStudyName, AuditState = qcAuditState }).FirstOrDefaultAsync(); return ResponseOutput.Ok(list, config);