Uat_Study
he 2022-10-18 15:17:22 +08:00
parent ee32ddd974
commit 0b0119c3ac
2 changed files with 2 additions and 50 deletions

View File

@ -1357,55 +1357,7 @@ namespace IRaCIS.Application.Services
public async Task<IResponseOutput> 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 (rowAnswerList.Count > 0)
{
errorMassage += $" 病灶{ string.Join(',', measureDataList)}不存在标记,";
}
if (tableAnswerList.Count > 0)
{
errorMassage += $" 病灶{ string.Join(',', tableAnswerList)}状态为空,";
}
if (errorMassage!=string.Empty)
{
throw new BusinessValidationFailedException(errorMassage);
}
await _readingCalculateService.VerifyVisitTaskQuestions(inDto);
//await _readingCalculateService.VerifyVisitTaskQuestions(inDto);
return ResponseOutput.Ok(true);

View File

@ -315,7 +315,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
if (tableAnswerList.Count > 0)
{
errorMassage += $" 病灶{ string.Join(',', tableAnswerList)}状态为空,";
errorMassage += $" 病灶{ string.Join(',', tableAnswerList.Select(x => x.OrderMark + x.RowIndex.GetLesionMark()))}状态为空,";
}