From f5a249cf28ef258a41e6c8cf429830662e783da8 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Thu, 11 Aug 2022 09:20:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Reading/ReadingQuestionService.cs | 6 +++++- .../Service/TrialSiteUser/TrialConfigService.cs | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs index 676f3996a..061243a15 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs @@ -106,7 +106,11 @@ namespace IRaCIS.Application.Services [HttpPost] public async Task VerifyeCriterionNeedSynchronize(VerifyeCriterionNeedSynchronizeInDto inDto) { - var trialCriterion = await _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == inDto.TrialId&&x.IsConfirm).FirstNotNullAsync(); + var trialCriterion = await _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == inDto.TrialId&&x.IsConfirm).FirstOrDefaultAsync(); + if (trialCriterion == null) + { + return false; + } if (trialCriterion.ReadingQuestionCriterionSystemId != null) { var systemCriterion = await _readingQuestionCriterionSystemRepository.Where(x => x.Id == trialCriterion.ReadingQuestionCriterionSystemId).FirstNotNullAsync(); diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs index 0c3043662..6f34459e3 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs @@ -241,7 +241,7 @@ namespace IRaCIS.Core.Application // 验证并同步 await iReadingQuestionService.VerifyeCriterionNeedSynchronize(new VerifyeCriterionNeedSynchronizeInDto() { - TrialCriterionId = trialCriterion.Id + TrialId = inDto.TrialId }); };