|
@@ -136,23 +136,12 @@ public class MatchLogic {
|
|
} else {
|
|
} else {
|
|
//不包含,阈值中,存在任一目标则不报警,都不存在时则报警,出现阈值之外的亦报警
|
|
//不包含,阈值中,存在任一目标则不报警,都不存在时则报警,出现阈值之外的亦报警
|
|
boolean flag = true;
|
|
boolean flag = true;
|
|
- if ("retargetingTagsInclude".equals(indicatorCode) || "population".equals(indicatorCode) || "region".equals(indicatorCode) || "district".equals(indicatorCode)) {
|
|
|
|
- //人群包判断是否存在该对象
|
|
|
|
- for (String thr : thresholds) {
|
|
|
|
- if (values.contains(thr)) {
|
|
|
|
- flag = false;
|
|
|
|
- } else {
|
|
|
|
- return true;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- //判断是否存在关键字。
|
|
|
|
- for (String thr : thresholds) {
|
|
|
|
- if (values.toString().contains(thr)) {
|
|
|
|
- flag = false;
|
|
|
|
- } else {
|
|
|
|
- return true;
|
|
|
|
- }
|
|
|
|
|
|
+ //人群包判断是否存在该对象
|
|
|
|
+ for (String v : values) {
|
|
|
|
+ if (threshold.contains(v)) {
|
|
|
|
+ flag = false;
|
|
|
|
+ } else {
|
|
|
|
+ return true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return flag;
|
|
return flag;
|
|
@@ -167,21 +156,17 @@ public class MatchLogic {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- boolean flag = true;
|
|
|
|
for (String thr : thresholds) {
|
|
for (String thr : thresholds) {
|
|
- if (value.toString().contains(thr)) {
|
|
|
|
- flag = false;
|
|
|
|
- } else {
|
|
|
|
|
|
+ if (!value.contains(thr)) {
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- return flag;
|
|
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
if ("contain".equals(condition)) {
|
|
if ("contain".equals(condition)) {
|
|
- return value.toString().contains(threshold);
|
|
|
|
|
|
+ return value.contains(threshold);
|
|
} else {
|
|
} else {
|
|
- return !value.toString().contains(threshold);
|
|
|
|
|
|
+ return !value.contains(threshold);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|