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 }); };