|
@@ -183,7 +183,7 @@ public class RepositoryImpl extends RepositoryBase {
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
|
|
|
|
- public void refresh_children() {
|
|
|
|
|
|
+ private void refresh_rwd2zkt() {
|
|
for (SceneDataObject classItem : this.ZKTClassArray.set) {
|
|
for (SceneDataObject classItem : this.ZKTClassArray.set) {
|
|
String ibmsSceneCode = (String) classItem.get("ibmsSceneCode").value_prim.value;
|
|
String ibmsSceneCode = (String) classItem.get("ibmsSceneCode").value_prim.value;
|
|
String ibmsClassCode = (String) classItem.get("ibmsClassCode").value_prim.value;
|
|
String ibmsClassCode = (String) classItem.get("ibmsClassCode").value_prim.value;
|
|
@@ -197,14 +197,14 @@ public class RepositoryImpl extends RepositoryBase {
|
|
SceneDataValue sdv = this.ZKTObjectArrayDic.get(ibmsSceneCode).get(ibmsClassCode);
|
|
SceneDataValue sdv = this.ZKTObjectArrayDic.get(ibmsSceneCode).get(ibmsClassCode);
|
|
for (SceneDataObject obj : sdv.value_array.set) {
|
|
for (SceneDataObject obj : sdv.value_array.set) {
|
|
if (obj.father != null) {
|
|
if (obj.father != null) {
|
|
- this.sdv2Children.putIfAbsent(obj.father, new CopyOnWriteArrayList<SceneDataObject>());
|
|
|
|
- this.sdv2Children.get(obj.father).add(obj);
|
|
|
|
|
|
+ this.dependency.sdv2Children.putIfAbsent(obj.father, new CopyOnWriteArrayList<SceneDataObject>());
|
|
|
|
+ this.dependency.sdv2Children.get(obj.father).add(obj);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- public void refresh_dependency() {
|
|
|
|
|
|
+ private void refresh_iot2SetColumn() {
|
|
for (String key : this.objectArrayDic.keySet()) {
|
|
for (String key : this.objectArrayDic.keySet()) {
|
|
if (this.objTypeMap.containsKey(key)) {
|
|
if (this.objTypeMap.containsKey(key)) {
|
|
continue;
|
|
continue;
|
|
@@ -221,7 +221,7 @@ public class RepositoryImpl extends RepositoryBase {
|
|
String Key = infoCode;
|
|
String Key = infoCode;
|
|
SceneDataValue sdv = obj.get(Key);
|
|
SceneDataValue sdv = obj.get(Key);
|
|
if (sdv != null) {
|
|
if (sdv != null) {
|
|
- this.dependency.add_iot(sdv, objectArray, Key);
|
|
|
|
|
|
+ this.dependency.add_sdv2SetColumn(sdv, objectArray, Key);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else if (RWDUtil.getInfoType(info) == 2) {
|
|
} else if (RWDUtil.getInfoType(info) == 2) {
|
|
@@ -230,7 +230,7 @@ public class RepositoryImpl extends RepositoryBase {
|
|
String Key = infoCode;
|
|
String Key = infoCode;
|
|
SceneDataValue sdv = obj.get(Key);
|
|
SceneDataValue sdv = obj.get(Key);
|
|
if (sdv != null) {
|
|
if (sdv != null) {
|
|
- this.dependency.add_iot(sdv, objectArray, Key);
|
|
|
|
|
|
+ this.dependency.add_sdv2SetColumn(sdv, objectArray, Key);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -238,8 +238,31 @@ public class RepositoryImpl extends RepositoryBase {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- public void clear_children() {
|
|
|
|
- this.sdv2Children.clear();
|
|
|
|
|
|
+ private void refresh_alarm2SetColumn() {
|
|
|
|
+ for (String classCode : this.objectArrayDic.keySet()) {
|
|
|
|
+ if (!this.code2objTypeMap.containsKey(classCode)) {
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+ String objType = this.code2objTypeMap.get(classCode);
|
|
|
|
+ if (!objType.equals("equipment") && !objType.equals("system") && !objType.equals("space")) {
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+ SceneDataSet objectArray = this.objectArrayDic.get(classCode).value_array;
|
|
|
|
+ for (int i = 0; i < objectArray.set.size(); i++) {
|
|
|
|
+ SceneDataObject objectItem = objectArray.set.get(i);
|
|
|
|
+ SceneDataValue sdv = objectItem.get("报警数量");
|
|
|
|
+ this.dependency.add_sdv2SetColumn(sdv, objectArray, "报警数量");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void refresh_dependency() {
|
|
|
|
+ // 构建zkt到rwd的依赖
|
|
|
|
+ this.refresh_rwd2zkt();
|
|
|
|
+ // 构建IOT到对象信息点的依赖
|
|
|
|
+ this.refresh_iot2SetColumn();
|
|
|
|
+ // 构建报警数量到对象信息点的依赖
|
|
|
|
+ this.refresh_alarm2SetColumn();
|
|
}
|
|
}
|
|
|
|
|
|
public int[] recomputeIOT() {
|
|
public int[] recomputeIOT() {
|
|
@@ -252,14 +275,14 @@ public class RepositoryImpl extends RepositoryBase {
|
|
SceneDataValue sdv = RepositoryContainer.RepositoryProject.point2sdv.get(point);
|
|
SceneDataValue sdv = RepositoryContainer.RepositoryProject.point2sdv.get(point);
|
|
if (sdv.value_prim.value != null) {
|
|
if (sdv.value_prim.value != null) {
|
|
item_count++;
|
|
item_count++;
|
|
- affect_count += this.recompute_point(point);
|
|
|
|
|
|
+ affect_count += this.ProcessIOT(point);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
for (String point : RepositoryContainer.RepositoryProject.set2sdv.keySet()) {
|
|
for (String point : RepositoryContainer.RepositoryProject.set2sdv.keySet()) {
|
|
SceneDataValue sdv = RepositoryContainer.RepositoryProject.set2sdv.get(point);
|
|
SceneDataValue sdv = RepositoryContainer.RepositoryProject.set2sdv.get(point);
|
|
if (sdv.value_prim.value != null) {
|
|
if (sdv.value_prim.value != null) {
|
|
item_count++;
|
|
item_count++;
|
|
- affect_count += this.recompute_point(point);
|
|
|
|
|
|
+ affect_count += this.ProcessIOT(point);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -289,13 +312,16 @@ public class RepositoryImpl extends RepositoryBase {
|
|
return counts;
|
|
return counts;
|
|
}
|
|
}
|
|
|
|
|
|
- public int recompute_point(String point) {
|
|
|
|
|
|
+ public int ProcessIOT(String point) {
|
|
int add_count = 0;
|
|
int add_count = 0;
|
|
- if (this.point2ObjectInfoList.containsKey(point)) {
|
|
|
|
- List<ObjectInfo> ObjectInfoList = this.point2ObjectInfoList.get(point);
|
|
|
|
- for (ObjectInfo ObjectInfo : ObjectInfoList) {
|
|
|
|
- SceneDataValue sdv = ObjectInfo.obj.get(ObjectInfo.infoCode);
|
|
|
|
- add_count += this.addWaitCompute(sdv);
|
|
|
|
|
|
+ if (this.enable_factor) {
|
|
|
|
+ if (this.point2ObjectInfoList.containsKey(point)) {
|
|
|
|
+ List<ObjectInfo> ObjectInfoList = this.point2ObjectInfoList.get(point);
|
|
|
|
+ for (ObjectInfo ObjectInfo : ObjectInfoList) {
|
|
|
|
+ SceneDataValue sdv = ObjectInfo.obj.get(ObjectInfo.infoCode);
|
|
|
|
+ // this.ComputeOccur(sdv);
|
|
|
|
+ add_count += this.addWaitCompute(sdv);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return add_count;
|
|
return add_count;
|