update 企业客户统计(年度待确收金额前二十) 增加年份筛选

This commit is contained in:
lijiarao
2024-01-25 10:30:08 +08:00
parent 9149d6ae78
commit 9dc93719a2
2 changed files with 7 additions and 5 deletions
@@ -93,10 +93,10 @@ public class IndexController {
}
}
@ApiOperation(value = "前十统计")
@ApiOperation(value = "企业客户统计(年度待确收金额前二十)")
@GetMapping(value = "/top10Statistics")
public Result<?> top10Statistics() {
List<HistogramVO> histogramVOS = indexService.top10Statistics();
public Result<?> top10Statistics(@RequestParam(name="year",required = false)String year) {
List<HistogramVO> histogramVOS = indexService.top10Statistics(year);
return Result.OK(histogramVOS);
}
@@ -244,8 +244,10 @@ public class IndexService {
return histogramVOlist;
}
public List<HistogramVO> top10Statistics() {
String year = String.valueOf(DateUtil.year(new DateTime()));
public List<HistogramVO> top10Statistics(String year) {
if (StringUtils.isBlank(year)){
year = String.valueOf(DateUtil.year(new DateTime()));
}
Page<CompanyComeMoneyList> page = new Page<>(1, 20);
CompanyComeMoneySearch companyComeMoneySearch = new CompanyComeMoneySearch();
companyComeMoneySearch.setYear(year);