From fb331b6c481ae84c82799d7a73fff2d75eb6ed8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E7=90=A6=E6=B6=9B?= Date: Fri, 19 Jan 2024 17:29:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A8=E9=99=A2=E7=BB=8F=E8=90=A5=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=BB=9F=E8=AE=A1=20=20(=E7=B4=AF=E8=AE=A1)=20?= =?UTF-8?q?=E5=85=A8=E9=99=A2=E7=BB=8F=E8=90=A5=E6=95=B0=E6=8D=AE=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1(=E5=8D=95=E6=9C=88)=20=E7=A7=91=E5=AE=A4=E6=80=BB?= =?UTF-8?q?=E4=BD=93=E7=BB=9F=E8=AE=A1=20=E5=A2=9E=E5=8A=A0=E5=B9=B4?= =?UTF-8?q?=E4=BB=BD=E7=9A=84=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jero/index/contoller/IndexController.java | 19 ++++++------------- .../com/jero/index/service/IndexService.java | 19 ++++++++++++------- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/jero-boot-incoming-payment/src/main/java/com/jero/index/contoller/IndexController.java b/jero-boot-incoming-payment/src/main/java/com/jero/index/contoller/IndexController.java index b54e5e80..9045dcb4 100644 --- a/jero-boot-incoming-payment/src/main/java/com/jero/index/contoller/IndexController.java +++ b/jero-boot-incoming-payment/src/main/java/com/jero/index/contoller/IndexController.java @@ -4,23 +4,17 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.jero.common.api.vo.Result; import com.jero.common.aspect.annotation.DictPoint; -import com.jero.common.system.api.ISysBaseAPI; -import com.jero.common.util.oConvertUtils; import com.jero.index.service.IndexService; import com.jero.index.vo.*; -import com.jero.project.service.IPayWorkingGroupService; -import com.jero.statistics.entity.AllMoney; import com.jero.statistics.entity.AllProjectStatistics; import com.jero.statistics.entity.AllProjectStatisticsOther; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.ObjectUtils; import org.jeecgframework.poi.excel.def.NormalExcelConstants; import org.jeecgframework.poi.excel.entity.ExportParams; import org.jeecgframework.poi.excel.entity.enmus.ExcelType; import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; @@ -28,7 +22,6 @@ import org.springframework.web.bind.annotation.RestController; import org.springframework.web.servlet.ModelAndView; import javax.annotation.Resource; -import java.text.DecimalFormat; import java.util.HashMap; import java.util.List; import java.util.Objects; @@ -54,8 +47,8 @@ public class IndexController { @ApiOperation(value = "折线图列表") @GetMapping(value = "/lineChartList") - public Result> lineChartList() { - List list = indexService.lineChartList(); + public Result> lineChartList(@RequestParam(name = "year",required = false) String year) { + List list = indexService.lineChartList(year); return Result.OK(list); } @@ -68,15 +61,15 @@ public class IndexController { @ApiOperation(value = "累计图列表") @GetMapping(value = "/cumulativeGraphList") - public Result> cumulativeGraphList() { - List list = indexService.cumulativeGraphList(); + public Result> cumulativeGraphList(@RequestParam(name = "year",required = false) String year) { + List list = indexService.cumulativeGraphList(year); return Result.OK(list); } @ApiOperation(value = "科室总体统计") @GetMapping(value = "/overallDepartmentStatistics") - public Result> overallDepartmentStatistics() { - List histogramVOS = indexService.overallDepartmentStatistics(); + public Result> overallDepartmentStatistics(@RequestParam(name = "year",required = false) String year) { + List histogramVOS = indexService.overallDepartmentStatistics(year); return Result.OK(histogramVOS); } diff --git a/jero-boot-incoming-payment/src/main/java/com/jero/index/service/IndexService.java b/jero-boot-incoming-payment/src/main/java/com/jero/index/service/IndexService.java index deddf745..6aeba295 100644 --- a/jero-boot-incoming-payment/src/main/java/com/jero/index/service/IndexService.java +++ b/jero-boot-incoming-payment/src/main/java/com/jero/index/service/IndexService.java @@ -60,8 +60,10 @@ public class IndexService { } - public List lineChartList() { - String year = String.valueOf(DateUtil.year(new DateTime())); + public List lineChartList(String year) { + if(StringUtils.isBlank(year)){ + year = String.valueOf(DateUtil.year(new DateTime())); + } AllProjectStatisticsSearch allProjectStatisticsSearch = new AllProjectStatisticsSearch(); allProjectStatisticsSearch.setPaymentYear(year); List list = payWorkingGroupService.queryListAllProjectMoney(allProjectStatisticsSearch, null); @@ -140,8 +142,10 @@ public class IndexService { return lineChartVO; } - public List cumulativeGraphList() { - String year = String.valueOf(DateUtil.year(new DateTime())); + public List cumulativeGraphList(String year) { + if(StringUtils.isBlank(year)){ + year = String.valueOf(DateUtil.year(new DateTime())); + } AllProjectStatisticsSearch allProjectStatisticsSearch = new AllProjectStatisticsSearch(); allProjectStatisticsSearch.setPaymentYear(year); List list = payWorkingGroupService.cumulativeListAllProjectMoney(allProjectStatisticsSearch); @@ -189,9 +193,10 @@ public class IndexService { return list; } - public List overallDepartmentStatistics() { - - String year = String.valueOf(DateUtil.year(new DateTime())); + public List overallDepartmentStatistics(String year) { + if(StringUtils.isBlank(year)){ + year = String.valueOf(DateUtil.year(new DateTime())); + } List records = payWorkingGroupMapper.overallDepartmentStatistics(year); List all = payWorkingGroupMapper.allDepartmentStatistics(year); for (DepartStatistics a : all) {