diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/controller/UserHomePageController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/controller/UserHomePageController.java index 66e0b0bd..8b6cc28a 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/controller/UserHomePageController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/controller/UserHomePageController.java @@ -48,15 +48,15 @@ public class UserHomePageController { @AutoLog(value = "学校管理员-分析报告") @ApiOperation(value = "河南机电-学校综合报告", notes = "河南机电-学校综合报告") @GetMapping(value = "/report4School") - public Result report4School(String year, boolean recreateFlag) { - Object result = homePageService.report4School(year,recreateFlag); + public Result report4School(String annualId, boolean recreateFlag) { + Object result = homePageService.report4School(annualId,recreateFlag); return Result.ok(result); } @AutoLog(value = "部门管理员-分析报告") @ApiOperation(value = "河南机电-部门综合报告", notes = "河南机电-部门综合报告") @GetMapping(value = "/report4Depart") - public Result report4Depart(String year,String orgCode, boolean recreateFlag) { - return Result.ok(homePageService.report4Depart(year,orgCode, recreateFlag)); + public Result report4Depart(String annualId,String orgCode, boolean recreateFlag) { + return Result.ok(homePageService.report4Depart(annualId,orgCode, recreateFlag)); } } diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/service/UserHomePageService.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/service/UserHomePageService.java index b2cdd97f..62815f20 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/service/UserHomePageService.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/service/UserHomePageService.java @@ -8,7 +8,7 @@ public interface UserHomePageService { Map homePage4School(); - Object report4School(String year,boolean recreateFlag); + Object report4School(String annualId,boolean recreateFlag); - Object report4Depart(String year,String orgCode, boolean recreateFlag); + Object report4Depart(String annualId,String orgCode, boolean recreateFlag); } diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/service/UserHomePageServiceImpl.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/service/UserHomePageServiceImpl.java index 040a7918..fcaad6d1 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/service/UserHomePageServiceImpl.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/service/UserHomePageServiceImpl.java @@ -363,12 +363,13 @@ public class UserHomePageServiceImpl implements UserHomePageService { } @Override - public Object report4School(String yearStr, boolean recreateFlag) { + public Object report4School(String annualId, boolean recreateFlag) { String currentYear; - if (StringUtils.isNotBlank(yearStr)) { - currentYear = yearStr; - } else { + if (StringUtils.isNotBlank(annualId)) { + Annual annual = iAnnualService.getById(annualId); + currentYear = annual.getAnnualName(); + }else { currentYear = DateUtils.getCurrentYear() + ""; } final String REPORT4SCHOOL = "report4School-" + currentYear; @@ -598,7 +599,7 @@ public class UserHomePageServiceImpl implements UserHomePageService { if (hasKey) { return redisUtil.get(REPORT4SCHOOL); } else { - return this.report4School(yearStr, true); + return this.report4School(annualId, true); } } } @@ -618,13 +619,14 @@ public class UserHomePageServiceImpl implements UserHomePageService { } @Override - public Object report4Depart(String yearStr, String orgCode, boolean recreateFlag) { + public Object report4Depart(String annualId, String orgCode, boolean recreateFlag) { Assert.notNull(orgCode, "部门编号不能为空"); Map resultMap = new LinkedHashMap<>(); String currentYear; - if (StringUtils.isNotBlank(yearStr)) { - currentYear = yearStr; + if (StringUtils.isNotBlank(annualId)) { + Annual annual = iAnnualService.getById(annualId); + currentYear = annual.getAnnualName(); } else { currentYear = DateUtils.getCurrentYear() + ""; } @@ -825,7 +827,7 @@ public class UserHomePageServiceImpl implements UserHomePageService { if (hasKey) { return redisUtil.get(REPORT4DEPART); } else { - return this.report4Depart(yearStr, orgCode, true); + return this.report4Depart(annualId, orgCode, true); } } }