|
@@ -1308,28 +1308,29 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
|
|
|
if (!ExamMode.CET.equals(exam.getMode())) {
|
|
|
throw new StatusException("该考试不是CET");
|
|
|
}
|
|
|
- List<ExportCetVo> iPage = baseMapper
|
|
|
+ List<ExportCetVo> dataList = baseMapper
|
|
|
.listCetMarkingPage(query);
|
|
|
- if (CollectionUtils.isNotEmpty(iPage)) {
|
|
|
+ if (CollectionUtils.isNotEmpty(dataList)) {
|
|
|
String imageTransferDir = sysProperty.getTransferDir();
|
|
|
Map<String, List<QuestionEntity>> structs = new HashMap<>();
|
|
|
Map<Integer, AnswerCardEntity> cardMap = new HashMap<>();
|
|
|
- new BatchSetDataUtil<ExportCetVo>() {
|
|
|
-
|
|
|
- @Override
|
|
|
- protected void setData(List<ExportCetVo> dataList) {
|
|
|
- List<Long> ids = dataList.stream().map(e -> e.getId()).collect(Collectors.toList());
|
|
|
- List<PaperPageCetVo> totalpages = paperPageService.listByStudentIds(ids);
|
|
|
- List<PaperCetVo> totalpapers = paperService.findByStudentIds(ids);
|
|
|
- Map<Long, List<PaperPageCetVo>> totalpagesmap = ofPage(totalpages);
|
|
|
- Map<Long, List<PaperCetVo>> totalpapersmap = ofPaper(totalpapers);
|
|
|
- for (ExportCetVo vo : dataList) {
|
|
|
- disposeStudent(vo, paperTypeBarcodeContents, totalpagesmap.get(vo.getId()),
|
|
|
- totalpapersmap.get(vo.getId()), imageTransferDir, structs, cardMap);
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- }.setDataForBatch(iPage, 200);
|
|
|
+ List<Long> ids = dataList.stream().map(e -> e.getId()).collect(Collectors.toList());
|
|
|
+ List<PaperPageCetVo> totalpages = paperPageService.listByStudentIds(ids);
|
|
|
+ List<PaperCetVo> totalpapers = paperService.findByStudentIds(ids);
|
|
|
+ for (ExportCetVo vo: dataList) {
|
|
|
+ Map<Long, List<PaperPageCetVo>> totalpagesmap = ofPage(totalpages);
|
|
|
+ Map<Long, List<PaperCetVo>> totalpapersmap = ofPaper(totalpapers);
|
|
|
+ disposeStudent(vo, paperTypeBarcodeContents, totalpagesmap.get(vo.getId()),
|
|
|
+ totalpapersmap.get(vo.getId()), imageTransferDir, structs, cardMap);
|
|
|
+ }
|
|
|
+// new BatchSetDataUtil<ExportCetVo>() {
|
|
|
+//
|
|
|
+// @Override
|
|
|
+// protected void setData(List<ExportCetVo> dataList) {
|
|
|
+//
|
|
|
+//
|
|
|
+// }
|
|
|
+// }.setDataForBatch(iPage, 200);
|
|
|
}
|
|
|
return iPage;
|
|
|
}
|