|
@@ -197,7 +197,8 @@ public class RWDRepositoryUtil {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- String[] parentPathArray = { "基础对象类型'设备", "基础对象'设备", "基础对象'品质", "基础对象'运营", "基础对象'安全", "基础对象'系统", "基础对象'逻辑编组" };
|
|
|
+ String[] parentPathArray = { "基础对象类型'设备", "基础对象'设备", "基础对象'品质", "基础对象'运营", "基础对象'安全", "基础对象'系统", "基础对象'逻辑编组", "场景数据'设备", "场景数据'品质", "场景数据'运营",
|
|
|
+ "场景数据'安全" };
|
|
|
// String[] parentPathArray = { "基础对象类型'设备" };
|
|
|
// String[] parentPathArray = { "基础对象'系统" };
|
|
|
List<SceneProperty> equipTypeList = new ArrayList<SceneProperty>();
|
|
@@ -208,59 +209,102 @@ public class RWDRepositoryUtil {
|
|
|
List<Object> tmpList = PathUtil.getByPath(sceneObject, parentPath);
|
|
|
for (Object tmp : tmpList) {
|
|
|
SceneProperty spInner = (SceneProperty) tmp;
|
|
|
- for (SceneObject soScene : spInner.static_array) {
|
|
|
- String SceneName = null;
|
|
|
- for (SceneProperty spInner2 : soScene.propertyList) {
|
|
|
- if (spInner2.propertyName.equals("名称")) {
|
|
|
- SceneName = spInner2.static_value;
|
|
|
- break;
|
|
|
+ if (spInner.propertyValueType.equals("static") && spInner.propertyValueSchema.equals("JSONArray")) {
|
|
|
+ for (SceneObject soScene : spInner.static_array) {
|
|
|
+ String SceneName = null;
|
|
|
+ for (SceneProperty spInner2 : soScene.propertyList) {
|
|
|
+ if (spInner2.propertyName.equals("名称")) {
|
|
|
+ SceneName = spInner2.static_value;
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- if (!SceneName2Code.containsKey(SceneName)) {
|
|
|
- continue;
|
|
|
- }
|
|
|
- String SceneCode = SceneName2Code.get(SceneName);
|
|
|
+ if (!SceneName2Code.containsKey(SceneName)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ String SceneCode = SceneName2Code.get(SceneName);
|
|
|
|
|
|
- SceneProperty equipType = null;
|
|
|
- SceneProperty equipType_gl = null;
|
|
|
- SceneProperty gailan = null;
|
|
|
- for (SceneProperty spInner2 : soScene.propertyList) {
|
|
|
- if (spInner2.propertyName.equals("设备类型")) {
|
|
|
- equipType = spInner2;
|
|
|
- } else if (spInner2.propertyName.equals("系统概览")) {
|
|
|
- if (spInner2.propertyValueType.equals("static") && spInner2.propertyValueSchema.equals("JSONArray")) {
|
|
|
- gailan = spInner2;
|
|
|
- } else {
|
|
|
- for (SceneProperty spInner2_att : spInner2.query_attached) {
|
|
|
- if (spInner2_att.propertyName.equals("设备类型")) {
|
|
|
- equipType_gl = spInner2_att;
|
|
|
- break;
|
|
|
+ SceneProperty equipType = null;
|
|
|
+ SceneProperty equipType_gl = null;
|
|
|
+ SceneProperty gailan = null;
|
|
|
+ for (SceneProperty spInner2 : soScene.propertyList) {
|
|
|
+ if (spInner2.propertyName.equals("设备类型")) {
|
|
|
+ equipType = spInner2;
|
|
|
+ } else if (spInner2.propertyName.equals("系统概览")) {
|
|
|
+ if (spInner2.propertyValueType.equals("static") && spInner2.propertyValueSchema.equals("JSONArray")) {
|
|
|
+ gailan = spInner2;
|
|
|
+ } else {
|
|
|
+ for (SceneProperty spInner2_att : spInner2.query_attached) {
|
|
|
+ if (spInner2_att.propertyName.equals("设备类型")) {
|
|
|
+ equipType_gl = spInner2_att;
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if (equipType != null) {
|
|
|
+ equipTypeList.add(equipType);
|
|
|
+ SceneCodeList.add(SceneCode);
|
|
|
+ SceneNameList.add(SceneName);
|
|
|
+ PathList.add(parentPath + "'" + "名称=" + SceneName + "'" + "设备类型");
|
|
|
+ }
|
|
|
+ if (equipType_gl != null) {
|
|
|
+ equipTypeList.add(equipType_gl);
|
|
|
+ SceneCodeList.add(SceneCode);
|
|
|
+ SceneNameList.add(SceneName);
|
|
|
+ PathList.add(parentPath + "'" + "名称=" + SceneName + "'系统概览'" + "设备类型");
|
|
|
+ }
|
|
|
+ if (gailan != null) {
|
|
|
+ equipTypeList.add(gailan);
|
|
|
+ SceneCodeList.add(SceneCode);
|
|
|
+ SceneNameList.add(SceneName);
|
|
|
+ PathList.add(parentPath + "'" + "名称=" + SceneName + "'系统概览");
|
|
|
+ }
|
|
|
}
|
|
|
- if (equipType != null) {
|
|
|
- equipTypeList.add(equipType);
|
|
|
- SceneCodeList.add(SceneCode);
|
|
|
- SceneNameList.add(SceneName);
|
|
|
- PathList.add(parentPath + "'" + "名称=" + SceneName + "'" + "设备类型");
|
|
|
- }
|
|
|
- if (equipType_gl != null) {
|
|
|
- equipTypeList.add(equipType_gl);
|
|
|
- SceneCodeList.add(SceneCode);
|
|
|
- SceneNameList.add(SceneName);
|
|
|
- PathList.add(parentPath + "'" + "名称=" + SceneName + "'系统概览'" + "设备类型");
|
|
|
- }
|
|
|
- if (gailan != null) {
|
|
|
- equipTypeList.add(gailan);
|
|
|
- SceneCodeList.add(SceneCode);
|
|
|
- SceneNameList.add(SceneName);
|
|
|
- PathList.add(parentPath + "'" + "名称=" + SceneName + "'系统概览");
|
|
|
+ } else if (spInner.propertyValueType.equals("custom")) {
|
|
|
+ for (SceneProperty spInner2 : spInner.custom_object.propertyList) {
|
|
|
+ String SceneName = spInner2.propertyName;
|
|
|
+ if (!SceneName2Code.containsKey(SceneName)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ String SceneCode = SceneName2Code.get(SceneName);
|
|
|
+
|
|
|
+ SceneProperty floor = null;
|
|
|
+ for (SceneProperty spInner3 : spInner2.custom_object.propertyList) {
|
|
|
+ if (spInner3.propertyName.equals("楼层数据")) {
|
|
|
+ floor = spInner3;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (floor == null) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ SceneProperty equipType = null;
|
|
|
+ SceneProperty gailan = null;
|
|
|
+ for (SceneProperty spInner2_att : floor.query_attached) {
|
|
|
+ if (spInner2_att.propertyName.equals("设备类型")) {
|
|
|
+ equipType = spInner2_att;
|
|
|
+ } else if (spInner2_att.propertyName.equals("系统概览")) {
|
|
|
+ gailan = spInner2_att;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (equipType != null) {
|
|
|
+ equipTypeList.add(equipType);
|
|
|
+ SceneCodeList.add(SceneCode);
|
|
|
+ SceneNameList.add(SceneName);
|
|
|
+ PathList.add(parentPath + "'" + SceneName + "'楼层数据" + "'设备类型");
|
|
|
+ }
|
|
|
+ if (gailan != null) {
|
|
|
+ equipTypeList.add(gailan);
|
|
|
+ SceneCodeList.add(SceneCode);
|
|
|
+ SceneNameList.add(SceneName);
|
|
|
+ PathList.add(parentPath + "'" + SceneName + "'楼层数据" + "'系统概览");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- }
|
|
|
+ } // end for
|
|
|
+ } // end for
|
|
|
for (int i = 0; i < equipTypeList.size(); i++) {
|
|
|
SceneProperty equipType = equipTypeList.get(i);
|
|
|
String SceneCode = SceneCodeList.get(i);
|