From 05cc46a6d643dfbc0ba96a39fe08fa203e509e75 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Fri, 13 Jun 2025 16:01:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=87=E8=AE=B0=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ReadingImageTaskService.cs | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs index 7f2fb3b21..4a78f3e06 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs @@ -1190,6 +1190,17 @@ namespace IRaCIS.Core.Application.Service var organIds = tableAnsweRowInfos.Where(x => x.OrganInfoId != null).Select(x => x.OrganInfoId).Distinct().ToList(); var organList = await _organInfoRepository.Where(x => organIds.Contains(x.Id)).ToListAsync(); + + + // 删除病灶不删除病灶标记 所以查询question的时候 已经删除的病灶对应的标记的信息要排除 + var rowids = await _readingTableAnswerRowInfoRepository.Where(x => x.Id == inDto.VisitTaskId).Select(x => x.Id).ToListAsync(); + + List rowidnull = rowids.Select(x => (Guid?)x).ToList(); + + var tableQuestionMarkList = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId + && x.RowId == null || rowidnull.Contains(x.RowId) + ).ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); + return (await GetReadingTableQuestion( new GetReadingTableQuestionOrAnswerInDto() { @@ -1206,7 +1217,7 @@ namespace IRaCIS.Core.Application.Service { IsBaseline = taskInfo.SourceSubjectVisit != null && taskInfo.SourceSubjectVisit.IsBaseLine, ReadingTaskState = taskInfo.ReadingTaskState, - QuestionMarkInfoList = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).ProjectTo(_mapper.ConfigurationProvider).ToListAsync(), + QuestionMarkInfoList = tableQuestionMarkList, }); } @@ -1221,14 +1232,7 @@ namespace IRaCIS.Core.Application.Service { var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).FirstNotNullAsync(); - // 删除病灶不删除病灶标记 所以查询question的时候 已经删除的病灶对应的标记的信息要排除 - var rowids = await _readingTableAnswerRowInfoRepository.Where(x => x.Id == inDto.TaskId).Select(x => x.Id).ToListAsync(); - - List rowidnull = rowids.Select(x => (Guid?)x).ToList(); - - var tableQuestionMarkList = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inDto.TaskId - &&x.RowId==null|| rowidnull.Contains(x.RowId) - ).ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); + var tableQuestionMarkList = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inDto.TaskId).ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); var qusetionList = await _readingQuestionTrialRepository .Where(x => x.IsShowInDicom) .WhereIf(inDto.QuestionClassify != null, x => x.QuestionClassify == inDto.QuestionClassify)