|
@@ -0,0 +1,109 @@
|
|
|
+package com.qmth.exam.reserve.controller.admin;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+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.multipart.MultipartFile;
|
|
|
+
|
|
|
+import com.qmth.boot.api.annotation.Aac;
|
|
|
+import com.qmth.boot.api.constant.ApiConstant;
|
|
|
+import com.qmth.boot.core.collection.PageResult;
|
|
|
+import com.qmth.exam.reserve.bean.login.LoginUser;
|
|
|
+import com.qmth.exam.reserve.bean.stdapply.CategoryVO;
|
|
|
+import com.qmth.exam.reserve.bean.stdapply.StdApplyReq;
|
|
|
+import com.qmth.exam.reserve.bean.stdapply.StdApplyVO;
|
|
|
+import com.qmth.exam.reserve.controller.BaseController;
|
|
|
+import com.qmth.exam.reserve.service.ApplyTaskService;
|
|
|
+import com.qmth.exam.reserve.service.CategoryService;
|
|
|
+import com.qmth.exam.reserve.service.ExamSiteService;
|
|
|
+import com.qmth.exam.reserve.service.StudentApplyService;
|
|
|
+
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import io.swagger.annotations.ApiParam;
|
|
|
+
|
|
|
+@RestController
|
|
|
+@Api(tags = "考生预约明细相关接口")
|
|
|
+@RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + "/apply")
|
|
|
+@Aac(strict = false, auth = false)
|
|
|
+public class StudentApplyControl extends BaseController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private StudentApplyService studentApplyService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ApplyTaskService applyTaskService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private CategoryService categoryService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ExamSiteService examSiteService;
|
|
|
+
|
|
|
+ @ApiOperation(value = "预约任务列表")
|
|
|
+ @PostMapping(value = "/task/list")
|
|
|
+ public List<CategoryVO> listTask() {
|
|
|
+ return applyTaskService.listTask();
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "教学点列表")
|
|
|
+ @PostMapping(value = "/teaching/list")
|
|
|
+ public List<CategoryVO> listTeaching() {
|
|
|
+ LoginUser user = this.curLoginUser();
|
|
|
+ return categoryService.listTeaching(user);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "考点列表")
|
|
|
+ @PostMapping(value = "/agent/list")
|
|
|
+ public List<CategoryVO> listAgent(@ApiParam("教学点ID") @RequestParam Long id) {
|
|
|
+ return examSiteService.listExamSite(id);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "考生预约名单详情分页")
|
|
|
+ @PostMapping(value = "/std/page")
|
|
|
+ public PageResult<StdApplyVO> page(@RequestBody StdApplyReq req) {
|
|
|
+ return studentApplyService.page(req);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "取消预约")
|
|
|
+ @PostMapping(value = "/std/cancel")
|
|
|
+ public void cancel(@ApiParam("预约结果ID") @RequestParam Long id) {
|
|
|
+ // TODO 在可取消预约范围内
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "导入预考模版下载")
|
|
|
+ @PostMapping(value = "/std/preexam/template/download")
|
|
|
+ public void download() {
|
|
|
+ // TODO
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "导入预考")
|
|
|
+ @PostMapping(value = "/std/upload")
|
|
|
+ public void upload(MultipartFile file, @ApiParam("教学点ID") @RequestParam Long teachingId) {
|
|
|
+ // TODO
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "一键自动分配")
|
|
|
+ @PostMapping(value = "/std/auto/assign")
|
|
|
+ public void autoAssign() {
|
|
|
+ // TODO 只有学校管理员和第一阶段结束之后第二阶段开始之前,才可以点击
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "打印签到表")
|
|
|
+ @PostMapping(value = "/std/auto/sign/in/print")
|
|
|
+ public void printSignIn(@ApiParam("教学点ID") @RequestParam Long teachingId) {
|
|
|
+ // TODO 教学点才能打印
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "自动排考")
|
|
|
+ @PostMapping(value = "/std/auto/layout")
|
|
|
+ public void autoLayout(@ApiParam("教学点ID") @RequestParam Long teachingId) {
|
|
|
+ // TODO 自动将各教学点下待考试的考生分配考场和座位号,并生成准考证号码
|
|
|
+ }
|
|
|
+
|
|
|
+}
|