From 5ba8b3b559666039eea45dd8f6c01fcfb2b65fdf Mon Sep 17 00:00:00 2001
From: he <10978375@qq.com>
Date: Fri, 26 Aug 2022 16:23:19 +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
---
.../Reading/Dto/ReadingImageTaskViewModel.cs | 73 ++++++++++++++++++-
.../Reading/ReadingImageTaskService.cs | 61 ++++++++++++++--
2 files changed, 122 insertions(+), 12 deletions(-)
diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
index d64c76b41..1621cfc17 100644
--- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
@@ -1115,9 +1115,6 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
///
public ShowQuestion ShowQuestion { get; set; }
-
-
-
///
/// 最大问题数
///
@@ -1138,9 +1135,77 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
///
public bool IsShowInDicom { get; set; } = false;
- public List TableQuestions { get; set; }
+ //public List TableQuestions { get; set; }
+
+
+ public List RelationQuestions { get; set; }
+
public List Childrens { get; set; }
+
+
+ public Guid Id { get; set; }
+
+
+
+
+
+ ///
+ /// 数据列
+ ///
+ public string DataTableColumn { get; set; } = string.Empty;
+
+
+
+ ///
+ /// 是否启用
+ ///
+ public bool IsEnable { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime { get; set; }
+
+ ///
+ /// 是否是裁判问题
+ ///
+ public bool IsJudgeQuestion { get; set; }
+
+ ///
+ /// 备注
+ ///
+ public string Remark { get; set; }
+
+
+ ///
+ /// 序号标记
+ ///
+ public string OrderMark { get; set; } = string.Empty;
+
+
+ ///
+ /// 关联父问题
+ ///
+ public Guid? DependParentId { get; set; }
+
+ ///
+ /// 是否关联
+ ///
+ public IsDepend? IsDepend { get; set; }
+
+ ///
+ /// 表格问题类型
+ ///
+ public TableQuestionType? TableQuestionType { get; set; }
+
+
+ ///
+ /// 问题标识
+ ///
+ public QuestionMark? QuestionMark { get; set; }
+
+
}
/////
diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs
index 6f4e8a40a..a624f9b17 100644
--- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs
+++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs
@@ -1359,21 +1359,66 @@ namespace IRaCIS.Application.Services
///
/// 找子问题
///
- ///
+ ///
///
- ///
+ ///
[NonDynamicMethod]
- public void FindChildQuestion(GetTrialReadingQuestionOutDto trialReadingQuestion, List questionlists,List tableQuestionLists)
+ public void FindChildQuestion(GetTrialReadingQuestionOutDto item, List questionlists,List tableQuestions)
{
- trialReadingQuestion.Childrens = questionlists.Where(x => x.ParentId == trialReadingQuestion.ReadingQuestionTrialId || (trialReadingQuestion.Type == "group" && x.Type != "group" && x.ParentId == null && x.GroupName == trialReadingQuestion.GroupName)).ToList();
- trialReadingQuestion.TableQuestions = tableQuestionLists.Where(x => x.ReadingQuestionId == trialReadingQuestion.ReadingQuestionTrialId).ToList();
+ item.Childrens = questionlists.Where(x => x.ParentId == item.ReadingQuestionTrialId || (item.Type == "group" && x.Type != "group" && x.ParentId == null && x.GroupName == trialReadingQuestion.GroupName)).ToList();
- if (trialReadingQuestion.Childrens != null && trialReadingQuestion.Childrens.Count != 0)
+ item.Childrens.AddRange(tableQuestions.Where(x => x.ReadingQuestionId == item.Id).Select(x => new GetTrialReadingQuestionOutDto
{
- trialReadingQuestion.Childrens.ForEach(x =>
+ Childrens = new List(),
+ ShowOrder = x.ShowOrder,
+ GroupName = string.Empty,
+ Id = x.Id,
+ Type = x.Type,
+ TableQuestionType = x.TableQuestionType,
+ DependParentId = x.DependParentId,
+ IsDepend = x.IsDepend,
+ QuestionMark = x.QuestionMark,
+ TypeValue = x.TypeValue,
+ RelevanceId = x.RelevanceId,
+ IsRequired = x.IsRequired,
+ RelevanceValue = x.RelevanceValue,
+ ImageCount = 0,
+ ParentId = item.Id,
+ DataTableColumn = x.DataTableColumn,
+ LesionType = item.LesionType,
+ QuestionName = x.QuestionName,
+ RelationQuestions = tableQuestions.Where(z => (z.DependParentId ?? default(Guid)) == x.Id).Select(x => new GetTrialReadingQuestionOutDto
{
- this.FindChildQuestion(x, questionlists, tableQuestionLists);
+ Childrens = new List(),
+ ShowOrder = x.ShowOrder,
+ GroupName = string.Empty,
+ Id = x.Id,
+ Type = x.Type,
+ TableQuestionType = x.TableQuestionType,
+ DependParentId = x.DependParentId,
+ IsDepend = x.IsDepend,
+ QuestionMark = x.QuestionMark,
+ TypeValue = x.TypeValue,
+ RelevanceId = x.RelevanceId,
+ RelevanceValue = x.RelevanceValue,
+ ImageCount = 0,
+ ParentId = item.Id,
+ DataTableColumn = x.DataTableColumn,
+ LesionType = item.LesionType,
+ QuestionName = x.QuestionName,
+ RelationQuestions = new List(),
+ Remark = x.Remark,
+
+ }).ToList(),
+ Remark = x.Remark,
+
+ }));
+ if (item.Childrens != null && item.Childrens.Count != 0)
+ {
+ item.Childrens.ForEach(x =>
+ {
+ this.FindChildQuestion(x, questionlists, tableQuestions);
});
}
}