|
@@ -4,10 +4,12 @@ import com.jjt.biz.domain.BizObjMetrics;
|
|
|
import com.jjt.biz.domain.IndexMetrics;
|
|
|
import com.jjt.biz.service.IBizObjMetricsService;
|
|
|
import com.jjt.biz.service.IIndexMetricsService;
|
|
|
+import com.jjt.biz.vo.HlScoreVO;
|
|
|
import com.jjt.common.core.controller.BaseController;
|
|
|
import com.jjt.common.core.domain.AjaxResult;
|
|
|
import com.jjt.common.core.page.TableDataInfo;
|
|
|
import com.jjt.common.utils.DateUtils;
|
|
|
+import com.jjt.hl.service.IHlScoreService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
@@ -34,6 +36,8 @@ public class IndexController extends BaseController {
|
|
|
private IIndexMetricsService imService;
|
|
|
@Resource
|
|
|
private IBizObjMetricsService omService;
|
|
|
+ @Resource
|
|
|
+ private IHlScoreService scoreService;
|
|
|
|
|
|
String[] MODEL_NAMES = {"市场服务", "市场出清", "信息发布", "市场合规", "市场结算"};
|
|
|
|
|
@@ -51,15 +55,16 @@ public class IndexController extends BaseController {
|
|
|
@ApiOperation("当前健康度")
|
|
|
@GetMapping("/hl/curr")
|
|
|
public AjaxResult hlCurr() {
|
|
|
- List<Map<String, Object>> result = new ArrayList<>();
|
|
|
- for (int i = 0; i < MODEL_NAMES.length; i++) {
|
|
|
- Map<String, Object> map = new HashMap<>(16);
|
|
|
- map.put("name", MODEL_NAMES[i]);
|
|
|
- Float score = Float.valueOf(new Random().nextInt(50) + 50);
|
|
|
- map.put("score", score);
|
|
|
- result.add(map);
|
|
|
- }
|
|
|
- return AjaxResult.success(result);
|
|
|
+ List<HlScoreVO> list = scoreService.selectHlScoreListLast();
|
|
|
+// List<Map<String, Object>> result = new ArrayList<>();
|
|
|
+// for (int i = 0; i < MODEL_NAMES.length; i++) {
|
|
|
+// Map<String, Object> map = new HashMap<>(16);
|
|
|
+// map.put("name", MODEL_NAMES[i]);
|
|
|
+// Float score = Float.valueOf(new Random().nextInt(50) + 50);
|
|
|
+// map.put("score", score);
|
|
|
+// result.add(map);
|
|
|
+// }
|
|
|
+ return AjaxResult.success(list);
|
|
|
}
|
|
|
|
|
|
@ApiOperation("应用健康趋势-按月")
|