添加验证
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
37cfe07ea6
commit
9cb6fb2a92
|
@ -1460,6 +1460,26 @@ namespace IRaCIS.Core.Application.Service
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<NeedSynchronize> VerifyeCriterionNeedSynchronize(VerifyeCriterionNeedSynchronizeInDto inDto)
|
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();
|
var trialCriterion = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).FirstOrDefaultAsync();
|
||||||
if (trialCriterion == null)
|
if (trialCriterion == null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -555,6 +555,27 @@ namespace IRaCIS.Core.Application
|
||||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||||
public async Task<IResponseOutput> SetCriterionReadingInfo(SetCriterionReadingInfoInDto inDto)
|
public async Task<IResponseOutput> SetCriterionReadingInfo(SetCriterionReadingInfoInDto 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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ArbitrationRule arbitration = ArbitrationRule.NA;
|
ArbitrationRule arbitration = ArbitrationRule.NA;
|
||||||
|
|
||||||
if (inDto.IsArbitrationReading)
|
if (inDto.IsArbitrationReading)
|
||||||
|
|
Loading…
Reference in New Issue