From 49a0cf3ece530870d18949b975d1c8147a8d8ea4 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Wed, 20 Mar 2024 17:08:26 +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 --- .../LuganoCalculateService.cs | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs index 651ed4672..7a178bd51 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs @@ -1374,15 +1374,20 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate var addList = _mapper.Map>(tableRowAnswers).OrderBy(x => x.RowIndex).ToList(); - await _readingTaskQuestionMarkRepository.AddRangeAsync(questionMarkList); - await _readingTableAnswerRowInfoRepository.AddRangeAsync(addList); - await _readingTableQuestionAnswerRepository.AddRangeAsync(tableAnswers); - addList.ForEach(x => + foreach (var item in addList) { - x.MergeRow = null; - x.SplitRow = null; + await _readingTableAnswerRowInfoRepository.AddAsync(item); + await _readingTableQuestionAnswerRepository.SaveChangesAsync(); + } + await _readingTaskQuestionMarkRepository.AddRangeAsync(questionMarkList); + //await _readingTableAnswerRowInfoRepository.AddRangeAsync(addList); + await _readingTableQuestionAnswerRepository.AddRangeAsync(tableAnswers); + //addList.ForEach(x => + //{ + // x.MergeRow = null; + // x.SplitRow = null; - }); + //}); await _readingTableQuestionAnswerRepository.SaveChangesAsync(); }