From 74fe7c6e158a4eafa6f1cf7e7bb97520ec32ff69 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Wed, 22 Mar 2023 15:06:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Reading/Dto/ReadingImageTaskViewModel.cs | 3 +++ .../ReadingImageTaskService.cs | 23 +++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs index 81659e689..b94d39f4f 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs @@ -818,6 +818,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public int ShowOrder { get; set; } + + public bool IsFirstChangeTask { get; set; } = false; + } public class GetTableAnswerRowInfoInDto diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs index a162f53f0..7650b2722 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs @@ -711,6 +711,29 @@ namespace IRaCIS.Application.Services .WhereIf(inDto.QuestionId != null, x => x.QuestionId == inDto.QuestionId) .ProjectTo(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder).ThenBy(x => x.RowIndex) .ToListAsync(); + + + var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync(); + + if (taskInfo.IsConvertedTask && + !(await _visitTaskRepository.AnyAsync(x => x.IsAnalysisCreate == taskInfo.IsAnalysisCreate + && x.IsSelfAnalysis == taskInfo.IsSelfAnalysis + && x.VisitTaskNum < taskInfo.VisitTaskNum + && x.DoctorUserId == taskInfo.DoctorUserId + && x.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId + && !x.IsConvertedTask + && x.SubjectId == taskInfo.SubjectId + && x.ArmEnum == taskInfo.ArmEnum && + x.TaskState == TaskState.Effect)) + ) + { + result.ForEach(x => + { + x.IsFirstChangeTask = true; + }); + + } + result.ForEach(x => {