This commit is contained in:
he
2022-10-19 14:01:40 +08:00
parent 8ddb5001ef
commit 72935c89d8
2 changed files with 7 additions and 2 deletions
@@ -138,7 +138,7 @@ namespace IRaCIS.Core.Application
{
var trialCriterion = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).FirstNotNullAsync();
if (trialCriterion.SynchronizeOriginalTime == null && trialCriterion.ReadingQuestionCriterionSystemId != null)
if ((!await _readingCriterionDictionaryRepository.AnyAsync(x=>x.CriterionId == trialCriterion.Id && x.ParentCode == "GlobalAssessType"))&& trialCriterion.ReadingQuestionCriterionSystemId!=null)
{
await _readingCriterionDictionaryRepository.BatchDeleteNoTrackingAsync(x => x.CriterionId == trialCriterion.Id&&x.ParentCode== "GlobalAssessType");
var criterionDictionaryList = await _readingCriterionDictionaryRepository.Where(x => x.CriterionId == trialCriterion.ReadingQuestionCriterionSystemId.Value&&x.ParentCode== "GlobalAssessType").
@@ -175,7 +175,7 @@ namespace IRaCIS.Core.Application
var trialCriterion = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).FirstOrDefaultAsync();
if (trialCriterion.SynchronizeOriginalTime == null && trialCriterion.ReadingQuestionCriterionSystemId != null)
if ((!await _readingCriterionDictionaryRepository.AnyAsync(x => x.CriterionId == trialCriterion.Id && x.ParentCode == "OncologyAssessType")) && trialCriterion.ReadingQuestionCriterionSystemId != null)
{
await _readingCriterionDictionaryRepository.BatchDeleteNoTrackingAsync(x => x.CriterionId == trialCriterion.Id && x.ParentCode == "OncologyAssessType");
var criterionDictionaryList = await _readingCriterionDictionaryRepository.Where(x => x.CriterionId == trialCriterion.ReadingQuestionCriterionSystemId.Value && x.ParentCode == "OncologyAssessType").