From 6a99e3104a6d88c1817357447cbca085ef022dbc Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Tue, 14 Oct 2025 14:28:06 +0800 Subject: [PATCH] =?UTF-8?q?=E9=AA=8C=E8=AF=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Reading/ReadingCriterion/ReadingQuestionService.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs index 69ffea91d..e416e4a53 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs @@ -847,7 +847,7 @@ namespace IRaCIS.Core.Application.Service /// - /// 新增修改想想项目表格问题 + /// 新增修改项目表格问题 /// /// /// @@ -861,6 +861,13 @@ namespace IRaCIS.Core.Application.Service //---问题编号重复 throw new BusinessValidationFailedException(_localizer["ReadingQuestion_IdDup"]); } + if (indto.IsPreinstall) + { + if (await _readingTableQuestionTrialRepository.AnyAsync(x => x.ReadingQuestionId == indto.ReadingQuestionId && x.Id != indto.Id && x.IsPreinstall)) + { + throw new BusinessValidationFailedException(_localizer["ReadingQuestion_OnlyOnePreinstall"]); + } + } indto.ParentTriggerValue = string.Join(',', indto.ParentTriggerValueList); indto.RelevanceValue = string.Join(',', indto.RelevanceValueList);