From 9385e22c58cd1899b4f82d7b0409ad3dfc0dec62 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Wed, 23 Oct 2024 17:29:08 +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/Reading/Dto/ReadingQuestionViewModel.cs | 2 ++ .../Reading/ReadingCriterion/ReadingQuestionService.cs | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs index 9301685d3..0d0fd4410 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs @@ -1632,6 +1632,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public string Type { get; set; } + public List TypeList { get; set; } = new List(); + } public class GetTrialGroupNameOutDto diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs index 5a44f2041..af07da1a0 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs @@ -93,7 +93,8 @@ namespace IRaCIS.Core.Application.Service var result = await _readingQuestionTrialRepository .Where(x => x.ReadingQuestionCriterionTrialId == inDto.TrialCriterionId) - .WhereIf(!inDto.Type.IsNullOrEmpty(), x => x.Type == inDto.Type) + .WhereIf(!inDto.Type.IsNullOrEmpty(), x => x.Type == inDto.Type) + .WhereIf(inDto.TypeList.Count()>0, x => inDto.TypeList.Contains(x.Type)) .OrderBy(x => x.ShowOrder) .Select(x => new GetCalculateQuestionsOutDto () @@ -380,7 +381,7 @@ namespace IRaCIS.Core.Application.Service { var types = new List() { - "select","radio" + "select","radio","class", }; var questionList = await _readingTableQuestionSystemRepository.Where(x => x.ReadingQuestionId == inDto.ReadingQuestionId) .Where(x => types.Contains(x.Type)) @@ -610,7 +611,7 @@ namespace IRaCIS.Core.Application.Service { var types = new List() { - "select","radio" + "select","radio","class", }; var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == inDto.ReadingQuestionCriterionTrialId) .Where(x => types.Contains(x.Type))