|
@@ -157,6 +157,42 @@ public class RWDDownloadUtil {
|
|
}
|
|
}
|
|
FileUtil.Save(path + Constant.getSeperator() + "info-point-list" + ".json", FastJsonUtil.toFormatString(InfoPointListArray));
|
|
FileUtil.Save(path + Constant.getSeperator() + "info-point-list" + ".json", FastJsonUtil.toFormatString(InfoPointListArray));
|
|
FileUtil.Save(path + Constant.getSeperator() + "info-point-relation" + ".json", FastJsonUtil.toFormatString(InfoPointRelationArray));
|
|
FileUtil.Save(path + Constant.getSeperator() + "info-point-relation" + ".json", FastJsonUtil.toFormatString(InfoPointRelationArray));
|
|
|
|
+
|
|
|
|
+ Load_interval_range(path);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public static void Load_interval_range(String path) throws Exception {
|
|
|
|
+ InputStream stream = Constant.getStream("interval_range.xlsx");
|
|
|
|
+ if (stream != null) {
|
|
|
|
+ JSONArray InfoPointListArray = new JSONArray();
|
|
|
|
+ Map<String, ExcelSheet> sheetMap = ExcelCommonUtil.Read(stream, true);
|
|
|
|
+ for (String sheetName : sheetMap.keySet()) {
|
|
|
|
+ ExcelSheet sheet = sheetMap.get(sheetName);
|
|
|
|
+ for (int i = 0; i < sheet.contentListList.size(); i++) {
|
|
|
|
+ String equipType = ExcelCommonUtil.getContentInner(sheet, "类型", i);
|
|
|
|
+ String name = ExcelCommonUtil.getContentInner(sheet, "名称", i);
|
|
|
|
+ int value = Integer.parseInt(ExcelCommonUtil.getContentInner(sheet, "数值", i));
|
|
|
|
+ String low = ExcelCommonUtil.getContentInner(sheet, "下限", i);
|
|
|
|
+ String high = ExcelCommonUtil.getContentInner(sheet, "上限", i);
|
|
|
|
+ String color = ExcelCommonUtil.getContentInner(sheet, "颜色", i);
|
|
|
|
+ JSONObject pointListItem = new JSONObject();
|
|
|
|
+ {
|
|
|
|
+ pointListItem.put("类型", equipType);
|
|
|
|
+ pointListItem.put("名称", name);
|
|
|
|
+ pointListItem.put("数值", value);
|
|
|
|
+ if (low != null && low.length() > 0) {
|
|
|
|
+ pointListItem.put("下限", Double.parseDouble(low));
|
|
|
|
+ }
|
|
|
|
+ if (high != null && high.length() > 0) {
|
|
|
|
+ pointListItem.put("上限", Double.parseDouble(high));
|
|
|
|
+ }
|
|
|
|
+ pointListItem.put("颜色", color);
|
|
|
|
+ InfoPointListArray.add(pointListItem);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ FileUtil.Save(path + Constant.getSeperator() + "interval-range" + ".json", FastJsonUtil.toFormatString(InfoPointListArray));
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
public static boolean Process_physical_world(LogOfDownload LogOfDownload) throws Exception {
|
|
public static boolean Process_physical_world(LogOfDownload LogOfDownload) throws Exception {
|