| | |
| | | if (0!=all){ |
| | | BigDecimal countNum = new BigDecimal(statisticsPhotoVO.getCountNum()); |
| | | BigDecimal allDecimal = new BigDecimal(all); |
| | | BigDecimal percent = countNum.divide(allDecimal,2, BigDecimal.ROUND_HALF_DOWN); |
| | | BigDecimal percent = countNum.divide(allDecimal,4, BigDecimal.ROUND_HALF_DOWN).multiply(new BigDecimal(100)); |
| | | statisticsPhotoVO.setPercent(percent); |
| | | } |
| | | } |
| | |
| | | if (0L!=sum) { |
| | | BigDecimal countNum = new BigDecimal(statisticsPhotoVO.getCountNum()); |
| | | BigDecimal sumDecimal = new BigDecimal(sum); |
| | | BigDecimal percent = countNum.divide(sumDecimal, 2, BigDecimal.ROUND_HALF_DOWN); |
| | | BigDecimal percent = countNum.divide(sumDecimal, 4, BigDecimal.ROUND_HALF_DOWN).multiply(new BigDecimal(100)); |
| | | statisticsPhotoVO.setPercent(percent); |
| | | } |
| | | } |
| | |
| | | } |
| | | chartMap.put(month,map1); |
| | | } |
| | | Map<String, List<StatisticsPhotoVO>> stringListMap = statisticsPhotoVOS1.stream().collect(Collectors.groupingBy(StatisticsPhotoVO::getCountName)); |
| | | Map<String, List<StatisticsPhotoVO>> stringListMap = statisticsPhotoVOS1 |
| | | .stream() |
| | | .sorted(Comparator.comparing(StatisticsPhotoVO::getStatisticsDate)) |
| | | .collect(Collectors.groupingBy(StatisticsPhotoVO::getCountName)); |
| | | |
| | | |
| | | Map<String,Object> retMap = new HashMap<>(); |