From 21fdd4b0e42c25b35af8130c7436e474403252bf Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Tue, 24 Dec 2024 10:04:10 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=94=E5=9B=9E=E8=A1=A8=E6=A0=BC=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E7=9A=84=E6=A0=87=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ReadingImageTask/ReadingImageTaskService.cs | 10 ++++++---- IRaCIS.Core.Application/Service/Reading/_MapConfig.cs | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs index 57f9122ba..d448f0c0a 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs @@ -1130,6 +1130,7 @@ 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(); var qusetionList = await _readingQuestionTrialRepository .Where(x => x.IsShowInDicom) .WhereIf(inDto.QuestionClassify != null, x => x.QuestionClassify == inDto.QuestionClassify) @@ -1305,7 +1306,7 @@ namespace IRaCIS.Core.Application.Service var pageGroupList = newPageQusetionList.Where(x => x.Type == ReadingQestionType.Group).ToList(); pageGroupList.ForEach(x => { - FindChildQuestion(x, newPageQusetionList, tableQuestionList, inDto.TableAnswers, inDto.TableAnsweRowInfos, inDto.OrganInfos, baseLineTableAnswer, isFirstChangeTask, lastTaskTableAnswer, inDto.TaskId); + FindChildQuestion(x, newPageQusetionList, tableQuestionList, inDto.TableAnswers, inDto.TableAnsweRowInfos, inDto.OrganInfos, baseLineTableAnswer, isFirstChangeTask, lastTaskTableAnswer, tableQuestionMarkList, inDto.TaskId); }); page.Childrens = pageGroupList.Where(x => !(x.Type == ReadingQestionType.Group && x.Childrens.Count == 0)).ToList(); @@ -1322,7 +1323,7 @@ namespace IRaCIS.Core.Application.Service groupList = qusetionList.Where(x => x.Type == ReadingQestionType.Group).ToList(); groupList.ForEach(x => { - FindChildQuestion(x, qusetionList, tableQuestionList, inDto.TableAnswers, inDto.TableAnsweRowInfos, inDto.OrganInfos, baseLineTableAnswer, isFirstChangeTask, lastTaskTableAnswer, inDto.TaskId); + FindChildQuestion(x, qusetionList, tableQuestionList, inDto.TableAnswers, inDto.TableAnsweRowInfos, inDto.OrganInfos, baseLineTableAnswer, isFirstChangeTask, lastTaskTableAnswer, tableQuestionMarkList, inDto.TaskId); }); groupList = groupList.Where(x => !(x.Type == ReadingQestionType.Group && x.Childrens.Count == 0)).ToList(); @@ -1349,7 +1350,7 @@ namespace IRaCIS.Core.Application.Service /// /// /// - private async void FindChildQuestion(TrialReadQuestionData item, List questionlists, List tableQuestionLists, List tableAnswers, List tableAnsweRowInfos, List organInfos, List baseLineTableAnswer, bool isFirstChangeTask, List lastTaskTableAnswer, Guid? TaskId) + private async void FindChildQuestion(TrialReadQuestionData item, List questionlists, List tableQuestionLists, List tableAnswers, List tableAnsweRowInfos, List organInfos, List baseLineTableAnswer, bool isFirstChangeTask, List lastTaskTableAnswer, List TableQuestionMarkList, Guid? TaskId) { item.Childrens = questionlists.Where(x => x.ParentId == item.Id || (x.GroupId == item.Id && x.ParentId == null)).ToList(); item.TableQuestions = new TrialReadTableQuestion(); @@ -1473,6 +1474,7 @@ namespace IRaCIS.Core.Application.Service answers.Add("OtherNumberOfFrames", rowInfo == null || rowInfo.OtherNumberOfFrames == null ? string.Empty : rowInfo.OtherNumberOfFrames.ToString()); answers.Add("OtherMarkTool", rowInfo == null || rowInfo.OtherMarkTool == null ? string.Empty : rowInfo.OtherMarkTool.ToString()); answers.Add("RowIndex", x.ToString()); + answers.Add("TableQuestionMarkList", rowInfo == null ? "[]" : JsonConvert.SerializeObject(TableQuestionMarkList.Where(x=>x.RowId== rowInfo.Id).ToList())); answers.Add("RowId", rowInfo == null ? string.Empty : rowInfo.Id.ToString()); answers.Add("MarkTool", rowInfo.MarkTool); answers.Add("StudyId", rowInfo.StudyId.ToString()); @@ -1504,7 +1506,7 @@ namespace IRaCIS.Core.Application.Service { item.Childrens.ForEach(x => { - FindChildQuestion(x, questionlists, tableQuestionLists, tableAnswers, tableAnsweRowInfos, organInfos, baseLineTableAnswer, isFirstChangeTask, lastTaskTableAnswer, TaskId); + FindChildQuestion(x, questionlists, tableQuestionLists, tableAnswers, tableAnsweRowInfos, organInfos, baseLineTableAnswer, isFirstChangeTask, lastTaskTableAnswer, TableQuestionMarkList, TaskId); }); } } diff --git a/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs b/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs index 86b0a6bff..9b34f478c 100644 --- a/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs @@ -67,6 +67,7 @@ namespace IRaCIS.Core.Application.Service CreateMap(); CreateMap(); + CreateMap(); CreateMap() .ForMember(dest => dest.CreateUser, opt => opt.Ignore()) .ForAllMembers(opts => opts.Condition((src, dest, srcMember) => srcMember != null));