|
@@ -206,41 +206,6 @@ public class RWDDownloadUtil {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public static void Read_scaleplate(RepositoryImpl Repository) throws Exception {
|
|
|
- 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("tmp-" + "scaleplate" + ".json", FastJsonUtil.toFormatString(array));
|
|
|
- Repository.scaleplate.set = RWDUtil.array2SDOList(array);
|
|
|
- Repository.addWaitCompute(Repository.scaleplate);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
public static boolean Process_physical_world(LogOfDownload LogOfDownload) throws Exception {
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
|
|
|
String validPath = Constant.getLatestPath(Constant.physical_world, true);
|