|
@@ -741,21 +741,26 @@ public class QuesServiceImpl implements QuesService {
|
|
|
Question question = optional.get();
|
|
|
QuestionAnswerBean bean = new QuestionAnswerBean();
|
|
|
List<String> answers = new ArrayList<>();
|
|
|
+ final String separator = "";//默认分隔符
|
|
|
|
|
|
if (QuesStructType.NESTED_ANSWER_QUESTION == question.getQuestionType()) {
|
|
|
List<Question> subQuestions = question.getSubQuestions();
|
|
|
for (Question subQuestion : subQuestions) {
|
|
|
if (QuesStructType.SINGLE_ANSWER_QUESTION == subQuestion.getQuestionType() || QuesStructType.MULTIPLE_ANSWER_QUESTION == subQuestion.getQuestionType()) {
|
|
|
- answers.add(StringUtils.join(QuestionAnswerConvert.parseQuestionOptionAnswerList(subQuestion.getQuesOptions()), ""));
|
|
|
+ List<String> values = QuestionAnswerConvert.parseQuestionOptionAnswerList(subQuestion.getQuesOptions());
|
|
|
+ answers.add(StringUtils.join(values, separator));
|
|
|
} else {
|
|
|
- answers.add(StringUtils.join(QuestionAnswerConvert.parseQuestionAnswerList(subQuestion), ""));
|
|
|
+ List<String> values = QuestionAnswerConvert.parseQuestionAnswerList(subQuestion);
|
|
|
+ answers.add(StringUtils.join(values, separator));
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
if (QuesStructType.SINGLE_ANSWER_QUESTION == question.getQuestionType() || QuesStructType.MULTIPLE_ANSWER_QUESTION == question.getQuestionType()) {
|
|
|
- answers.add(StringUtils.join(QuestionAnswerConvert.parseQuestionOptionAnswerList(question.getQuesOptions()), ""));
|
|
|
+ List<String> values = QuestionAnswerConvert.parseQuestionOptionAnswerList(question.getQuesOptions());
|
|
|
+ answers.add(StringUtils.join(values, separator));
|
|
|
} else {
|
|
|
- answers.add(StringUtils.join(QuestionAnswerConvert.parseQuestionAnswerList(question), ""));
|
|
|
+ List<String> values = QuestionAnswerConvert.parseQuestionAnswerList(question);
|
|
|
+ answers.add(StringUtils.join(values, separator));
|
|
|
}
|
|
|
}
|
|
|
|