Uat_Study
he 2022-08-04 15:57:07 +08:00
parent bb73416535
commit b8108e34ba
2 changed files with 6 additions and 6 deletions

View File

@ -35,7 +35,7 @@ namespace IRaCIS.Core.Application.Contracts
public Guid UpdateUserId { get; set; } public Guid UpdateUserId { get; set; }
public List<QCQuestionView> ChildList=new List<QCQuestionView>(); public List<QCQuestionView> Childrens = new List<QCQuestionView>();
} }
/// <summary> QCQuestionConfigureView 列表视图模型 </summary> /// <summary> QCQuestionConfigureView 列表视图模型 </summary>

View File

@ -135,11 +135,11 @@ namespace IRaCIS.Core.Application.Contracts
var question = new List<QCQuestionView>(); var question = new List<QCQuestionView>();
if (inDto.TrialId!= null) 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 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) 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); GetQuestionChild(x, dataList);
}); });