|
@@ -205,6 +205,162 @@ public class RWDDownloadUtil {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ * 网络获取管理范围信息
|
|
|
+ *
|
|
|
+ * @param path 路径
|
|
|
+ * @param LogOfDownload 存储信息
|
|
|
+ * @throws Exception 错误信息
|
|
|
+ */
|
|
|
+ public static void Load_info_point_network(String path, LogOfDownload LogOfDownload) throws Exception {
|
|
|
+ FileUtil.deleteRecursive(new File(path));
|
|
|
+ {
|
|
|
+ File root = new File(path);
|
|
|
+ if (!root.exists()) {
|
|
|
+ root.mkdir();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ JSONObject paramNetwork = new JSONObject();
|
|
|
+ paramNetwork.put("groupCode", RepositoryContainer.RepositoryProject.groupCode);
|
|
|
+ paramNetwork.put("projectId", RepositoryContainer.RepositoryProject.projectId);
|
|
|
+
|
|
|
+ String post_network_result = HttpClientUtil.instance("ibms_config").post(Constant.ibms_config_url + "/sdkStatistics/listInfoPointWithProject",
|
|
|
+ paramNetwork.toJSONString());
|
|
|
+ JSONObject resultJSONNetwork = JSON.parseObject(post_network_result);
|
|
|
+ JSONArray contentNetwork = (JSONArray) resultJSONNetwork.get("content");
|
|
|
+
|
|
|
+ String get_network_result = HttpClientUtil.instance("ibms_config").get(Constant.ibms_config_url + "/sdkStatistics/listLatestInfoPointRelation");
|
|
|
+ JSONObject resultJSONNetworkRelation = JSON.parseObject(get_network_result);
|
|
|
+ JSONArray contentNetworkRelation = (JSONArray) resultJSONNetworkRelation.get("content");
|
|
|
+
|
|
|
+ FileUtil.Save(path + Constant.getSeperator() + "info-point-list" + ".json", FastJsonUtil.toFormatString(contentNetwork));
|
|
|
+ FileUtil.Save(path + Constant.getSeperator() + "info-point-relation" + ".json", FastJsonUtil.toFormatString(contentNetworkRelation));
|
|
|
+
|
|
|
+ if(Constant.scaleplate_enable){
|
|
|
+ String[] typeCodes = { "tdb", "rH", "cO2", "cO", "pM2d5" };
|
|
|
+ {
|
|
|
+ JSONArray array = new JSONArray();
|
|
|
+ int value = 29;
|
|
|
+ for (String typeCode : typeCodes) {
|
|
|
+ JSONObject param = new JSONObject();
|
|
|
+ param.put("groupCode", RepositoryContainer.RepositoryProject.groupCode);
|
|
|
+ param.put("projectId", RepositoryContainer.RepositoryProject.projectId);
|
|
|
+ param.put("typeCode", typeCode);
|
|
|
+ String post_result = HttpClientUtil.instance("scaleplate").post(Constant.scaleplate_url + "/listDyeScaleplateByType",
|
|
|
+ param.toJSONString());
|
|
|
+ JSONObject resultJSON = JSON.parseObject(post_result);
|
|
|
+ JSONArray content = (JSONArray) resultJSON.get("content");
|
|
|
+ for (int i = 0; i < content.size(); i++) {
|
|
|
+ JSONObject contentItem = content.getJSONObject(i);
|
|
|
+ String upperLimit = contentItem.getString("upperLimit");
|
|
|
+ String lowerLimit = contentItem.getString("lowerLimit");
|
|
|
+ JSONObject arrayItem = new JSONObject();
|
|
|
+ arrayItem.put("typeCode", typeCode);
|
|
|
+ arrayItem.put("id", contentItem.get("id"));
|
|
|
+ arrayItem.put("数值", value++);
|
|
|
+ arrayItem.put("名称", contentItem.get("name"));
|
|
|
+ arrayItem.put("颜色", contentItem.get("colorValue"));
|
|
|
+ arrayItem.put("上限", (upperLimit == null || upperLimit.length() == 0) ? null : Double.parseDouble(upperLimit));
|
|
|
+ arrayItem.put("下限", (lowerLimit == null || lowerLimit.length() == 0) ? null : Double.parseDouble(lowerLimit));
|
|
|
+ array.add(arrayItem);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ FileUtil.Save(path + Constant.getSeperator() + "scaleplate" + ".json", FastJsonUtil.toFormatString(array));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
public static boolean Process_physical_world(LogOfDownload LogOfDownload) throws Exception {
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
|
|
|
String validPath = Constant.getLatestPath(Constant.physical_world, true);
|