阅片信息签名验证接口修改

Uat_IRC_Net10
he 2026-08-18 13:53:27 +08:00
parent 747bb29729
commit 1094c8ce2a
1 changed files with 40 additions and 5 deletions

View File

@ -27,6 +27,7 @@ namespace IRaCIS.Core.Application
IRepository<TrialQCQuestion> _trialQCQuestionRepository, IRepository<TrialQCQuestion> _trialQCQuestionRepository,
IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository, IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository,
IRepository<ReadingQuestionTrial> _readingQuestionTrialRepository, IRepository<ReadingQuestionTrial> _readingQuestionTrialRepository,
IRepository<ReadingQuestionVisitJudgeRule> _readingQuestionVisitJudgeRuleRepository,
IRepository<TrialCriterionDictionaryCode> _trialCriterionDictionaryCode, IRepository<TrialCriterionDictionaryCode> _trialCriterionDictionaryCode,
IRepository<SystemCriterionDictionaryCode> _systemCriterionDictionaryCode, IRepository<SystemCriterionDictionaryCode> _systemCriterionDictionaryCode,
IRepository<ReadingQuestionCriterionSystem> _readingQuestionCriterionSystemRepository, IRepository<ReadingQuestionCriterionSystem> _readingQuestionCriterionSystemRepository,
@ -34,7 +35,7 @@ namespace IRaCIS.Core.Application
IRepository<ReadingCriterionPage> _readingCriterionPageRepository, IRepository<ReadingCriterionPage> _readingCriterionPageRepository,
IRepository<SystemCriterionKeyFile> _systemCriterionKeyFileRepository, IRepository<SystemCriterionKeyFile> _systemCriterionKeyFileRepository,
IOSSService _oSSService, IOSSService _oSSService,
IRepository<VisitStage> _visitStageRepository,
IRepository<TrialCriterionKeyFile> _trialCriterionKeyFileRepository, IRepository<TrialCriterionKeyFile> _trialCriterionKeyFileRepository,
IOrganInfoService _iOrganInfoService, IOrganInfoService _iOrganInfoService,
IRepository<TrialBodyPart> _trialBodyPartRepository, IRepository<TrialBodyPart> _trialBodyPartRepository,
@ -105,6 +106,40 @@ namespace IRaCIS.Core.Application
throw new BusinessValidationFailedException(_localizer["TrialConfig_JudgeTaskFail"]); throw new BusinessValidationFailedException(_localizer["TrialConfig_JudgeTaskFail"]);
} }
if (trialCriterion.JudgeRuleEnum == JudgeRule.Difference)
{
var visitStageList = await _visitStageRepository.Where(x => x.TrialId == trialCriterion.TrialId).ToListAsync();
visitStageList.Add(new VisitStage()
{
VisitName = "Out of Plan",
VisitNum=-1,
});
var judgeCount = await _readingQuestionTrialRepository.CountAsync(x => x.ReadingQuestionCriterionTrialId == inDto.TrialReadingCriterionId && x.IsJudgeQuestion);
var ruleList = await _readingQuestionVisitJudgeRuleRepository.Where(x => x.ReadingQuestionTrial.ReadingQuestionCriterionTrialId == inDto.TrialReadingCriterionId).ToListAsync();
var errorList = new List<string>();
visitStageList.ForEach(x =>
{
if (judgeCount != ruleList.Count(y => y.VisitNum == x.VisitNum))
{
errorList.Add(x.VisitName);
}
});
if (errorList.Count() > 0)
{
throw new BusinessValidationFailedException(_localizer["TrialConfig_VisitjudgeDeficiency", string.Join(",", errorList)]);
}
}
return ResponseOutput.Ok(true); return ResponseOutput.Ok(true);
} }