同步修改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
ab1e33a799
commit
8c5b759a92
|
@ -966,7 +966,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
question.GroupId = copyNewQuestionList.Where(y => x.GroupId == y.OriginalId).Select(y => y.Id).FirstOrDefault();
|
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);
|
await _readingQuestionSystemRepository.BatchDeleteNoTrackingAsync(x => x.ReadingQuestionCriterionSystemId == inDto.NewSystemCriterionId);
|
||||||
|
@ -975,15 +976,24 @@ namespace IRaCIS.Core.Application.Service
|
||||||
#region 表格问题
|
#region 表格问题
|
||||||
var newSystemTableQuestionList = await _readingTableQuestionSystemRepository.Where(x => x.SystemCriterionId == inDto.SourceSystemCriterionId)
|
var newSystemTableQuestionList = await _readingTableQuestionSystemRepository.Where(x => x.SystemCriterionId == inDto.SourceSystemCriterionId)
|
||||||
.ProjectTo<ReadingTableQuestionSystemData>(_mapper.ConfigurationProvider).ToListAsync();
|
.ProjectTo<ReadingTableQuestionSystemData>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
|
foreach (var question in newSystemTableQuestionList)
|
||||||
|
{
|
||||||
|
question.SystemCriterionId = inDto.NewSystemCriterionId;
|
||||||
|
question.Id = NewId.NextGuid();
|
||||||
|
}
|
||||||
|
|
||||||
var copeNewSystemTableQuestionList = newSystemTableQuestionList.Clone();
|
var copeNewSystemTableQuestionList = newSystemTableQuestionList.Clone();
|
||||||
|
|
||||||
|
|
||||||
var needAddTableDatas = new List<ReadingTableQuestionSystemData>();
|
var needAddTableDatas = new List<ReadingTableQuestionSystemData>();
|
||||||
foreach (var x in newSystemTableQuestionList)
|
foreach (var x in newSystemTableQuestionList)
|
||||||
{
|
{
|
||||||
var tableQuestion = x.Clone();
|
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();
|
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();
|
tableQuestion.ParentId = copeNewSystemTableQuestionList.Where(y => x.ParentId == y.OriginalId).Select(y => y.Id).FirstOrDefault();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue