修改
continuous-integration/drone/push Build is passing Details

Test_IRC_Net8
he 2025-04-24 14:55:50 +08:00
parent c7103654e3
commit 6a1cd07951
1 changed files with 22 additions and 21 deletions

View File

@ -2424,32 +2424,33 @@ namespace IRaCIS.Core.Application.Service
// 如果当前添加 是 非靶病灶 并且 典型肝内病灶为 是 时 如果 靶病灶的典型肝内病灶 为是的 数量<2 给提示
// 验证去掉
if (questionInfo.LesionType == LesionType.NonTargetLesions)
{
// 非靶病灶
var tablequestionList = await _readingTableQuestionTrialRepository.Where(x => x.TrialCriterionId == taskinfo.TrialReadingCriterionId && x.ReadingQuestionId == inDto.QuestionId).ToListAsync();
// 判断表格问题是否为空
//if (questionInfo.LesionType == LesionType.NonTargetLesions)
//{
// // 非靶病灶
// var tablequestionList = await _readingTableQuestionTrialRepository.Where(x => x.TrialCriterionId == taskinfo.TrialReadingCriterionId && x.ReadingQuestionId == inDto.QuestionId).ToListAsync();
// // 判断表格问题是否为空
var tableQuestion = tablequestionList.Where(x => x.QuestionMark == QuestionMark.TypicalIntrahepaticLesion).FirstOrDefault();
if (tableQuestion != null)
{
if (inDto.AnswerList.Where(x => x.TableQuestionId == tableQuestion.Id).Select(x => x.Answer).FirstOrDefault().EqEnum(ReadingYesOrNo.Yes))
{
// var tableQuestion = tablequestionList.Where(x => x.QuestionMark == QuestionMark.TypicalIntrahepaticLesion).FirstOrDefault();
// if (tableQuestion != null)
// {
// if (inDto.AnswerList.Where(x => x.TableQuestionId == tableQuestion.Id).Select(x => x.Answer).FirstOrDefault().EqEnum(ReadingYesOrNo.Yes))
// {
var yesString = ((int)(object)ReadingYesOrNo.Yes).ToString();
// var yesString = ((int)(object)ReadingYesOrNo.Yes).ToString();
var targetList = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.ReadingQuestionTrial.LesionType == LesionType.TargetLesion
&& x.LesionAnswerList.Any(y => y.Answer == yesString && y.ReadingTableQuestionTrial.QuestionMark == QuestionMark.TypicalIntrahepaticLesion)
).ToListAsync();
if (targetList.Count() < 2)
{
throw new BusinessValidationFailedException(_localizer["ReadingImageTask_PriorityTarget"]);
}
}
}
// var targetList = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.ReadingQuestionTrial.LesionType == LesionType.TargetLesion
// && x.LesionAnswerList.Any(y => y.Answer == yesString && y.ReadingTableQuestionTrial.QuestionMark == QuestionMark.TypicalIntrahepaticLesion)
// ).ToListAsync();
// if (targetList.Count() < 2)
// {
// throw new BusinessValidationFailedException(_localizer["ReadingImageTask_PriorityTarget"]);
// }
// }
// }
}
//}