学校综合报告 7.29

main
zhc077 4 months ago
parent 112b09b2ea
commit c1402fc977
  1. 7
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/controller/UserHomePageController.java
  2. 36
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/service/UserHomePageServiceImpl.java

@ -48,4 +48,11 @@ public class UserHomePageController {
Map<String, Object> result = homePageService.report4School();
return Result.ok(result);
}
@ApiOperation(value = "河南机电-部门综合报告", notes = "河南机电-部门综合报告")
@GetMapping(value = "/report4Depart")
public Result report4Depart(String orgCode) {
Map<String, Object> result = homePageService.report4Depart(orgCode);
return Result.ok(result);
}
}

@ -392,12 +392,11 @@ public class UserHomePageServiceImpl implements UserHomePageService {
} else {
countMap.put("已完成比赛比率", 0);
}
resultMap.putAll(countMap);
List<PersonalAbilityEvaluationCollect> evaluationCollects = iPersonalAbilityEvaluationCollectService
.list(new LambdaQueryWrapper<PersonalAbilityEvaluationCollect>()
.orderByDesc(PersonalAbilityEvaluationCollect::getCreateTime)
.last(" limit 60"));
resultMap.put("前60名学生能力值", evaluationCollects);
.list(new LambdaQueryWrapper<PersonalAbilityEvaluationCollect>());
// resultMap.put("前60名学生能力值", evaluationCollects);
List<PersonalAbilityEvaluationCollect> vos = new LinkedList<>();
Map<String, List<PersonalAbilityEvaluationCollect>> 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<Map<String, Object>> abilityList = new LinkedList<>();
List<Integer> years = DateUtils.getLastxYear(2);
@ -635,13 +634,12 @@ public class UserHomePageServiceImpl implements UserHomePageService {
} else {
countMap.put("已完成比赛比率", 0);
}
resultMap.putAll(countMap);
List<PersonalAbilityEvaluationCollect> evaluationCollects = iPersonalAbilityEvaluationCollectService
.list(new LambdaQueryWrapper<PersonalAbilityEvaluationCollect>()
.eq(PersonalAbilityEvaluationCollect::getDepetId, departId)
.orderByDesc(PersonalAbilityEvaluationCollect::getCreateTime)
.last(" limit 60"));
resultMap.put("前60名学生能力值", evaluationCollects);
.eq(PersonalAbilityEvaluationCollect::getDepetId, departId));
// resultMap.put("学生综合能力值分析", evaluationCollects);
List<PersonalAbilityEvaluationCollect> vos = new LinkedList<>();
Map<String, List<PersonalAbilityEvaluationCollect>> 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<Map<String, Object>> abilityList = new LinkedList<>();
List<Integer> years = DateUtils.getLastxYear(2);
@ -852,22 +850,4 @@ public class UserHomePageServiceImpl implements UserHomePageService {
return map;
}
List<CompVo> getCompList() {
List<AnnualCompPoint> annualCompPointList = iAnnualCompPointService.list(new LambdaQueryWrapper<AnnualCompPoint>()
.eq(AnnualCompPoint::getRequireApply, "Y"));
List<CompVo> compVoList = new LinkedList<>();
Optional.ofNullable(annualCompPointList).orElse(new LinkedList<>()).stream().forEach(p -> {
CompVo compVo = new CompVo();
BeanUtils.copyProperties(p, compVo);
List<AnnualCompetitionProjectRegistration> list = iAnnualCompetitionProjectRegistrationService.list(new LambdaQueryWrapper<AnnualCompetitionProjectRegistration>()
.eq(AnnualCompetitionProjectRegistration::getAnnualCompid, p.getId()));
if (!ObjectUtils.isEmpty(list)) {
Set<String> entryFormats = list.stream().map(bo -> bo.getEnrollCode()).collect(Collectors.toSet());
Long count = iTeamManagementService.count(new LambdaQueryWrapper<TeamManagement>().in(TeamManagement::getEnrollCode, entryFormats));
compVo.setNumber(count.intValue());
}
});
return compVoList;
}
}

Loading…
Cancel
Save