| | |
| | | dList.add(new Document("recordStatus", new Document("$eq", item))); |
| | | if (params.getDataType().equals(1)) { |
| | | dList.add(new Document("provinceTag", new Document("$eq", Boolean.TRUE))); |
| | | }else if(params.getDataType().equals(2)){ |
| | | dList.add(new Document("deptTag", new Document("$eq", Boolean.TRUE))); |
| | | } |
| | | Document filter = new Document("$and", dList); |
| | | // 构建聚合管道 |
| | |
| | | uniqueDeviceIdCount = doc.getInteger("uniqueDeviceIds"); |
| | | break; // 不需要继续遍历,因为 $count 只会产生一个结果 |
| | | } |
| | | return uniqueDeviceIdCount + "%"; |
| | | return uniqueDeviceIdCount + ""; |
| | | }).collect(Collectors.toList()); |
| | | |
| | | Date now = new Date(); |