|
@@ -1282,7 +1282,7 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public List<ExportCetVo> exportCetData(ExportCetMarkingQueryVo query) {
|
|
|
|
|
|
+ public List<ExportCetVo> exportCetData(ExportCetMarkingQueryVo query,boolean useSlice) {
|
|
if (query.getExamId() == null) {
|
|
if (query.getExamId() == null) {
|
|
throw new StatusException("examId不能为空");
|
|
throw new StatusException("examId不能为空");
|
|
}
|
|
}
|
|
@@ -1321,7 +1321,7 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
|
|
Map<Long, List<PaperPageCetVo>> totalpagesmap = ofPage(totalpages);
|
|
Map<Long, List<PaperPageCetVo>> totalpagesmap = ofPage(totalpages);
|
|
Map<Long, List<PaperCetVo>> totalpapersmap = ofPaper(totalpapers);
|
|
Map<Long, List<PaperCetVo>> totalpapersmap = ofPaper(totalpapers);
|
|
disposeStudent(vo, paperTypeBarcodeContents, totalpagesmap.get(vo.getId()),
|
|
disposeStudent(vo, paperTypeBarcodeContents, totalpagesmap.get(vo.getId()),
|
|
- totalpapersmap.get(vo.getId()), imageTransferDir, structs, cardMap);
|
|
|
|
|
|
+ totalpapersmap.get(vo.getId()), imageTransferDir, structs, cardMap,useSlice);
|
|
}
|
|
}
|
|
// new BatchSetDataUtil<ExportCetVo>() {
|
|
// new BatchSetDataUtil<ExportCetVo>() {
|
|
//
|
|
//
|
|
@@ -1337,7 +1337,7 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
|
|
|
|
|
|
private void disposeStudent(ExportCetVo student, List<String> paperTypeBarcodeContents, List<PaperPageCetVo> pages,
|
|
private void disposeStudent(ExportCetVo student, List<String> paperTypeBarcodeContents, List<PaperPageCetVo> pages,
|
|
List<PaperCetVo> papers, String imageTransferDir, Map<String, List<QuestionEntity>> structs,
|
|
List<PaperCetVo> papers, String imageTransferDir, Map<String, List<QuestionEntity>> structs,
|
|
- Map<Integer, AnswerCardEntity> cardMap) {
|
|
|
|
|
|
+ Map<Integer, AnswerCardEntity> cardMap,boolean useSlice) {
|
|
pages = pages.stream().sorted(Comparator.comparingInt(PaperPageCetVo::getPaperNumber).thenComparingInt(PaperPageCetVo::getPageIndex))
|
|
pages = pages.stream().sorted(Comparator.comparingInt(PaperPageCetVo::getPaperNumber).thenComparingInt(PaperPageCetVo::getPageIndex))
|
|
.collect(Collectors.toList());
|
|
.collect(Collectors.toList());
|
|
papers = papers.stream().sorted(Comparator.comparingInt(PaperCetVo::getPaperNumber))
|
|
papers = papers.stream().sorted(Comparator.comparingInt(PaperCetVo::getPaperNumber))
|
|
@@ -1375,16 +1375,18 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- List<String> sliceNameList = new ArrayList<>(sliceSet);
|
|
|
|
- sliceNameList.sort((v1, v2) -> Integer.parseInt(v1) > Integer.parseInt(v2) ? 1 : -1);
|
|
|
|
- // 获取图片大小
|
|
|
|
- List<String> sliceImageInfo = new ArrayList<String>();
|
|
|
|
- student.setSliceImageInfo(sliceImageInfo);
|
|
|
|
- for (String sliceName : sliceNameList) {
|
|
|
|
- String mirrorSlicePath = toolExportService.getCetSliceUri(student.getExamId(), student.getExamNumber(),
|
|
|
|
- sliceName);
|
|
|
|
- File targetSliceFile = new File(imageTransferDir + "/" + mirrorSlicePath);
|
|
|
|
- sliceImageInfo.add(sliceName + "-" + targetSliceFile.length());
|
|
|
|
|
|
+ if(useSlice){
|
|
|
|
+ List<String> sliceNameList = new ArrayList<>(sliceSet);
|
|
|
|
+ sliceNameList.sort((v1, v2) -> Integer.parseInt(v1) > Integer.parseInt(v2) ? 1 : -1);
|
|
|
|
+ // 获取图片大小
|
|
|
|
+ List<String> sliceImageInfo = new ArrayList<String>();
|
|
|
|
+ student.setSliceImageInfo(sliceImageInfo);
|
|
|
|
+ for (String sliceName : sliceNameList) {
|
|
|
|
+ String mirrorSlicePath = toolExportService.getCetSliceUri(student.getExamId(), student.getExamNumber(),
|
|
|
|
+ sliceName);
|
|
|
|
+ File targetSliceFile = new File(imageTransferDir + "/" + mirrorSlicePath);
|
|
|
|
+ sliceImageInfo.add(sliceName + "-" + targetSliceFile.length());
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|