From 549691c8ac3a5d182888ebab42ca87ae857a4ae5 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Wed, 23 Jul 2025 15:31:17 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A8=BD=E6=9F=A5=E5=A4=96=E5=B1=82=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs index f1b9cbf18..7e3745c1b 100644 --- a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs +++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs @@ -3310,6 +3310,17 @@ namespace IRaCIS.Core.Infra.EFCore.Common markName = mark.OrderMarkName; } + // 这里本来就批量展示问题的 现在又需要单个展示 + var thisQuestinonAnswer = entitys.Where(x => x.Entity.GetType() == typeof(ReadingTaskQuestionAnswer)).Select(x => x.Entity as ReadingTaskQuestionAnswer).FirstOrDefault(); + + string questionName = string.Empty; + string questionAnswer = string.Empty; + if (thisQuestinonAnswer != null) + { + questionName = await _dbContext.ReadingQuestionTrial.Where(x => x.Id == thisQuestinonAnswer.ReadingQuestionTrialId).Select(x => _userInfo.IsEn_Us ? x.QuestionEnName : x.QuestionName).FirstOrDefaultAsync(); + questionAnswer = thisQuestinonAnswer.Answer; + } + await InsertInspection(cloneEntity, type, x => new InspectionConvertDTO() { VisitTaskId = x.VisitTaskId, @@ -3327,6 +3338,8 @@ namespace IRaCIS.Core.Infra.EFCore.Common MarkName = markName, PicturePath = mark != null ? mark.PicturePath : string.Empty, + QuestinonAnswer = questionAnswer, + QuestionName = questionName, QuestionAnswerList = taskQuestionAnswerList.Join(quesionList, t => t.ReadingQuestionTrialId, u => u.QuestionId,