| | |
| | | package com.iailab.module.data.point.collection.handler; |
| | | |
| | | import com.iailab.framework.common.util.string.StrUtils; |
| | | import com.iailab.module.data.common.enums.CommonConstant; |
| | | import com.iailab.module.data.common.enums.DataTypeEnum; |
| | | import com.iailab.module.data.common.enums.JsErrorCode; |
| | |
| | | pointNos.add(s); |
| | | dataMap.putAll(measureHandle.getCurrent(pointNos)); |
| | | dataMap.putAll(constantHandle.getCurrent(pointNos)); |
| | | expression = expression.replace(s, dataMap.get(s).toString()); |
| | | String valueStr = dataMap.get(s).toString(); |
| | | if (StrUtils.isNumeric(valueStr) && new BigDecimal(valueStr).compareTo(CommonConstant.BAD_VALUE) == 0) { |
| | | log.info("BAD_VALUE:" + s); |
| | | } |
| | | if (StrUtils.isNumeric(valueStr) && new BigDecimal(valueStr).compareTo(BigDecimal.ZERO) < 0) { |
| | | valueStr = "(" + valueStr + ")"; |
| | | } |
| | | expression = expression.replace(s, valueStr); |
| | | } |
| | | expression = expression.replace("&", "&&"); |
| | | expression = expression.replace("|", "||"); |