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