diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
index 8e0d6c2d4..d6f2f6df7 100644
--- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
@@ -133,6 +133,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public class GetTrialCriterionJudgeQuestionListInDto
{
+ [NotDefault]
+ public Guid TrialId { get; set; }
+
[NotDefault]
public Guid ReadingQuestionCriterionTrialId { get; set; }
}
diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs
index 17954d93e..c495d6a70 100644
--- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs
+++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs
@@ -255,9 +255,13 @@ namespace IRaCIS.Application.Services
///
///
[HttpPost]
- public async Task> GetTrialCriterionJudgeQuestionList(GetTrialCriterionJudgeQuestionListInDto inDto)
+ public async Task<(List,object)> GetTrialCriterionJudgeQuestionList(GetTrialCriterionJudgeQuestionListInDto inDto)
{
+ var trialCriterion = await _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == inDto.TrialId && x.IsConfirm).FirstOrDefaultAsync();
+
var result = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == inDto.ReadingQuestionCriterionTrialId && x.IsJudgeQuestion)
+ .WhereIf(trialCriterion.FormType == FormType.SinglePage, x => x.ReadingCriterionPageId == null)
+ .WhereIf(trialCriterion.FormType == FormType.MultiplePage, x => x.ReadingCriterionPageId != null)
.Select(x => new GetTrialCriterionJudgeQuestionListOutDto()
{
AnswerGroup = JsonConvert.DeserializeObject>(x.AnswerGroup.IsNullOrEmpty()?"[]": x.AnswerGroup),
@@ -267,7 +271,17 @@ namespace IRaCIS.Application.Services
JudgeType=x.JudgeType,
ReadingQuestionTrialId = x.Id
}).ToListAsync();
- return result;
+
+
+ var signTime = await _trialRepository.Where(x => x.Id == inDto.TrialId).Select(x => x.ReadingInfoSignTime).FirstOrDefaultAsync();
+
+ return (result, new
+ {
+
+ IsSign = signTime != null,
+
+ });
+
}
///