同步修改
continuous-integration/drone/push Build is passing Details

Test_IRC_Net8
he 2025-04-07 17:25:37 +08:00
parent ab1e33a799
commit 8c5b759a92
1 changed files with 14 additions and 4 deletions

View File

@ -966,7 +966,8 @@ namespace IRaCIS.Core.Application.Service
{
question.GroupId = copyNewQuestionList.Where(y => x.GroupId == y.OriginalId).Select(y => y.Id).FirstOrDefault();
}
needAddDatas.Add(question);
needAddDatas.Add(question);
};
await _readingQuestionSystemRepository.BatchDeleteNoTrackingAsync(x => x.ReadingQuestionCriterionSystemId == inDto.NewSystemCriterionId);
@ -975,15 +976,24 @@ namespace IRaCIS.Core.Application.Service
#region 表格问题
var newSystemTableQuestionList = await _readingTableQuestionSystemRepository.Where(x => x.SystemCriterionId == inDto.SourceSystemCriterionId)
.ProjectTo<ReadingTableQuestionSystemData>(_mapper.ConfigurationProvider).ToListAsync();
foreach (var question in newSystemTableQuestionList)
{
question.SystemCriterionId = inDto.NewSystemCriterionId;
question.Id = NewId.NextGuid();
}
var copeNewSystemTableQuestionList = newSystemTableQuestionList.Clone();
var needAddTableDatas = new List<ReadingTableQuestionSystemData>();
foreach (var x in newSystemTableQuestionList)
{
var tableQuestion = x.Clone();
tableQuestion.SystemCriterionId = inDto.NewSystemCriterionId;
tableQuestion.Id = NewId.NextGuid();
tableQuestion.ReadingQuestionId = copyNewQuestionList.Where(y => x.ReadingQuestionId == y.OriginalId).Select(y => y.Id).FirstOrDefault();
if (tableQuestion.ParentId != null)
if (tableQuestion.ParentId != null)
{
tableQuestion.ParentId = copeNewSystemTableQuestionList.Where(y => x.ParentId == y.OriginalId).Select(y => y.Id).FirstOrDefault();
}