|
@@ -3,22 +3,16 @@ package com.qmth.exam.reserve.controller.admin;
|
|
|
import java.io.File;
|
|
|
import java.io.IOException;
|
|
|
import java.net.URLEncoder;
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import java.util.*;
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
import com.qmth.boot.tools.excel.ExcelWriter;
|
|
|
import com.qmth.boot.tools.excel.enums.ExcelType;
|
|
|
+import com.qmth.exam.reserve.bean.stdapply.*;
|
|
|
import com.qmth.exam.reserve.bean.studentimport.StudentImportTaskExport;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
@@ -27,10 +21,6 @@ import com.qmth.boot.api.constant.ApiConstant;
|
|
|
import com.qmth.boot.core.collection.PageResult;
|
|
|
import com.qmth.boot.core.exception.StatusException;
|
|
|
import com.qmth.exam.reserve.bean.login.LoginUser;
|
|
|
-import com.qmth.exam.reserve.bean.stdapply.CategoryVO;
|
|
|
-import com.qmth.exam.reserve.bean.stdapply.SignInVO;
|
|
|
-import com.qmth.exam.reserve.bean.stdapply.StudentApplyReq;
|
|
|
-import com.qmth.exam.reserve.bean.stdapply.StudentApplyVO;
|
|
|
import com.qmth.exam.reserve.controller.BaseController;
|
|
|
import com.qmth.exam.reserve.enums.Role;
|
|
|
import com.qmth.exam.reserve.service.ApplyTaskService;
|
|
@@ -173,13 +163,20 @@ public class StudentApplyController extends BaseController {
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "导出考场预约情况表")
|
|
|
- @PostMapping(value = "/export/agent/available")
|
|
|
+ @GetMapping(value = "/export/site/available")
|
|
|
public void exportApplyAvailable(@ApiParam("考点ID") @RequestParam Long examSiteId, HttpServletResponse response) {
|
|
|
try {
|
|
|
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);
|
|
|
+ List<SiteApplyExportVO> exportList = studentApplyService.exportPage(examSiteId);
|
|
|
+ String [] titles= {"测试1" ,"测试2", "测试3"};
|
|
|
+ List<String[]> list = new ArrayList<>();
|
|
|
+ list.add(titles);
|
|
|
+ list.add(titles);
|
|
|
+ list.add(titles);
|
|
|
+ writer.writeDataArrays("考场预约情况表", null, titles, list.iterator());
|
|
|
writer.output(response.getOutputStream());
|
|
|
} catch (IOException e) {
|
|
|
e.printStackTrace();
|