Uat_Study
parent
77f9bd84d7
commit
bc05bc38f6
|
@ -415,7 +415,7 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.VerifyCalculateRelation(relationList, indto.Id.Value);
|
this.VerifyCalculateRelation(relationList, indto.Id.Value, indto.Id.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
var entity = await _readingQuestionTrialRepository.InsertOrUpdateAsync(indto, true);
|
var entity = await _readingQuestionTrialRepository.InsertOrUpdateAsync(indto, true);
|
||||||
|
@ -438,22 +438,29 @@ namespace IRaCIS.Application.Services
|
||||||
return await query.ToListAsync();
|
return await query.ToListAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void VerifyCalculateRelation(List<CalculateRelationDto> relationList,Guid QuestionId)
|
/// <summary>
|
||||||
|
/// 验证计算关系
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="relationList"></param>
|
||||||
|
/// <param name="QuestionId"></param>
|
||||||
|
/// <param name="originalId"></param>
|
||||||
|
/// <exception cref="BusinessValidationFailedException"></exception>
|
||||||
|
private void VerifyCalculateRelation(List<CalculateRelationDto> relationList,Guid QuestionId,Guid originalId)
|
||||||
{
|
{
|
||||||
var relation = relationList.Where(x=>x.CalculateQuestionList.Any(y=>y.QuestionId== QuestionId||y.TableQuestionId==QuestionId)).ToList();
|
var relation = relationList.Where(x=>x.CalculateQuestionList.Any(y=>y.QuestionId== QuestionId||y.TableQuestionId==QuestionId)).ToList();
|
||||||
|
|
||||||
if (relation.Select(x => x.QuestionId).ToList().Contains(QuestionId))
|
if (relation.Select(x => x.QuestionId).ToList().Contains(originalId))
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("计算依赖循环了!");
|
throw new BusinessValidationFailedException("计算依赖循环了!");
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var newrelation = relation.Clone();
|
|
||||||
relation.ForEach(x =>
|
relation.ForEach(x =>
|
||||||
{
|
{
|
||||||
|
|
||||||
VerifyCalculateRelation(newrelation, QuestionId);
|
VerifyCalculateRelation(relationList, x.QuestionId, originalId);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -635,7 +642,7 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.VerifyCalculateRelation(relationList, indto.Id.Value);
|
this.VerifyCalculateRelation(relationList, indto.Id.Value, indto.Id.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -193,6 +193,7 @@ namespace IRaCIS.Core.Application
|
||||||
await _readingQuestionCriterionTrialRepository.BatchUpdateNoTrackingAsync(x => x.Id == inDto.TrialReadingCriterionId, x => new ReadingQuestionCriterionTrial()
|
await _readingQuestionCriterionTrialRepository.BatchUpdateNoTrackingAsync(x => x.Id == inDto.TrialReadingCriterionId, x => new ReadingQuestionCriterionTrial()
|
||||||
{
|
{
|
||||||
IsOncologyReading = systemCriterion.IsOncologyReading,
|
IsOncologyReading = systemCriterion.IsOncologyReading,
|
||||||
|
IseCRFShowInDicomReading=systemCriterion.IseCRFShowInDicomReading,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue