2 Commits 2a77e38cef ... 8ba141ed63

Autor SHA1 Mensaje Fecha
  menglu 8ba141ed63 Merge branch 'master' of http://git.sagacloud.cn/IBMS/ibms-sdk hace 3 años
  menglu f28ffe569f 简化过滤逻辑 hace 3 años

+ 26 - 24
ibms-data-sdk/src/main/java/com/persagy/ibms/data/sdk/util/RWDRepositoryUtil.java

@@ -183,6 +183,7 @@ public class RWDRepositoryUtil {
 	}
 
 	// 根据信息点是否显示过滤设备类型
+	@SuppressWarnings("unused")
 	private static void filter_by_info_point_new(RepositoryImpl Repository, SceneObject sceneObject) throws Exception {
 		Map<String, String> SceneName2Code = new ConcurrentHashMap<String, String>();
 		for (SceneDataObject SceneDataObject : Repository.ZKTSceneArray.set) {
@@ -420,30 +421,31 @@ public class RWDRepositoryUtil {
 					}
 					String ibmsSceneCode = null;
 					String ibmsClassCode = null;
-					if (spList != null && spList.propertyValueType.equals("query")) {
-						JSONObject query_sql = JSON.parseObject(spList.query_sql);
-						JSONObject Target = query_sql.getJSONObject("Target");
-						String Source = Target.getString("Source");
-						if (Source.equals("zkt-object")) {
-							ibmsSceneCode = Target.getString("ibmsSceneCode");
-							ibmsClassCode = Target.getString("ibmsClassCode");
-						} else if (Source.equals("ibms-group")) {
-							JSONObject Criteria = query_sql.getJSONObject("Criteria");
-							ibmsSceneCode = Criteria.getString("ibmsSceneCode");
-							ibmsClassCode = Criteria.getString("ibmsClassCode");
-						} else if (Source.equals("ref")) {
-							String ref = Target.getString("ref");
-							String[] splits = ref.split("'");
-							if (splits.length >= 6) {
-								String type1 = splits[2];
-								String type2 = splits[4];
-								if (type1.startsWith("名称=") && type2.startsWith("名称=")) {
-									ibmsSceneCode = SceneName2Code.get(type1.substring("名称=".length()));
-									ibmsClassCode = SceneClassName.get(ibmsSceneCode).get(type2.substring("名称=".length()));
-								}
-							}
-						}
-					} else {
+					// if (spList != null && spList.propertyValueType.equals("query")) {
+					// JSONObject query_sql = JSON.parseObject(spList.query_sql);
+					// JSONObject Target = query_sql.getJSONObject("Target");
+					// String Source = Target.getString("Source");
+					// if (Source.equals("zkt-object")) {
+					// ibmsSceneCode = Target.getString("ibmsSceneCode");
+					// ibmsClassCode = Target.getString("ibmsClassCode");
+					// } else if (Source.equals("ibms-group")) {
+					// JSONObject Criteria = query_sql.getJSONObject("Criteria");
+					// ibmsSceneCode = Criteria.getString("ibmsSceneCode");
+					// ibmsClassCode = Criteria.getString("ibmsClassCode");
+					// } else if (Source.equals("ref")) {
+					// String ref = Target.getString("ref");
+					// String[] splits = ref.split("'");
+					// if (splits.length >= 6) {
+					// String type1 = splits[2];
+					// String type2 = splits[4];
+					// if (type1.startsWith("名称=") && type2.startsWith("名称=")) {
+					// ibmsSceneCode = SceneName2Code.get(type1.substring("名称=".length()));
+					// ibmsClassCode = SceneClassName.get(ibmsSceneCode).get(type2.substring("名称=".length()));
+					// }
+					// }
+					// }
+					// } else
+					{
 						ibmsSceneCode = SceneCode;
 						ibmsClassCode = SceneClassName.get(ibmsSceneCode).get(spName.static_value);
 					}