lugano 修改
parent
545ddd4ec9
commit
2747fa82e3
|
@ -882,6 +882,26 @@ 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();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue