修改
This commit is contained in:
+6
-10
@@ -589,19 +589,15 @@ namespace IRaCIS.Application.Services
|
||||
qusetionList = qusetionList.Where(x => usedGurops.Contains(x.GroupName)).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (inDto.TaskId != null)
|
||||
|
||||
var answers = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.TaskId).ToListAsync();
|
||||
qusetionList.ForEach(x =>
|
||||
{
|
||||
var answers = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.TaskId).ToListAsync();
|
||||
qusetionList.ForEach(x =>
|
||||
{
|
||||
var answer= answers.Where(y => y.ReadingQuestionTrialId == x.Id).Select(x => x.Answer).FirstOrDefault() ?? string.Empty;
|
||||
x.Answer = answer.IsNullOrEmpty() ? x.DefaultValue : answer;
|
||||
});
|
||||
|
||||
}
|
||||
var answer = answers.Where(y => y.ReadingQuestionTrialId == x.Id).Select(x => x.Answer).FirstOrDefault() ?? string.Empty;
|
||||
x.Answer = answer.IsNullOrEmpty() ? x.DefaultValue : answer;
|
||||
});
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
Reference in New Issue
Block a user