diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs index 1ce95f5ef..1b9556145 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs @@ -26,9 +26,14 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public Guid? RelevanceId { get; set; } public string RelevanceValue { get; set; } public int ShowQuestion { get; set; } - public int MaxRowCount { get; set; } + public int? MaxRowCount { get; set; } public string DataTableName { get; set; } public string DataTableColumn { get; set; } + + /// + /// 表格问题类型 + /// + public TableQuestionType TableQuestionType { get; set; } } @@ -38,6 +43,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public Guid ReadingQuestionId { get; set; } + /// + /// 表格问题类型 + /// + public TableQuestionType? TableQuestionType { get; set; } + } /// ReadingTableQuestionSystemAddOrEdit 列表查询参数模型 @@ -59,9 +69,14 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public Guid? RelevanceId { get; set; } public string RelevanceValue { get; set; } public int ShowQuestion { get; set; } - public int MaxRowCount { get; set; } + public int? MaxRowCount { get; set; } public string DataTableName { get; set; } public string DataTableColumn { get; set; } + + /// + /// 表格问题类型 + /// + public TableQuestionType TableQuestionType { get; set; } } public class ReadingCriterionPageView @@ -377,7 +392,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// /// 最大问题数 /// - public int MaxQuestionCount { get; set; } + public int? MaxQuestionCount { get; set; } } public class ReadingQuestionSystemView @@ -476,7 +491,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// /// 最大问题数 /// - public int MaxQuestionCount { get; set; } + public int? MaxQuestionCount { get; set; } } @@ -753,7 +768,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// /// 最大问题数 /// - public int MaxQuestionCount { get; set; } = 0; + public int? MaxQuestionCount { get; set; } } @@ -862,7 +877,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// /// 最大问题数 /// - public int MaxQuestionCount { get; set; } = 0; + public int? MaxQuestionCount { get; set; } } diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs index 5025e3fa9..cff7cb8eb 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs @@ -80,6 +80,7 @@ namespace IRaCIS.Application.Services var readingTableQuestionSystemQueryable = _readingTableQuestionSystemRepository + .WhereIf(inDto.TableQuestionType!=null,x=>x.TableQuestionType ==inDto.TableQuestionType!) .Where(x=>x.ReadingQuestionId==inDto.ReadingQuestionId).ProjectTo(_mapper.ConfigurationProvider); var result=await readingTableQuestionSystemQueryable.ToListAsync(); diff --git a/IRaCIS.Core.Domain.Share/Allocation/AllocationRelation.cs b/IRaCIS.Core.Domain.Share/Allocation/AllocationRelation.cs index 8d43de8f8..10eb4e13d 100644 --- a/IRaCIS.Core.Domain.Share/Allocation/AllocationRelation.cs +++ b/IRaCIS.Core.Domain.Share/Allocation/AllocationRelation.cs @@ -172,6 +172,19 @@ namespace IRaCIS.Core.Domain.Share SubjectVisit = 1 } + public enum TableQuestionType + { + /// + /// 自定义 + /// + Customize=0, + + /// + /// 关联数据 + /// + LinkedData=1, + + } public enum FormType { diff --git a/IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs b/IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs index 415f910c4..75458f9fa 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs @@ -102,7 +102,7 @@ namespace IRaCIS.Core.Domain.Models /// /// 最大问题数 /// - public int MaxQuestionCount { get; set; } + public int? MaxQuestionCount { get; set; } /// /// 创建人 diff --git a/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs b/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs index fd6ccf4fd..5046cb364 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs @@ -140,7 +140,7 @@ namespace IRaCIS.Core.Domain.Models /// /// 最大问题数 /// - public int MaxQuestionCount { get; set; } + public int? MaxQuestionCount { get; set; } /// /// 分页标准 diff --git a/IRaCIS.Core.Domain/Reading/ReadingTableQuestionSystem.cs b/IRaCIS.Core.Domain/Reading/ReadingTableQuestionSystem.cs index 66dd70e55..a9dd860db 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingTableQuestionSystem.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingTableQuestionSystem.cs @@ -94,7 +94,7 @@ namespace IRaCIS.Core.Domain.Models /// /// 最大问题数 /// - public int MaxRowCount { get; set; } + public int? MaxRowCount { get; set; } /// /// 数据表名称 @@ -105,8 +105,13 @@ namespace IRaCIS.Core.Domain.Models /// 数据列 /// public string DataTableColumn { get; set; } - - } + + /// + /// 表格问题类型 + /// + public TableQuestionType TableQuestionType { get; set; } + + } }