|
@@ -7,12 +7,11 @@ import cn.seecoder.data.server.utils.enums.UserRole;
|
|
|
import cn.seecoder.data.server.utils.exception.GlobalException;
|
|
import cn.seecoder.data.server.utils.exception.GlobalException;
|
|
|
import cn.seecoder.data.server.vo.Result;
|
|
import cn.seecoder.data.server.vo.Result;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
+@CrossOrigin
|
|
|
@RestController
|
|
@RestController
|
|
|
public class EvaluateController {
|
|
public class EvaluateController {
|
|
|
|
|
|
|
@@ -20,7 +19,7 @@ public class EvaluateController {
|
|
|
EvaluateService evaluateService;
|
|
EvaluateService evaluateService;
|
|
|
|
|
|
|
|
@Auth(roles = {UserRole.SYS})
|
|
@Auth(roles = {UserRole.SYS})
|
|
|
- @RequestMapping("/eval/analysis/{examId}")
|
|
|
|
|
|
|
+ @RequestMapping(value = "/eval/analysis/{examId}", method = RequestMethod.GET)
|
|
|
public Result<Map<String, Map<String,Double>>> evalAnalysisByExamId(@PathVariable("examId") Integer examId) {
|
|
public Result<Map<String, Map<String,Double>>> evalAnalysisByExamId(@PathVariable("examId") Integer examId) {
|
|
|
Map<String, Map<String, Double>> res = evaluateService.analyzeEvalTest(examId);
|
|
Map<String, Map<String, Double>> res = evaluateService.analyzeEvalTest(examId);
|
|
|
if(res == null) throw new GlobalException(ErrorCodeEnum.SERVICE_ERROR_C0001);
|
|
if(res == null) throw new GlobalException(ErrorCodeEnum.SERVICE_ERROR_C0001);
|