diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs index c77aa5945..9c39f7f33 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs @@ -1221,7 +1221,14 @@ namespace IRaCIS.Core.Application.Service { var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).FirstNotNullAsync(); - var tableQuestionMarkList = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inDto.TaskId).ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); + // 删除病灶不删除病灶标记 所以查询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 qusetionList = await _readingQuestionTrialRepository .Where(x => x.IsShowInDicom) .WhereIf(inDto.QuestionClassify != null, x => x.QuestionClassify == inDto.QuestionClassify) @@ -2069,9 +2076,6 @@ namespace IRaCIS.Core.Application.Service var index = await _readingCalculateService.GetDeleteLesionStatrIndex(inDto); - - await _readingTaskQuestionMarkRepository.BatchDeleteNoTrackingAsync(x => x.RowId == inDto.RowId); - await _readingTableQuestionAnswerRepository.BatchUpdateNoTrackingAsync(x => x.RowId == inDto.RowId, x => new ReadingTableQuestionAnswer() {