添加重复验证
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user