yanghui
2022-12-06 c1b67dd00934b110c8563fd8ad13267a43f18c1f
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java
@@ -1108,9 +1108,10 @@
                statisticsPhotoVO.setPercent(percent);
            }
        }
        Map<String, StatisticsPhotoVO> circleMap = statisticsPhotoVOS
                .stream()
                .collect(Collectors.toMap(StatisticsPhotoVO::getCountName, Function.identity()));
//        Map<String, StatisticsPhotoVO> circleMap = statisticsPhotoVOS
//                .stream()
//                .collect(Collectors.toMap(StatisticsPhotoVO::getCountName, Function.identity()));
        //按月份查询
        List<StatisticsPhotoVO> statisticsPhotoVOS1 = this.baseMapper.selectPhotoByMonth();
@@ -1135,8 +1136,11 @@
        }
        Map<String, Map<String, StatisticsPhotoVO>> chartMap = statisticsPhotoVOS1.stream().collect(Collectors.groupingBy(StatisticsPhotoVO::getStatisticsDate, Collectors.toMap(StatisticsPhotoVO::getCountName, Function.identity())));
        // 状态 1待处理   2进行中 3已驳回 4待评价 5.已完成
        String[] statusArr = {"dcl","jxz","ybh","dpj","ywc"};
        String[] statusArr = {"待处理","进行中","已驳回","待评价","已完成"};
        List<String> latest12Month = DateUtils.getLatest12Month(LocalDate.now(), 10);
        for (String month : latest12Month) {
            Map<String, StatisticsPhotoVO> map1;
@@ -1151,11 +1155,18 @@
                    statisticsPhotoVO.setCountNum(0);
                    statisticsPhotoVO.setStatisticsDate(month);
                    statisticsPhotoVO.setCountName(status);
                    statisticsPhotoVOS1.add(statisticsPhotoVO);
                    map1.put(status,statisticsPhotoVO);
                }
            }
            chartMap.put(month,map1);
        }
        Map<String, List<StatisticsPhotoVO>> stringListMap = statisticsPhotoVOS1.stream().collect(Collectors.groupingBy(StatisticsPhotoVO::getCountName));
        Map<String,Object> retMap = new HashMap<>();
        retMap.put("statisticsPhotoVOS",statisticsPhotoVOS);
        retMap.put("monthMap",stringListMap);
        return R.ok();
    }