From 4e060c7093f8ffa6188ecb91c70621c4cc3b0987 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Wed, 29 Jun 2022 09:10:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=80=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IRaCIS.Core.Application.xml | 14 +++++++++++ .../Reading/Dto/ReadingQuestionViewModel.cs | 6 ++++- .../Service/Reading/ReadingQuestionService.cs | 23 +++++++++++++++++++ 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index 8c64c8c84..618069104 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -4650,6 +4650,20 @@ + + + 验证系统问题是否设置裁片答案 + + + + + + + 验证项目问题是否设置裁片答案 + + + + 设置系统问题标准是否完成配置 diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs index c6138f40f..47426b3dd 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs @@ -88,7 +88,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public bool IsEnable { get; set; } } - + public class VerifySystemQuestionIsSetJudgeAnswerInDto + { + [NotDefault] + public Guid Id { get; set; } + } public class SetSystemReadingQuestionCriterionIsIsCompleteConfig { [NotDefault] diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs index 95939b255..82c810d20 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs @@ -131,6 +131,29 @@ namespace IRaCIS.Application.Services // return ResponseOutput.Ok(result); //} + /// + /// 验证系统问题是否设置裁判答案 + /// + /// + /// + public async Task VerifySystemQuestionIsSetJudgeAnswer(VerifySystemQuestionIsSetJudgeAnswerInDto inDto) + { + var result = await _readingQuestionTrialRepository.AnyAsync(x => x.ReadingQuestionSystemId == inDto.Id&&x.IsJudgeQuestion && x.JudgeType != JudgeTypeEnum.None); + return ResponseOutput.Ok(result); + } + + + /// + /// 验证项目问题是否设置裁判答案 + /// + /// + /// + public async Task VerifyTrialQuestionIsSetJudgeAnswer(VerifySystemQuestionIsSetJudgeAnswerInDto inDto) + { + var result = await _readingQuestionTrialRepository.AnyAsync(x => x.Id == inDto.Id && x.IsJudgeQuestion && x.JudgeType != JudgeTypeEnum.None); + return ResponseOutput.Ok(result); + } + /// /// 设置系统问题标准是否完成配置 ///