Browse Source

增加颜色标尺服务

menglu 3 years ago
parent
commit
38d5f4e478

+ 15 - 4
ibms-data-sdk/src/main/java/com/persagy/ibms/data/sdk/service/DaemonThread.java

@@ -246,18 +246,29 @@ public class DaemonThread extends Thread {
 			}
 
 			RepositoryImpl Repository = RepositoryContainer.instance;
-			log.warn("********************************" + "\t" + "refresh calendar weather start");
+			log.warn("********************************" + "\t" + "refresh calendar start");
 			try {
-				RWDLoadUtil.LoadCalendar(Repository);
+				RWDLoadUtil.Read_calendar(Repository);
 			} catch (Exception e) {
 				log.error(e.getMessage(), e);
 			}
+			log.warn("********************************" + "\t" + "refresh calendar finish");
+			log.warn("********************************" + "\t" + "refresh weather start");
 			try {
-				RWDLoadUtil.LoadWeather(Repository);
+				RWDLoadUtil.Read_weather(Repository);
 			} catch (Exception e) {
 				log.error(e.getMessage(), e);
 			}
-			log.warn("********************************" + "\t" + "refresh calendar weather finish");
+			log.warn("********************************" + "\t" + "refresh weather finish");
+			if (Constant.scaleplate_enable) {
+				log.warn("********************************" + "\t" + "refresh scaleplate start");
+				try {
+					RWDLoadUtil.Read_scaleplate(Repository);
+				} catch (Exception e) {
+					log.error(e.getMessage(), e);
+				}
+				log.warn("********************************" + "\t" + "refresh scaleplate finish");
+			}
 
 			try {
 				log.warn("********************************" + "\t" + "deamon start");

+ 2 - 8
ibms-data-sdk/src/main/java/com/persagy/ibms/data/sdk/service/RefreshThread.java

@@ -116,14 +116,8 @@ public class RefreshThread extends Thread {
 					RepositoryOld.threadStop();
 					// 启动新的计算线程
 					Repository.threadStart();
-					// 激发IOT重算
-					int[] recomputeIOT_counts = Repository.recomputeIOT();
-					log.warn("********************************" + "\t" + "recomputeIOT item: " + recomputeIOT_counts[0] + " affect: "
-							+ recomputeIOT_counts[1]);
-					// 激发报警重算
-					int[] recomputeAlarm_count = Repository.recomputeAlarm();
-					log.warn("********************************" + "\t" + "recomputeAlarm item: " + recomputeAlarm_count[0] + " affect: "
-							+ recomputeAlarm_count[1]);
+					// 重算iot,alarm等
+					Repository.recompute();
 					log.warn("********************************" + "\t" + "recompute finish");
 					for (String resource : LogOfRun.resourceTime_new.keySet()) {
 						RepositoryContainer.RepositoryProject.resourceMap_valid.put(resource, LogOfRun.resourceTime_new.get(resource));

+ 9 - 0
ibms-data-sdk/src/main/java/com/persagy/ibms/data/sdk/util/Constant.java

@@ -63,6 +63,8 @@ public class Constant {
 	public static String alarm_service_name;
 	public static String person_center_url;
 	public static String weather_url;
+	public static boolean scaleplate_enable;
+	public static String scaleplate_url;
 
 	public static Map<String, Map<String, String>> weather_nowMap = new ConcurrentHashMap<String, Map<String, String>>();
 	public static Map<String, Map<String, String>> weather_forecastMap = new ConcurrentHashMap<String, Map<String, String>>();
@@ -170,6 +172,13 @@ public class Constant {
 					weather_url = element.attribute("url").getValue();
 					weather_url = StrUtil.removeSuffix(weather_url, "/");
 				}
+				iter = document.selectNodes("/root/scaleplate").iterator();
+				if (iter.hasNext()) {
+					element = (Element) iter.next();
+					scaleplate_enable = element.attribute("enable").getValue().equalsIgnoreCase("true");
+					scaleplate_url = element.attribute("url").getValue();
+					scaleplate_url = StrUtil.removeSuffix(scaleplate_url, "/");
+				}
 
 				iter = document.selectNodes("/root/config").iterator();
 				if (iter.hasNext()) {

+ 1 - 1
ibms-data-sdk/src/main/java/com/persagy/ibms/data/sdk/util/RWDAlarmUtil.java

@@ -677,7 +677,7 @@ public class RWDAlarmUtil {
 		} catch (Exception e) {
 			log.error(e.getMessage(), e);
 		}
-		RepositoryContainer.instance.recomputeAlarm();
+		RepositoryContainer.instance.recompute_Alarm();
 	}
 
 	public static JSONArray refresh() throws Exception {

+ 0 - 36
ibms-data-sdk/src/main/java/com/persagy/ibms/data/sdk/util/RWDDownloadUtil.java

@@ -157,42 +157,6 @@ public class RWDDownloadUtil {
 		}
 		FileUtil.Save(path + Constant.getSeperator() + "info-point-list" + ".json", FastJsonUtil.toFormatString(InfoPointListArray));
 		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 {

+ 58 - 38
ibms-data-sdk/src/main/java/com/persagy/ibms/data/sdk/util/RWDLoadUtil.java

@@ -694,20 +694,20 @@ public class RWDLoadUtil {
 							svInner.value_prim.value = ibmsClassCode;
 							sdo.put("ibmsClassCode", svInner);
 						}
-//						{
-//							SceneDataValue svInner = new SceneDataValue(null, null, null, null);
-//							svInner.finish = true;
-//							svInner.value_prim = new SceneDataPrimitive();
-//							svInner.value_prim.value = arrayItem.get("ibmsxianshimingcheng");
-//							sdo.put("ibmsxianshimingcheng", svInner);
-//						}
-//						{
-//							SceneDataValue svInner = new SceneDataValue(null, null, null, null);
-//							svInner.finish = true;
-//							svInner.value_prim = new SceneDataPrimitive();
-//							svInner.value_prim.value = arrayItem.get("ibmsxianshibianma");
-//							sdo.put("ibmsxianshibianma", svInner);
-//						}
+						// {
+						// SceneDataValue svInner = new SceneDataValue(null, null, null, null);
+						// svInner.finish = true;
+						// svInner.value_prim = new SceneDataPrimitive();
+						// svInner.value_prim.value = arrayItem.get("ibmsxianshimingcheng");
+						// sdo.put("ibmsxianshimingcheng", svInner);
+						// }
+						// {
+						// SceneDataValue svInner = new SceneDataValue(null, null, null, null);
+						// svInner.finish = true;
+						// svInner.value_prim = new SceneDataPrimitive();
+						// svInner.value_prim.value = arrayItem.get("ibmsxianshibianma");
+						// sdo.put("ibmsxianshibianma", svInner);
+						// }
 						SceneDataObject sodChild = new SceneDataObject(Repository, null, null, SceneDataValue, null, null, sdo);
 						SceneDataSet.set.add(sodChild);
 					}
@@ -818,7 +818,7 @@ public class RWDLoadUtil {
 				SceneDataSet SceneDataSet_level1 = new SceneDataSet(false);
 				SceneDataSet_level1.set = RWDUtil.array2SDOList(level1);
 				arrayDic.put("一级编组", SceneDataSet_level1);
-				FileUtil.Save(product + "-" + "一级编组" + ".json", FastJsonUtil.toFormatString(level1));
+				FileUtil.Save("tmp-" + product + "-" + "一级编组" + ".json", FastJsonUtil.toFormatString(level1));
 				// 自动生成二级编组
 				JSONArray level2 = new JSONArray();
 				for (SceneDataObject sdo : Repository.IBMSGroupArray.set) {
@@ -851,7 +851,7 @@ public class RWDLoadUtil {
 				SceneDataSet SceneDataSet_level2 = new SceneDataSet(false);
 				SceneDataSet_level2.set = RWDUtil.array2SDOList(level2);
 				arrayDic.put("二级编组", SceneDataSet_level2);
-				FileUtil.Save(product + "-" + "二级编组" + ".json", FastJsonUtil.toFormatString(level2));
+				FileUtil.Save("tmp-" + product + "-" + "二级编组" + ".json", FastJsonUtil.toFormatString(level2));
 				// 自动生成回路
 				SceneDataSet zhaominghuilu = arrayDic.get("zhaominghuilu");
 				if (zhaominghuilu == null) {
@@ -941,7 +941,7 @@ public class RWDLoadUtil {
 				SceneDataSet huilu = new SceneDataSet(false);
 				huilu.set = RWDUtil.array2SDOList(huiluArray);
 				arrayDic.put("回路", huilu);
-				FileUtil.Save(product + "-" + "回路" + ".json", FastJsonUtil.toFormatString(huiluArray));
+				FileUtil.Save("tmp-" + product + "-" + "回路" + ".json", FastJsonUtil.toFormatString(huiluArray));
 
 				for (SceneDataObject sdo : huilu.set) {
 					String id = (String) sdo.get("回路编号").value_prim.value;
@@ -986,14 +986,6 @@ public class RWDLoadUtil {
 			SceneDataSet.set = RWDUtil.array2SDOList(classArray);
 			Repository.InfoPointRelationArray = SceneDataSet;
 		}
-
-		File file_interval_range = new File(validPath + Constant.getSeperator() + "interval-range.json");
-		if (file_interval_range.exists()) {
-			JSONArray classArray = FastJsonReaderUtil.Instance().ReadJSONArray(new File(validPath + Constant.getSeperator() + "interval-range.json"));
-			SceneDataSet SceneDataSet = new SceneDataSet(false, "interval-range");
-			SceneDataSet.set = RWDUtil.array2SDOList(classArray);
-			Repository.IntervalRangeListArray = SceneDataSet;
-		}
 	}
 
 	public static void Load_info_point_old(RepositoryImpl Repository) throws Exception {
@@ -1062,15 +1054,6 @@ public class RWDLoadUtil {
 			SceneDataSet.set = RWDUtil.array2SDOList(classArray);
 			Repository.InfoPointRelationArray = SceneDataSet;
 		}
-
-		RWDDownloadUtil.Load_interval_range(validPath);
-		File file_interval_range = new File(validPath + Constant.getSeperator() + "interval-range.json");
-		if (file_interval_range.exists()) {
-			JSONArray classArray = FastJsonReaderUtil.Instance().ReadJSONArray(new File(validPath + Constant.getSeperator() + "interval-range.json"));
-			SceneDataSet SceneDataSet = new SceneDataSet(false, "interval-range");
-			SceneDataSet.set = RWDUtil.array2SDOList(classArray);
-			Repository.IntervalRangeListArray = SceneDataSet;
-		}
 	}
 
 	private static String getValidName(SceneDataObject sdo) {
@@ -1086,7 +1069,7 @@ public class RWDLoadUtil {
 		return result;
 	}
 
-	public static void LoadCalendar(RepositoryImpl Repository) throws Exception {
+	public static void Read_calendar(RepositoryImpl Repository) throws Exception {
 		SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
 		Date currDate = new Date();
 		String dateString = sdf.format(currDate);
@@ -1119,6 +1102,7 @@ public class RWDLoadUtil {
 					modelMap.put(modelId, modelName);
 				}
 			}
+			FileUtil.Save("tmp-" + "IBMSCalendarModel" + ".json", FastJsonUtil.toFormatString(array));
 			Repository.IBMSCalendarModel.set = RWDUtil.array2SDOList(array);
 		}
 		{
@@ -1151,11 +1135,12 @@ public class RWDLoadUtil {
 					}
 				}
 			}
+			FileUtil.Save("tmp-" + "IBMSCalendarBinding" + ".json", FastJsonUtil.toFormatString(arrayToday));
 			Repository.IBMSCalendarBinding.set = RWDUtil.array2SDOList(arrayToday);
 		}
 	}
 
-	public static void LoadWeather(RepositoryImpl Repository) throws Exception {
+	public static void Read_weather(RepositoryImpl Repository) throws Exception {
 		String cityCode = RepositoryContainer.RepositoryProject.projectId.substring(2, 8);
 		{
 			JSONObject arrayItem = new JSONObject();
@@ -1221,9 +1206,44 @@ public class RWDLoadUtil {
 			}
 			JSONArray array = new JSONArray();
 			array.add(arrayItem);
-			Repository.weather.set.clear();
-			Repository.weather.set.addAll(RWDUtil.array2SDOList(array));
+			FileUtil.Save("tmp-" + "weather" + ".json", FastJsonUtil.toFormatString(array));
+			Repository.weather.set = RWDUtil.array2SDOList(array);
 			Repository.addWaitCompute(Repository.weather);
 		}
 	}
+
+	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);
+		}
+	}
 }

+ 17 - 39
ibms-data-sdk/src/main/java/com/persagy/ibms/data/sdk/util/RWDRepositoryUtil.java

@@ -55,41 +55,7 @@ public class RWDRepositoryUtil {
 				RWDLoadUtil.LoadAlarm(Repository, true);
 			}
 		} else {
-			Repository.alarmConfigArray = RepositoryContainer.instance.alarmConfigArray;
-			Repository.alarmConfigTrigger = RepositoryContainer.instance.alarmConfigTrigger;
-
-			Repository.objTypeMap = RepositoryContainer.instance.objTypeMap;
-			Repository.classCode2NameMap = RepositoryContainer.instance.classCode2NameMap;
-			Repository.code2objTypeMap = RepositoryContainer.instance.code2objTypeMap;
-			Repository.classArray = RepositoryContainer.instance.classArray;
-			Repository.infoArrayDic = RepositoryContainer.instance.infoArrayDic;
-			Repository.infoArrayJson = RepositoryContainer.instance.infoArrayJson;
-			Repository.objectArrayDic = RepositoryContainer.instance.objectArrayDic;
-			Repository.objectArrayAll = RepositoryContainer.instance.objectArrayAll;
-			Repository.object2info2point = RepositoryContainer.instance.object2info2point;
-			Repository.point2ObjectInfoList = RepositoryContainer.instance.point2ObjectInfoList;
-			Repository.set2ObjectInfoList = RepositoryContainer.instance.set2ObjectInfoList;
-			Repository.objType2id2Value = RepositoryContainer.instance.objType2id2Value;
-			Repository.relationArrayDic = RepositoryContainer.instance.relationArrayDic;
-			Repository.graphCodeDic = RepositoryContainer.instance.graphCodeDic;
-			Repository.relCodeDic = RepositoryContainer.instance.relCodeDic;
-			Repository.relationAll = RepositoryContainer.instance.relationAll;
-			Repository.id2object = RepositoryContainer.instance.id2object;
-			Repository.id2sdv = RepositoryContainer.instance.id2sdv;
-
-			Repository.ZKTSceneArray = RepositoryContainer.instance.ZKTSceneArray;
-			Repository.ZKTClassArray = RepositoryContainer.instance.ZKTClassArray;
-			Repository.ZKTObjectArrayDic = RepositoryContainer.instance.ZKTObjectArrayDic;
-			Repository.ZKTAlarmTypeArray = RepositoryContainer.instance.ZKTAlarmTypeArray;
-			Repository.subsystem_connect_status = RepositoryContainer.instance.subsystem_connect_status;
-
-			Repository.IBMSGroupArray = RepositoryContainer.instance.IBMSGroupArray;
-			Repository.IBMSArrayDic = RepositoryContainer.instance.IBMSArrayDic;
-
-			Repository.InfoPointListArray = RepositoryContainer.instance.InfoPointListArray;
-			Repository.InfoPointRelationArray = RepositoryContainer.instance.InfoPointRelationArray;
-
-			Repository.IntervalRangeListArray = RepositoryContainer.instance.IntervalRangeListArray;
+			Repository.copyFromRepositoryContainer();
 		}
 
 		// 重新构建依赖关系
@@ -135,17 +101,29 @@ public class RWDRepositoryUtil {
 		log.warn("********************************" + "\t" + "computeAll");
 		ComputeUtil.computeAll(Repository, spListList);
 
-		log.warn("********************************" + "\t" + "refresh calendar weather start");
+		log.warn("********************************" + "\t" + "refresh calendar start");
 		try {
-			RWDLoadUtil.LoadCalendar(Repository);
+			RWDLoadUtil.Read_calendar(Repository);
 		} catch (Exception e) {
 			log.error(e.getMessage(), e);
 		}
+		log.warn("********************************" + "\t" + "refresh calendar finish");
+		log.warn("********************************" + "\t" + "refresh weather start");
 		try {
-			RWDLoadUtil.LoadWeather(Repository);
+			RWDLoadUtil.Read_weather(Repository);
 		} catch (Exception e) {
+			log.error(e.getMessage(), e);
+		}
+		log.warn("********************************" + "\t" + "refresh weather finish");
+		if (Constant.scaleplate_enable) {
+			log.warn("********************************" + "\t" + "refresh scaleplate start");
+			try {
+				RWDLoadUtil.Read_scaleplate(Repository);
+			} catch (Exception e) {
+				log.error(e.getMessage(), e);
+			}
+			log.warn("********************************" + "\t" + "refresh scaleplate finish");
 		}
-		log.warn("********************************" + "\t" + "refresh calendar weather finish");
 
 		try {
 			log.warn("********************************" + "\t" + "deamon start");

+ 95 - 11
ibms-data-sdk/src/main/java/com/persagy/ibms/data/sdk/util/RepositoryImpl.java

@@ -17,6 +17,9 @@ import com.persagy.ibms.core.util.RWDUtil;
 import com.persagy.ibms.core.util.RepositoryBase;
 import com.persagy.ibms.data.sdk.service.websocket.server.WebSocketUtil;
 
+import lombok.extern.slf4j.Slf4j;
+
+@Slf4j
 public class RepositoryImpl extends RepositoryBase {
 	public Map<String, JSONObject> general_queryMap;
 	public RepositoryProject RepositoryProject;
@@ -65,17 +68,15 @@ public class RepositoryImpl extends RepositoryBase {
 	public SceneDataSet IBMSGroupArray = new SceneDataSet(false);
 	public Map<String, Map<String, SceneDataSet>> IBMSArrayDic = new ConcurrentHashMap<String, Map<String, SceneDataSet>>();
 
-	// 日历模式:周期性刷新,不需要拷贝
-	public SceneDataSet IBMSCalendarModel = new SceneDataSet(false, true);
-	public SceneDataSet IBMSCalendarBinding = new SceneDataSet(false, true);
-	public SceneDataSet weather = new SceneDataSet(false, true);
-
 	// 信息点
 	public SceneDataSet InfoPointListArray = new SceneDataSet(false);
 	public SceneDataSet InfoPointRelationArray = new SceneDataSet(false);
 
-	// 区间范围
-	public SceneDataSet IntervalRangeListArray = new SceneDataSet(false);
+	// 日历模式:周期性刷新,不需要拷贝
+	public SceneDataSet IBMSCalendarModel = new SceneDataSet(false, true);
+	public SceneDataSet IBMSCalendarBinding = new SceneDataSet(false, true);
+	public SceneDataSet weather = new SceneDataSet(false, true);
+	public SceneDataSet scaleplate = new SceneDataSet(false, true);
 
 	public RepositoryImpl(RepositoryProject RepositoryProject, boolean use_thread, boolean enable_factor, int thread_count,
 			long interval_between_compute) {
@@ -83,6 +84,42 @@ public class RepositoryImpl extends RepositoryBase {
 		this.RepositoryProject = RepositoryProject;
 	}
 
+	public void copyFromRepositoryContainer() {
+		this.alarmConfigArray = RepositoryContainer.instance.alarmConfigArray;
+		this.alarmConfigTrigger = RepositoryContainer.instance.alarmConfigTrigger;
+
+		this.objTypeMap = RepositoryContainer.instance.objTypeMap;
+		this.classCode2NameMap = RepositoryContainer.instance.classCode2NameMap;
+		this.code2objTypeMap = RepositoryContainer.instance.code2objTypeMap;
+		this.classArray = RepositoryContainer.instance.classArray;
+		this.infoArrayDic = RepositoryContainer.instance.infoArrayDic;
+		this.infoArrayJson = RepositoryContainer.instance.infoArrayJson;
+		this.objectArrayDic = RepositoryContainer.instance.objectArrayDic;
+		this.objectArrayAll = RepositoryContainer.instance.objectArrayAll;
+		this.object2info2point = RepositoryContainer.instance.object2info2point;
+		this.point2ObjectInfoList = RepositoryContainer.instance.point2ObjectInfoList;
+		this.set2ObjectInfoList = RepositoryContainer.instance.set2ObjectInfoList;
+		this.objType2id2Value = RepositoryContainer.instance.objType2id2Value;
+		this.relationArrayDic = RepositoryContainer.instance.relationArrayDic;
+		this.graphCodeDic = RepositoryContainer.instance.graphCodeDic;
+		this.relCodeDic = RepositoryContainer.instance.relCodeDic;
+		this.relationAll = RepositoryContainer.instance.relationAll;
+		this.id2object = RepositoryContainer.instance.id2object;
+		this.id2sdv = RepositoryContainer.instance.id2sdv;
+
+		this.ZKTSceneArray = RepositoryContainer.instance.ZKTSceneArray;
+		this.ZKTClassArray = RepositoryContainer.instance.ZKTClassArray;
+		this.ZKTObjectArrayDic = RepositoryContainer.instance.ZKTObjectArrayDic;
+		this.ZKTAlarmTypeArray = RepositoryContainer.instance.ZKTAlarmTypeArray;
+		this.subsystem_connect_status = RepositoryContainer.instance.subsystem_connect_status;
+
+		this.IBMSGroupArray = RepositoryContainer.instance.IBMSGroupArray;
+		this.IBMSArrayDic = RepositoryContainer.instance.IBMSArrayDic;
+
+		this.InfoPointListArray = RepositoryContainer.instance.InfoPointListArray;
+		this.InfoPointRelationArray = RepositoryContainer.instance.InfoPointRelationArray;
+	}
+
 	public ConcurrentHashMap<SceneDataPrimitive, String> sdv2point() {
 		return RepositoryProject.sdv2point;
 	}
@@ -184,14 +221,14 @@ public class RepositoryImpl extends RepositoryBase {
 			result = this.ZKTAlarmTypeArray;
 		} else if (Source.equals("weather")) {
 			result = this.weather;
+		} else if (Source.equals("scaleplate")) {
+			result = this.scaleplate;
 		} else if (Source.equals("alarm")) {
 			result = this.RepositoryProject.alarmArray;
 		} else if (Source.equals("info-point-list")) {
 			result = this.InfoPointListArray;
 		} else if (Source.equals("info-point-relation")) {
 			result = this.InfoPointRelationArray;
-		} else if (Source.equals("interval-range")) {
-			result = this.IntervalRangeListArray;
 		} else if (Source.equals("subsystem-connect-status")) {
 			result = this.subsystem_connect_status;
 		}
@@ -283,7 +320,54 @@ public class RepositoryImpl extends RepositoryBase {
 		}
 	}
 
-	public int[] recomputeIOT() {
+	public void recompute() {
+		{
+			int[] counts = this.recompute_IOT();
+			log.warn("********************************" + "\t" + "recompute_IOT item: " + counts[0] + " affect: " + counts[1]);
+		}
+		{
+			int[] counts = this.recompute_Alarm();
+			log.warn("********************************" + "\t" + "recompute_Alarm item: " + counts[0] + " affect: " + counts[1]);
+		}
+		// {
+		// int[] counts = this.recompute_weather();
+		// log.warn("********************************" + "\t" + "recompute_weather item: " + counts[0] + " affect: " + counts[1]);
+		// }
+		// if (Constant.scaleplate_enable) {
+		// int[] counts = this.recompute_scaleplate();
+		// log.warn("********************************" + "\t" + "recompute_scaleplate item: " + counts[0] + " affect: " + counts[1]);
+		// }
+	}
+
+	// private int[] recompute_weather() {
+	// int[] counts = new int[2];
+	// int item_count = 0;
+	// int affect_count = 0;
+	// // 加入计算队列
+	// if (this.enable_factor) {
+	// item_count++;
+	// affect_count += this.addWaitCompute(this.weather);
+	// }
+	// counts[0] = item_count;
+	// counts[1] = affect_count;
+	// return counts;
+	// }
+
+	// private int[] recompute_scaleplate() {
+	// int[] counts = new int[2];
+	// int item_count = 0;
+	// int affect_count = 0;
+	// // 加入计算队列
+	// if (this.enable_factor) {
+	// item_count++;
+	// affect_count += this.addWaitCompute(this.scaleplate);
+	// }
+	// counts[0] = item_count;
+	// counts[1] = affect_count;
+	// return counts;
+	// }
+
+	private int[] recompute_IOT() {
 		int[] counts = new int[2];
 		int item_count = 0;
 		int affect_count = 0;
@@ -309,7 +393,7 @@ public class RepositoryImpl extends RepositoryBase {
 		return counts;
 	}
 
-	public int[] recomputeAlarm() {
+	public int[] recompute_Alarm() {
 		int[] counts = new int[2];
 		int item_count = 0;
 		int affect_count = 0;

+ 2 - 0
ibms-data-sdk/src/main/resources/config.xml

@@ -38,6 +38,8 @@
 	<person_center url="http://39.102.40.239:9970/person-center/" />
 	<!-- 天气服务地址 -->
 	<weather url="http://114.215.64.204:9090/EMS_Weather/" />
+	<!-- 标尺服务地址 -->
+	<scaleplate url="http://develop.persagy.com/calendar/dye/sdk/" enable="true" />
 
     <!-- 场景/产品模块编码与后台tab页名称的对应关系 -->
     <SceneCode2TabName sceneCode="ggzm" tabName="公共照明"/>