| | |
| | | |
| | | |
| | | } |
| | | |
| | | LocalDate thisMonth = LocalDate.now().minusMonths(0).with(TemporalAdjusters.firstDayOfMonth()); |
| | | Map<String, List<Record>> map = list.stream().collect(groupingBy(Record::getHierarchyName)); |
| | | List<ProjectHiddenDangerTrendVo> resultList = map.entrySet().stream().map(entry -> { |
| | | List<ProjectHiddenDangerTrendVo> resultList = new ArrayList<>(); |
| | | for (Map.Entry<String, List<Record>> entry : map.entrySet()) { |
| | | ProjectHiddenDangerTrendVo vo = new ProjectHiddenDangerTrendVo(); |
| | | vo.setName(entry.getKey()); |
| | | List<Record> value = entry.getValue(); |
| | |
| | | }else { |
| | | vo.setRate(0.00d); |
| | | } |
| | | return vo; |
| | | }).toList(); |
| | | resultList.add(vo) ; |
| | | } |
| | | |
| | | |
| | | return resultList; |