From 48bbefebf988a5d89a88e3d1efcdecf3c97e2895 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Wed, 20 Jul 2022 16:24:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=80=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IRaCIS.Core.Application.xml | 35 ++++++++++++++----- .../Service/Reading/ReadingQuestionService.cs | 11 ++++++ .../TrialSiteUser/TrialConfigService.cs | 12 +++++++ 3 files changed, 50 insertions(+), 8 deletions(-) diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index e12056965..a3711fc73 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -2822,6 +2822,11 @@ TaskAllocationRuleAddOrEdit 列表查询参数模型 + + + 原任务的Id + + 阅片期 @@ -5629,6 +5634,13 @@ IR影像阅片 + + + 获取全局阅片历史记录 + + + + 保存全局阅片结果 @@ -5711,13 +5723,6 @@ - - - 提交裁判问题 - - - - 获取既往结果 @@ -5740,7 +5745,21 @@ - 提交问题 + 提交访视阅片问题 + + + + + + + 提交裁判问题 + + + + + + + 提交全局阅片结果 diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs index d6deb4f08..d7a7cee8b 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs @@ -76,6 +76,17 @@ namespace IRaCIS.Application.Services [HttpPost] public async Task SetTrialJudgyInfo(SetTrialJudgyInfoInDto inDto) { + + var trialCriterion = await _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == inDto.TrialId && x.IsConfirm).FirstOrDefaultAsync(); + + var judgeCount = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == trialCriterion.Id && x.IsJudgeQuestion) + .WhereIf(trialCriterion.FormType == FormType.SinglePage, x => x.ReadingCriterionPageId == null) + .WhereIf(trialCriterion.FormType == FormType.MultiplePage, x => x.ReadingCriterionPageId != null).CountAsync(); + + if (judgeCount == 0&&(inDto.ArbitrationRule== ArbitrationRule.Visit|| inDto.ArbitrationRule == ArbitrationRule.Reading)) + { + throw new BusinessValidationFailedException("无裁判问题却有仲裁对象,操作失败"); + } await _trialRepository.UpdatePartialFromQueryAsync(inDto.TrialId, x => new Trial() { ArbitrationRule = inDto.ArbitrationRule, diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs index ca760fe8c..7aa43e1be 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs @@ -54,6 +54,18 @@ namespace IRaCIS.Core.Application [NonDynamicMethod] public async Task TrialReadingInfoSign(TrialReadingInfoSignInDto inDto) { + var trialCriterion = await _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == inDto.TrialId && x.IsConfirm).FirstOrDefaultAsync(); + + var existsJudge = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == trialCriterion.Id && x.IsJudgeQuestion && x.JudgeType == JudgeTypeEnum.None) + .WhereIf(trialCriterion.FormType == FormType.SinglePage, x => x.ReadingCriterionPageId == null) + .WhereIf(trialCriterion.FormType == FormType.MultiplePage, x => x.ReadingCriterionPageId != null) + .AnyAsync(); + + if (existsJudge) + { + throw new BusinessValidationFailedException("配置了裁判问题但未配置裁判规则,操作失败"); + } + await _trialRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.TrialId, x => new Trial() { ReadingInfoSignTime = DateTime.Now