fuliqi
2024-12-11 5dccf0dc687dfef1c91936af3cea06fe0609b918
ycl-server/src/main/java/com/ycl/platform/service/impl/TMonitorServiceImpl.java
@@ -780,7 +780,7 @@
        MongoDatabase database = mongoTemplate.getDb();
        MongoCollection<Document> collection = database.getCollection("uy_record_meta_d_sum");
        Integer examineTag = monitorQuery.getExamineTag();
        Document matchConditions = new Document("mongoCreateTime", new Document("$gte", startDate).append("$lte", endDate));
        Document matchConditions = new Document("statTime", new Document("$gte", startDate).append("$lte", endDate));
        // 根据examineTag的值动态添加额外的条件
        if (examineTag != null && examineTag.equals(1)) {
            matchConditions.append("provinceTag", true);
@@ -790,7 +790,7 @@
        // 构建聚合管道
        List<Document> pipeline = Arrays.asList(
                new Document("$match", matchConditions),
                new Document("$group", new Document("_id", "$mongoCreateTime")
                new Document("$group", new Document("_id", "$statTime")
                        .append("normalCount", new Document("$sum",
                                new Document("$cond", Arrays.asList(
                                        new Document("$eq", Arrays.asList("$recordStatus", 1)),
@@ -976,7 +976,6 @@
            results.add(homecarVO);
        }
        //TODO:在线修改,需要把检测海康优云检测的结果存入mongo,mongo查点位在线
        MongoCollection<Document> onlineCollection = database.getCollection("t_monitor_online");
        // 构建基本的$match条件
        List<Document> onlineMatch = new ArrayList<>();