Compare commits

..

No commits in common. "2f224047bc7ec6b9925adc6e58e570b43ce08505" and "5dd80c91cf3e1cba149fc547dc02eb3df31e72da" have entirely different histories.

1 changed files with 0 additions and 20 deletions

View File

@ -882,26 +882,6 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
if(targetQuestion!=null) if(targetQuestion!=null)
{ {
// 找到状态问题 // 找到状态问题
var stateQuestion = await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionId == targetQuestion.Id && x.QuestionMark == QuestionMark.State).FirstOrDefaultAsync();
if (stateQuestion != null)
{
var state =await _readingTableQuestionAnswerRepository.Where(x=>x.VisitTaskId==inDto.VisitTaskId&&x.RowIndex== (int)Math.Floor(inDto.RowNumber)&&x.TableQuestionId== stateQuestion.Id).Select(x=>x.Answer).FirstOrDefaultAsync();
// 找到ppd问题
var ppdQuestion = await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionId == targetQuestion.Id && x.QuestionMark == QuestionMark.PPD).FirstOrDefaultAsync();
if(ppdQuestion!=null)
{
var ppdAnswerList= await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.TableQuestionId == stateQuestion.Id)
.Where(x=> x.RowIndex >= (int)Math.Floor(inDto.RowNumber) && x.RowIndex< ((int)Math.Floor(inDto.RowNumber)+1))
.Select(x => x.Answer).ToListAsync();
var allPPd = ppdAnswerList.Select(x => x.IsNullOrEmptyReturn0()).Sum();
}
}
} }