| | |
| | | kioTagIds.add(new String[]{item.getSourceId(), item.getTagNo()}); |
| | | } else if (DataSourceType.HTTP.getCode().equals(item.getSourceType())) { |
| | | if (SourceApiEnum.iHyperDB.getCode().equals(item.getSourceName())) { |
| | | if (item.getTagNo() != null && item.getDimension() != null && item.getValueType() != null) { |
| | | httpTagIhd.add(new Object[]{item.getSourceId(), item.getTagNo(), item.getDimension(), item.getValueType()}); |
| | | } |
| | | } |
| | | } |
| | | }); |
| | |
| | | } |
| | | if (DataTypeEnum.FLOAT.getCode().equals(dto.getDataType()) || DataTypeEnum.INT.getCode().equals(dto.getDataType())) { |
| | | BigDecimal rawValue = new BigDecimal(value.toString()); |
| | | if(CommonConstant.BAD_VALUE.compareTo(rawValue) == 0) { |
| | | return CommonConstant.BAD_VALUE; |
| | | } |
| | | // 异常值处理 |
| | | if (rawValue.compareTo(maxValue) > 0 || rawValue.compareTo(minValue) < 0) { |
| | | rawValue = CommonConstant.BAD_VALUE; |
| | | return CommonConstant.BAD_VALUE; |
| | | } |
| | | BigDecimal coefficient = dto.getUnittransfactor() == null ? BigDecimal.ONE : dto.getUnittransfactor(); |
| | | BigDecimal calValue = rawValue.multiply(coefficient); |