| | |
| | | |
| | | // 构建模板样例数据 |
| | | List<QuestionImportVO> data = new ArrayList<>(4); |
| | | |
| | | // 查出所有的课目(excel下拉数据) |
| | | List<Subject> subjects = subjectMapper.allSubject(new ArrayList<>(), Boolean.TRUE); |
| | | List<String> subjectNameList = subjects.stream().map(Subject::getName).collect(Collectors.toList()); |
| | | |
| | | EasyExcel.write(response.getOutputStream(), QuestionExportData.class) |
| | | .sheet("模板") |
| | | .doWrite(data); |
| | |
| | | } |
| | | vm.setItems(questionEditItemVMS); |
| | | // 清空前后的逗号,以免后续作答判断为错误 |
| | | List<String> str = Arrays.asList(vm.getCorrect().replaceAll("^,+|,+$", "").split(SPLIT)); |
| | | String s = vm.getCorrect().replaceAll("^,+|,+$", ""); |
| | | vm.setCorrect(s); |
| | | List<String> str = Arrays.asList(s.split(SPLIT)); |
| | | |
| | | List<Subject> subjectList = subjectMapper.getNames(vm.getSbNames().split(SPLIT)); |
| | | |
| | |
| | | DISTINCT |
| | | q.id, |
| | | q.question_type, |
| | | q.correct as answer, |
| | | q.correct, |
| | | ttc.content |
| | | FROM |
| | | t_question q |