|
@@ -2,7 +2,10 @@ package com.css.simulation.resource.home.ctrl;
|
|
|
|
|
|
import api.common.pojo.common.PageVO;
|
|
|
import api.common.pojo.common.ResponseBodyVO;
|
|
|
-import api.common.pojo.vo.home.*;
|
|
|
+import api.common.pojo.vo.home.HardwareVO;
|
|
|
+import api.common.pojo.vo.home.LineChartVO;
|
|
|
+import api.common.pojo.vo.home.ServiceVO;
|
|
|
+import api.common.pojo.vo.home.SystemServerVO;
|
|
|
import com.css.simulation.resource.algorithm.service.AlgorithmService;
|
|
|
import com.css.simulation.resource.home.service.HomePageService;
|
|
|
import com.css.simulation.resource.model.service.ConfigService;
|
|
@@ -11,13 +14,13 @@ import com.css.simulation.resource.scene.service.SceneNaturalService;
|
|
|
import com.css.simulation.resource.system.service.ClusterService;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import javax.annotation.Resource;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
@@ -26,29 +29,27 @@ import java.util.Map;
|
|
|
@RestController
|
|
|
@RequestMapping("/homePage")
|
|
|
public class HomePageCtrl {
|
|
|
- @Autowired
|
|
|
- SceneNaturalService sceneNaturalService;
|
|
|
- @Autowired
|
|
|
- AlgorithmService algorithmService;
|
|
|
- @Autowired
|
|
|
- SimulationProjectService simulationProjectService;
|
|
|
- @Autowired
|
|
|
- ConfigService configService;
|
|
|
- @Autowired
|
|
|
- HomePageService homePageService;
|
|
|
- @Autowired
|
|
|
- ClusterService clusterService;
|
|
|
+ @Resource
|
|
|
+ private SceneNaturalService sceneNaturalService;
|
|
|
+ @Resource
|
|
|
+ private AlgorithmService algorithmService;
|
|
|
+ @Resource
|
|
|
+ private SimulationProjectService simulationProjectService;
|
|
|
+ @Resource
|
|
|
+ private ConfigService configService;
|
|
|
+ @Resource
|
|
|
+ private HomePageService homePageService;
|
|
|
+ @Resource
|
|
|
+ private ClusterService clusterService;
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 首页 -- 系统监控 -- 数据概览
|
|
|
- * @return
|
|
|
*/
|
|
|
@PostMapping("/queryAllNum")
|
|
|
@ResponseBody
|
|
|
- public ResponseBodyVO<Map<String,Integer>> queryAllNum() {
|
|
|
-
|
|
|
- Map<String,Integer> map = algorithmService.selectDetailsBySy(); //算法文件数量
|
|
|
+ public ResponseBodyVO<Map<String, Integer>> queryAllNum() {
|
|
|
+ Map<String, Integer> map = algorithmService.selectDetailsBySy(); //算法文件数量
|
|
|
map.put("SySceneNum", sceneNaturalService.querySceneNumBySy());//私有场景数量
|
|
|
map.put("GySceneNum", sceneNaturalService.querySceneNumByGy());//共有场景数量
|
|
|
map.put("ConfigTotal", configService.getConfigTotal()); //车辆配置数量
|
|
@@ -62,9 +63,9 @@ public class HomePageCtrl {
|
|
|
*/
|
|
|
@RequestMapping("selectRunProjectBySy")
|
|
|
@ResponseBody
|
|
|
- public ResponseBodyVO selectRunProjectBySy() {
|
|
|
+ public ResponseBodyVO<List<LineChartVO>> selectRunProjectBySy() {
|
|
|
List<LineChartVO> list = homePageService.selectRunProjectChart();
|
|
|
- return new ResponseBodyVO(ResponseBodyVO.Response.SUCCESS,list);
|
|
|
+ return new ResponseBodyVO<>(ResponseBodyVO.Response.SUCCESS, list);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -72,9 +73,9 @@ public class HomePageCtrl {
|
|
|
*/
|
|
|
@RequestMapping("selectRunTaskBySy")
|
|
|
@ResponseBody
|
|
|
- public ResponseBodyVO selectRunTaskBySy() {
|
|
|
+ public ResponseBodyVO<List<LineChartVO>> selectRunTaskBySy() {
|
|
|
List<LineChartVO> list = homePageService.selectRunTaskChart();
|
|
|
- return new ResponseBodyVO(ResponseBodyVO.Response.SUCCESS,list);
|
|
|
+ return new ResponseBodyVO<>(ResponseBodyVO.Response.SUCCESS, list);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -97,7 +98,6 @@ public class HomePageCtrl {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 评测等级分布-饼图
|
|
|
*/
|
|
@@ -136,7 +136,7 @@ public class HomePageCtrl {
|
|
|
@PreAuthorize("@AuthorityCheck.admin()")
|
|
|
public ResponseBodyVO<List<LineChartVO>> selectAccess() {
|
|
|
List<LineChartVO> list = homePageService.selectAccess();
|
|
|
- return new ResponseBodyVO(ResponseBodyVO.Response.SUCCESS,list);
|
|
|
+ return new ResponseBodyVO(ResponseBodyVO.Response.SUCCESS, list);
|
|
|
}
|
|
|
|
|
|
|