From 3ee005e93d3b14def072c2090703845919ca5af6 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Mon, 11 Jul 2022 11:23:00 +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 --- .../Reading/ReadingImageTaskService.cs | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs index 5a69ddcf8..485bc75ac 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs @@ -296,7 +296,7 @@ namespace IRaCIS.Application.Services { var readingTaskState = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Select(x => x.ReadingTaskState).FirstOrDefaultAsync(); - var query= from data in _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId==inDto.ReadingQuestionCriterionTrialId) + var query= from data in _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId==inDto.ReadingQuestionCriterionTrialId&&x.Type!= "group") join questionAnswer in _readingTaskQuestionAnswerRepository.Where(x=>x.VisitTaskId==inDto.VisitTaskId) on data.Id equals questionAnswer.ReadingQuestionTrialId into questionAnswerTemp from leftquestionAnswer in questionAnswerTemp.DefaultIfEmpty() select new GetTrialReadingQuestionOutDto() @@ -319,29 +319,29 @@ namespace IRaCIS.Application.Services var qusetionList =await query.OrderBy(x=>x.ShowOrder).ToListAsync(); - var groupList = qusetionList.Where(x => x.Type == "group").ToList(); - - groupList.ForEach(x => - { - x.Childrens = qusetionList.Where(y => y.GroupName == x.GroupName && y.ParentId == null).ToList(); - - x.Childrens.ForEach(z => - { - this.FindChildQuestion(z, qusetionList); - }); - - }); - - - - //List groupList = qusetionList.Where(x => x.ParentId == null).ToList(); - - + //var groupList = qusetionList.Where(x => x.Type == "group").ToList(); //groupList.ForEach(x => //{ - // this.FindChildQuestion(x, qusetionList); + // x.Childrens = qusetionList.Where(y => y.GroupName == x.GroupName && y.ParentId == null).ToList(); + + // x.Childrens.ForEach(z => + // { + // this.FindChildQuestion(z, qusetionList); + // }); + //}); + + + + List groupList = qusetionList.Where(x => x.ParentId == null).ToList(); + + + + groupList.ForEach(x => + { + this.FindChildQuestion(x, qusetionList); + }); return (groupList, new { readingTaskState = readingTaskState