Uat_Study
he 2022-08-29 16:14:19 +08:00
parent 9835b31fda
commit 361b98c7e0
1 changed files with 1 additions and 1 deletions

View File

@ -1511,7 +1511,7 @@ namespace IRaCIS.Application.Services
foreach (var item in questions) foreach (var item in questions)
{ {
var answer = inDto.AnswerList.Where(x => x.TableQuestionId == item.Id).Select(x => x.Answer).FirstOrDefault(); var answer = inDto.AnswerList.Where(x => x.TableQuestionId == item.Id).Select(x => x.Answer).FirstOrDefault();
if ((await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.TableQuestionId == item.Id && x.Answer == answer).CountAsync()) > item.MaxRowCount.Value - 1) if ((await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.TableQuestionId == item.Id && x.Answer == answer).CountAsync()) < item.MaxRowCount.Value - 1)
{ {
throw new BusinessValidationFailedException($"问题{item.QuestionName}最大相同问题数为{item.MaxRowCount.Value},当前已超过!"); throw new BusinessValidationFailedException($"问题{item.QuestionName}最大相同问题数为{item.MaxRowCount.Value},当前已超过!");
} }