From 6293aab5383150da9769353c1c350d9156a9ca55 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期日, 01 九月 2024 14:00:05 +0800
Subject: [PATCH] 考核积分排序
---
ycl-server/src/main/java/com/ycl/task/MonitorTask.java | 7 +++----
1 files changed, 3 insertions(+), 4 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 904cd0f..f6267aa 100644
--- a/ycl-server/src/main/java/com/ycl/task/MonitorTask.java
+++ b/ycl-server/src/main/java/com/ycl/task/MonitorTask.java
@@ -57,12 +57,9 @@
private RedisTemplate redisTemplate;
//鍚屾mongodb涓�鏈轰竴妗e埌鏁版嵁搴�
- @Transactional(rollbackFor = Exception.class)
public void synchronize() {
log.info("寮�濮嬪悓姝ongodb涓�鏈轰竴妗e埌鏁版嵁搴�");
- Date date = DateUtils.getDay(2024, 7, 13);
- Query query = new Query(Criteria.where("mongoCreateTime").gte(DateUtils.getDayStart(date)).lt(DateUtils.getDayEnd(date)));
-// Query query = new Query(Criteria.where("mongoCreateTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date())));
+ Query query = new Query(Criteria.where("mongoCreateTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date())));
List<MonitorQualifyResult> oneMachineFileResults = mongoTemplate.find(query, MonitorQualifyResult.class);
//鏁版嵁搴搈onitor琛ㄦ暟鎹�
Map<String, TMonitorVO> monitorVOMap = monitorMapper.selectMonitorVOList().stream().collect(Collectors.toMap(TMonitorVO::getSerialNumber, Function.identity()));
@@ -163,7 +160,9 @@
TMonitor monitor = new TMonitor();
if (monitorVOMap.containsKey(result.getSerialNumber().getValue())) {
monitor.setId(monitorVOMap.get(result.getSerialNumber().getValue()).getId());
+ monitor.setDeviceType(monitorVOMap.get(result.getSerialNumber().getValue()).getDeviceType());
}
+
monitor.setSerialNumber(result.getSerialNumber().getValue());
monitor.setName(result.getName().getValue());
String siteType = result.getJkdwlx().getValue();
--
Gitblit v1.8.0