|
|
|
@ -11,7 +11,9 @@ import org.jeecg.modules.demo.annual.entity.Annual; |
|
|
|
|
import org.jeecg.modules.demo.annual.service.IAnnualService; |
|
|
|
|
import org.jeecg.modules.demo.annualCompPoint.entity.AnnualCompPoint; |
|
|
|
|
import org.jeecg.modules.demo.annualCompPoint.service.IAnnualCompPointService; |
|
|
|
|
import org.jeecg.modules.demo.annualScore.entity.PersonalCompScore; |
|
|
|
|
import org.jeecg.modules.demo.annualScore.entity.PersonalCompTotalScore; |
|
|
|
|
import org.jeecg.modules.demo.annualScore.service.IPersonalCompScoreService; |
|
|
|
|
import org.jeecg.modules.demo.annualScore.service.IPersonalCompTotalScoreService; |
|
|
|
|
import org.jeecg.modules.demo.annualcomp.entity.AnnualComp; |
|
|
|
|
import org.jeecg.modules.demo.annualcomp.service.IAnnualCompService; |
|
|
|
@ -75,6 +77,9 @@ public class CompSystemBigScreenServiceImpl implements CompSystemBigScreenServic |
|
|
|
|
@Autowired |
|
|
|
|
private IPersonalCompTotalScoreService iPersonalCompTotalScoreService; |
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
private IPersonalCompScoreService iPersonalCompScoreService; |
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
private IDepartAbilityEvaluationService iDepartAbilityEvaluationService; |
|
|
|
|
|
|
|
|
@ -118,19 +123,19 @@ public class CompSystemBigScreenServiceImpl implements CompSystemBigScreenServic |
|
|
|
|
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.getLast4Year(); |
|
|
|
|
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 -> { |
|
|
|
@ -182,8 +187,26 @@ public class CompSystemBigScreenServiceImpl implements CompSystemBigScreenServic |
|
|
|
|
AnnualCompPoint annualCompPoint = iAnnualCompPointService.getById(award.getAnnualCompP()); |
|
|
|
|
award.setAnnualCompPname(annualCompPoint.getObjName()); |
|
|
|
|
}); |
|
|
|
|
studentInfoMap.put("awardList", awardPersions); |
|
|
|
|
|
|
|
|
|
studentInfoMap.put("studentAwardList", awardPersions); |
|
|
|
|
List<Map<String, Object>> last4YearData = new LinkedList<>(); |
|
|
|
|
List<Integer> years = DateUtils.getLastxYear(4); |
|
|
|
|
List<Annual> annualList = iAnnualService.list(new LambdaQueryWrapper<Annual>().in(Annual::getAnnualName, years).orderByAsc(Annual::getAnnualName)); |
|
|
|
|
annualList.forEach(annual -> { |
|
|
|
|
AtomicReference<BigDecimal> baseScore = new AtomicReference<>(BigDecimal.ZERO); |
|
|
|
|
Map<String, Object> yearData = new LinkedHashMap<>(); |
|
|
|
|
yearData.put("year", annual.getAnnualName()); |
|
|
|
|
List<PersonalCompScore> compScoreList = iPersonalCompScoreService.list(new LambdaQueryWrapper<PersonalCompScore>() |
|
|
|
|
.eq(PersonalCompScore::getWorkOn, person.getWorkOn()) |
|
|
|
|
.eq(PersonalCompScore::getAnnualId, annual.getId())); |
|
|
|
|
if (!ObjectUtils.isEmpty(compScoreList)) { |
|
|
|
|
double sum = compScoreList.stream().mapToDouble(PersonalCompScore::getScore).sum(); |
|
|
|
|
baseScore.getAndUpdate(val -> val.add(new BigDecimal(sum))); |
|
|
|
|
} |
|
|
|
|
yearData.put("score", baseScore); |
|
|
|
|
last4YearData.add(yearData); |
|
|
|
|
}); |
|
|
|
|
studentInfoMap.put("last4YearData", last4YearData); |
|
|
|
|
studentInfoMap.put("workNo", person.getWorkOn()); |
|
|
|
|
studentInfoMap.put("name", sysUser.getRealname()); |
|
|
|
|
studentInfoMap.put("major", "软件工程"); |
|
|
|
|