diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs
index d1287c704..9853a4d67 100644
--- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs
@@ -1068,6 +1068,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
[NotDefault]
public Guid QuestionId { get; set; }
+ public string Type { get; set; }
+
}
@@ -1076,6 +1078,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
[NotDefault]
public Guid TrialCriterionId { get; set; }
+
+ public string Type { get; set; }
+
}
public class GetTrialGroupNameListInDto
diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs
index c3a028803..83f484e03 100644
--- a/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs
+++ b/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs
@@ -86,7 +86,7 @@ namespace IRaCIS.Application.Services
var result =await _readingQuestionTrialRepository
.Where(x => x.ReadingQuestionCriterionTrialId == inDto.TrialCriterionId)
- .Where(x => x.Type == "number")
+ .WhereIf(!inDto.Type.IsNullOrEmpty(), x => x.Type == inDto.Type)
.OrderBy(x => x.ShowOrder)
.Select(x => new GetCalculateQuestionsOutDto
(){
@@ -111,7 +111,7 @@ namespace IRaCIS.Application.Services
var result = await _readingTableQuestionTrialRepository
.Where(x => x.ReadingQuestionId == inDto.QuestionId)
- .Where(x=>x.Type== "number")
+ .WhereIf(!inDto.Type.IsNullOrEmpty(), x => x.Type == inDto.Type)
.OrderBy(x => x.ShowOrder)
.Select(x => new GetCalculateTableQuestionsOutDto
()
@@ -125,6 +125,31 @@ namespace IRaCIS.Application.Services
}
+ ///
+ /// 获取标准所有表格数值问题
+ ///
+ ///
+ ///
+ [HttpPost]
+ public async Task> GetCalculateAllTableQuestions(GetCalculateQuestionsInDto inDto)
+ {
+
+ var result = await _readingTableQuestionTrialRepository
+
+ .Where(x => x.TrialCriterionId == inDto.TrialCriterionId)
+ .WhereIf(!inDto.Type.IsNullOrEmpty(), x => x.Type == inDto.Type)
+ .OrderBy(x => x.ShowOrder)
+ .Select(x => new GetCalculateTableQuestionsOutDto
+ ()
+ {
+ TableQuestionId = x.Id,
+ TableQuestionName = x.QuestionName
+
+ }).ToListAsync();
+
+ return result;
+ }
+
#endregion