From 1e91849f0a359e005dc3d30babc7540bb489d056 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E7=88=B1=E5=AD=A6=E4=B9=A0=E7=9A=84=E7=9F=B3?= =?UTF-8?q?=E5=90=8C=E5=AD=A6?= <2936013465@qq.com> Date: Fri, 22 Nov 2024 18:14:41 +0800 Subject: [PATCH] =?UTF-8?q?2024/11/22=20=2018=EF=BC=9A14=20=E5=A4=A7?= =?UTF-8?q?=E5=B1=8F=E5=9C=B0=E5=9B=BE=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../controller/datav/DataGobalController.java | 31 ++++++++++++------- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/pom.xml b/pom.xml index 9c1863c..1429e95 100644 --- a/pom.xml +++ b/pom.xml @@ -187,7 +187,7 @@ src/main/resources - true + false diff --git a/src/main/java/com/biutag/supervision/controller/datav/DataGobalController.java b/src/main/java/com/biutag/supervision/controller/datav/DataGobalController.java index b216983..0b03936 100644 --- a/src/main/java/com/biutag/supervision/controller/datav/DataGobalController.java +++ b/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 getAllGobalCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { // 获取数据大屏中央总数概览 JSONObject overview = dataGobalService.getAllGobalCount(beginTime, endTime); - // 地图数据 - List 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 getMap( + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { + + // 地图数据 + List 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); + } + + }