@@ -1460,6 +1460,26 @@ namespace IRaCIS.Core.Application.Service
|
||||
[HttpPost]
|
||||
public async Task<NeedSynchronize> VerifyeCriterionNeedSynchronize(VerifyeCriterionNeedSynchronizeInDto inDto)
|
||||
{
|
||||
|
||||
|
||||
#region 验证阅片工具配置
|
||||
var trialCriterion = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).FirstNotNullAsync();
|
||||
|
||||
var toolList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == inDto.TrialReadingCriterionId).Where(x => x.ImageTool != string.Empty).Select(x => x.ImageTool).ToListAsync();
|
||||
|
||||
var tabletoolList = await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionTrial.ReadingQuestionCriterionTrialId == inDto.TrialReadingCriterionId).Where(x => x.ImageTool != string.Empty).Select(x => x.ImageTool).ToListAsync();
|
||||
|
||||
toolList.AddRange(tabletoolList);
|
||||
|
||||
toolList = toolList.Distinct().ToList();
|
||||
|
||||
if (tabletoolList.Except(trialCriterion.ReadingToolList).Count() > 0)
|
||||
{
|
||||
//---问题的阅片工具不在标准配置的阅片工具列表中
|
||||
throw new BusinessValidationFailedException(_localizer["TrialConfig_TableToolNotInStdTool"]);
|
||||
}
|
||||
#endregion
|
||||
|
||||
var trialCriterion = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).FirstOrDefaultAsync();
|
||||
if (trialCriterion == null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user