diff --git a/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs b/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs index 8e9a951fb..39fcddffb 100644 --- a/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs @@ -277,7 +277,7 @@ namespace IRaCIS.Core.Application.Service /// /// [HttpPost] - public async Task> GetGroupConsistentRuleSubjectList(GroupConsistentQuery inQuery) + public async Task> > GetGroupConsistentRuleSubjectList(GroupConsistentQuery inQuery) { var trialId = inQuery.TrialId; @@ -286,7 +286,7 @@ namespace IRaCIS.Core.Application.Service if (filterObj == null) { - return new PageOutput(); + return ResponseOutput.Ok(new PageOutput()) ; } var query = await GetGroupConsistentQueryAsync(filterObj); @@ -294,7 +294,8 @@ namespace IRaCIS.Core.Application.Service var pagedList = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrWhiteSpace(inQuery.SortField) ? nameof(DoctorSelfConsistentSubjectView.SubjectCode) : inQuery.SortField, inQuery.Asc); - return pagedList; + var rule = await _taskConsistentRuleRepository.Where(t => t.TrialId == inQuery.TrialId && t.IsSelfAnalysis == false && t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId).ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync(); + return ResponseOutput.Ok(pagedList); }