From 4dfe5a1dce561726646cb6be2825e34e2e64a005 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Wed, 21 Aug 2024 17:35:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=82=E6=95=B0=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Allocation/TaskConsistentRuleService.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs b/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs index c18405e5c..345a65d9b 100644 --- a/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs @@ -787,8 +787,13 @@ namespace IRaCIS.Core.Application.Service [HttpPost] public async Task<(TaskConsistentRuleBasic?,object)> GetConsistentRule(TaskConsistentRuleQuery inQuery) { - return (await _taskConsistentRuleRepository.Where(t => t.TrialId == inQuery.TrialId && t.IsSelfAnalysis == inQuery.IsSelfAnalysis && t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId).ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync(), - await _trialReadingCriterionRepository.Where(x=>x.Id==inQuery.TrialReadingCriterionId).Select(x=>x.IsReadingTaskViewInOrder).FirstNotNullAsync() + + var IsReadingTaskViewInOrder = await _trialReadingCriterionRepository.Where(x => x.Id == inQuery.TrialReadingCriterionId).Select(x => x.IsReadingTaskViewInOrder).FirstNotNullAsync(); + var result = await _taskConsistentRuleRepository.Where(t => t.TrialId == inQuery.TrialId && t.IsSelfAnalysis == inQuery.IsSelfAnalysis && t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId).ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync(); + return (result, + new { + IsReadingTaskViewInOrder= IsReadingTaskViewInOrder, + } ); }