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 8941f315..315dbc5f 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,4 +48,11 @@ public class UserHomePageController { Map result = homePageService.report4School(); return Result.ok(result); } + + @ApiOperation(value = "河南机电-部门综合报告", notes = "河南机电-部门综合报告") + @GetMapping(value = "/report4Depart") + public Result report4Depart(String orgCode) { + Map result = homePageService.report4Depart(orgCode); + return Result.ok(result); + } } 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 6a676b5b..25648040 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 @@ -392,12 +392,11 @@ public class UserHomePageServiceImpl implements UserHomePageService { } else { countMap.put("已完成比赛比率", 0); } + resultMap.putAll(countMap); List evaluationCollects = iPersonalAbilityEvaluationCollectService - .list(new LambdaQueryWrapper() - .orderByDesc(PersonalAbilityEvaluationCollect::getCreateTime) - .last(" limit 60")); - resultMap.put("前60名学生能力值", evaluationCollects); + .list(new LambdaQueryWrapper()); +// resultMap.put("前60名学生能力值", evaluationCollects); List vos = new LinkedList<>(); Map> capacityIdListMap = Optional.ofNullable(evaluationCollects).orElse(new LinkedList<>()).stream() @@ -416,7 +415,7 @@ public class UserHomePageServiceImpl implements UserHomePageService { vo.setCapacityName(departAbilityEvaluationList.get(0).getCapacityName()); vos.add(vo); }); - resultMap.put("前60名学生能力平均值", vos); + resultMap.put("学生能力平均值", vos); List> abilityList = new LinkedList<>(); List years = DateUtils.getLastxYear(2); @@ -635,13 +634,12 @@ public class UserHomePageServiceImpl implements UserHomePageService { } else { countMap.put("已完成比赛比率", 0); } + resultMap.putAll(countMap); List evaluationCollects = iPersonalAbilityEvaluationCollectService .list(new LambdaQueryWrapper() - .eq(PersonalAbilityEvaluationCollect::getDepetId, departId) - .orderByDesc(PersonalAbilityEvaluationCollect::getCreateTime) - .last(" limit 60")); - resultMap.put("前60名学生能力值", evaluationCollects); + .eq(PersonalAbilityEvaluationCollect::getDepetId, departId)); +// resultMap.put("学生综合能力值分析", evaluationCollects); List vos = new LinkedList<>(); Map> capacityIdListMap = Optional.ofNullable(evaluationCollects).orElse(new LinkedList<>()).stream() @@ -660,7 +658,7 @@ public class UserHomePageServiceImpl implements UserHomePageService { vo.setCapacityName(departAbilityEvaluationList.get(0).getCapacityName()); vos.add(vo); }); - resultMap.put("前60名学生能力平均值", vos); + resultMap.put("学生能力平均值", vos); List> abilityList = new LinkedList<>(); List years = DateUtils.getLastxYear(2); @@ -852,22 +850,4 @@ public class UserHomePageServiceImpl implements UserHomePageService { return map; } - List getCompList() { - List annualCompPointList = iAnnualCompPointService.list(new LambdaQueryWrapper() - .eq(AnnualCompPoint::getRequireApply, "Y")); - List compVoList = new LinkedList<>(); - Optional.ofNullable(annualCompPointList).orElse(new LinkedList<>()).stream().forEach(p -> { - CompVo compVo = new CompVo(); - BeanUtils.copyProperties(p, compVo); - List list = iAnnualCompetitionProjectRegistrationService.list(new LambdaQueryWrapper() - .eq(AnnualCompetitionProjectRegistration::getAnnualCompid, p.getId())); - if (!ObjectUtils.isEmpty(list)) { - Set entryFormats = list.stream().map(bo -> bo.getEnrollCode()).collect(Collectors.toSet()); - Long count = iTeamManagementService.count(new LambdaQueryWrapper().in(TeamManagement::getEnrollCode, entryFormats)); - compVo.setNumber(count.intValue()); - } - }); - return compVoList; - } - }