修改
This commit is contained in:
@@ -412,7 +412,7 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
qusetionList.ForEach(x =>
|
||||
{
|
||||
x.Answer = answers.Where(y => y.ReadingQuestionTrialId == x.Id).Select(x => x.Answer).FirstOrDefault() ?? string.Empty;
|
||||
x.Answer = answers.Where(y => y.ReadingQuestionTrialId == x.Id).Select(x => x.Answer).FirstOrDefault() ?? x.DefaultValue;
|
||||
});
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -164,10 +164,16 @@ namespace IRaCIS.Application.Services
|
||||
PageName = leftpage.PageName,
|
||||
PageShowOrder = leftpage.ShowOrder,
|
||||
IsPublicPage = leftpage.IsPublicPage,
|
||||
DefaultValue = data.DefaultValue,
|
||||
};
|
||||
|
||||
var qusetionList = await query.Where(x => x.ShowQuestion != ShowQuestion.Hide).OrderBy(x => x.ShowOrder).ToListAsync();
|
||||
|
||||
qusetionList.ForEach(x =>
|
||||
{
|
||||
x.Answer = x.Answer.IsNullOrEmpty() ? x.DefaultValue : x.Answer;
|
||||
});
|
||||
|
||||
return qusetionList;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user