add 三年统计改为2021 - 2025年
This commit is contained in:
@@ -237,14 +237,13 @@ public class IndexService {
|
||||
}
|
||||
|
||||
public List<HistogramVO> withinThreeYears() {
|
||||
int yearInt = DateUtil.year(new DateTime());
|
||||
List<YearMoneyDTO> yearMoneyDTOList = payWorkingGroupMapper.getYearMoneyDTO();
|
||||
Map<String, String> map = yearMoneyDTOList.stream()
|
||||
.collect(Collectors.toMap(YearMoneyDTO::getYear, YearMoneyDTO::getAllMoney, (key1, key2) -> key2));
|
||||
List<HistogramVO> histogramVOList = new ArrayList<>();
|
||||
for (int i = 2; i >= 0 ; i--) {
|
||||
for (int i = 2021; i <= 2025 ; i++) {
|
||||
HistogramVO histogramVO = new HistogramVO();
|
||||
String year = String.valueOf(yearInt - i);
|
||||
String year = String.valueOf(i);
|
||||
histogramVO.setName(year);
|
||||
histogramVO.setAllMoney(map.getOrDefault(year, "0"));
|
||||
histogramVOList.add(histogramVO);
|
||||
|
||||
Reference in New Issue
Block a user