修改
This commit is contained in:
@@ -29,6 +29,10 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
public string RowIndex { get; set; }
|
||||
|
||||
public decimal AllPPD { get; set; }
|
||||
|
||||
public decimal AllMajorAxis { get; set; }
|
||||
|
||||
public decimal AllshortAxis { get; set; }
|
||||
}
|
||||
|
||||
public class GetSplitPPdInDto
|
||||
|
||||
@@ -999,7 +999,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 计算靶病灶状态
|
||||
/// 计算分裂靶病灶状态
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
@@ -1148,17 +1148,19 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
{
|
||||
var ppdAnswerList = await _readingTableQuestionAnswerRepository.Where(x =>
|
||||
x.VisitTaskId == inDto.VisitTaskId &&
|
||||
x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.PPD &&
|
||||
//x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.PPD &&
|
||||
x.QuestionId == targetQuestion.Id)
|
||||
.Select(x => new {
|
||||
x.RowId,
|
||||
x.RowIndex,
|
||||
x.Answer
|
||||
x.Answer,
|
||||
x.ReadingTableQuestionTrial.QuestionMark,
|
||||
}).ToListAsync();
|
||||
var answerList = ppdAnswerList.Select(x => new {
|
||||
x.RowId,
|
||||
x.RowIndex,
|
||||
Answer = x.Answer.IsNullOrEmptyReturn0()
|
||||
Answer = x.Answer.IsNullOrEmptyReturn0(),
|
||||
x.QuestionMark,
|
||||
}).ToList();
|
||||
var maxRowIndex = answerList.MaxOrDefault(x => x.RowIndex);
|
||||
for (int i = 1; i < maxRowIndex; i++)
|
||||
@@ -1167,7 +1169,9 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
{
|
||||
RowId = answerList.Where(x => x.RowIndex == i).Select(x => x.RowId).FirstOrDefault(),
|
||||
RowIndex = answerList.Where(x => x.RowIndex == i).Select(x => x.RowIndex).FirstOrDefault().ToString(),
|
||||
AllPPD = answerList.Where(x => x.RowIndex > i && x.RowIndex < (i + 1)).Sum(x => x.Answer),
|
||||
AllPPD = answerList.Where(x=>x.QuestionMark== QuestionMark.PPD).Where(x => x.RowIndex > i && x.RowIndex < (i + 1)).Sum(x => x.Answer),
|
||||
AllMajorAxis = answerList.Where(x => x.QuestionMark == QuestionMark.MajorAxis).Where(x => x.RowIndex > i && x.RowIndex < (i + 1)).Sum(x => x.Answer),
|
||||
AllshortAxis = answerList.Where(x => x.QuestionMark == QuestionMark.ShortAxis).Where(x => x.RowIndex > i && x.RowIndex < (i + 1)).Sum(x => x.Answer),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user