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)),
@@ -897,7 +897,7 @@
                String type = car.replaceAll("3", "人脸");
                monitor.setCameraFunType(type);
            }
            StringBuilder tag = new StringBuilder("" + (monitor.getProvinceTag() ? "省厅、" : "") + (monitor.getImportantTag() ? "重点点位、" : "") + (monitor.getImportantCommandImageTag() ? "重点指挥图像、" : "") + (monitor.getDeptTag() ? "部级、" : ""));
            StringBuilder tag = new StringBuilder("" + (monitor.getProvinceTagVideo() ? "省厅视频、" : "") + (monitor.getProvinceTagCar() ? "省厅车辆、" : "")+ (monitor.getProvinceTagFace() ? "省厅人脸、" : "")+ (monitor.getImportantTag() ? "重点点位、" : "") + (monitor.getImportantCommandImageTag() ? "重点指挥图像、" : "") + (monitor.getDeptTag() ? "部级、" : ""));
            //动态列处理加在标签里
            if (!CollectionUtils.isEmpty(monitor.getDynamicColumnList())) {
                List<DynamicColumnVO> dynamicColumnList = monitor.getDynamicColumnList();
@@ -976,7 +976,6 @@
            results.add(homecarVO);
        }
        //TODO:在线修改,需要把检测海康优云检测的结果存入mongo,mongo查点位在线
        MongoCollection<Document> onlineCollection = database.getCollection("t_monitor_online");
        // 构建基本的$match条件
        List<Document> onlineMatch = new ArrayList<>();