Uat_Study
he 2022-08-04 14:58:00 +08:00
parent 3f524341bd
commit ee07049a6e
4 changed files with 20 additions and 5 deletions

View File

@ -31,6 +31,12 @@ namespace IRaCIS.Core.Application.Contracts
} }
public class QCQuestionFilterSelect
{
public Guid? Id { get; set; }
public string[] TypeArray { get; set; } = new string[0];
}
public class TrialQCQuestionFilterSelect public class TrialQCQuestionFilterSelect
{ {

View File

@ -13,6 +13,6 @@ namespace IRaCIS.Core.Application.Contracts
Task<IResponseOutput> DeleteQCQuestionConfigure(Guid qCQuestionConfigureId); Task<IResponseOutput> DeleteQCQuestionConfigure(Guid qCQuestionConfigureId);
Task<List<QCQuestionConfigureView>> GetQCQuestionConfigureList(QCQuestionQuery queryQCQuestionConfigure); Task<List<QCQuestionConfigureView>> GetQCQuestionConfigureList(QCQuestionQuery queryQCQuestionConfigure);
Task<List<TrialQCQuestionSelect>> GetQCQuestionSelectList(TrialQCQuestionFilterSelect trialQCQuestionFilterSelect);
} }
} }

View File

@ -32,14 +32,14 @@ namespace IRaCIS.Core.Application.Contracts
/// <param name="trialQCQuestionFilterSelect"></param> /// <param name="trialQCQuestionFilterSelect"></param>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
public async Task<List<TrialQCQuestionSelect>> GetQCQuestionSelectList(TrialQCQuestionFilterSelect trialQCQuestionFilterSelect) public async Task<List<TrialQCQuestionSelect>> GetQCQuestionSelectList(QCQuestionFilterSelect trialQCQuestionFilterSelect)
{ {
//设置父亲的时候,不允许设置为自己的孙子 这种会形成环 //设置父亲的时候,不允许设置为自己的孙子 这种会形成环
var initList = await _qcQuestionRepository var initList = await _qcQuestionRepository
.WhereIf(trialQCQuestionFilterSelect.TypeArray.Count() > 0, t => trialQCQuestionFilterSelect.TypeArray.Contains(t.Type)) .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() { .OrderBy(t => t.ShowOrder).Select(x=>new TrialQCQuestionSelect() {
ShowOrder=x.ShowOrder, ShowOrder=x.ShowOrder,
Id=x.Id, Id=x.Id,

View File

@ -150,7 +150,16 @@ namespace IRaCIS.Core.Application.Contracts
foreach (var item in batchList.Where(x=>x.ParentId!=null)) 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
{
}
} }