|
@@ -3,8 +3,10 @@ package com.qmth.paper.library.business.service.impl;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.qmth.paper.library.business.bean.result.PictureManageDetailResult;
|
|
|
+import com.qmth.paper.library.business.entity.PaperScanTask;
|
|
|
import com.qmth.paper.library.business.mapper.PictureManageMapper;
|
|
|
import com.qmth.paper.library.business.service.PaperLibraryService;
|
|
|
+import com.qmth.paper.library.business.service.PaperScanTaskService;
|
|
|
import com.qmth.paper.library.business.service.PictureManageService;
|
|
|
import com.qmth.paper.library.common.bean.params.DownloadPictureParams;
|
|
|
import com.qmth.paper.library.common.enums.ExceptionResultEnum;
|
|
@@ -25,6 +27,8 @@ public class PictureManageServiceImpl implements PictureManageService {
|
|
|
|
|
|
@Resource
|
|
|
private PictureManageMapper pictureManageMapper;
|
|
|
+ @Resource
|
|
|
+ private PaperScanTaskService paperScanTaskService;
|
|
|
|
|
|
@Resource
|
|
|
private PaperLibraryService paperLibraryService;
|
|
@@ -33,19 +37,21 @@ public class PictureManageServiceImpl implements PictureManageService {
|
|
|
private FileStoreUtil fileStoreUtil;
|
|
|
|
|
|
@Override
|
|
|
- public IPage<PictureManageDetailResult> pageData(List<Long> semesterIds, List<Long> examIds, List<String> courseCodes, List<String> collegeNames,
|
|
|
- List<String> majorNames, List<String> classNames, String teacher, String teachClass, String param, Double minScore, Double maxScore,
|
|
|
- String pictureSymbol, Integer pictureCount, Integer pageNumber, Integer pageSize) {
|
|
|
- IPage<PictureManageDetailResult> picturePage = pictureManageMapper.pageData(new Page<>(pageNumber, pageSize), semesterIds, examIds,
|
|
|
- courseCodes, collegeNames, majorNames, classNames, teacher,
|
|
|
- teachClass, param, minScore, maxScore, pictureSymbol, pictureCount);
|
|
|
+ public IPage<PictureManageDetailResult> pageData(Long semesterId, Long examId, String courseCode, String collegeName,
|
|
|
+ String majorName, String className, String teacher, String teachClass, String param, String startStudentCode, String endStudentCode,
|
|
|
+ String pictureSymbol, Integer pictureCount, Integer pageNumber, Integer pageSize) {
|
|
|
+ IPage<PictureManageDetailResult> picturePage = pictureManageMapper.pageData(new Page<>(pageNumber, pageSize), semesterId, examId,
|
|
|
+ courseCode, collegeName, majorName, className, teacher,
|
|
|
+ teachClass, param, startStudentCode, endStudentCode, pictureSymbol, pictureCount);
|
|
|
List<PictureManageDetailResult> records = picturePage.getRecords();
|
|
|
for (PictureManageDetailResult record : records) {
|
|
|
//一个考生 可能会存在多个批次号
|
|
|
List<String> batchNoList = paperLibraryService.listBatchNo(record.getStudentId());
|
|
|
- if(!batchNoList.isEmpty()) {
|
|
|
+ if (!batchNoList.isEmpty()) {
|
|
|
record.setBatchNo(String.join(",", batchNoList));
|
|
|
}
|
|
|
+ PaperScanTask paperScanTask = paperScanTaskService.getByExamIdAndCourseCode(record.getExamId(), record.getCourseCode());
|
|
|
+ record.setPaperScanTaskId(paperScanTask != null ? paperScanTask.getId() : null);
|
|
|
}
|
|
|
return picturePage;
|
|
|
}
|
|
@@ -86,10 +92,10 @@ public class PictureManageServiceImpl implements PictureManageService {
|
|
|
Integer pictureCount = params.getPictureCount();
|
|
|
List<PictureManageDetailResult> pictureList = pictureManageMapper.pageData(semesterIds, examIds, courseCodes, collegeNames, majorNames,
|
|
|
classNames, teacher, teachClass, param, minScore, maxScore, pictureSymbol, pictureCount);
|
|
|
- for(PictureManageDetailResult result : pictureList) {
|
|
|
+ for (PictureManageDetailResult result : pictureList) {
|
|
|
//一个考生 可能会存在多个批次号
|
|
|
List<String> batchNoList = paperLibraryService.listBatchNo(result.getStudentId());
|
|
|
- if(!batchNoList.isEmpty()) {
|
|
|
+ if (!batchNoList.isEmpty()) {
|
|
|
result.setBatchNo(String.join(",", batchNoList));
|
|
|
}
|
|
|
}
|