Bläddra i källkod

管理范围的产品模块和设备类型都增加别名

menglu 3 år sedan
förälder
incheckning
ed716816e9

+ 10 - 0
ibms-data-sdk/src/main/java/com/persagy/ibms/data/sdk/util/RWDRepositoryUtil.java

@@ -206,8 +206,18 @@ public class RWDRepositoryUtil {
 			String ibmsSceneCode = (String) SceneDataObject.get("ibmsSceneCode").value_prim.value;
 			String ibmsClassCode = (String) SceneDataObject.get("ibmsClassCode").value_prim.value;
 			String name = (String) SceneDataObject.get("名称").value_prim.value;
+			String alias = null;
+			if (SceneDataObject.containsKey("别名")) {
+				alias = (String) SceneDataObject.get("别名").value_prim.value;
+			}
 			SceneClassName.putIfAbsent(ibmsSceneCode, new ConcurrentHashMap<String, String>());
 			SceneClassName.get(ibmsSceneCode).put(name, ibmsClassCode);
+			if (alias != null && alias.length() > 0) {
+				String[] aliasArray = alias.split(",");
+				for (String one_alias : aliasArray) {
+					SceneClassName.get(ibmsSceneCode).put(one_alias, ibmsClassCode);
+				}
+			}
 		}
 		Map<String, Boolean> SceneVisible = new ConcurrentHashMap<String, Boolean>();
 		Map<String, Map<String, Boolean>> SceneClassVisible = new ConcurrentHashMap<String, Map<String, Boolean>>();