significative 5 months ago
commit 07fbbd9995
  1. 60
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/bigScreen/service/CompSystemBigScreenServiceImpl.java
  2. 19
      jeecgboot-vue3-master/src/components/Table/src/components/TableAction.vue
  3. 2
      jeecgboot-vue3-master/src/views/annualCompPoint/committee/AnnualCompPointList.vue
  4. 3
      jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPointListPass.vue

@ -4,9 +4,11 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.jeecg.common.util.ComputeUtils; import org.jeecg.common.util.ComputeUtils;
import org.jeecg.common.util.DateUtils; import org.jeecg.common.util.DateUtils;
import org.jeecg.modules.demo.abilityEvaluation.entity.DepartAbilityEvaluation; import org.jeecg.modules.demo.abilityEvaluation.entity.DepartAbilityEvaluation;
import org.jeecg.modules.demo.abilityEvaluation.entity.PersonalAbilityEvaluation;
import org.jeecg.modules.demo.abilityEvaluation.entity.PersonalAbilityEvaluationCollect; import org.jeecg.modules.demo.abilityEvaluation.entity.PersonalAbilityEvaluationCollect;
import org.jeecg.modules.demo.abilityEvaluation.service.IDepartAbilityEvaluationService; import org.jeecg.modules.demo.abilityEvaluation.service.IDepartAbilityEvaluationService;
import org.jeecg.modules.demo.abilityEvaluation.service.IPersonalAbilityEvaluationCollectService; import org.jeecg.modules.demo.abilityEvaluation.service.IPersonalAbilityEvaluationCollectService;
import org.jeecg.modules.demo.abilityEvaluation.service.IPersonalAbilityEvaluationService;
import org.jeecg.modules.demo.annual.entity.Annual; import org.jeecg.modules.demo.annual.entity.Annual;
import org.jeecg.modules.demo.annual.service.IAnnualService; import org.jeecg.modules.demo.annual.service.IAnnualService;
import org.jeecg.modules.demo.annualCompPoint.entity.AnnualCompPoint; import org.jeecg.modules.demo.annualCompPoint.entity.AnnualCompPoint;
@ -85,6 +87,9 @@ public class CompSystemBigScreenServiceImpl implements CompSystemBigScreenServic
@Autowired @Autowired
private IDepartAbilityEvaluationService iDepartAbilityEvaluationService; private IDepartAbilityEvaluationService iDepartAbilityEvaluationService;
@Autowired
private IPersonalAbilityEvaluationService iPersonalAbilityEvaluationService;
@Autowired @Autowired
private IPersonalAbilityEvaluationCollectService iPersonalAbilityEvaluationCollectService; private IPersonalAbilityEvaluationCollectService iPersonalAbilityEvaluationCollectService;
@ -114,7 +119,6 @@ public class CompSystemBigScreenServiceImpl implements CompSystemBigScreenServic
List<CompVo> annualCompList = this.getAnnualCompList(comp); List<CompVo> annualCompList = this.getAnnualCompList(comp);
//年度比赛列表 //年度比赛列表
resultMap.put("annualCompList", annualCompList); resultMap.put("annualCompList", annualCompList);
// List<AnnualComp> annualCompList = iAnnualCompService.list(new LambdaQueryWrapper<AnnualComp>().eq(AnnualComp::getCompid, compId));
//年度比赛ids //年度比赛ids
@ -137,13 +141,15 @@ public class CompSystemBigScreenServiceImpl implements CompSystemBigScreenServic
resultMap.put("awardList", awardPersionList); resultMap.put("awardList", awardPersionList);
//TODO List<PersonalCompScore> personalCompScoreList = iPersonalCompScoreService.list(new LambdaQueryWrapper<PersonalCompScore>().in(PersonalCompScore::getAnnualCompId, annualCompIds));
List<PersonalCompTotalScore> personalCompScoreList = iPersonalCompTotalScoreService.list(new LambdaQueryWrapper<PersonalCompTotalScore>() //参加该比赛的所有学生学号
// .eq(PersonalCompTotalScore::getDepet, departId) Set<String> workNos = Optional.ofNullable(personalCompScoreList).orElse(new ArrayList<>()).stream().map(personalCompScore -> personalCompScore.getWorkOn()).collect(Collectors.toSet());
List<PersonalCompTotalScore> personalCompTotalScoreList = iPersonalCompTotalScoreService.list(new LambdaQueryWrapper<PersonalCompTotalScore>()
.in(PersonalCompTotalScore::getWorkOn, workNos)
.orderByDesc(PersonalCompTotalScore::getScore) .orderByDesc(PersonalCompTotalScore::getScore)
.last("limit 50")); .last("limit 50"));
//学生积分排名 //学生积分排名
resultMap.put("studentScore", personalCompScoreList); resultMap.put("studentScore", personalCompTotalScoreList);
Map<String, Object> compCounts = new LinkedHashMap<>(); Map<String, Object> compCounts = new LinkedHashMap<>();
@ -170,29 +176,29 @@ public class CompSystemBigScreenServiceImpl implements CompSystemBigScreenServic
resultMap.put("compCounts", compCounts); resultMap.put("compCounts", compCounts);
//TODO List<PersonalAbilityEvaluation> personalAbilityEvaluationList = iPersonalAbilityEvaluationService.list(new LambdaQueryWrapper<PersonalAbilityEvaluation>()
// List<DepartAbilityEvaluation> departAbilityEvaluations = iDepartAbilityEvaluationService.list(new LambdaQueryWrapper<DepartAbilityEvaluation>() .in(PersonalAbilityEvaluation::getAnnualCompId, annualCompIds)
// .eq(DepartAbilityEvaluation::getDepetId, departId)); .in(PersonalAbilityEvaluation::getWorkOn, workNos)
// List<DepartAbilityEvaluation> vos = new LinkedList<>(); );
// Map<String, List<DepartAbilityEvaluation>> capacityIdListMap = Optional.ofNullable(departAbilityEvaluations).orElse(new LinkedList<>()).stream() List<DepartAbilityEvaluation> vos = new LinkedList<>();
// .collect(Collectors.groupingBy(DepartAbilityEvaluation::getCapacityId)); Map<String, List<PersonalAbilityEvaluation>> capacityIdListMap = Optional.ofNullable(personalAbilityEvaluationList).orElse(new LinkedList<>()).stream()
// //遍历分组后的结果 .collect(Collectors.groupingBy(PersonalAbilityEvaluation::getCapacityId));
// Optional.ofNullable(capacityIdListMap).orElse(new LinkedHashMap<>()).forEach((key, value) -> { //遍历分组后的结果
// List<DepartAbilityEvaluation> departAbilityEvaluationList = value; Optional.ofNullable(capacityIdListMap).orElse(new LinkedHashMap<>()).forEach((key, obj) -> {
// double sum = departAbilityEvaluationList.stream().mapToDouble(obj -> obj.getValue()).sum(); double sum = obj.stream().mapToDouble(bo -> bo.getValue()).sum();
// DecimalFormat decimalFormat = new DecimalFormat(); DecimalFormat decimalFormat = new DecimalFormat();
// decimalFormat.setMaximumFractionDigits(2); // 保留两位小数 decimalFormat.setMaximumFractionDigits(2); // 保留两位小数
// decimalFormat.setRoundingMode(RoundingMode.HALF_UP); // 设置具体的进位机制 decimalFormat.setRoundingMode(RoundingMode.HALF_UP); // 设置具体的进位机制
// double val = ComputeUtils.div2(sum, departAbilityEvaluationList.size()); double val = ComputeUtils.div2(sum, obj.size());
// DepartAbilityEvaluation vo = new DepartAbilityEvaluation(); DepartAbilityEvaluation vo = new DepartAbilityEvaluation();
// vo.setDepetId(departId); // vo.setDepetId(departId);
// vo.setValue(val); vo.setValue(val);
// vo.setCapacityId(key); vo.setCapacityId(key);
// vo.setCapacityName(departAbilityEvaluationList.get(0).getCapacityName()); vo.setCapacityName(obj.get(0).getCapacityName());
// vos.add(vo); vos.add(vo);
// }); });
// //能力评估 //单项比赛能力评估
// resultMap.put("departAbilityEvaluation", vos); resultMap.put("comAbilityEvaluation", vos);
List<Integer> years = DateUtils.getLastxYear(5); List<Integer> years = DateUtils.getLastxYear(5);

@ -1,5 +1,5 @@
<template> <template>
<div :class="[prefixCls, getAlign]" @click="onCellClick"> <div :class="[prefixCls, getAlign]" @click="onCellClick" class="setting">
<template v-for="(action, index) in getActions" :key="`${index}-${action.label}`"> <template v-for="(action, index) in getActions" :key="`${index}-${action.label}`">
<template v-if="action.slot"> <template v-if="action.slot">
<slot name="customButton"></slot> <slot name="customButton"></slot>
@ -19,7 +19,8 @@
<Divider type="vertical" class="action-divider" v-if="divider && index < getActions.length - 1" /> <Divider type="vertical" class="action-divider" v-if="divider && index < getActions.length - 1" />
</template> </template>
<Dropdown :trigger="['hover']" :dropMenuList="getDropdownList" popconfirm v-if="dropDownActions && getDropdownList.length > 0"> <Dropdown :trigger="['hover']" :dropMenuList="getDropdownList" popconfirm
v-if="dropDownActions && getDropdownList.length > 0">
<slot name="more"></slot> <slot name="more"></slot>
<a-button type="link" size="small" v-if="!$slots.more"> 更多 <Icon icon="mdi-light:chevron-down"></Icon> </a-button> <a-button type="link" size="small" v-if="!$slots.more"> 更多 <Icon icon="mdi-light:chevron-down"></Icon> </a-button>
</Dropdown> </Dropdown>
@ -198,4 +199,18 @@
} }
} }
} }
.setting {
width: 100%;
height: 100%;
display: flex;
flex-wrap: wrap;
align-items: center;
}
</style> </style>

@ -105,7 +105,7 @@
canResize: false, canResize: false,
useSearchForm: false, useSearchForm: false,
actionColumn: { actionColumn: {
width: 550, width: 220,
fixed: 'right', fixed: 'right',
}, },
beforeFetch: (params) => { beforeFetch: (params) => {

@ -336,4 +336,7 @@ function setFieldsValue(map) {
text-align: center text-align: center
} }
} }
::v-deep(.ant-table-row) {
height: 120px !important;
}
</style> </style>

Loading…
Cancel
Save