From 7cf455d9e9dd66a13c01b3e5d6536a4b3ce7bfbf Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期四, 16 十月 2025 18:09:00 +0800 Subject: [PATCH] 项目管理代码生成 --- ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AssetStatisticsController.java | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AssetStatisticsController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AssetStatisticsController.java index e5f61c6..65c9707 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AssetStatisticsController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AssetStatisticsController.java @@ -138,10 +138,10 @@ query.setDeptIds(deptIds); } } - String[] dateList = query.getDate().split(","); + String[] dateList = query.getDate().split("-"); String month = dateList[1]; int monthValue = Integer.parseInt(month); - int year = LocalDateTime.now().getYear(); + int year = Integer.parseInt(dateList[0]); LocalDateTime firstDay = LocalDateTime.of(year, monthValue, 1, 0, 0, 0); LocalDateTime lastDay = LocalDateTime.of(year, monthValue, YearMonth.of(year, monthValue).lengthOfMonth(), 23, 59, 59); @@ -192,10 +192,10 @@ query.setDeptIds(deptIds); } } - String[] dateList = query.getDate().split(","); + String[] dateList = query.getDate().split("-"); String month = dateList[1]; int monthValue = Integer.parseInt(month); - int year = LocalDateTime.now().getYear(); + int year = Integer.parseInt(dateList[0]); LocalDateTime firstDay = LocalDateTime.of(year, monthValue, 1, 0, 0, 0); LocalDateTime lastDay = LocalDateTime.of(year, monthValue, YearMonth.of(year, monthValue).lengthOfMonth(), 23, 59, 59); @@ -267,7 +267,5 @@ res.setPageList(pageList); return R.ok(res); } - - } -- Gitblit v1.7.1