调整代码
parent
59aa7a5269
commit
a5ae2a4aa4
|
@ -141,77 +141,5 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 找子问题
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="item"></param>
|
|
||||||
/// <param name="questionlists"></param>
|
|
||||||
/// <param name="tableQuestions"></param>
|
|
||||||
[NonDynamicMethod]
|
|
||||||
public void FindChildQuestion(GetTrialReadingQuestionOutDto item, List<GetTrialReadingQuestionOutDto> questionlists, List<TableQuestionDataInfo> tableQuestions)
|
|
||||||
{
|
|
||||||
item.Childrens = questionlists.Where(x => x.ParentId == item.Id || (item.Type == ReadingQestionType.Group && x.Type != ReadingQestionType.Group && x.ParentId == null && x.GroupName == item.GroupName)).ToList();
|
|
||||||
|
|
||||||
|
|
||||||
item.Childrens.AddRange(tableQuestions.Where(x => x.ReadingQuestionId == item.Id).Select(x => new GetTrialReadingQuestionOutDto
|
|
||||||
{
|
|
||||||
Childrens = new List<GetTrialReadingQuestionOutDto>(),
|
|
||||||
ShowOrder = x.ShowOrder,
|
|
||||||
GroupName = string.Empty,
|
|
||||||
Id = x.Id,
|
|
||||||
Type = x.Type,
|
|
||||||
DictionaryCode = x.DictionaryCode,
|
|
||||||
TableQuestionType = x.TableQuestionType,
|
|
||||||
DependParentId = x.DependParentId,
|
|
||||||
IsDepend = x.IsDepend,
|
|
||||||
QuestionMark = x.QuestionMark,
|
|
||||||
QuestionGenre = x.QuestionGenre,
|
|
||||||
TypeValue = x.TypeValue,
|
|
||||||
RelevanceId = x.RelevanceId,
|
|
||||||
IsRequired = x.IsRequired,
|
|
||||||
RelevanceValue = x.RelevanceValue,
|
|
||||||
ImageCount = 0,
|
|
||||||
ParentId = item.Id,
|
|
||||||
DataTableColumn = x.DataTableColumn,
|
|
||||||
LesionType = item.LesionType,
|
|
||||||
QuestionName = x.QuestionName,
|
|
||||||
RelationQuestions = tableQuestions.Where(z => (z.DependParentId ?? default(Guid)) == x.Id).Select(x => new GetTrialReadingQuestionOutDto
|
|
||||||
{
|
|
||||||
Childrens = new List<GetTrialReadingQuestionOutDto>(),
|
|
||||||
ShowOrder = x.ShowOrder,
|
|
||||||
GroupName = string.Empty,
|
|
||||||
Id = x.Id,
|
|
||||||
Type = x.Type,
|
|
||||||
QuestionGenre = x.QuestionGenre,
|
|
||||||
TableQuestionType = x.TableQuestionType,
|
|
||||||
DependParentId = x.DependParentId,
|
|
||||||
DictionaryCode = x.DictionaryCode,
|
|
||||||
IsDepend = x.IsDepend,
|
|
||||||
QuestionMark = x.QuestionMark,
|
|
||||||
TypeValue = x.TypeValue,
|
|
||||||
RelevanceId = x.RelevanceId,
|
|
||||||
RelevanceValue = x.RelevanceValue,
|
|
||||||
ImageCount = 0,
|
|
||||||
ParentId = item.Id,
|
|
||||||
DataTableColumn = x.DataTableColumn,
|
|
||||||
LesionType = item.LesionType,
|
|
||||||
QuestionName = x.QuestionName,
|
|
||||||
RelationQuestions = new List<GetTrialReadingQuestionOutDto>(),
|
|
||||||
Remark = x.Remark,
|
|
||||||
|
|
||||||
}).ToList(),
|
|
||||||
Remark = x.Remark,
|
|
||||||
|
|
||||||
}));
|
|
||||||
if (item.Childrens != null && item.Childrens.Count != 0)
|
|
||||||
{
|
|
||||||
item.Childrens.ForEach(x =>
|
|
||||||
{
|
|
||||||
this.FindChildQuestion(x, questionlists, tableQuestions);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -169,6 +169,79 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
return qusetionList;
|
return qusetionList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 找子问题
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="item"></param>
|
||||||
|
/// <param name="questionlists"></param>
|
||||||
|
/// <param name="tableQuestions"></param>
|
||||||
|
[NonDynamicMethod]
|
||||||
|
public void FindChildQuestion(GetTrialReadingQuestionOutDto item, List<GetTrialReadingQuestionOutDto> questionlists, List<TableQuestionDataInfo> tableQuestions)
|
||||||
|
{
|
||||||
|
item.Childrens = questionlists.Where(x => x.ParentId == item.Id || (item.Type == ReadingQestionType.Group && x.Type != ReadingQestionType.Group && x.ParentId == null && x.GroupName == item.GroupName)).ToList();
|
||||||
|
|
||||||
|
|
||||||
|
item.Childrens.AddRange(tableQuestions.Where(x => x.ReadingQuestionId == item.Id).Select(x => new GetTrialReadingQuestionOutDto
|
||||||
|
{
|
||||||
|
Childrens = new List<GetTrialReadingQuestionOutDto>(),
|
||||||
|
ShowOrder = x.ShowOrder,
|
||||||
|
GroupName = string.Empty,
|
||||||
|
Id = x.Id,
|
||||||
|
Type = x.Type,
|
||||||
|
DictionaryCode = x.DictionaryCode,
|
||||||
|
TableQuestionType = x.TableQuestionType,
|
||||||
|
DependParentId = x.DependParentId,
|
||||||
|
IsDepend = x.IsDepend,
|
||||||
|
QuestionMark = x.QuestionMark,
|
||||||
|
QuestionGenre = x.QuestionGenre,
|
||||||
|
TypeValue = x.TypeValue,
|
||||||
|
RelevanceId = x.RelevanceId,
|
||||||
|
IsRequired = x.IsRequired,
|
||||||
|
RelevanceValue = x.RelevanceValue,
|
||||||
|
ImageCount = 0,
|
||||||
|
ParentId = item.Id,
|
||||||
|
DataTableColumn = x.DataTableColumn,
|
||||||
|
LesionType = item.LesionType,
|
||||||
|
QuestionName = x.QuestionName,
|
||||||
|
RelationQuestions = tableQuestions.Where(z => (z.DependParentId ?? default(Guid)) == x.Id).Select(x => new GetTrialReadingQuestionOutDto
|
||||||
|
{
|
||||||
|
Childrens = new List<GetTrialReadingQuestionOutDto>(),
|
||||||
|
ShowOrder = x.ShowOrder,
|
||||||
|
GroupName = string.Empty,
|
||||||
|
Id = x.Id,
|
||||||
|
Type = x.Type,
|
||||||
|
QuestionGenre = x.QuestionGenre,
|
||||||
|
TableQuestionType = x.TableQuestionType,
|
||||||
|
DependParentId = x.DependParentId,
|
||||||
|
DictionaryCode = x.DictionaryCode,
|
||||||
|
IsDepend = x.IsDepend,
|
||||||
|
QuestionMark = x.QuestionMark,
|
||||||
|
TypeValue = x.TypeValue,
|
||||||
|
RelevanceId = x.RelevanceId,
|
||||||
|
RelevanceValue = x.RelevanceValue,
|
||||||
|
ImageCount = 0,
|
||||||
|
ParentId = item.Id,
|
||||||
|
DataTableColumn = x.DataTableColumn,
|
||||||
|
LesionType = item.LesionType,
|
||||||
|
QuestionName = x.QuestionName,
|
||||||
|
RelationQuestions = new List<GetTrialReadingQuestionOutDto>(),
|
||||||
|
Remark = x.Remark,
|
||||||
|
|
||||||
|
}).ToList(),
|
||||||
|
Remark = x.Remark,
|
||||||
|
|
||||||
|
}));
|
||||||
|
if (item.Childrens != null && item.Childrens.Count != 0)
|
||||||
|
{
|
||||||
|
item.Childrens.ForEach(x =>
|
||||||
|
{
|
||||||
|
this.FindChildQuestion(x, questionlists, tableQuestions);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 获取系统的阅片问题
|
#region 获取系统的阅片问题
|
||||||
|
|
Loading…
Reference in New Issue