From 3d647966bc41215e72cba86860cce5075896ae93 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期四, 24 十月 2024 17:17:08 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
ycl-server/src/main/java/com/ycl/platform/service/impl/TMonitorServiceImpl.java | 19 ++++++++-----------
1 files changed, 8 insertions(+), 11 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 504cd1b..931cac4 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
@@ -879,8 +879,6 @@
matchConditions.add(new Document("dataType", new Document("$eq", ApiConstants.HK_DataType_CAR)));
if (examineTag != null && examineTag.equals(1)) {
matchConditions.add(new Document("provinceTag", true));
- } else if (examineTag != null && examineTag.equals(2)) {
- matchConditions.add(new Document("deptTag", true));
}
// 鏋勫缓鑱氬悎绠¢亾
List<Document> pipeline = Arrays.asList(
@@ -889,7 +887,6 @@
.append("dataCount", new Document("$sum", "$dataCount"))
)
);
-
// 鎵ц鑱氬悎鏌ヨ骞惰幏鍙栫粨鏋�
AggregateIterable<Document> result = collection.aggregate(pipeline);
for (Document doc : result) {
@@ -899,7 +896,7 @@
results.add(homecarVO);
}
- //mongo鏌ョ偣浣嶅湪绾�
+ //TODO锛氬湪绾夸慨鏀癸紝闇�瑕佹妸妫�娴嬫捣搴蜂紭浜戞娴嬬殑缁撴灉瀛樺叆mongo锛宮ongo鏌ョ偣浣嶅湪绾�
MongoCollection<Document> onlineCollection = database.getCollection("t_monitor_online");
// 鏋勫缓鍩烘湰鐨�$match鏉′欢
List<Document> onlineMatch = new ArrayList<>();
@@ -907,8 +904,6 @@
onlineMatch.add(new Document("monitorType", new Document("$regex", "2")));
if (examineTag != null && examineTag.equals(1)) {
onlineMatch.add(new Document("provinceTag", true));
- } else if (examineTag != null && examineTag.equals(2)) {
- onlineMatch.add(new Document("deptTag", true));
}
// 鏋勫缓鑱氬悎绠¢亾
List<Document> onlinePipeline = Arrays.asList(
@@ -994,8 +989,6 @@
matchConditions.add(new Document("dataType", new Document("$eq", ApiConstants.HK_DataType_FACE)));
if (examineTag != null && examineTag.equals(1)) {
matchConditions.add(new Document("provinceTag", true));
- } else if (examineTag != null && examineTag.equals(2)) {
- matchConditions.add(new Document("deptTag", true));
}
// 鏋勫缓鑱氬悎绠¢亾
List<Document> pipeline = Arrays.asList(
@@ -1022,8 +1015,6 @@
onlineMatch.add(new Document("monitorType", new Document("$regex", "3")));
if (examineTag != null && examineTag.equals(1)) {
onlineMatch.add(new Document("provinceTag", true));
- } else if (examineTag != null && examineTag.equals(2)) {
- onlineMatch.add(new Document("deptTag", true));
}
// 鏋勫缓鑱氬悎绠¢亾
List<Document> onlinePipeline = Arrays.asList(
@@ -1108,7 +1099,13 @@
for (TMonitorResult monitorResult : onlineResult) {
int dayOfMonth = monitorResult.getMongoCreateTime().getDayOfMonth();
String online = "";
- online += monitorResult.getPingOnline() ? "鍦ㄧ嚎" : "绂荤嚎";
+ if(ApiConstants.UY_OnlineSite_Online.equals(monitorResult.getOnline())){
+ online +="鍦ㄧ嚎";
+ }else if(ApiConstants.UY_OnlineSite_Offline.equals(monitorResult.getOnline())){
+ online +="绂荤嚎";
+ }else {
+ online +="鏈煡";
+ }
//鍙嶅皠璧嬪�硷紝瀛楁缁熶竴瀹氫箟涓篸ay+1锛�2锛�3...
Field field = videoDailyExp.getClass().getDeclaredField("day" + dayOfMonth);
field.setAccessible(true);
--
Gitblit v1.8.0