|
@@ -64,7 +64,7 @@ public class PretreatmentRule {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
for (Rule rule : rules) {
|
|
for (Rule rule : rules) {
|
|
- if (!Constants.COMMON_STRING_1.equals(rule.getSet_name_check())) {
|
|
|
|
|
|
+ if (Constants.COMMON_STRING_1.equals(rule.getSet_name_check())) {
|
|
if (StringUtils.isEmpty(rule.getSet_name()) || !result.getName().equals(rule.getSet_name())) {
|
|
if (StringUtils.isEmpty(rule.getSet_name()) || !result.getName().equals(rule.getSet_name())) {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
@@ -102,15 +102,15 @@ public class PretreatmentRule {
|
|
//标准值最优先匹配
|
|
//标准值最优先匹配
|
|
if (compareEqual(result.getValue(), rule.getEq_value())) {
|
|
if (compareEqual(result.getValue(), rule.getEq_value())) {
|
|
content = content + rule.getRemind() == null ? "" : rule.getRemind();
|
|
content = content + rule.getRemind() == null ? "" : rule.getRemind();
|
|
- } else if (compareMin(result.getValue(), rule.getMin_value(), rule.getMin_operator())
|
|
|
|
- && compareMax(result.getValue(), rule.getMax_value(), rule.getMax_operator())
|
|
|
|
|
|
+ } else if (compareMin(result.getValue(), rule.getMax_operator(), rule.getMax_operator())
|
|
|
|
+ && compareMax(result.getValue(), rule.getMin_operator(), rule.getMin_operator())
|
|
&& result.getUnits().equals(rule.getMin_operator())
|
|
&& result.getUnits().equals(rule.getMin_operator())
|
|
&& result.getUnits().equals(rule.getMax_operator())) {
|
|
&& result.getUnits().equals(rule.getMax_operator())) {
|
|
content = content + rule.getRemind() == null ? "" : rule.getRemind();
|
|
content = content + rule.getRemind() == null ? "" : rule.getRemind();
|
|
- } else if (compareMin(result.getValue(), rule.getMin_value(), rule.getMin_operator())
|
|
|
|
|
|
+ } else if (compareMin(result.getValue(), rule.getMax_value(), rule.getMax_operator()) //比最大值小
|
|
&& result.getUnits().equals(rule.getMin_operator())) {
|
|
&& result.getUnits().equals(rule.getMin_operator())) {
|
|
content = content + rule.getRemind() == null ? "" : rule.getRemind();
|
|
content = content + rule.getRemind() == null ? "" : rule.getRemind();
|
|
- } else if (compareMax(result.getValue(), rule.getMax_value(), rule.getMax_operator())
|
|
|
|
|
|
+ } else if (compareMax(result.getValue(), rule.getMin_value(), rule.getMin_operator()) //比最小值大
|
|
&& result.getUnits().equals(rule.getMin_operator())) {
|
|
&& result.getUnits().equals(rule.getMin_operator())) {
|
|
content = content + rule.getRemind() == null ? "" : rule.getRemind();
|
|
content = content + rule.getRemind() == null ? "" : rule.getRemind();
|
|
}
|
|
}
|