添加重复验证

Uat_IRC_Net8
he 2025-01-09 15:34:53 +08:00
parent 0dae3c000c
commit 9362d29fae
1 changed files with 10 additions and 0 deletions

View File

@ -56,6 +56,16 @@ namespace IRaCIS.Core.Application.Service
[HttpPost]
public async Task<bool> 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<ExportResult> needAdd = new List<ExportResult>()
{
ExportResult.DetailedTableOfAdjudicationResults,