From 728727af54e6d2eff558910a518388e9b5fe1049 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Sun, 4 Jan 2026 12:29:22 +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 --- .../General/ReadingCalculateService.cs | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/General/ReadingCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/General/ReadingCalculateService.cs index 33903bba9..c287df5c3 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/General/ReadingCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/General/ReadingCalculateService.cs @@ -485,7 +485,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate Value=x }).ToList()); - var r1baseLine= alldata.TaskQuestions + var r1baseLine= r1.TaskQuestions .SelectMany(x => x.Childrens) .Where(x => x.QuestionType == QuestionType.ExistDisease) .SelectMany(x => x.Answer.Select(a => new EvaluationValue @@ -496,7 +496,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate .ToList(); - var r1data = alldata.TaskQuestions + var r1data = r1.TaskQuestions .SelectMany(x => x.Childrens) .Where(x => x.QuestionType == QuestionType.Tumor) .SelectMany(x => x.Answer.Select(a => new EvaluationValue @@ -516,7 +516,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate if (criterion.ReadingType == ReadingMethod.Double) { - var r2baseLine = alldata.TaskQuestions + var r2baseLine = r2.TaskQuestions .SelectMany(x => x.Childrens) .Where(x => x.QuestionType == QuestionType.ExistDisease) .SelectMany(x => x.Answer.Select(a => new EvaluationValue @@ -527,7 +527,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate .ToList(); - var r2data = alldata.TaskQuestions + var r2data = r2.TaskQuestions .SelectMany(x => x.Childrens) .Where(x => x.QuestionType == QuestionType.Tumor) .SelectMany(x => x.Answer.Select(a => new EvaluationValue @@ -552,18 +552,21 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate List BuildShowChartGroups(GetReadingReportEvaluationOutDto data, Arm arm) { var groups = new List(); - if (data.TaskQuestions == null || data.VisitTaskList == null) return groups; - foreach (var g in data.TaskQuestions) + if (alldata.TaskQuestions == null || alldata.VisitTaskList == null) return groups; + foreach (var g in alldata.TaskQuestions) { var items = g.Childrens?.Where(c => c.ShowChartTypeEnum != ShowChartType.NotShow).ToList() ?? new List(); if (items.Count == 0) continue; var chartList = new List(); foreach (var item in items) { + var itemdata= data.TaskQuestions.SelectMany(x => x.Childrens) + .Where(x => x.QuestionId == item.QuestionId) + .FirstOrDefault(); var cd = new ReportChartData { - Name = item.QuestionName, - Value = item.Answer?.Select(a => a.Answer).ToList() ?? new List() + Name = item?.QuestionName??string.Empty, + Value = itemdata?.Answer?.Select(a => a.Answer).ToList() ?? new List() }; chartList.Add(cd); }