add 三年统计改为2021 - 2025年

This commit is contained in:
lijiarao
2022-09-21 10:00:37 +08:00
parent 7eb86fad94
commit 3ff4bd48ca
2 changed files with 3 additions and 3 deletions
+1
View File
@@ -263,3 +263,4 @@ INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `com
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`) VALUES ('1553997970898395138', '1437320526513905666', '全所收入统计', '/statisticalReport/WholePaymentsStatistics', 'statisticalReport/WholePaymentsStatistics', NULL, NULL, 1, NULL, '1', 10.00, 0, NULL, 1, 0, 0, 0, NULL, 'LKGLZ', '2022-08-01 14:56:03', NULL, NULL, 0, 0, '1', 0);
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`) VALUES ('1553987184549404674', '1435493270476906497', '确认收入', NULL, NULL, NULL, NULL, 2, 'packProject:confirmPayment', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2022-08-01 14:13:11', NULL, NULL, 0, 0, '1', 0);
INSERT INTO `sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`) VALUES ('1570599545738825729', '1435815710331621378', '撤销', '', NULL, NULL, NULL, 2, 'incomePaymentAndInvoiving:revoke', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2022-09-16 10:24:47', NULL, NULL, 0, 0, '1', 0);
@@ -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);