From 84ce2e2032ca0e4f2c47d1034f0c2c9928bc266e Mon Sep 17 00:00:00 2001
From: he <10978375@qq.com>
Date: Wed, 10 Aug 2022 10:10:54 +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 | 10 ++-
.../Reading/Dto/ReadingQuestionViewModel.cs | 66 ++++++++++++-------
.../Reading/ReadingImageTaskService.cs | 2 +
.../Service/Reading/ReadingQuestionService.cs | 3 +-
IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs | 43 ++++++++++++
.../Reading/ReadingQuestionSystem.cs | 7 +-
.../Reading/ReadingQuestionTrial.cs | 9 ++-
7 files changed, 111 insertions(+), 29 deletions(-)
diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
index c90c21942..5912e5d69 100644
--- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
@@ -641,7 +641,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
///
/// 是否是必须
///
- public bool IsRequired { get; set; }
+ public IsRequired IsRequired { get; set; }
///
/// 排序
@@ -695,7 +695,13 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
///
/// 图片数量
///
- public int ImageCount { get; set; }
+ public int ImageCount { get; set; }
+
+
+ ///
+ /// 是否显示
+ ///
+ public ShowQuestion ShowQuestion { get; set; }
public List Childrens { get; set; }
}
diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs
index 309a57311..f8a6bc99c 100644
--- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs
@@ -190,8 +190,6 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public string CriterionName { get; set; } = string.Empty;
-
-
}
@@ -227,11 +225,6 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
///
public string QuestionName { get; set; }
- ///
- /// 是否是必须
- ///
- public bool IsRequired { get; set; }
-
///
/// 排序
///
@@ -285,6 +278,17 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// 图片数量
///
public int ImageCount { get; set; } = 0;
+
+
+ ///
+ /// 是否是必须
+ ///
+ public IsRequired IsRequired { get; set; }
+
+ ///
+ /// 是否显示
+ ///
+ public ShowQuestion ShowQuestion { get; set; }
}
public class ReadingQuestionSystemView
@@ -324,11 +328,6 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
///
public string QuestionName { get; set; }
- ///
- /// 是否是必须
- ///
- public bool IsRequired { get; set; }
-
///
/// 排序
///
@@ -359,7 +358,18 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
///
/// 图片数量
///
- public int ImageCount { get; set; }
+ public int ImageCount { get; set; }
+
+
+ ///
+ /// 是否是必须
+ ///
+ public IsRequired IsRequired { get; set; }
+
+ ///
+ /// 是否显示
+ ///
+ public ShowQuestion ShowQuestion { get; set; }
}
@@ -564,11 +574,6 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
///
public string QuestionName { get; set; }
- ///
- /// 是否是必须
- ///
- public bool IsRequired { get; set; } = false;
-
///
/// 排序
///
@@ -597,6 +602,16 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public bool IsEnable { get; set; } = false;
+ ///
+ /// 是否是必须
+ ///
+ public IsRequired IsRequired { get; set; }
+
+ ///
+ /// 是否显示
+ ///
+ public ShowQuestion ShowQuestion { get; set; }
+
///
/// 图片数量
@@ -658,11 +673,6 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
///
public string QuestionName { get; set; }
- ///
- /// 是否是必须
- ///
- public bool IsRequired { get; set; } = false;
-
///
/// 排序
///
@@ -701,6 +711,16 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// 图片数量
///
public int ImageCount { get; set; } = 0;
+
+ ///
+ /// 是否是必须
+ ///
+ public IsRequired IsRequired { get; set; }
+
+ ///
+ /// 是否显示
+ ///
+ public ShowQuestion ShowQuestion { get; set; }
}
diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs
index 9e365744e..99b830d2c 100644
--- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs
+++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs
@@ -690,6 +690,7 @@ namespace IRaCIS.Application.Services
GroupName = data.GroupName,
QuestionName = data.QuestionName,
IsRequired = data.IsRequired,
+ ShowQuestion=data.ShowQuestion,
ShowOrder = data.ShowOrder,
RelevanceId=data.RelevanceId,
RelevanceValue=data.RelevanceValue,
@@ -801,6 +802,7 @@ namespace IRaCIS.Application.Services
ParentId = data.ParentId,
TypeValue = data.TypeValue,
Answer = string.Empty,
+ ShowQuestion=data.ShowQuestion,
PageShowOrder = data.ShowOrder,
Type=data.Type,
};
diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs
index 02410bc89..c56b92692 100644
--- a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs
+++ b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs
@@ -324,7 +324,8 @@ namespace IRaCIS.Application.Services
AnswerGroup= (c.trial.FirstOrDefault()?.AnswerGroup) ?? string.Empty,
GroupName=c.system.GroupName,
IsEnable=c.system.IsEnable,
- IsJudgeQuestion=c.system.IsJudgeQuestion,
+ ShowQuestion= c.system.ShowQuestion,
+ IsJudgeQuestion =c.system.IsJudgeQuestion,
IsRequired=c.system.IsRequired,
JudgeType = (c.trial.FirstOrDefault()?.JudgeType)??JudgeTypeEnum.None,
ParentId = c.trial.FirstOrDefault()?.ParentId,
diff --git a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs
index ec882e92f..c741188c2 100644
--- a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs
+++ b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs
@@ -222,6 +222,49 @@ namespace IRaCIS.Core.Domain.Share
}
+ ///
+ /// 是否必填
+ ///
+ public enum IsRequired
+ {
+ ///
+ /// 必填
+ ///
+ Required = 0,
+
+ ///
+ /// 不必填
+ ///
+ NotRequired = 1,
+
+ ///
+ /// 依赖父问题
+ ///
+ Rely = 2,
+ }
+
+ ///
+ /// 是否显示问题
+ ///
+ public enum ShowQuestion
+ {
+ ///
+ /// 显示
+ ///
+ Show=0,
+
+ ///
+ /// 不显示
+ ///
+ Hide=1,
+
+ ///
+ /// 依赖父问题
+ ///
+ Rely=2,
+
+ }
+
///
/// 阅片状态
///
diff --git a/IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs b/IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs
index cfd4e8770..c34ce1b86 100644
--- a/IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs
+++ b/IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs
@@ -37,7 +37,7 @@ namespace IRaCIS.Core.Domain.Models
///
/// 是否是必须
///
- public bool IsRequired { get; set; }
+ public IsRequired IsRequired { get; set; }
///
/// 排序
@@ -84,6 +84,11 @@ namespace IRaCIS.Core.Domain.Models
///
public int ImageCount { get; set; } = 1;
+ ///
+ /// 是否显示
+ ///
+ public ShowQuestion ShowQuestion { get; set; } = ShowQuestion.Show;
+
///
/// 创建人
///
diff --git a/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs b/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs
index e650e3b76..af4cdbdc1 100644
--- a/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs
+++ b/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs
@@ -42,7 +42,7 @@ namespace IRaCIS.Core.Domain.Models
///
/// 是否是必须
///
- public bool IsRequired { get; set; }
+ public IsRequired IsRequired { get; set; }
///
/// 排序
@@ -130,7 +130,12 @@ namespace IRaCIS.Core.Domain.Models
///
/// 图片数量
///
- public int ImageCount { get; set; } = 0;
+ public int ImageCount { get; set; } = 1;
+
+ ///
+ /// 是否显示
+ ///
+ public ShowQuestion ShowQuestion { get; set; } = ShowQuestion.Show;
///
/// 分页标准