From 3add1f8ab325dff968d5c2b94985700419ea1ccb Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期三, 19 二月 2025 09:46:32 +0800
Subject: [PATCH] 运维监控报表接口统计sql重新编写
---
ycl-server/src/main/java/com/ycl/task/MonitorTask.java | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/ycl-server/src/main/java/com/ycl/task/MonitorTask.java b/ycl-server/src/main/java/com/ycl/task/MonitorTask.java
index b57ea36..b13a2cd 100644
--- a/ycl-server/src/main/java/com/ycl/task/MonitorTask.java
+++ b/ycl-server/src/main/java/com/ycl/task/MonitorTask.java
@@ -29,6 +29,7 @@
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
@@ -61,7 +62,10 @@
private YwPointMapper ywPointMapper;
@Autowired
private RedisTemplate redisTemplate;
-
+ @Value("${DH.userName}")
+ public String userName;
+ @Value("${DH.password}")
+ public String password;
//鍚屾鐐逛綅鍦ㄧ嚎鐜囧埌mongo(寮冪敤)
// public void siteOnline() {
// log.info("寮�濮嬪悓姝ョ偣浣嶅湪绾跨巼鍒癿ongo");
@@ -104,7 +108,6 @@
//鍑嗗鎻掑叆鐐逛綅琛ㄧ殑鏁版嵁
List<YwPoint> ywPointList = new ArrayList<>();
-
//鍏ㄥ勾鐣欏瓨
for (MonitorQualifyResult result : oneMachineFileResults) {
TMonitor monitor = getMonitor(result, monitorVOMap, osdMap);
@@ -132,7 +135,7 @@
//鑰佽澶囩姸鎬佹敼涓轰笉鍙備笌鑰冩牳
if (!points.contains(key)) {
value.setExamineStatus(Boolean.FALSE);
- //鍗曚綅璁剧疆涓虹┖锛圱ODO锛氫负鍟ワ級
+ //鍗曚綅璁剧疆涓虹┖
value.setUnitId(null);
ywPointList.add(value);
}
@@ -170,6 +173,8 @@
ywPoint.setCreateTime(new Date());
ywPoint.setUpdateTime(new Date());
ywPoint.setOnline(ApiConstants.UY_OnlineSite_Unknown);
+ ywPoint.setUsername(userName);
+ ywPoint.setPassword(password);
}
//鐘舵�佽缃负鑰冩牳璁惧
ywPoint.setExamineStatus(Boolean.TRUE);
--
Gitblit v1.8.0