Uat_Study
parent
3f524341bd
commit
ee07049a6e
|
@ -30,7 +30,13 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public Guid UpdateUserId { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class QCQuestionFilterSelect
|
||||
{
|
||||
public Guid? Id { get; set; }
|
||||
|
||||
public string[] TypeArray { get; set; } = new string[0];
|
||||
}
|
||||
|
||||
public class TrialQCQuestionFilterSelect
|
||||
{
|
||||
|
|
|
@ -13,6 +13,6 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
Task<IResponseOutput> DeleteQCQuestionConfigure(Guid qCQuestionConfigureId);
|
||||
Task<List<QCQuestionConfigureView>> GetQCQuestionConfigureList(QCQuestionQuery queryQCQuestionConfigure);
|
||||
|
||||
Task<List<TrialQCQuestionSelect>> GetQCQuestionSelectList(TrialQCQuestionFilterSelect trialQCQuestionFilterSelect);
|
||||
|
||||
}
|
||||
}
|
|
@ -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,
|
||||
|
|
|
@ -150,7 +150,16 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
foreach (var item in batchList.Where(x=>x.ParentId!=null))
|
||||
{
|
||||
|
||||
var parent = batchList.Where(x => x.SystemQuestionId == item.ParentId).FirstOrDefault();
|
||||
if (parent == null)
|
||||
{
|
||||
item.ParentId = null;
|
||||
item.ParentTriggerValue = String.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue