diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs index c90c2194..5912e5d6 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 309a5731..f8a6bc99 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 9e365744..99b830d2 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 02410bc8..c56b9269 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 ec882e92..c741188c 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 cfd4e877..c34ce1b8 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 e650e3b7..af4cdbdc 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; /// /// 分页标准