From 1c3462470b0339da9c30fa5388c590a3c5add150 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 26 Jul 2022 16:41:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Allocation/VisitTaskHelpeService.cs | 4 ++-- .../TrialSiteUser/TrialConfigService.cs | 24 +------------------ 2 files changed, 3 insertions(+), 25 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs index 37bfb2fd1..d62dcb3e1 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs @@ -152,7 +152,7 @@ namespace IRaCIS.Core.Application.Service { #region 验证历史任务 - if (_taskAllocationRuleRepository.Where(t => t.TrialId == trialId && t.IsEnable && t.IsJudgeDoctor == false).Count() < 2) + if (_taskAllocationRuleRepository.Where(t => t.TrialId == trialId && t.IsEnable).Count() < 2) { throw new BusinessValidationFailedException("能参与读片的医生数量必须>=2,自动分配任务中止"); @@ -160,7 +160,7 @@ namespace IRaCIS.Core.Application.Service - if (!(assignConfigList.Any(t => t.ArmEnum == Arm.DoubleReadingArm1) || ! assignConfigList.Any(t => t.ArmEnum == Arm.DoubleReadingArm2))) + if (!(assignConfigList.Any(t => t.ArmEnum == Arm.DoubleReadingArm1) && assignConfigList.Any(t => t.ArmEnum == Arm.DoubleReadingArm2))) { throw new BusinessValidationFailedException("该受试者阅片医生未配置完成"); diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs index 158a41037..9af436c21 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs @@ -639,29 +639,7 @@ namespace IRaCIS.Core.Application return ResponseOutput.Ok(await _trialRepository.SaveChangesAsync()); } - /// - /// 配置项目 裁判任务 分配规则 - /// - /// - /// - [HttpPut] - public async Task ConfigJudgeTaskAllocateRule(TrialJudgeTaskConfig trialConfig) - { - var trialInfo = (await _trialRepository.FirstOrDefaultAsync(t => t.Id == trialConfig.TrialId)).IfNullThrowException(); - - _mapper.Map(trialConfig, trialInfo); - - if (_taskAllocationRuleRepository.Where(t => t.TrialId == trialConfig.TrialId && t.IsEnable && t.IsJudgeDoctor ).Sum(t => t.PlanReadingRatio) != 100) - { - return ResponseOutput.NotOk("已启用医生比率不为百分之100"); - } - - return ResponseOutput.Ok(await _trialRepository.SaveChangesAsync()); - } - - - - + } }