From 346c0e1d769358fb7e3e40cf9d1eb79d531b41c1 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Fri, 26 Aug 2022 18:11:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=80=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Reading/ReadingQuestionService.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs index b5aa3ea1c..2c5db1cdb 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs @@ -506,6 +506,11 @@ namespace IRaCIS.Application.Services var newTrialTableQuestionList = await _readingTableQuestionSystemRepository.Where(x => x.SystemCriterionId == trialCriterion.ReadingQuestionCriterionSystemId) .ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); + + newTrialTableQuestionList.ForEach(x => { + x.Id = NewId.NextGuid(); + }); + var copyNewTrialTableQuestionList = newTrialTableQuestionList.Clone(); var needAddTableDatas = new List(); @@ -515,8 +520,6 @@ namespace IRaCIS.Application.Services tableQuestion.TrialId = inDto.TrialId; tableQuestion.TrialCriterionId = trialCriterion.Id; - tableQuestion.Id = NewId.NextGuid(); - tableQuestion.ReadingQuestionId = copyNewQuestionList.Where(y => y.ReadingQuestionSystemId == x.ReadingQuestionId).Select(y => y.Id).FirstOrDefault(); if (tableQuestion.ParentId != null) {