This commit is contained in:
he
2022-08-04 14:58:00 +08:00
parent 3f524341bd
commit ee07049a6e
4 changed files with 20 additions and 5 deletions
@@ -32,14 +32,14 @@ namespace IRaCIS.Core.Application.Contracts
/// <param name="trialQCQuestionFilterSelect"></param>
/// <returns></returns>
[HttpPost]
public async Task<List<TrialQCQuestionSelect>> GetQCQuestionSelectList(TrialQCQuestionFilterSelect trialQCQuestionFilterSelect)
public async Task<List<TrialQCQuestionSelect>> GetQCQuestionSelectList(QCQuestionFilterSelect trialQCQuestionFilterSelect)
{
//设置父亲的时候,不允许设置为自己的孙子 这种会形成环
var initList = await _qcQuestionRepository
.WhereIf(trialQCQuestionFilterSelect.TypeArray.Count() > 0, t => trialQCQuestionFilterSelect.TypeArray.Contains(t.Type))
//.WhereIf(trialQCQuestionFilterSelect.Id != null, t => t.Id != trialQCQuestionFilterSelect.Id /*&& t.ParentId != trialQCQuestionFilterSelect.Id*/)
.OrderBy(t => t.ShowOrder).Select(x=>new TrialQCQuestionSelect() {
ShowOrder=x.ShowOrder,
Id=x.Id,