|
@@ -2,6 +2,7 @@ package cn.com.qmth.scancentral.controller.admin;
|
|
|
|
|
|
import cn.com.qmth.scancentral.controller.BaseController;
|
|
|
import cn.com.qmth.scancentral.service.ExamService;
|
|
|
+import cn.com.qmth.scancentral.service.StudentImportService;
|
|
|
import cn.com.qmth.scancentral.service.StudentService;
|
|
|
import cn.com.qmth.scancentral.util.ResouceUtil;
|
|
|
import cn.com.qmth.scancentral.vo.ResultVo;
|
|
@@ -22,30 +23,32 @@ import java.util.Map;
|
|
|
@RestController
|
|
|
@Api(tags = "考生导入相关接口")
|
|
|
@RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + "/admin/student")
|
|
|
-@Aac(strict = false, auth = false)
|
|
|
+@Aac(strict = false, auth = true)
|
|
|
public class StudentImportController extends BaseController {
|
|
|
|
|
|
@Autowired
|
|
|
private StudentService studentService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private StudentImportService studentImportService;
|
|
|
+
|
|
|
@Autowired
|
|
|
private ExamService examService;
|
|
|
|
|
|
@ApiOperation(value = "考生导入")
|
|
|
@PostMapping("/import")
|
|
|
public Map<String, Object> studentImport(@RequestParam Long examId, @RequestParam MultipartFile file) {
|
|
|
+ Long taskId = studentImportService.studentImport(examId, file);
|
|
|
+
|
|
|
Map<String, Object> result = new HashMap<>();
|
|
|
- result.put("taskId", 1L);
|
|
|
+ result.put("taskId", taskId);
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "考生导入进度查询")
|
|
|
@PostMapping("/import/progress")
|
|
|
public Map<String, Object> studentImportProgress(@RequestParam Long taskId) {
|
|
|
- Map<String, Object> result = new HashMap<>();
|
|
|
- result.put("progress", 100);
|
|
|
- result.put("errFileUrl", "");
|
|
|
- return result;
|
|
|
+ return studentImportService.studentImportProgress(taskId);
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "查询科目考生数")
|