From fee3b47eedfaca85eadaebbde9e27bb4c02c7a5e Mon Sep 17 00:00:00 2001
From: he <10978375@qq.com>
Date: Thu, 4 Aug 2022 09:28:52 +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
---
.../Service/Reading/Dto/ReadingQuestionViewModel.cs | 11 +++++++++++
.../Service/Reading/ReadingQuestionService.cs | 6 ++++++
IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs | 5 +++++
3 files changed, 22 insertions(+)
diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs
index 65de6ce6c..309a57311 100644
--- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs
@@ -355,6 +355,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// 是否是裁判问题
///
public bool IsJudgeQuestion { get; set; }
+
+ ///
+ /// 图片数量
+ ///
+ public int ImageCount { get; set; }
}
@@ -591,6 +596,12 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public string TypeValue { get; set; }
public bool IsEnable { get; set; } = false;
+
+
+ ///
+ /// 图片数量
+ ///
+ public int ImageCount { get; set; } = 1;
}
diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs
index 077cedba2..e5ff567f9 100644
--- a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs
+++ b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs
@@ -749,6 +749,12 @@ namespace IRaCIS.Application.Services
}
}
+ if (indto.ParentId == indto.RelevanceId && indto.ParentId != null && indto.ParentTriggerValue != indto.RelevanceValue)
+ {
+ throw new BusinessValidationFailedException("显示依赖父问题和必填依赖的问题为同一个,但答案互斥,操作失败");
+ }
+
+
if (await _readingQuestionTrialRepository.AnyAsync(x => x.Id != indto.Id && x.ShowOrder == indto.ShowOrder&&x.TrialId==indto.TrialId&&x.ReadingQuestionCriterionTrialId==indto.ReadingQuestionCriterionTrialId&&x.ReadingCriterionPageId==indto.ReadingCriterionPageId))
{
throw new BusinessValidationFailedException("问题编号重复");
diff --git a/IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs b/IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs
index 63e12257f..cfd4e8770 100644
--- a/IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs
+++ b/IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs
@@ -79,6 +79,11 @@ namespace IRaCIS.Core.Domain.Models
///
public string GroupName { get; set; }
+ ///
+ /// 图片数量
+ ///
+ public int ImageCount { get; set; } = 1;
+
///
/// 创建人
///