河南机电职业学院-大屏数据统计

main
zhc077 4 months ago
parent de30ba8215
commit 0820c60529
  1. 24
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/bigScreen/service/CompSystemBigScreenServiceImpl.java

@ -1,5 +1,6 @@
package org.jeecg.modules.demo.bigScreen.service; package org.jeecg.modules.demo.bigScreen.service;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@ -131,16 +132,17 @@ public class CompSystemBigScreenServiceImpl implements CompSystemBigScreenServic
Optional.ofNullable(departList).orElse(new LinkedList<>()).stream().forEach(depart -> { Optional.ofNullable(departList).orElse(new LinkedList<>()).stream().forEach(depart -> {
Map<String, Object> resultMap = new LinkedHashMap<>(); Map<String, Object> resultMap = new LinkedHashMap<>();
List<CompVo> vos = new LinkedList<>(); List<CompVo> vos = new LinkedList<>();
CompVo vo = new CompVo();
//部门id
vo.setCompOrganId(depart.getId());
//部门名称
vo.setCompOrganName(depart.getDepartName());
List<AnnualCompetitionProjectRegistration> registrationList = iAnnualCompetitionProjectRegistrationService.list(new LambdaQueryWrapper<AnnualCompetitionProjectRegistration>() List<AnnualCompetitionProjectRegistration> registrationList = iAnnualCompetitionProjectRegistrationService.list(new LambdaQueryWrapper<AnnualCompetitionProjectRegistration>()
.eq(AnnualCompetitionProjectRegistration::getSysOrgCode, depart.getOrgCode())); .eq(AnnualCompetitionProjectRegistration::getSysOrgCode, depart.getOrgCode()));
Map<String, List<AnnualCompetitionProjectRegistration>> annualCompIdListMap = Optional.ofNullable(registrationList).orElse(new LinkedList<>()).stream() Map<String, List<AnnualCompetitionProjectRegistration>> annualCompIdListMap = Optional.ofNullable(registrationList).orElse(new LinkedList<>()).stream()
.collect(Collectors.groupingBy(AnnualCompetitionProjectRegistration::getAnnualCompid)); .collect(Collectors.groupingBy(AnnualCompetitionProjectRegistration::getAnnualCompid));
Optional.ofNullable(annualCompIdListMap).orElse(new LinkedHashMap<>()).forEach((key, obj) -> { Optional.ofNullable(annualCompIdListMap).orElse(new LinkedHashMap<>()).forEach((key, obj) -> {
CompVo vo = new CompVo();
//部门id
vo.setCompOrganId(depart.getId());
//部门名称
vo.setCompOrganName(depart.getDepartName());
vo.setNumber(obj.size()); vo.setNumber(obj.size());
AnnualCompPoint annualCompPoint = iAnnualCompPointService.getById(key); AnnualCompPoint annualCompPoint = iAnnualCompPointService.getById(key);
if (!ObjectUtils.isEmpty(annualCompPoint)) { if (!ObjectUtils.isEmpty(annualCompPoint)) {
@ -388,7 +390,7 @@ public class CompSystemBigScreenServiceImpl implements CompSystemBigScreenServic
//年度比赛ids //年度比赛ids
Set<String> annualCompIds = Optional.ofNullable(annualCompList).orElse(new ArrayList<>()).stream().map(annualComp -> annualComp.getCompId()).collect(Collectors.toSet()); Set<String> annualCompIds = Optional.ofNullable(annualCompList).orElse(new ArrayList<>()).stream().map(annualComp -> annualComp.getCompId()).collect(Collectors.toSet());
List<AwardPersion> awardPersionList = iAwardPersionService.list(new LambdaQueryWrapper<AwardPersion>() List<AwardPersion> awardPersionList = iAwardPersionService.list(new LambdaQueryWrapper<AwardPersion>()
.in(AwardPersion::getAnnalComp, annualCompIds) .in(ObjectUtil.isNotNull(annualCompIds),AwardPersion::getAnnalComp, annualCompIds)
.orderByAsc(AwardPersion::getAwardname) .orderByAsc(AwardPersion::getAwardname)
.last("limit 30")); .last("limit 30"));
Optional.ofNullable(awardPersionList).orElse(new LinkedList<>()).forEach(award -> { Optional.ofNullable(awardPersionList).orElse(new LinkedList<>()).forEach(award -> {
@ -444,8 +446,8 @@ public class CompSystemBigScreenServiceImpl implements CompSystemBigScreenServic
List<PersonalAbilityEvaluation> personalAbilityEvaluationList = iPersonalAbilityEvaluationService.list(new LambdaQueryWrapper<PersonalAbilityEvaluation>() List<PersonalAbilityEvaluation> personalAbilityEvaluationList = iPersonalAbilityEvaluationService.list(new LambdaQueryWrapper<PersonalAbilityEvaluation>()
.in(PersonalAbilityEvaluation::getAnnualCompId, annualCompIds) .in(!ObjectUtils.isEmpty(annualCompIds),PersonalAbilityEvaluation::getAnnualCompId, annualCompIds)
.in(PersonalAbilityEvaluation::getWorkOn, workNos) .in(!ObjectUtils.isEmpty(workNos),PersonalAbilityEvaluation::getWorkOn, workNos)
); );
List<DepartAbilityEvaluation> vos = new LinkedList<>(); List<DepartAbilityEvaluation> vos = new LinkedList<>();
Map<String, List<PersonalAbilityEvaluation>> capacityIdListMap = Optional.ofNullable(personalAbilityEvaluationList).orElse(new LinkedList<>()).stream() Map<String, List<PersonalAbilityEvaluation>> capacityIdListMap = Optional.ofNullable(personalAbilityEvaluationList).orElse(new LinkedList<>()).stream()
@ -683,9 +685,9 @@ public class CompSystemBigScreenServiceImpl implements CompSystemBigScreenServic
studentInfoMap.put("last4YearData", last4YearData); studentInfoMap.put("last4YearData", last4YearData);
studentInfoMap.put("workNo", workNo); studentInfoMap.put("workNo", workNo);
studentInfoMap.put("name", sysUser.getRealname()); studentInfoMap.put("name", sysUser.getRealname());
studentInfoMap.put("major", "软件工程"); studentInfoMap.put("major", "");
studentInfoMap.put("grade", "202*级"); studentInfoMap.put("grade", "");
studentInfoMap.put("class", "软工*班"); studentInfoMap.put("class", "");
resultMap.put("studentInfo", studentInfoMap); resultMap.put("studentInfo", studentInfoMap);
List<TeamManagement> studentEnrollCodeList = iTeamManagementService.list(new LambdaQueryWrapper<TeamManagement>() List<TeamManagement> studentEnrollCodeList = iTeamManagementService.list(new LambdaQueryWrapper<TeamManagement>()

Loading…
Cancel
Save