From ccf0df5cb5e487beae4d8712d9b48cd8d2d7b9ae Mon Sep 17 00:00:00 2001
From: he <10978375@qq.com>
Date: Fri, 12 Aug 2022 14:22:28 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Service/QC/DTO/QCQuestionConfigureViewModel.cs | 3 +++
IRaCIS.Core.Application/Service/QC/QCQuestionService.cs | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/IRaCIS.Core.Application/Service/QC/DTO/QCQuestionConfigureViewModel.cs b/IRaCIS.Core.Application/Service/QC/DTO/QCQuestionConfigureViewModel.cs
index c08fa313b..de70c0e8b 100644
--- a/IRaCIS.Core.Application/Service/QC/DTO/QCQuestionConfigureViewModel.cs
+++ b/IRaCIS.Core.Application/Service/QC/DTO/QCQuestionConfigureViewModel.cs
@@ -72,6 +72,9 @@ namespace IRaCIS.Core.Application.Contracts
public bool? IsEnable { get; set; }
+
+ public Guid? TrialId { get; set; }
+
}
/// QCQuestionAddOrEdit 列表查询参数模型
diff --git a/IRaCIS.Core.Application/Service/QC/QCQuestionService.cs b/IRaCIS.Core.Application/Service/QC/QCQuestionService.cs
index 0bf4945b3..d74012a95 100644
--- a/IRaCIS.Core.Application/Service/QC/QCQuestionService.cs
+++ b/IRaCIS.Core.Application/Service/QC/QCQuestionService.cs
@@ -92,7 +92,7 @@ namespace IRaCIS.Core.Application.Contracts
{
var QCQuestionQueryable = _qcQuestionRepository
- .Where(x=>x.IsEnable)
+ .WhereIf(queryQCQuestionConfigure.IsEnable != null,x=>x.IsEnable== queryQCQuestionConfigure.IsEnable)
.WhereIf(!string.IsNullOrWhiteSpace(queryQCQuestionConfigure.QuestionName), t => t.QuestionName.Contains(queryQCQuestionConfigure.QuestionName))
.WhereIf(!string.IsNullOrWhiteSpace(queryQCQuestionConfigure.Type), t => t.Type.Contains(queryQCQuestionConfigure.Type))
.ProjectTo(_mapper.ConfigurationProvider);