添加重复验证
parent
0dae3c000c
commit
9362d29fae
|
@ -56,6 +56,16 @@ namespace IRaCIS.Core.Application.Service
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<bool> SetTrialQuestionExportResult(SetTrialQuestionExportResultInDto inDto)
|
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>()
|
List<ExportResult> needAdd = new List<ExportResult>()
|
||||||
{
|
{
|
||||||
ExportResult.DetailedTableOfAdjudicationResults,
|
ExportResult.DetailedTableOfAdjudicationResults,
|
||||||
|
|
Loading…
Reference in New Issue