Uat_Study
he 2022-08-26 11:49:13 +08:00
parent c42000323b
commit e45165e523
1 changed files with 5 additions and 4 deletions

View File

@ -1044,16 +1044,17 @@ namespace IRaCIS.Application.Services
public void FindSystemChildQuestion(GetSystemReadingQuestionOutDto item, List<GetSystemReadingQuestionOutDto> questionlists,List<TableQuestionDataInfo> tableQuestions)
{
item.Childrens = questionlists.Where(x => x.ParentId == item.Id || (item.Type == "group" && x.Type != "group" && x.ParentId == null && x.GroupName == item.GroupName)).ToList();
item.Childrens.AddRange(tableQuestions.Where(x => x.ReadingQuestionId == item.Id).Select(x => new GetSystemReadingQuestionOutDto
{
Childrens = new List<GetSystemReadingQuestionOutDto>(),
ShowOrder = x.ShowOrder,
GroupName = String.Empty,
GroupName = string.Empty,
Id = x.Id,
Type=x.Type,
TypeValue=x.TypeValue,
RelevanceId=x.RelevanceId,
RelevanceValue=x.RelevanceValue,
ImageCount = 0,
ParentId = item.Id,
QuestionName = x.QuestionName,