Test.EIImageViewer
parent
611f914d0f
commit
57bb9e5bba
|
@ -1705,6 +1705,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
|
|
||||||
public bool IsPage { get; set; } = false;
|
public bool IsPage { get; set; } = false;
|
||||||
|
|
||||||
|
public string DefaultValue { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 标准分页Id
|
/// 标准分页Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -412,7 +412,7 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
qusetionList.ForEach(x =>
|
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
|
#endregion
|
||||||
|
|
|
@ -164,10 +164,16 @@ namespace IRaCIS.Application.Services
|
||||||
PageName = leftpage.PageName,
|
PageName = leftpage.PageName,
|
||||||
PageShowOrder = leftpage.ShowOrder,
|
PageShowOrder = leftpage.ShowOrder,
|
||||||
IsPublicPage = leftpage.IsPublicPage,
|
IsPublicPage = leftpage.IsPublicPage,
|
||||||
|
DefaultValue = data.DefaultValue,
|
||||||
};
|
};
|
||||||
|
|
||||||
var qusetionList = await query.Where(x => x.ShowQuestion != ShowQuestion.Hide).OrderBy(x => x.ShowOrder).ToListAsync();
|
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;
|
return qusetionList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue