xujiaheng 3 jaren geleden
bovenliggende
commit
327f8e7078

+ 1 - 1
src/main/java/com/persagy/apm/alarmservice/project/alarmcondition/service/impl/AlarmConditionServiceImpl.java

@@ -80,7 +80,7 @@ public class AlarmConditionServiceImpl extends ServiceImpl<AlarmConditionMapper,
                 StringBuffer displayFormula = new StringBuffer();
                 displayFormula.append(calculateMethodDTO.getMonitorIndicatorName()).append(calculateMethodDTO.getOperator());
                 for (Formula formula : formulas) {
-                    if (formula.getValue() != null) {
+                    if (StringUtils.isNotBlank(formula.getValue())) {
                         nullString.append(formula.getValue()).append("==NaN").append(" || ");
                         notNullString.append(formula.getValue()).append("!=NaN").append(" && ");
                         tempFormula.append(formula.getValue());