|
@@ -10,6 +10,7 @@ import com.miaxis.common.utils.SecurityUtils;
|
|
|
import com.miaxis.common.utils.poi.ExcelUtil;
|
|
|
import com.miaxis.question.domain.QuestionCollection;
|
|
|
import com.miaxis.score.domain.ScoreInfo;
|
|
|
+import com.miaxis.score.dto.ScoreInfoAllDTO;
|
|
|
import com.miaxis.score.dto.ScoreInfoDTO;
|
|
|
import com.miaxis.score.service.IScoreInfoService;
|
|
|
import io.swagger.annotations.*;
|
|
@@ -107,29 +108,39 @@ public class ScoreInfoController extends BaseController{
|
|
|
/**
|
|
|
* 获取预测成功
|
|
|
*/
|
|
|
- @GetMapping(value = "/forecastScore")
|
|
|
- @ApiOperation("获取预测成绩")
|
|
|
- public Response<Integer> getInfo(){
|
|
|
- ScoreInfo scoreInfo = new ScoreInfo();
|
|
|
- scoreInfo.setUserId(SecurityUtils.getLoginUser().getStudent().getId());
|
|
|
- int forecastScore = scoreInfoService.getForecastScore(scoreInfo);
|
|
|
-// Map<String,Object> map = new HashMap<String,Object>();
|
|
|
-// map.put("forecastScore",forecastScore);
|
|
|
- return Response.success(forecastScore);
|
|
|
- }
|
|
|
+// @GetMapping(value = "/forecastScore")
|
|
|
+// @ApiOperation("获取预测成绩")
|
|
|
+// public Response<Integer> getInfo(){
|
|
|
+// ScoreInfo scoreInfo = new ScoreInfo();
|
|
|
+// scoreInfo.setUserId(SecurityUtils.getLoginUser().getStudent().getId());
|
|
|
+// int forecastScore = scoreInfoService.getForecastScore(scoreInfo);
|
|
|
+// return Response.success(forecastScore);
|
|
|
+// }
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 获取预测成功
|
|
|
*/
|
|
|
- @GetMapping(value = "/avgScore")
|
|
|
- @ApiOperation("获取平均成绩")
|
|
|
- public Response<Integer> getAvgScore(){
|
|
|
+// @GetMapping(value = "/avgScore")
|
|
|
+// @ApiOperation("获取平均成绩")
|
|
|
+// public Response<Integer> getAvgScore(){
|
|
|
+// ScoreInfo scoreInfo = new ScoreInfo();
|
|
|
+// scoreInfo.setUserId(SecurityUtils.getLoginUser().getStudent().getId());
|
|
|
+// int aveScore = scoreInfoService.getAveScore(scoreInfo);
|
|
|
+// return Response.success(aveScore);
|
|
|
+// }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取最大成绩,平均成绩,预测成绩
|
|
|
+ */
|
|
|
+ @GetMapping(value = "/getScoreInfoAll")
|
|
|
+ @ApiOperation("获取最大成绩,平均成绩,预测成绩")
|
|
|
+ public Response<ScoreInfoAllDTO> getScoreInfoAll(){
|
|
|
ScoreInfo scoreInfo = new ScoreInfo();
|
|
|
scoreInfo.setUserId(SecurityUtils.getLoginUser().getStudent().getId());
|
|
|
- int aveScore = scoreInfoService.getAveScore(scoreInfo);
|
|
|
-// Map<String,Object> map = new HashMap<String,Object>();
|
|
|
-// map.put("forecastScore",forecastScore);
|
|
|
- return Response.success(aveScore);
|
|
|
+ ScoreInfoAllDTO scoreInfoAllDTO = scoreInfoService.getScoreInfoAll(scoreInfo);
|
|
|
+ return Response.success(scoreInfoAllDTO);
|
|
|
}
|
|
|
}
|