From a032c23f5c02bf73a870518462d537230f58f51e Mon Sep 17 00:00:00 2001
From: he <10978375@qq.com>
Date: Thu, 14 Jul 2022 15:29:29 +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
---
.../IRaCIS.Core.Application.xml | 7 --
.../Reading/ReadingImageTaskService.cs | 14 ++--
.../Service/Reading/ReadingQuestionService.cs | 64 +++++++++----------
3 files changed, 39 insertions(+), 46 deletions(-)
diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index b37de711e..9976acd9f 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -5891,13 +5891,6 @@
-
-
- 获取预览问题信息
-
-
-
-
设置项目标准是否完成配置
diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs
index 763eadadf..5ab86d950 100644
--- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs
+++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs
@@ -354,11 +354,11 @@ namespace IRaCIS.Application.Services
IsPublicPage = firstData.IsPublicPage,
};
- var pageGroupList = newPageQusetionList.Where(x => x.ParentId == null).ToList();
- pageGroupList.ForEach(x =>
- {
- this.FindChildQuestion(x, newPageQusetionList);
- });
+ var pageGroupList = newPageQusetionList.Where(x =>x.IsPage|| (x.ParentId == null&&x.PageName.IsNullOrEmpty())).ToList();
+ pageGroupList.ForEach(x =>
+ {
+ this.FindChildQuestion(x, newPageQusetionList);
+ });
page.Childrens = pageGroupList;
groupList.Add(page);
@@ -371,7 +371,7 @@ namespace IRaCIS.Application.Services
{
qusetionList = qusetionList.Where(x => x.ReadingCriterionPageId == null).ToList();
- groupList = qusetionList.Where(x => x.ParentId == null).ToList();
+ groupList = qusetionList.Where(x => x.IsPage || (x.ParentId == null && x.PageName.IsNullOrEmpty())).ToList();
groupList.ForEach(x =>
{
this.FindChildQuestion(x, qusetionList);
@@ -540,7 +540,7 @@ namespace IRaCIS.Application.Services
[NonDynamicMethod]
public void FindChildQuestion(GetTrialReadingQuestionOutDto trialReadingQuestion, List questionlists)
{
- trialReadingQuestion.Childrens = questionlists.Where(x => x.ParentId == trialReadingQuestion.ReadingQuestionTrialId).ToList();
+ trialReadingQuestion.Childrens = questionlists.Where(x => x.ParentId == trialReadingQuestion.ReadingQuestionTrialId||(trialReadingQuestion.IsPage&&x.ParentId==null&&x.GroupName==trialReadingQuestion.GroupName)).ToList();
if (trialReadingQuestion.Childrens != null && trialReadingQuestion.Childrens.Count != 0)
{
trialReadingQuestion.Childrens.ForEach(x =>
diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs
index db5013e28..2f879b442 100644
--- a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs
+++ b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs
@@ -579,39 +579,39 @@ namespace IRaCIS.Application.Services
return ResponseOutput.Ok(entity.Id.ToString());
}
- ///
- /// 获取预览问题信息
- ///
- ///
- ///
- [HttpPost]
- public async Task> GetPreviewTheQuestion(GetPreviewTheQuestionInDto inDto)
- {
- var trialQuestionQuery = from trialQuestion in _readingQuestionTrialRepository.Where(x=>x.ReadingQuestionCriterionTrialId== inDto.Id)
- select new GetTrialReadingQuestionOutDto()
- {
- ReadingQuestionTrialId = trialQuestion.Id,
- ReadingQuestionCriterionTrialId = trialQuestion.ReadingQuestionCriterionTrialId,
- TrialId = trialQuestion.TrialId,
- Type = trialQuestion.Type,
- ParentTriggerValue = trialQuestion.ParentTriggerValue,
- GroupName = trialQuestion.GroupName,
- QuestionName = trialQuestion.QuestionName,
- IsRequired = trialQuestion.IsRequired,
- ShowOrder = trialQuestion.ShowOrder,
- ParentId = trialQuestion.ParentId,
- TypeValue = trialQuestion.TypeValue,
- Answer = string.Empty
- };
- var qusetionList = await trialQuestionQuery.OrderBy(x => x.ShowOrder).ToListAsync();
- List readingQuestionList = qusetionList.Where(x => x.ParentId == null).ToList();
- readingQuestionList.ForEach(x =>
- {
- _readingImageTaskService.FindChildQuestion(x, qusetionList);
- });
+ /////
+ ///// 获取预览问题信息
+ /////
+ /////
+ /////
+ //[HttpPost]
+ //public async Task> GetPreviewTheQuestion(GetPreviewTheQuestionInDto inDto)
+ //{
+ // var trialQuestionQuery = from trialQuestion in _readingQuestionTrialRepository.Where(x=>x.ReadingQuestionCriterionTrialId== inDto.Id)
+ // select new GetTrialReadingQuestionOutDto()
+ // {
+ // ReadingQuestionTrialId = trialQuestion.Id,
+ // ReadingQuestionCriterionTrialId = trialQuestion.ReadingQuestionCriterionTrialId,
+ // TrialId = trialQuestion.TrialId,
+ // Type = trialQuestion.Type,
+ // ParentTriggerValue = trialQuestion.ParentTriggerValue,
+ // GroupName = trialQuestion.GroupName,
+ // QuestionName = trialQuestion.QuestionName,
+ // IsRequired = trialQuestion.IsRequired,
+ // ShowOrder = trialQuestion.ShowOrder,
+ // ParentId = trialQuestion.ParentId,
+ // TypeValue = trialQuestion.TypeValue,
+ // Answer = string.Empty
+ // };
+ // var qusetionList = await trialQuestionQuery.OrderBy(x => x.ShowOrder).ToListAsync();
+ // List readingQuestionList = qusetionList.Where(x => x.ParentId == null).ToList();
+ // readingQuestionList.ForEach(x =>
+ // {
+ // _readingImageTaskService.FindChildQuestion(x, qusetionList);
+ // });
- return readingQuestionList;
- }
+ // return readingQuestionList;
+ //}
/////
///// 设置项目标准是否生效