|
|
|
@ -154,6 +154,7 @@ namespace Shentun.WebPeis.QuestionRegisters |
|
|
|
join questionSubjectType in await _questionSubjectTypeRepository.GetQueryableAsync() |
|
|
|
on question.QuestionSubjectTypeId equals questionSubjectType.QuestionSubjectTypeId |
|
|
|
where questionRegisterItem.QuestionRegisterId == questionRegister.QuestionRegisterId |
|
|
|
orderby questionSubjectType.DisplayOrder |
|
|
|
select new |
|
|
|
{ |
|
|
|
questionSubjectType, |
|
|
|
@ -171,9 +172,11 @@ namespace Shentun.WebPeis.QuestionRegisters |
|
|
|
}).ToList(); |
|
|
|
foreach (var personSubjectTypeDto in personSubjectTypeDtos) |
|
|
|
{ |
|
|
|
questionRegisterItems.Where(o => o.questionSubjectType.QuestionSubjectTypeId == personSubjectTypeDto.QuestionSubjectTypeId |
|
|
|
).ToList(); |
|
|
|
foreach(var questionRegisterItem in questionRegisterItems) |
|
|
|
var questionSubjectTypeItems = questionRegisterItems.Where(o => |
|
|
|
o.questionSubjectType.QuestionSubjectTypeId == personSubjectTypeDto.QuestionSubjectTypeId |
|
|
|
) |
|
|
|
.OrderBy(o=>o.questionAnswer.DisplayOrder).ToList(); |
|
|
|
foreach(var questionRegisterItem in questionSubjectTypeItems) |
|
|
|
{ |
|
|
|
string answer; |
|
|
|
if(questionRegisterItem.questionAnswer.AnswerResultType == AnswerResultTypeFlag.Choice) |
|
|
|
@ -191,6 +194,10 @@ namespace Shentun.WebPeis.QuestionRegisters |
|
|
|
{ |
|
|
|
answer = questionRegisterItem.questionRegisterAnswer.Content; |
|
|
|
} |
|
|
|
if(string.IsNullOrWhiteSpace(answer)) |
|
|
|
{ |
|
|
|
continue; |
|
|
|
} |
|
|
|
personSubjectTypeDto.Answers.Add(new PersonSubjectTypeQuestionAnswer() |
|
|
|
{ |
|
|
|
QuestionAnswerName = answer, |
|
|
|
|