From d4388ea487d17690711f0dc52585379ad4daeef8 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Thu, 11 Aug 2022 09:17: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 --- .../Service/Reading/Dto/ReadingQuestionViewModel.cs | 3 ++- .../Service/Reading/ReadingQuestionService.cs | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs index 5204fd502..d1b7790d6 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs @@ -51,7 +51,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public class VerifyeCriterionNeedSynchronizeInDto { - public Guid TrialCriterionId { get; set; } + [NotDefault] + public Guid TrialId { get; set; } } public class GetTrialJudgyInfoInDto { diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs index 2501a56fe..676f3996a 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs @@ -106,13 +106,13 @@ namespace IRaCIS.Application.Services [HttpPost] public async Task VerifyeCriterionNeedSynchronize(VerifyeCriterionNeedSynchronizeInDto inDto) { - var trialCriterion = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialCriterionId).FirstNotNullAsync(); + var trialCriterion = await _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == inDto.TrialId&&x.IsConfirm).FirstNotNullAsync(); if (trialCriterion.ReadingQuestionCriterionSystemId != null) { var systemCriterion = await _readingQuestionCriterionSystemRepository.Where(x => x.Id == trialCriterion.ReadingQuestionCriterionSystemId).FirstNotNullAsync(); if (systemCriterion.ConfirmTime > trialCriterion.SynchronizeTime) { - await SynchronizeCriterion(inDto.TrialCriterionId); + await SynchronizeCriterion(trialCriterion.Id); return true; }