| | |
| | | Double value = null; |
| | | switch (ProcessConfDataTypeEnum.getEumByCode(conf.getDataType())) { |
| | | case DATAPOINT: |
| | | List<String> points = new ArrayList<>(); |
| | | points.add(conf.getPointNo()); |
| | | Map<String, Object> pointsRealValue = dataPointApi.queryPointsRealValue(points); |
| | | if (pointsRealValue.containsKey(conf.getPointNo())) { |
| | | value = Double.valueOf(pointsRealValue.get(conf.getPointNo()).toString()); |
| | | ApiPointValueQueryDTO queryDTO = new ApiPointValueQueryDTO(); |
| | | queryDTO.setPointNo(conf.getPointNo()); |
| | | Calendar calendar = Calendar.getInstance(); |
| | | queryDTO.setEnd(calendar.getTime()); |
| | | calendar.add(Calendar.DAY_OF_YEAR,-1); |
| | | queryDTO.setStart(calendar.getTime()); |
| | | List<ApiPointValueDTO> values = dataPointApi.queryPointHistoryValue(queryDTO); |
| | | if (!CollectionUtils.isEmpty(values)) { |
| | | value = values.get(values.size() - 1).getV(); |
| | | } |
| | | break; |
| | | case IND: |