|
|
|
@ -26,6 +26,7 @@ public class StaticVariable {
|
|
|
|
|
public static List<Jg> jg_Cache = null;
|
|
|
|
|
public static List<Zsb> zsb_Cache = null;
|
|
|
|
|
public static ConcurrentHashMap<Integer, WarnRule> rule_Cache = new ConcurrentHashMap<>();
|
|
|
|
|
public static HashMap<String, Integer> ruleRelationMap = new HashMap<>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 更新服务端
|
|
|
|
@ -49,6 +50,19 @@ public class StaticVariable {
|
|
|
|
|
if (time != null) {
|
|
|
|
|
map.put("acquisitionTime", time);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 规则触发
|
|
|
|
|
String key = eqmid + "_" + colname;
|
|
|
|
|
if (StaticVariable.ruleRelationMap.containsKey(key)) {
|
|
|
|
|
Integer ruleId = StaticVariable.ruleRelationMap.get(key);
|
|
|
|
|
WarnRule rule = StaticVariable.rule_Cache.get(ruleId);
|
|
|
|
|
if (rule != null) {
|
|
|
|
|
boolean r = rule.triggerRule(value);
|
|
|
|
|
if (r) {
|
|
|
|
|
map.put(colname, value + ",1");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 更新最新数据缓存
|
|
|
|
|