Uat_Study
he 2022-07-14 15:21:06 +08:00
parent 5be770e2bb
commit c4a7e8f632
1 changed files with 5 additions and 35 deletions

View File

@ -353,26 +353,13 @@ namespace IRaCIS.Application.Services
IsPage = true,
IsPublicPage = firstData.IsPublicPage,
};
var pageGroupList = newPageQusetionList.Where(x => x.Type == "group").ToList();
if (pageGroupList.Count()!=0)
{
pageGroupList.ForEach(x =>
{
x.Childrens = newPageQusetionList.Where(y => y.GroupName == x.GroupName && y.ParentId == null && y.Type != "group").ToList();
x.Childrens.ForEach(z =>
{
this.FindChildQuestion(z, newPageQusetionList);
});
});
}
else
{
pageGroupList = newPageQusetionList.Where(x => x.ParentId == null).ToList();
var pageGroupList = newPageQusetionList.Where(x => x.ParentId == null).ToList();
pageGroupList.ForEach(x =>
{
this.FindChildQuestion(x, newPageQusetionList);
});
}
page.Childrens = pageGroupList;
groupList.Add(page);
}
@ -383,31 +370,14 @@ namespace IRaCIS.Application.Services
else
{
qusetionList = qusetionList.Where(x => x.ReadingCriterionPageId == null).ToList();
groupList = qusetionList.Where(x => x.Type == "group").ToList();
if (groupList.Count() != 0)
{
groupList.ForEach(x =>
{
x.Childrens = qusetionList.Where(y => y.GroupName == x.GroupName && y.ParentId == null && y.Type != "group").ToList();
x.Childrens.ForEach(z =>
{
this.FindChildQuestion(z, qusetionList);
});
});
}
else
{
groupList = qusetionList.Where(x => x.ParentId == null).ToList();
groupList.ForEach(x =>
{
this.FindChildQuestion(x, qusetionList);
});
}
result.SinglePage = groupList;