Explorar el Código

OTSECB换到管理范围中

menglu hace 3 años
padre
commit
f147e6002e

+ 0 - 69
ibms-data-sdk/src/main/java/com/persagy/ibms/data/sdk/util/RWDLoadUtil.java

@@ -26,12 +26,6 @@ import lombok.extern.slf4j.Slf4j;
 
 @Slf4j
 public class RWDLoadUtil {
-	public static String[] concentrate_types = { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17" };
-	public static String[] concentrate_codes = { "CO", "CO2", "SO", "NOX", "HCHO", "BTX", "TVOC", "PM10", "PM2_5", "SMOG", "BIMI", "HOW", "PH", "SS",
-			"COD", "O2", "NOI" };
-	public static String[] concentrate_names = { "一氧化碳", "二氧化碳", "二氧化硫", "氮氧化物", "甲醛", "苯", "总挥发性有机化合物", "PM10", "PM2.5", "烟雾浓度", "生物微粒", "水硬度",
-			"PH值", "SS值", "COD值", "氧气", "负氧离子" };
-
 	public static void LoadPhysicalWorld(RepositoryImpl Repository) throws Exception {
 		String validPath = Constant.getLatestPath(Constant.physical_world, true);
 
@@ -69,31 +63,6 @@ public class RWDLoadUtil {
 				log.info(infoPath + Constant.getSeperator() + "" + file.getName());
 				try {
 					JSONArray array = FastJsonReaderUtil.Instance().ReadJSONArray(new File(infoPath + Constant.getSeperator() + "" + file.getName()));
-					if (code.equals("OTSECB")) {
-						for (int i = 0; i < concentrate_codes.length; i++) {
-							String info_code = concentrate_codes[i];
-							String info_name = concentrate_names[i];
-							JSONObject info = new JSONObject();
-							info.put("code", info_code);
-							info.put("name", info_name);
-							info.put("category", "SEQUENTIAL");
-							info.put("firstTag", "运行参数");
-							info.put("dataType", "DOUBLE");
-							info.put("unit", "ppm");
-							array.add(info);
-						}
-						for (int i = 0; i < concentrate_codes.length; i++) {
-							String info_code = concentrate_codes[i];
-							String info_name = concentrate_names[i];
-							JSONObject info = new JSONObject();
-							info.put("code", "unitOf" + info_code);
-							info.put("name", info_name + "单位");
-							info.put("category", "STATIC");
-							info.put("firstTag", "技术参数");
-							info.put("dataType", "STRING");
-							array.add(info);
-						}
-					}
 					SceneDataSet SceneDataSet = new SceneDataSet(false, "rwd/info/" + code);
 					SceneDataSet.set = RWDUtil.array2SDOList(array);
 					infoArrayDic.put(code, SceneDataSet);
@@ -120,44 +89,6 @@ public class RWDLoadUtil {
 				String className = Repository.classCode2NameMap.get(code);
 				log.info(objectPath + Constant.getSeperator() + "" + file.getName());
 				JSONArray array = FastJsonReaderUtil.Instance().ReadJSONArray(new File(objectPath + Constant.getSeperator() + "" + file.getName()));
-				if (code.equals("OTSECB")) {
-					for (int ii = 0; ii < array.size(); ii++) {
-						JSONObject arrayItem = (JSONObject) array.get(ii);
-						Map<String, String> concentrateMap = new ConcurrentHashMap<String, String>();
-						Map<String, String> concentrateUnitMap = new ConcurrentHashMap<String, String>();
-						for (int iii = 1; iii <= 5; iii++) {
-							if (arrayItem.containsKey("concentrateSensorType" + iii) && arrayItem.containsKey("concentrate" + iii)) {
-								String sensorType = (String) arrayItem.get("concentrateSensorType" + iii);
-								String point = (String) arrayItem.get("concentrate" + iii);
-								if (sensorType != null && sensorType.length() > 0 && point != null && point.length() > 0) {
-									concentrateMap.put(sensorType, point);
-								}
-								if (arrayItem.containsKey("concentrate" + iii + "Unit")) {
-									String unit = (String) arrayItem.get("concentrate" + iii + "Unit");
-									concentrateUnitMap.put(sensorType, unit);
-								}
-							}
-						}
-						for (int i = 0; i < concentrate_types.length; i++) {
-							String SensorType = concentrate_types[i];
-							String info_code = concentrate_codes[i];
-							if (concentrateMap.containsKey(SensorType)) {
-								arrayItem.put(info_code, concentrateMap.get(SensorType));
-							}
-							if (concentrateUnitMap.containsKey(SensorType)) {
-								arrayItem.put("unitOf" + info_code, concentrateUnitMap.get(SensorType));
-							}
-						}
-						// physicalQuantityType
-						if (arrayItem.containsKey("physicalQuantityType")) {
-							JSONArray unit = (JSONArray) arrayItem.get("physicalQuantityType");
-							for (int i = 0; i < unit.size(); i++) {
-								String ttt = unit.getString(i);
-								arrayItem.put("physicalQuantityType" + ttt, true);
-							}
-						}
-					}
-				}
 				// info_replace
 				if (Repository.code2objTypeMap.containsKey(code)) {
 					String objType = Repository.code2objTypeMap.get(code);