Uat_Study
he 2022-08-10 17:11:00 +08:00
parent 5bdc2dfefb
commit d41ce4422c
3 changed files with 15 additions and 2 deletions

View File

@ -13,6 +13,9 @@ namespace IRaCIS.Core.Application.Contracts
{
Task<IResponseOutput> SetSystemCriterionDisable(Guid dictionaryId, Guid? parentId);
Task<bool> VerifyeCriterionNeedSynchronize(VerifyeCriterionNeedSynchronizeInDto inDto);
}
}

View File

@ -112,7 +112,9 @@ namespace IRaCIS.Application.Services
var systemCriterion = await _readingQuestionCriterionSystemRepository.Where(x => x.Id == trialCriterion.ReadingQuestionCriterionSystemId).FirstNotNullAsync();
if (systemCriterion.ConfirmTime > trialCriterion.SynchronizeTime)
{
await SynchronizeCriterion(inDto.TrialCriterionId);
return true;
}
else
{

View File

@ -10,6 +10,7 @@ using Microsoft.AspNetCore.Authorization;
using IRaCIS.Core.Application.Auth;
using Panda.DynamicWebApi.Attributes;
using IRaCIS.Core.Infra.EFCore.Common;
using IRaCIS.Core.Application.Service.Reading.Dto;
namespace IRaCIS.Core.Application
{
@ -25,6 +26,7 @@ namespace IRaCIS.Core.Application
private readonly IEasyCachingProvider _provider;
private readonly IRepository<TaskAllocationRule> _taskAllocationRuleRepository;
private readonly IReadingQuestionService iReadingQuestionService;
public TrialConfigService(IRepository<Trial> trialRepository,
IRepository<TrialQCQuestion> trialQCQuestionRepository,
@ -33,11 +35,13 @@ namespace IRaCIS.Core.Application
IRepository<ClinicalDataTrialSet> clinicalDataTrialSetRepository,
IRepository<ReadingCriterionPage> readingCriterionPageRepository,
IRepository<TaskAllocationRule> taskAllocationRuleRepository,
IReadingQuestionService iReadingQuestionService,
IEasyCachingProvider provider
)
{
_trialRepository = trialRepository;
_taskAllocationRuleRepository = taskAllocationRuleRepository;
this.iReadingQuestionService = iReadingQuestionService;
this._trialQCQuestionRepository = trialQCQuestionRepository;
this._readingQuestionCriterionTrialRepository = readingQuestionCriterionTrialRepository;
this._readingQuestionTrialRepository = readingQuestionTrialRepository;
@ -234,7 +238,11 @@ namespace IRaCIS.Core.Application
result.FormType = trialCriterion.FormType;
result.IsFromSystem = trialCriterion.ReadingQuestionCriterionSystemId != null;
// 验证并同步
await iReadingQuestionService.VerifyeCriterionNeedSynchronize(new VerifyeCriterionNeedSynchronizeInDto()
{
TrialCriterionId = trialCriterion.Id
});
};
result.TrialQuestionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrial.IsConfirm && x.TrialId == inDto.TrialId&&x.ReadingQuestionCriterionTrialId == result.TrialCriterionId