Uat_Study
parent
bb73416535
commit
b8108e34ba
|
@ -35,7 +35,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public Guid UpdateUserId { get; set; }
|
||||
|
||||
|
||||
public List<QCQuestionView> ChildList=new List<QCQuestionView>();
|
||||
public List<QCQuestionView> Childrens = new List<QCQuestionView>();
|
||||
}
|
||||
|
||||
/// <summary> QCQuestionConfigureView 列表视图模型 </summary>
|
||||
|
|
|
@ -135,11 +135,11 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
var question = new List<QCQuestionView>();
|
||||
if (inDto.TrialId!= null)
|
||||
{
|
||||
question = await _trialQCQuestionRepository.Where(x => x.TrialId == inDto.TrialId).OrderBy(x => x.ShowOrder).ProjectTo<QCQuestionView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
question = await _trialQCQuestionRepository.Where(x => x.TrialId == inDto.TrialId&&x.IsEnable).OrderBy(x => x.ShowOrder).ProjectTo<QCQuestionView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
question=await _qcQuestionRepository.AsQueryable().OrderBy(x => x.ShowOrder).ProjectTo<QCQuestionView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
question=await _qcQuestionRepository.Where(x=>x.IsEnable).OrderBy(x => x.ShowOrder).ProjectTo<QCQuestionView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
}
|
||||
|
||||
|
||||
|
@ -155,11 +155,11 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
private void GetQuestionChild(QCQuestionView parent, List<QCQuestionView> dataList)
|
||||
{
|
||||
parent.ChildList = dataList.Where(x => x.ParentId == parent.Id).ToList();
|
||||
parent.Childrens = dataList.Where(x => x.ParentId == parent.Id).ToList();
|
||||
|
||||
if (parent.ChildList.Count != 0)
|
||||
if (parent.Childrens.Count != 0)
|
||||
{
|
||||
parent.ChildList.ForEach(x =>
|
||||
parent.Childrens.ForEach(x =>
|
||||
{
|
||||
GetQuestionChild(x, dataList);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue