| | |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @author PanZhibao |
| | |
| | | default: |
| | | break; |
| | | } |
| | | |
| | | if (!CollectionUtils.isEmpty(dataView.getCurData())) { |
| | | List<Double> curList = dataView.getCurData().stream().map(t -> { |
| | | return new Double(t[1].toString()); |
| | | }).collect(Collectors.toList()); |
| | | dataView.setPreMax(new BigDecimal(curList.stream().mapToDouble(Double::doubleValue).max().getAsDouble()).setScale(2, BigDecimal.ROUND_HALF_UP)); |
| | | dataView.setPreMin(new BigDecimal(curList.stream().mapToDouble(Double::doubleValue).min().getAsDouble()).setScale(2, BigDecimal.ROUND_HALF_UP)); |
| | | } |
| | | |
| | | result.setStartTime(startTime); |
| | | result.setEndTime(endTime); |
| | | result.setCategories(categories); |