Test.EIImageViewer
he 2023-01-17 19:10:36 +08:00
parent 72c4fedfd5
commit c7ef738dd9
1 changed files with 13 additions and 12 deletions

View File

@ -190,6 +190,7 @@ namespace IRaCIS.Application.Services
BeforeQuestionList = x.ReadingTaskQuestionAnswerList.Where(y => y.ReadingQuestionTrial.GlobalReadingShowType!=GlobalReadingShowType.NotShow).OrderBy(y => y.ReadingQuestionTrial.ShowOrder) BeforeQuestionList = x.ReadingTaskQuestionAnswerList.Where(y => y.ReadingQuestionTrial.GlobalReadingShowType!=GlobalReadingShowType.NotShow).OrderBy(y => y.ReadingQuestionTrial.ShowOrder)
.Select(y => new GlobalQuestionInfo() .Select(y => new GlobalQuestionInfo()
{ {
QuestionId = y.ReadingQuestionTrialId, QuestionId = y.ReadingQuestionTrialId,
QuestionName = y.ReadingQuestionTrial.QuestionName.LanguageName(y.ReadingQuestionTrial.QuestionEnName, _userInfo.IsEn_Us), QuestionName = y.ReadingQuestionTrial.QuestionName.LanguageName(y.ReadingQuestionTrial.QuestionEnName, _userInfo.IsEn_Us),
AnswerGroup = y.ReadingQuestionTrial.AnswerGroup, AnswerGroup = y.ReadingQuestionTrial.AnswerGroup,
@ -204,7 +205,7 @@ namespace IRaCIS.Application.Services
TypeValue = y.ReadingQuestionTrial.TypeValue, TypeValue = y.ReadingQuestionTrial.TypeValue,
ValueType = y.ReadingQuestionTrial.ValueType, ValueType = y.ReadingQuestionTrial.ValueType,
IsJudgeQuestion =y.ReadingQuestionTrial.IsJudgeQuestion, IsJudgeQuestion =y.ReadingQuestionTrial.IsJudgeQuestion,
Answer = y.Answer Answer =y.GlobalChangeAnswer==string.Empty|| y.GlobalChangeAnswer ==null? y.Answer: y.GlobalChangeAnswer,
}).ToList() }).ToList()
}).ToListAsync(); }).ToListAsync();
@ -212,18 +213,18 @@ namespace IRaCIS.Application.Services
var globalReadingQuestion = await _readingGlobalTaskInfoRepository.Where(x => x.GlobalTaskId == inDto.VisitTaskId).ToListAsync(); var globalReadingQuestion = await _readingGlobalTaskInfoRepository.Where(x => x.GlobalTaskId == inDto.VisitTaskId).ToListAsync();
var criterionType = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == taskInfo.TrialReadingCriterionId).Select(x => x.CriterionType).FirstOrDefaultAsync(); var criterionType = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == taskInfo.TrialReadingCriterionId).Select(x => x.CriterionType).FirstOrDefaultAsync();
if (criterionType == CriterionType.PCWG3) //if (criterionType == CriterionType.PCWG3)
{ //{
result.TaskList.ForEach(x => // result.TaskList.ForEach(x =>
{ // {
x.BeforeQuestionList.ForEach(y => // x.BeforeQuestionList.ForEach(y =>
{ // {
var globalAnswer = globalReadingQuestion.Where(z => z.QuestionId == y.QuestionId).Select(z => z.Answer).FirstOrDefault(); // var globalAnswer = globalReadingQuestion.Where(z => z.QuestionId == y.QuestionId).Select(z => z.Answer).FirstOrDefault();
y.Answer = globalAnswer.IsNullOrEmpty() ? y.Answer : globalAnswer; // y.Answer = globalAnswer.IsNullOrEmpty() ? y.Answer : globalAnswer;
}); // });
}); // });
} //}
result.TaskList.ForEach(x => result.TaskList.ForEach(x =>
{ {