Uat_Study
parent
c407c48061
commit
dafec6e18f
|
@ -617,7 +617,55 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
|
|
||||||
public async Task VerifyVisitTaskQuestions(VerifyVisitTaskQuestionsInDto inDto)
|
public async Task VerifyVisitTaskQuestions(VerifyVisitTaskQuestionsInDto inDto)
|
||||||
{
|
{
|
||||||
|
var tableAnswerList = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && (x.Answer == string.Empty || x.Answer == null)
|
||||||
|
&& x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.State
|
||||||
|
)
|
||||||
|
.Select(x => new
|
||||||
|
{
|
||||||
|
x.ReadingQuestionTrial.OrderMark,
|
||||||
|
x.RowIndex,
|
||||||
|
QuestionMark = x.ReadingTableQuestionTrial.QuestionMark,
|
||||||
|
Answer = x.Answer,
|
||||||
|
|
||||||
|
}).ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
|
string errorMassage = string.Empty;
|
||||||
|
|
||||||
|
//var rowAnswerList = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && (x.MeasureData == string.Empty || x.MeasureData == null))
|
||||||
|
// .Select(x => new
|
||||||
|
// {
|
||||||
|
// x.ReadingQuestionTrial.OrderMark,
|
||||||
|
// x.RowIndex,
|
||||||
|
// x.Id,
|
||||||
|
// }).ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
|
//var unableEvaluateRowIds = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.Answer == TargetState.UnableEvaluate.GetEnumInt()
|
||||||
|
// && x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.State
|
||||||
|
//)
|
||||||
|
// .Select(x => x.RowId).Distinct().ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
|
//IEnumerable<string> measureDataList = rowAnswerList.Where(x => !unableEvaluateRowIds.Contains(x.Id)).Select(x => x.OrderMark + x.RowIndex.GetLesionMark()).ToList();
|
||||||
|
|
||||||
|
|
||||||
|
//if (measureDataList.Count() > 0)
|
||||||
|
//{
|
||||||
|
// errorMassage += $" 病灶{ string.Join(',', measureDataList)}不存在标记,";
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
if (tableAnswerList.Count > 0)
|
||||||
|
{
|
||||||
|
errorMassage += $" 病灶{ string.Join(',', tableAnswerList.Select(x => x.OrderMark + x.RowIndex.GetLesionMark()))}状态为空,";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (errorMassage != string.Empty)
|
||||||
|
{
|
||||||
|
throw new BusinessValidationFailedException(errorMassage);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue