暂态报告:监测点报告和区域报告下载速度优化

This commit is contained in:
wurui
2023-02-17 11:22:50 +08:00
parent 3a602068a4
commit 3b591338a6
7 changed files with 1899 additions and 3289 deletions

View File

@@ -53,4 +53,23 @@ public class InfluxDBCommUtils {
}
return lineIdsStr;
}
/**
* 组装为influxdb监测点参数
*
* @param devIds 设备ids参数
* @param name 列明
* @return StringBuilder
*/
public static StringBuilder assToInfluxParamAndName(@NotEmpty List<String> devIds,String name){
StringBuilder lineIdsStr = new StringBuilder("(");
for (int i = 0; i < devIds.size(); i++) {
if (devIds.size() - i != 1) {
lineIdsStr.append(name+" ='").append(devIds.get(i)).append("' or ");
} else {
lineIdsStr.append(name+" ='").append(devIds.get(i)).append("') ");
}
}
return lineIdsStr;
}
}