|
|
|
@ -43,7 +43,7 @@ import java.util.concurrent.atomic.AtomicReference; |
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @Description: TODO |
|
|
|
|
* @Description: 河南机电-大屏 |
|
|
|
|
* @Author: Z.H.C |
|
|
|
|
* @CreateTime: 2023-11-28 17:00 |
|
|
|
|
* @Version: 1.0 |
|
|
|
@ -89,11 +89,20 @@ public class CompSystemBigScreenServiceImpl implements CompSystemBigScreenServic |
|
|
|
|
@Autowired |
|
|
|
|
private IAnnualService iAnnualService; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @description: 部门比赛数据展示 |
|
|
|
|
* 使用大数据页面的形式全面展示各部门参加比赛的数据,可以用多幅大数据页面分别展示,展示内容包括:多维度能力评价数据、获奖情况、得分情况、参赛情况。需要提供功能截图。 |
|
|
|
|
* @param: [] |
|
|
|
|
* @return: java.util.Map<java.lang.String,java.lang.Object> |
|
|
|
|
* @author: z.h.c |
|
|
|
|
* @date: 24/7/3 17:27 |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
public Map<String, Object> bigScreen4Depart() { |
|
|
|
|
|
|
|
|
|
Map<String, Object> resultMap = new LinkedHashMap<>(); |
|
|
|
|
|
|
|
|
|
//比赛列表
|
|
|
|
|
resultMap.put("compList", this.getCompList()); |
|
|
|
|
|
|
|
|
|
List<AwardPersion> awardPersionList = iAwardPersionService.list(new LambdaQueryWrapper<AwardPersion>().last("limit 30")); |
|
|
|
@ -250,6 +259,91 @@ public class CompSystemBigScreenServiceImpl implements CompSystemBigScreenServic |
|
|
|
|
return resultMap; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @description: 比赛数据综合展示 |
|
|
|
|
* 使用大数据页面的形式全面展示系统管理的各种综合数据, |
|
|
|
|
* 包括比赛列表、比赛总数统计、参赛人数统计、多维度能力评价分析数据、近五年比赛数和总人数对比,比赛获奖列表,参赛人员积分列表。需要提供功能截图。 |
|
|
|
|
* @param: [] |
|
|
|
|
* @return: java.util.Map<java.lang.String,java.lang.Object> |
|
|
|
|
* @author: z.h.c |
|
|
|
|
* @date: 24/7/3 16:25 |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
public Map<String, Object> composite() { |
|
|
|
|
|
|
|
|
|
Map<String, Object> resultMap = new LinkedHashMap<>(); |
|
|
|
|
//比赛列表
|
|
|
|
|
resultMap.put("compList", this.getCompList()); |
|
|
|
|
List<AwardPersion> awardPersionList = iAwardPersionService.list(new LambdaQueryWrapper<AwardPersion>().last("limit 30")); |
|
|
|
|
Optional.ofNullable(awardPersionList).orElse(new LinkedList<>()).forEach(award -> { |
|
|
|
|
// 根据报名编号查询参赛者信息,都是个人赛场景
|
|
|
|
|
TeamManagement management = iTeamManagementService.getOne(new LambdaQueryWrapper<TeamManagement>() |
|
|
|
|
.eq(TeamManagement::getEnrollCode, award.getEnrollCode()).last("limit 1")); |
|
|
|
|
if (ObjectUtils.isEmpty(management)) return; |
|
|
|
|
SysUser sysUser = iSysUserService.getById(management.getUserId()); |
|
|
|
|
award.setStudentname(sysUser.getRealname()); |
|
|
|
|
AnnualCompPoint annualCompPoint = iAnnualCompPointService.getById(award.getAnnualCompP()); |
|
|
|
|
award.setAnnualCompPname(annualCompPoint.getObjName()); |
|
|
|
|
}); |
|
|
|
|
//获奖列表
|
|
|
|
|
resultMap.put("awardList", awardPersionList); |
|
|
|
|
|
|
|
|
|
List<PersonalCompTotalScore> personalCompScoreList = iPersonalCompTotalScoreService.list(new LambdaQueryWrapper<PersonalCompTotalScore>() |
|
|
|
|
.orderByDesc(PersonalCompTotalScore::getScore) |
|
|
|
|
.last("limit 50")); |
|
|
|
|
//学生积分排行前50名
|
|
|
|
|
resultMap.put("studentScore", personalCompScoreList); |
|
|
|
|
|
|
|
|
|
Map<String, Object> compCounts = new LinkedHashMap<>(); |
|
|
|
|
Long compCount = iCompService.count(); |
|
|
|
|
Long pointCount = iAnnualCompPointService.count(); |
|
|
|
|
//比赛数
|
|
|
|
|
compCounts.put("compCount", compCount); |
|
|
|
|
//年度项目比赛数
|
|
|
|
|
compCounts.put("pointCount", pointCount); |
|
|
|
|
//总报名数数
|
|
|
|
|
Long count = iAnnualCompetitionProjectRegistrationService.count(); |
|
|
|
|
Long personCount = iAnnualCompetitionProjectRegistrationService.count(new LambdaQueryWrapper<AnnualCompetitionProjectRegistration>() |
|
|
|
|
.eq(AnnualCompetitionProjectRegistration::getEntryFormat, "0")); |
|
|
|
|
//学生人数
|
|
|
|
|
compCounts.put("personCompCount", personCount); |
|
|
|
|
Long teamCount = count - personCount; |
|
|
|
|
//队伍数
|
|
|
|
|
compCounts.put("teamCompCount", teamCount); |
|
|
|
|
resultMap.put("compCounts", compCounts); |
|
|
|
|
|
|
|
|
|
List<DepartAbilityEvaluation> departAbilityEvaluations = iDepartAbilityEvaluationService.list(); |
|
|
|
|
resultMap.put("departAbilityEvaluation", departAbilityEvaluations); |
|
|
|
|
|
|
|
|
|
List<Integer> years = DateUtils.getLastxYear(5); |
|
|
|
|
List<Annual> annualList = iAnnualService.list(new LambdaQueryWrapper<Annual>().in(Annual::getAnnualName, years).orderByAsc(Annual::getAnnualName)); |
|
|
|
|
List<Last5YearDataVo> last5YearDataVos = new LinkedList<>(); |
|
|
|
|
Optional.ofNullable(annualList).orElse(new LinkedList<>()).stream().forEach(annual -> { |
|
|
|
|
Last5YearDataVo last5YearDataVo = new Last5YearDataVo(); |
|
|
|
|
last5YearDataVo.setYear(annual.getAnnualName()); |
|
|
|
|
AtomicReference<BigDecimal> personCount4Comp = new AtomicReference<>(BigDecimal.ZERO); |
|
|
|
|
|
|
|
|
|
List<AnnualComp> annualCompList = iAnnualCompService.list(new LambdaQueryWrapper<AnnualComp>().eq(AnnualComp::getAnnualid, annual.getId())); |
|
|
|
|
//比赛数
|
|
|
|
|
last5YearDataVo.setCompCount(annualCompList.size()); |
|
|
|
|
if (!ObjectUtils.isEmpty(annualCompList)) { |
|
|
|
|
annualCompList.stream().forEach(ac -> { |
|
|
|
|
AnnualCompPoint annualCompPoint = iAnnualCompPointService.getOne(new LambdaQueryWrapper<AnnualCompPoint>().eq(AnnualCompPoint::getAnnualCompId, ac.getId())); |
|
|
|
|
if (!ObjectUtils.isEmpty(annualCompPoint)) { |
|
|
|
|
long personCount4CompTemp = iAnnualCompetitionProjectRegistrationService.count(new LambdaQueryWrapper<AnnualCompetitionProjectRegistration>(). |
|
|
|
|
eq(AnnualCompetitionProjectRegistration::getAnnualCompid, annualCompPoint.getId())); |
|
|
|
|
personCount4Comp.getAndUpdate(val -> val.add(new BigDecimal(personCount4CompTemp))); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
last5YearDataVo.setPersonCount(personCount4Comp.get().intValue()); |
|
|
|
|
last5YearDataVos.add(last5YearDataVo); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
resultMap.put("last5YearData", last5YearDataVos); |
|
|
|
|
return resultMap; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
List<CompVo> getCompList() { |
|
|
|
|
List<AnnualCompPoint> annualCompPointList = iAnnualCompPointService.list(new LambdaQueryWrapper<AnnualCompPoint>() |
|
|
|
|
.eq(AnnualCompPoint::getRequireApply, "Y")); |
|
|
|
|