From 7cfa09050726578c2cc5114e5bc8a419e6e2e466 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期二, 15 十月 2024 11:03:45 +0800
Subject: [PATCH] 人脸上传数据延迟修复
---
ycl-server/src/main/java/com/ycl/platform/service/impl/DataCenterServiceImpl.java | 54 +++++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 45 insertions(+), 9 deletions(-)
diff --git a/ycl-server/src/main/java/com/ycl/platform/service/impl/DataCenterServiceImpl.java b/ycl-server/src/main/java/com/ycl/platform/service/impl/DataCenterServiceImpl.java
index 2e7fe8a..4dded27 100644
--- a/ycl-server/src/main/java/com/ycl/platform/service/impl/DataCenterServiceImpl.java
+++ b/ycl-server/src/main/java/com/ycl/platform/service/impl/DataCenterServiceImpl.java
@@ -73,7 +73,13 @@
long total = mongoTemplate.count(query, TMonitorResult.class);
MongoUtil.setPage(query, params, TIME_FIELD);
List<TMonitorResult> resultList = mongoTemplate.find(query, TMonitorResult.class);
-
+ resultList.forEach(item->{
+ if(null != item.getPingOnline() && item.getPingOnline()){
+ item.setPingOnlineStr("鍦ㄧ嚎");
+ }else {
+ item.setPingOnlineStr("绂荤嚎");
+ }
+ });
params.setDeptTag(-1);
params.setDeviceType(1);
// 缁熻璁惧鏁伴噺
@@ -110,7 +116,13 @@
long total = mongoTemplate.count(query, TMonitorResult.class);
MongoUtil.setPage(query, params, TIME_FIELD);
List<TMonitorResult> resultList = mongoTemplate.find(query, TMonitorResult.class);
-
+ resultList.forEach(item->{
+ if(null != item.getPingOnline() && item.getPingOnline()){
+ item.setPingOnlineStr("鍦ㄧ嚎");
+ }else {
+ item.setPingOnlineStr("绂荤嚎");
+ }
+ });
// 缁熻璁惧鏁伴噺
params.setDeptTag(1);
params.setDeviceType(1);
@@ -152,7 +164,13 @@
params.setDeviceType(1);
// 缁熻璁惧鏁伴噺
Integer distinctCount = pointMapper.distinctCount(params);
-
+ resultList.forEach(item->{
+ if(null != item.getPingOnline() && item.getPingOnline()){
+ item.setPingOnlineStr("鍦ㄧ嚎");
+ }else {
+ item.setPingOnlineStr("绂荤嚎");
+ }
+ });
Date now = new Date();
List<CheckIndexVideo> videoList = new LambdaQueryChainWrapper<>(checkIndexVideoService.getBaseMapper())
.select(CheckIndexVideo::getKeySiteOnline)
@@ -190,7 +208,13 @@
params.setDeviceType(1);
// 缁熻璁惧鏁伴噺
Integer distinctCount = pointMapper.distinctCount(params);
-
+ resultList.forEach(item->{
+ if(null != item.getPingOnline() && item.getPingOnline()){
+ item.setPingOnlineStr("鍦ㄧ嚎");
+ }else {
+ item.setPingOnlineStr("绂荤嚎");
+ }
+ });
Date now = new Date();
List<CheckIndexVideo> videoList = new LambdaQueryChainWrapper<>(checkIndexVideoService.getBaseMapper())
.select(CheckIndexVideo::getKeyCommandImageOnline)
@@ -888,18 +912,24 @@
//鍒嗛〉鏁伴噺
long total = mongoTemplate.count(query, TMonitorResult.class);
MongoUtil.setPage(query, params, TIME_FIELD);
+ //绯荤粺ping鐨勭粨鏋�
List<TMonitorResult> resultList = mongoTemplate.find(query, TMonitorResult.class);
-
+ //TODO锛氫紭浜戝湪绾跨粨鏋�
params.setDeptTag(-1);
params.setDeviceType(2);
// 缁熻璁惧鏁伴噺
Integer distinctCount = pointMapper.distinctCount(params);
-
- Date now = new Date();
+ resultList.forEach(item->{
+ if(null != item.getPingOnline() && item.getPingOnline()){
+ item.setPingOnlineStr("鍦ㄧ嚎");
+ }else {
+ item.setPingOnlineStr("绂荤嚎");
+ }
+ });
List<CheckIndexCar> videoList = new LambdaQueryChainWrapper<>(checkIndexCarService.getBaseMapper())
.select(CheckIndexCar::getSiteOnline)
.eq(params.getDataType().equals(1), CheckIndexCar::getExamineTag, CheckConstants.Examine_Tag_Province)
- .between(CheckIndexCar::getCreateTime, DateUtils.getDayStart(now), DateUtils.getDayEnd(now))
+ .between(CheckIndexCar::getCreateTime, DateUtils.getDayStart(params.getStartTime()), DateUtils.getDayEnd(params.getEndTime()))
.list();
BigDecimal onlineRate = BigDecimal.ZERO;
if (CollectionUtils.isNotEmpty(videoList)) {
@@ -1391,7 +1421,13 @@
long total = mongoTemplate.count(query, TMonitorResult.class);
MongoUtil.setPage(query, params, TIME_FIELD);
List<TMonitorResult> resultList = mongoTemplate.find(query, TMonitorResult.class);
-
+ resultList.forEach(item->{
+ if(null != item.getPingOnline() && item.getPingOnline()){
+ item.setOnlineStr("鍦ㄧ嚎");
+ }else {
+ item.setOnlineStr("绂荤嚎");
+ }
+ });
params.setDeptTag(-1);
params.setDeviceType(3);
// 缁熻璁惧鏁伴噺
--
Gitblit v1.8.0