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 /// <summary> /// 是否是必须 /// </summary> - public bool IsRequired { get; set; } + public IsRequired IsRequired { get; set; } /// <summary> /// 排序 @@ -695,7 +695,13 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// <summary> /// 图片数量 /// </summary> - public int ImageCount { get; set; } + public int ImageCount { get; set; } + + + /// <summary> + /// 是否显示 + /// </summary> + public ShowQuestion ShowQuestion { get; set; } public List<GetTrialReadingQuestionOutDto> 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 /// </summary> public string QuestionName { get; set; } - /// <summary> - /// 是否是必须 - /// </summary> - public bool IsRequired { get; set; } - /// <summary> /// 排序 /// </summary> @@ -285,6 +278,17 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// 图片数量 /// </summary> public int ImageCount { get; set; } = 0; + + + /// <summary> + /// 是否是必须 + /// </summary> + public IsRequired IsRequired { get; set; } + + /// <summary> + /// 是否显示 + /// </summary> + public ShowQuestion ShowQuestion { get; set; } } public class ReadingQuestionSystemView @@ -324,11 +328,6 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// </summary> public string QuestionName { get; set; } - /// <summary> - /// 是否是必须 - /// </summary> - public bool IsRequired { get; set; } - /// <summary> /// 排序 /// </summary> @@ -359,7 +358,18 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// <summary> /// 图片数量 /// </summary> - public int ImageCount { get; set; } + public int ImageCount { get; set; } + + + /// <summary> + /// 是否是必须 + /// </summary> + public IsRequired IsRequired { get; set; } + + /// <summary> + /// 是否显示 + /// </summary> + public ShowQuestion ShowQuestion { get; set; } } @@ -564,11 +574,6 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// </summary> public string QuestionName { get; set; } - /// <summary> - /// 是否是必须 - /// </summary> - public bool IsRequired { get; set; } = false; - /// <summary> /// 排序 /// </summary> @@ -597,6 +602,16 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public bool IsEnable { get; set; } = false; + /// <summary> + /// 是否是必须 + /// </summary> + public IsRequired IsRequired { get; set; } + + /// <summary> + /// 是否显示 + /// </summary> + public ShowQuestion ShowQuestion { get; set; } + /// <summary> /// 图片数量 @@ -658,11 +673,6 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// </summary> public string QuestionName { get; set; } - /// <summary> - /// 是否是必须 - /// </summary> - public bool IsRequired { get; set; } = false; - /// <summary> /// 排序 /// </summary> @@ -701,6 +711,16 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// 图片数量 /// </summary> public int ImageCount { get; set; } = 0; + + /// <summary> + /// 是否是必须 + /// </summary> + public IsRequired IsRequired { get; set; } + + /// <summary> + /// 是否显示 + /// </summary> + 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 } + /// <summary> + /// 是否必填 + /// </summary> + public enum IsRequired + { + /// <summary> + /// 必填 + /// </summary> + Required = 0, + + /// <summary> + /// 不必填 + /// </summary> + NotRequired = 1, + + /// <summary> + /// 依赖父问题 + /// </summary> + Rely = 2, + } + + /// <summary> + /// 是否显示问题 + /// </summary> + public enum ShowQuestion + { + /// <summary> + /// 显示 + /// </summary> + Show=0, + + /// <summary> + /// 不显示 + /// </summary> + Hide=1, + + /// <summary> + /// 依赖父问题 + /// </summary> + Rely=2, + + } + /// <summary> /// 阅片状态 /// </summary> 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 /// <summary> /// 是否是必须 /// </summary> - public bool IsRequired { get; set; } + public IsRequired IsRequired { get; set; } /// <summary> /// 排序 @@ -84,6 +84,11 @@ namespace IRaCIS.Core.Domain.Models /// </summary> public int ImageCount { get; set; } = 1; + /// <summary> + /// 是否显示 + /// </summary> + public ShowQuestion ShowQuestion { get; set; } = ShowQuestion.Show; + /// <summary> /// 创建人 /// </summary> 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 /// <summary> /// 是否是必须 /// </summary> - public bool IsRequired { get; set; } + public IsRequired IsRequired { get; set; } /// <summary> /// 排序 @@ -130,7 +130,12 @@ namespace IRaCIS.Core.Domain.Models /// <summary> /// 图片数量 /// </summary> - public int ImageCount { get; set; } = 0; + public int ImageCount { get; set; } = 1; + + /// <summary> + /// 是否显示 + /// </summary> + public ShowQuestion ShowQuestion { get; set; } = ShowQuestion.Show; /// <summary> /// 分页标准