|
@@ -0,0 +1,65 @@
|
|
|
+package cn.com.qmth.examcloud.app.controller;
|
|
|
+
|
|
|
+import static cn.com.qmth.examcloud.app.model.Constants.PARAM_APP_KEY;
|
|
|
+import static cn.com.qmth.examcloud.app.model.Constants.PARAM_APP_TOKEN;
|
|
|
+
|
|
|
+import javax.validation.Valid;
|
|
|
+
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.ModelAttribute;
|
|
|
+import org.springframework.web.bind.annotation.PathVariable;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestHeader;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+import cn.com.qmth.examcloud.app.model.GetYunSignatureReq;
|
|
|
+import cn.com.qmth.examcloud.app.model.Result;
|
|
|
+import cn.com.qmth.examcloud.app.service.CoreOeService;
|
|
|
+import cn.com.qmth.examcloud.web.support.ControllerSupport;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+
|
|
|
+@RestController
|
|
|
+@RequestMapping("${$rmp}/v2/exam")
|
|
|
+@Api(tags = "考试相关接口")
|
|
|
+public class ExamController extends ControllerSupport {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private CoreOeService oeService;
|
|
|
+
|
|
|
+ @ApiOperation(value = "查询考生的考试批次属性集")
|
|
|
+ @GetMapping("getExamProperty/{examId}/{keys}")
|
|
|
+ public Result getExamPropertyFromCacheByStudentSession(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token,@PathVariable Long examId,
|
|
|
+ @PathVariable String keys) throws Exception{
|
|
|
+ return oeService.getExamPropertyFromCacheByStudentSession(key, token, examId, keys);
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 获取云存储上传签名(微信小程序调用)
|
|
|
+ */
|
|
|
+ @ApiOperation(value = "获取文件上传签名")
|
|
|
+ @PostMapping("/yunSignature")
|
|
|
+ public Result getYunSignature(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token,@ModelAttribute @Valid GetYunSignatureReq req) throws Exception{
|
|
|
+ return oeService.getYunSignature(key, token, req);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "获取在线考试待考列表")
|
|
|
+ @GetMapping("/queryExamList")
|
|
|
+ public Result queryExamList(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token) throws Exception{
|
|
|
+ return oeService.queryExamList(key, token);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "获取考试记录信息")
|
|
|
+ @GetMapping("/getEndExamInfo/{examRecordDataId}")
|
|
|
+ public Result getEndExamInfo(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token,@PathVariable Long examRecordDataId) throws Exception{
|
|
|
+ return oeService.getEndExamInfo(key, token,examRecordDataId);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "根据examStudentId获取客观分信息")
|
|
|
+ @GetMapping("/queryObjectiveScoreList/{examStudentId}")
|
|
|
+ public Result queryObjectiveScoreList(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token,@PathVariable Long examStudentId) throws Exception{
|
|
|
+ return oeService.queryObjectiveScoreList(key, token,examStudentId);
|
|
|
+ }
|
|
|
+
|
|
|
+}
|