From 9149bdb7ff1b98df84d3fed7d1b98cf5c18ff276 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Thu, 16 Jun 2022 16:33:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=80=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Reading/Dto/ReadingImageTaskViewModel.cs | 12 ++++++++++++ .../Service/Reading/ReadingImageTaskService.cs | 8 ++++++-- .../Service/Reading/ReadingQuestionService.cs | 3 +-- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs index 5384b585c..1fe363bbd 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs @@ -67,6 +67,16 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public string Answer { get; set; } } + + public class GetTrialReadingQuestionDto + { + public Guid Id { get; set; } + + public string GroupName { get; set; } + + List Questions { get; set; } + } + public class GetTrialReadingQuestionOutDto { @@ -112,6 +122,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// 类型值 /// public string TypeValue { get; set; } + + public List Childrens { get; set; } } diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs index 13de43e65..550cd21a2 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs @@ -80,6 +80,9 @@ namespace IRaCIS.Application.Services [HttpPost] public async Task> GetTrialReadingQuestion(GetTrialReadingQuestionInDto inDto) { + var qusetionList = await _readingQuestionTrialRepository.Where(x => x.Id == inDto.CriterionId).ToListAsync(); + //List groupNames + var result = await _readingQuestionTrialRepository.Where(x => x.Id == inDto.CriterionId) .ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); return result; @@ -92,11 +95,12 @@ namespace IRaCIS.Application.Services ///// //public async Task SubmitVisitTaskQuestions(SubmitVisitTaskQuestionsInDto InDto) //{ - - + + //} + } diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs index fec3fd4d5..0e9866c01 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs @@ -249,7 +249,7 @@ namespace IRaCIS.Application.Services { var trialUsrSystemIds = _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == trialId && x.ReadingQuestionCriterionSystemId != null) .Select(x => x.ReadingQuestionCriterionSystemId); - var needAddSystemDataList = await _readingQuestionCriterionSystemRepository.Where(x => !trialUsrSystemIds.Contains(x.Id)&&x.IsCompleteConfig).Include(x=>x.ReadingQuestionSystemList).ToListAsync(); + var needAddSystemDataList = await _readingQuestionCriterionSystemRepository.Where(x => !trialUsrSystemIds.Contains(x.Id)&&x.Dictionary.IsEnable).Include(x=>x.ReadingQuestionSystemList).ToListAsync(); List needAddCriterionList = new List(); List needAddQuestionList = new List(); needAddSystemDataList.ForEach(x => @@ -536,7 +536,6 @@ namespace IRaCIS.Application.Services { var result = await _readingQuestionSystemRepository.Where(x => x.ReadingQuestionCriterionSystemId == inDto.CriterionId && x.Type == "group") .Select(x => x.GroupName).ToListAsync(); - return result; }