From 9362d29faef8c2002ebf41f8b2aa4b941a26da33 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Thu, 9 Jan 2025 15:34:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=87=8D=E5=A4=8D=E9=AA=8C?= =?UTF-8?q?=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Reading/ReadingCriterion/ReadingQuestionService.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs index a53094fa6..5bb8ff5c3 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs @@ -56,6 +56,16 @@ namespace IRaCIS.Core.Application.Service [HttpPost] public async Task SetTrialQuestionExportResult(SetTrialQuestionExportResultInDto inDto) { + + var cDISCCodeList = inDto.QuestionList.Where(x => x.CDISCCode.IsNotNullOrEmpty()).Select(x => x.CDISCCode).ToList(); + + cDISCCodeList.AddRange(inDto.TableQuestionList.Where(x => x.CDISCCode.IsNotNullOrEmpty()).Select(x => x.CDISCCode).ToList()); + + if (cDISCCodeList.Distinct().Count() != cDISCCodeList.Count) + { + throw new BusinessValidationFailedException(_localizer["ReadingQuestion_CDISCCodeRepeat"]); + } + List needAdd = new List() { ExportResult.DetailedTableOfAdjudicationResults,