From 8a459af6c6ae6bb88f4e47611717d7fe958cca89 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 14 Jun 2022 10:15:20 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=96=B0=E6=89=93=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index bf86d93d..f8d10ec3 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs @@ -298,7 +298,7 @@ namespace IRaCIS.Core.Application.Service //获取待分配的医生列表 指导分配医生的数量 var waitAllocationDoctorList = _taskAllocationRuleRepository.Where(t => t.TrialId == trialId && t.IsEnable) .Select(t => new { t.DoctorUserId, t.PlanReadingRatio, Weight = (double)(subjectCount * t.PlanReadingRatio) % 100 }) - .OrderByDescending(t => t.PlanReadingRatio).ThenByDescending(t => t.Weight); + .OrderByDescending(t => t.PlanReadingRatio).ThenByDescending(t => t.Weight).ToList(); //获取项目配置 判断应该分配几个医生 var trialConfig = (await _trialRepository.Where(t => t.Id == trialId).Select(t => new { TrialId = t.Id, t.ReadingType, t.IsFollowVisitAutoAssign, t.IsFollowGlobalVisitAutoAssign, t.FollowGlobalVisitAutoAssignDefaultState, t.TaskAllocateObjEnum }).FirstOrDefaultAsync()).IfNullThrowException();