|
@@ -56,6 +56,8 @@ import cn.com.qmth.scancentral.vo.UriVo;
|
|
|
import cn.com.qmth.scancentral.vo.answerquery.AnswerQueryVo;
|
|
|
import cn.com.qmth.scancentral.vo.batchdetail.BatchDetailVo;
|
|
|
import cn.com.qmth.scancentral.vo.mismatchquery.MismatchQueryVo;
|
|
|
+import cn.com.qmth.scancentral.vo.student.StudentExamRoomVo;
|
|
|
+import cn.com.qmth.scancentral.vo.student.StudentVo;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
@@ -232,4 +234,47 @@ public class ScanAnswerController extends BaseController {
|
|
|
return studentService.answerRefix(getAccessUser(), query);
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "按考生导出答题卡扫描详情")
|
|
|
+ @PostMapping(value = "student/export")
|
|
|
+ public void studentExport(@Validated AnswerQueryDomain query, HttpServletResponse response) throws IOException {
|
|
|
+ String fileName = URLEncoder.encode("按考生导出", "UTF-8");
|
|
|
+ response.setHeader("Content-Disposition", "inline; filename=" + fileName + ".xlsx");
|
|
|
+ response.setContentType("application/vnd.ms-excel");
|
|
|
+ ExcelWriter writer = ExcelWriter.create(ExcelType.XLSX);
|
|
|
+ PageListIterator<StudentVo> iterator = new PageListIterator<StudentVo>(5000) {
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Collection<StudentVo> getPageList(int pageNumber, int pageSize) {
|
|
|
+ query.setPageNumber(pageNumber);
|
|
|
+ query.setPageSize(pageSize);
|
|
|
+ return studentService.studentExportList(query);
|
|
|
+ }
|
|
|
+ };
|
|
|
+ writer.writeObjects("按考生导出", null, StudentVo.class, iterator);
|
|
|
+ writer.output(response.getOutputStream());
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "按考场导出答题卡扫描详情")
|
|
|
+ @PostMapping(value = "exam-room/export")
|
|
|
+ public void studentExamRoomExport(@Validated AnswerQueryDomain query, HttpServletResponse response)
|
|
|
+ throws IOException {
|
|
|
+ String fileName = URLEncoder.encode("按考场导出", "UTF-8");
|
|
|
+ response.setHeader("Content-Disposition", "inline; filename=" + fileName + ".xlsx");
|
|
|
+ response.setContentType("application/vnd.ms-excel");
|
|
|
+ ExcelWriter writer = ExcelWriter.create(ExcelType.XLSX);
|
|
|
+ PageListIterator<StudentExamRoomVo> iterator = new PageListIterator<StudentExamRoomVo>(5000) {
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Collection<StudentExamRoomVo> getPageList(int pageNumber, int pageSize) {
|
|
|
+ query.setPageNumber(pageNumber);
|
|
|
+ query.setPageSize(pageSize);
|
|
|
+ return studentService.studentExamRoomExportList(query);
|
|
|
+ }
|
|
|
+ };
|
|
|
+ writer.writeObjects("按考场导出", null, StudentExamRoomVo.class, iterator);
|
|
|
+ writer.output(response.getOutputStream());
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}
|