|
@@ -543,7 +543,7 @@ public class AlarmConditionServiceImpl extends ServiceImpl<AlarmConditionMapper,
|
|
|
// return ResultHelper.failure(ResponseCode.C0134.getCode(), "内置变量为空");
|
|
|
// }
|
|
|
// 去空格
|
|
|
- expression = expression.replaceAll(" ", "");
|
|
|
+ expression = expression.replaceAll(" ", "").replaceAll("÷","/").replaceAll("x","*");
|
|
|
// 连续运算符处理
|
|
|
if (expression.split("[\\+\\-\\*\\/]{2,}").length > 1) {
|
|
|
return ResultHelper.failure(ResponseCode.C0134.getCode(), "公式不合法");
|