|
|
|
@ -102,6 +102,7 @@ public class QuestionsServiceImpl extends ServiceImpl<QuestionsDao, QuestionsEnt |
|
|
|
|
BeanUtils.copyProperties(item, questionsVO); |
|
|
|
|
|
|
|
|
|
//处理时间格式
|
|
|
|
|
questionsVO.setCreateTime(handleTime(item.getCreateTime())); |
|
|
|
|
questionsVO.setModifyTime(handleTime(item.getModifyTime())); |
|
|
|
|
|
|
|
|
|
return questionsVO; |
|
|
|
@ -359,6 +360,7 @@ public class QuestionsServiceImpl extends ServiceImpl<QuestionsDao, QuestionsEnt |
|
|
|
|
ossService.downloadFiles(response, xlsxTemplate.getFileName()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// TODO 处理时间格式
|
|
|
|
|
@Override |
|
|
|
|
public EvaluationVO evaluation() { |
|
|
|
|
|
|
|
|
@ -410,14 +412,18 @@ public class QuestionsServiceImpl extends ServiceImpl<QuestionsDao, QuestionsEnt |
|
|
|
|
judgmentNum = evaluationRules.getJudgmentNum(); |
|
|
|
|
List<QuestionsEntity> judgments = this.list(queryWrapper.eq("question_type_no", |
|
|
|
|
Constant.QuestionType.TRUE_OR_FALSE.getType())); |
|
|
|
|
|
|
|
|
|
set.addAll(getRandomList(judgmentNum, judgments)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
evaluation.setQuestionNum(singleNum + multipleNum + judgmentNum); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
evaluation.setQuestions(set); |
|
|
|
|
Set<QuestionsVO> collect = set.stream().map(item -> { |
|
|
|
|
QuestionsVO questionsVO = new QuestionsVO(); |
|
|
|
|
BeanUtils.copyProperties(item, questionsVO); |
|
|
|
|
questionsVO.setCreateTime(handleTime(item.getCreateTime())); |
|
|
|
|
questionsVO.setModifyTime(handleTime(item.getModifyTime())); |
|
|
|
|
return questionsVO; |
|
|
|
|
}).collect(Collectors.toSet()); |
|
|
|
|
evaluation.setQuestions(collect); |
|
|
|
|
|
|
|
|
|
return evaluation; |
|
|
|
|
} |
|
|
|
|