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> <resources>
<resource> <resource>
<directory>src/main/resources</directory> <directory>src/main/resources</directory>
<filtering>true</filtering> <filtering>false</filtering>
<!-- 本地跑时改成true,打包时改成false--> <!-- 本地跑时改成true,打包时改成false-->
</resource> </resource>
<resource> <resource>

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

@ -40,34 +40,26 @@ public class DataGobalController {
/** /**
* 获取数据大屏概览 * 获取数据大屏概览
* 大屏中央数据和地图数据 * 大屏中央数据
* *
* @param beginTime * @param beginTime
* @param endTime * @param endTime
* @return * @return
*/ */
@Operation(summary = "初始化大屏数据") @Operation(summary = "大屏中央数据")
@GetMapping @GetMapping
public Result<JSONObject> getAllGobalCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, public Result<JSONObject> getAllGobalCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 获取数据大屏中央总数概览 // 获取数据大屏中央总数概览
JSONObject overview = dataGobalService.getAllGobalCount(beginTime, 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() JSONObject data = new JSONObject()
.fluentPut("overview", overview) .fluentPut("overview", overview);
.fluentPut("gobalTempMapVoList", gobalTempMapVoList);
return Result.success(data); 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