Uat_Study
parent
9835b31fda
commit
361b98c7e0
|
@ -1511,7 +1511,7 @@ namespace IRaCIS.Application.Services
|
|||
foreach (var item in questions)
|
||||
{
|
||||
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},当前已超过!");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue