From 8fc0241701fbc1e942064576d02458921bde9388 Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期三, 19 二月 2025 09:48:19 +0800
Subject: [PATCH] 运维监控报表接口统计sql重新编写
---
ycl-server/src/main/java/com/ycl/platform/service/impl/TMonitorServiceImpl.java | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/ycl-server/src/main/java/com/ycl/platform/service/impl/TMonitorServiceImpl.java b/ycl-server/src/main/java/com/ycl/platform/service/impl/TMonitorServiceImpl.java
index c17d4ee..55976c3 100644
--- a/ycl-server/src/main/java/com/ycl/platform/service/impl/TMonitorServiceImpl.java
+++ b/ycl-server/src/main/java/com/ycl/platform/service/impl/TMonitorServiceImpl.java
@@ -372,16 +372,21 @@
*/
@Override
public Map<String, Object> home(HomeQuery monitorQuery) {
-
+ System.out.println(monitorQuery + "~~~~~~~~~~~~~鎵撳嵃");
Map<String, Object> dataMap = new HashMap<>();
Map<String, Object> monthMap1 = new HashMap<>();
Map<String, Object> monthMap2 = new HashMap<>();
List<Map<String, Object>> home = baseMapper.home(monitorQuery);
if (ObjectUtils.isNotEmpty(home)) {
+ //鎷垮埌鏁版嵁搴� 寰幆鏌ヨ
+ System.out.println(home + "~~~~~~~~~~~~~鎵撳嵃");
for (Map<String, Object> map : home) {
+ //寰楀埌map鐨� months閿殑鍊� num1閿殑鍊� 缁勮涓烘柊瀵硅薄
monthMap1.put(map.get("months").toString(), map.get("num1"));
+ //寰楀埌map鐨� months閿殑鍊� num2閿殑鍊� 缁勮涓烘柊瀵硅薄
monthMap2.put(map.get("months").toString(), map.get("num2"));
}
+ //home 鐨勪笅鏍�0鐨� map鐨� name閿殑鍊�
dataMap.put("name", home.get(0).get("name"));
dataMap.put("state", monthMap1);
dataMap.put("state2", monthMap2);
--
Gitblit v1.8.0