代码修改

IRC_NewDev
he 2023-10-13 13:40:45 +08:00
parent b62a1e5d88
commit 45de42fc71
1 changed files with 4 additions and 4 deletions

View File

@ -1897,15 +1897,15 @@ namespace IRaCIS.Application.Services
var targetTablequestionList = await _readingTableQuestionTrialRepository.Where(x => x.TrialCriterionId == taskinfo.TrialReadingCriterionId && x.ReadingQuestionTrial.LesionType == LesionType.TargetLesion).ToListAsync();
var lymphQuestion = targetTablequestionList.Where(x => x.QuestionMark == QuestionMark.IsLymph).FirstOrDefault();
var targetlymphQuestion = targetTablequestionList.Where(x => x.QuestionMark == QuestionMark.IsLymph).FirstOrDefault();
// 判断是否存在淋巴结问题
if (lymphQuestion != null)
if (targetlymphQuestion != null)
{
// 判断是否为淋巴结
if (inDto.QuestionId == targetTablequestionList[0].ReadingQuestionId && inDto.AnswerList.Any(x => x.TableQuestionId == lymphQuestion.Id && x.Answer.EqEnum(ReadingYesOrNo.Yes)))
if (inDto.QuestionId == targetTablequestionList[0].ReadingQuestionId && inDto.AnswerList.Any(x => x.TableQuestionId == targetlymphQuestion.Id && x.Answer.EqEnum(ReadingYesOrNo.Yes)))
{
if (await _readingTableQuestionAnswerRepository.CountAsync(x => x.VisitTaskId == inDto.VisitTaskId && x.TableQuestionId == lymphQuestion.Id && x.Answer == ReadingYesOrNo.Yes.GetEnumInt() && x.RowId != inDto.RowId) >= 2)
if (await _readingTableQuestionAnswerRepository.CountAsync(x => x.VisitTaskId == inDto.VisitTaskId && x.TableQuestionId == targetlymphQuestion.Id && x.Answer == ReadingYesOrNo.Yes.GetEnumInt() && x.RowId != inDto.RowId) >= 2)
{
// 靶病灶只能添加两个淋巴结病灶
throw new BusinessValidationFailedException(_localizer["ReadingImage_LuganoMaxTowTarget"]);