Uat_Study
parent
5bdc2dfefb
commit
d41ce4422c
|
@ -13,6 +13,9 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
{
|
{
|
||||||
Task<IResponseOutput> SetSystemCriterionDisable(Guid dictionaryId, Guid? parentId);
|
Task<IResponseOutput> SetSystemCriterionDisable(Guid dictionaryId, Guid? parentId);
|
||||||
|
|
||||||
|
Task<bool> VerifyeCriterionNeedSynchronize(VerifyeCriterionNeedSynchronizeInDto inDto);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -112,7 +112,9 @@ namespace IRaCIS.Application.Services
|
||||||
var systemCriterion = await _readingQuestionCriterionSystemRepository.Where(x => x.Id == trialCriterion.ReadingQuestionCriterionSystemId).FirstNotNullAsync();
|
var systemCriterion = await _readingQuestionCriterionSystemRepository.Where(x => x.Id == trialCriterion.ReadingQuestionCriterionSystemId).FirstNotNullAsync();
|
||||||
if (systemCriterion.ConfirmTime > trialCriterion.SynchronizeTime)
|
if (systemCriterion.ConfirmTime > trialCriterion.SynchronizeTime)
|
||||||
{
|
{
|
||||||
|
await SynchronizeCriterion(inDto.TrialCriterionId);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,6 +10,7 @@ using Microsoft.AspNetCore.Authorization;
|
||||||
using IRaCIS.Core.Application.Auth;
|
using IRaCIS.Core.Application.Auth;
|
||||||
using Panda.DynamicWebApi.Attributes;
|
using Panda.DynamicWebApi.Attributes;
|
||||||
using IRaCIS.Core.Infra.EFCore.Common;
|
using IRaCIS.Core.Infra.EFCore.Common;
|
||||||
|
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application
|
namespace IRaCIS.Core.Application
|
||||||
{
|
{
|
||||||
|
@ -25,6 +26,7 @@ namespace IRaCIS.Core.Application
|
||||||
private readonly IEasyCachingProvider _provider;
|
private readonly IEasyCachingProvider _provider;
|
||||||
|
|
||||||
private readonly IRepository<TaskAllocationRule> _taskAllocationRuleRepository;
|
private readonly IRepository<TaskAllocationRule> _taskAllocationRuleRepository;
|
||||||
|
private readonly IReadingQuestionService iReadingQuestionService;
|
||||||
|
|
||||||
public TrialConfigService(IRepository<Trial> trialRepository,
|
public TrialConfigService(IRepository<Trial> trialRepository,
|
||||||
IRepository<TrialQCQuestion> trialQCQuestionRepository,
|
IRepository<TrialQCQuestion> trialQCQuestionRepository,
|
||||||
|
@ -33,11 +35,13 @@ namespace IRaCIS.Core.Application
|
||||||
IRepository<ClinicalDataTrialSet> clinicalDataTrialSetRepository,
|
IRepository<ClinicalDataTrialSet> clinicalDataTrialSetRepository,
|
||||||
IRepository<ReadingCriterionPage> readingCriterionPageRepository,
|
IRepository<ReadingCriterionPage> readingCriterionPageRepository,
|
||||||
IRepository<TaskAllocationRule> taskAllocationRuleRepository,
|
IRepository<TaskAllocationRule> taskAllocationRuleRepository,
|
||||||
|
IReadingQuestionService iReadingQuestionService,
|
||||||
IEasyCachingProvider provider
|
IEasyCachingProvider provider
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
_trialRepository = trialRepository;
|
_trialRepository = trialRepository;
|
||||||
_taskAllocationRuleRepository = taskAllocationRuleRepository;
|
_taskAllocationRuleRepository = taskAllocationRuleRepository;
|
||||||
|
this.iReadingQuestionService = iReadingQuestionService;
|
||||||
this._trialQCQuestionRepository = trialQCQuestionRepository;
|
this._trialQCQuestionRepository = trialQCQuestionRepository;
|
||||||
this._readingQuestionCriterionTrialRepository = readingQuestionCriterionTrialRepository;
|
this._readingQuestionCriterionTrialRepository = readingQuestionCriterionTrialRepository;
|
||||||
this._readingQuestionTrialRepository = readingQuestionTrialRepository;
|
this._readingQuestionTrialRepository = readingQuestionTrialRepository;
|
||||||
|
@ -234,7 +238,11 @@ namespace IRaCIS.Core.Application
|
||||||
result.FormType = trialCriterion.FormType;
|
result.FormType = trialCriterion.FormType;
|
||||||
result.IsFromSystem = trialCriterion.ReadingQuestionCriterionSystemId != null;
|
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
|
result.TrialQuestionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrial.IsConfirm && x.TrialId == inDto.TrialId&&x.ReadingQuestionCriterionTrialId == result.TrialCriterionId
|
||||||
|
|
Loading…
Reference in New Issue