Browse Source

2024/11/22 18:14 大屏地图优化

main
parent
commit
1e91849f0a
  1. 2
      pom.xml
  2. 31
      src/main/java/com/biutag/supervision/controller/datav/DataGobalController.java

2
pom.xml

@ -187,7 +187,7 @@
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<filtering>false</filtering>
<!-- 本地跑时改成true,打包时改成false-->
</resource>
<resource>

31
src/main/java/com/biutag/supervision/controller/datav/DataGobalController.java

@ -40,34 +40,26 @@ public class DataGobalController {
/**
* 获取数据大屏概览
* 大屏中央数据和地图数据
* 大屏中央数据
*
* @param beginTime
* @param endTime
* @return
*/
@Operation(summary = "初始化大屏数据")
@Operation(summary = "大屏中央数据")
@GetMapping
public Result<JSONObject> getAllGobalCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 获取数据大屏中央总数概览
JSONObject overview = dataGobalService.getAllGobalCount(beginTime, endTime);
// 地图数据
List<GobalMapIconVo> gobalTempMapVoList = dataGobalService.getMapIconInfo(beginTime, endTime);
if (gobalTempMapVoList == null || gobalTempMapVoList.size() == 0) {
gobalTempMapVoList = new ArrayList<>();
}
JSONObject data = new JSONObject()
.fluentPut("overview", overview)
.fluentPut("gobalTempMapVoList", gobalTempMapVoList);
.fluentPut("overview", overview);
return Result.success(data);
}
/**
* 数据大屏问题趋势统计按月展示
*
@ -168,4 +160,21 @@ public class DataGobalController {
}
@Operation(summary = "地图数据")
@GetMapping("/getMap")
public Result<JSONObject> getMap(
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 地图数据
List<GobalMapIconVo> gobalTempMapVoList = dataGobalService.getMapIconInfo(beginTime, endTime);
if (gobalTempMapVoList == null || gobalTempMapVoList.size() == 0) {
gobalTempMapVoList = new ArrayList<>();
}
JSONObject data = new JSONObject()
.fluentPut("gobalTempMapVoList", gobalTempMapVoList);
return Result.success(data);
}
}

Loading…
Cancel
Save