| | |
| | | Map<String, Long> map = new HashMap<>(); |
| | | //总销售金额 |
| | | List<SalesDelivery> salesDeliveries = salesDeliveryMapper.selectList(null); |
| | | long sum = salesDeliveries.stream().mapToLong(value -> Long.parseLong(value.getPrice().toString())).sum(); |
| | | map.put("price",sum/1000);//单位w |
| | | BigDecimal sum = salesDeliveries.stream() |
| | | .map(item -> item.getPrice() != null ? new BigDecimal(item.getPrice().toString()) : BigDecimal.ZERO) |
| | | .reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | long finalPrice = sum.divide(new BigDecimal("1000"), 0, RoundingMode.HALF_UP).longValue(); |
| | | |
| | | map.put("price", finalPrice);//单位w |
| | | //总发货单 |
| | | map.put("delivery",salesDeliveries.stream().count()); |
| | | map.put("delivery", (long) salesDeliveries.size()); |
| | | //总销售区? |
| | | //累计客户 |
| | | Long count = customerMapper.selectCount(null); |