喻忠伟 5 months ago
commit 3f921d3075
  1. 18
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/anncomgrotopp/entity/AnnComGroTopP.java
  2. 17
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/bigScreen/controller/CompSystemBigScreenController.java
  3. 5
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/bigScreen/service/CompSystemBigScreenService.java
  4. 221
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/bigScreen/service/CompSystemBigScreenServiceImpl.java
  5. 16
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/bigScreen/vo/CompVo.java
  6. 33
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/chooseTopicPersion/controller/ChaoseTopicPersionController.java
  7. 22
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/topic/controller/TopicController.java
  8. 4
      jeecgboot-vue3-master/src/views/anncomgrotopp/AnnComGroTopP.data.ts
  9. 2
      jeecgboot-vue3-master/src/views/anncomgrotopp/components/AnnComGroTopPModal.vue
  10. 16
      jeecgboot-vue3-master/src/views/anncomgrotopp/components/ChaoseTopicPersion.data.ts
  11. 11
      jeecgboot-vue3-master/src/views/annualcompgroup/AnnualCompGroup.api.ts
  12. 4
      jeecgboot-vue3-master/src/views/annualcompgroup/AnnualCompGroupList.vue
  13. 282
      jeecgboot-vue3-master/src/views/annualcompgroup/AnnualCompGroupList1.vue

@ -72,4 +72,22 @@ public class AnnComGroTopP implements Serializable {
@Excel(name = "已评专家数", width = 15) @Excel(name = "已评专家数", width = 15)
@ApiModelProperty(value = "已评专家数") @ApiModelProperty(value = "已评专家数")
private java.lang.Integer ypzj; private java.lang.Integer ypzj;
/**年度*/
@Excel(name = "年度", width = 15, dictTable = "annual", dicText = "annual_name", dicCode = "id")
@Dict(dictTable = "annual", dicText = "annual_name", dicCode = "id")
@ApiModelProperty(value = "年度")
private java.lang.String annid;
/**年度比赛项目*/
@Excel(name = "年度比赛项目", width = 15, dictTable = "annual_comp_point", dicText = "obj_name", dicCode = "id")
@Dict(dictTable = "annual_comp_point", dicText = "obj_name", dicCode = "id")
@ApiModelProperty(value = "年度比赛项目")
private java.lang.String annComP;
/**专家组*/
@Excel(name = "专家组", width = 15, dictTable = "annual_comp_group", dicText = "name", dicCode = "id")
@Dict(dictTable = "annual_comp_group", dicText = "name", dicCode = "id")
@ApiModelProperty(value = "专家组")
private java.lang.String annComPG;
/**作品名称*/
@ApiModelProperty(value = "作品名称")
private java.lang.String topicName;
} }

@ -16,13 +16,13 @@ import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
* @Description: 比赛综合管理系统大屏 * @Description: 河南机电比赛大屏
* @Author: Z.H.C * @Author: Z.H.C
* @CreateTime: 2023-11-28 16:45 * @CreateTime: 2023-11-28 16:45
* @Version: 1.0 * @Version: 1.0
*/ */
@Api(tags = "比赛系统大屏") @Api(tags = "河南机电比赛系统大屏")
@RestController @RestController
@RequestMapping("/comp/bigScreen") @RequestMapping("/comp/bigScreen")
@Slf4j @Slf4j
@ -31,10 +31,17 @@ public class CompSystemBigScreenController /*extends JeecgController*/ {
@Autowired @Autowired
private CompSystemBigScreenService compSystemBigScreenService; private CompSystemBigScreenService compSystemBigScreenService;
@ApiOperation(value = "院系综合大屏", notes = "院系综合大屏") @ApiOperation(value = "河南机电-比赛数据综合展示", notes = "河南机电-比赛数据综合展示")
@GetMapping(value = "/composite")
public Result composite(HttpServletRequest req) {
Map<String, Object> result = compSystemBigScreenService.composite();
return Result.ok(result);
}
@ApiOperation(value = "河南机电-部门比赛数据展示", notes = "河南机电-部门比赛数据展示")
@GetMapping(value = "/depart") @GetMapping(value = "/depart")
public Result bigScreen4Depart(HttpServletRequest req) { public Result bigScreen4Depart(String departId) {
Map<String, Object> result = compSystemBigScreenService.bigScreen4Depart(); Map<String, Object> result = compSystemBigScreenService.bigScreen4Depart(departId);
return Result.ok(result); return Result.ok(result);
} }

@ -5,7 +5,10 @@ import org.jeecg.modules.demo.abilityEvaluation.entity.PersonalAbilityEvaluation
import java.util.Map; import java.util.Map;
public interface CompSystemBigScreenService { public interface CompSystemBigScreenService {
Map<String, Object> bigScreen4Depart(); Map<String, Object> bigScreen4Depart(String departId);
Map<String, Object> bigScreen4Student(PersonalAbilityEvaluation personalAbilityEvaluation); Map<String, Object> bigScreen4Student(PersonalAbilityEvaluation personalAbilityEvaluation);
Map<String, Object> composite();
} }

@ -1,6 +1,8 @@
package org.jeecg.modules.demo.bigScreen.service; package org.jeecg.modules.demo.bigScreen.service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.jeecg.common.exception.JeecgBootException;
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.PersonalAbilityEvaluation;
@ -38,12 +40,14 @@ import org.springframework.util.Assert;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.util.*; import java.util.*;
import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
* @Description: TODO * @Description: 河南机电-大屏
* @Author: Z.H.C * @Author: Z.H.C
* @CreateTime: 2023-11-28 17:00 * @CreateTime: 2023-11-28 17:00
* @Version: 1.0 * @Version: 1.0
@ -89,14 +93,30 @@ public class CompSystemBigScreenServiceImpl implements CompSystemBigScreenServic
@Autowired @Autowired
private IAnnualService iAnnualService; 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 @Override
public Map<String, Object> bigScreen4Depart() { public Map<String, Object> bigScreen4Depart(String departId) {
Assert.notNull(departId, "部门id不能为空");
SysDepart sysDepart = iSysDepartService.getById(departId);
if (ObjectUtils.isEmpty(sysDepart)) {
throw new JeecgBootException("部门不存在");
}
Map<String, Object> resultMap = new LinkedHashMap<>(); Map<String, Object> resultMap = new LinkedHashMap<>();
resultMap.put("compList", this.getCompList()); //比赛列表
List<CompVo> compVoList = this.getCompList4Depart(sysDepart);
resultMap.put("compList", compVoList);
List<AwardPersion> awardPersionList = iAwardPersionService.list(new LambdaQueryWrapper<AwardPersion>().last("limit 30"));
List<AwardPersion> awardPersionList = iAwardPersionService.list(new LambdaQueryWrapper<AwardPersion>().eq(AwardPersion::getSysOrgCode, sysDepart.getOrgCode()).last("limit 30"));
Optional.ofNullable(awardPersionList).orElse(new LinkedList<>()).forEach(award -> { Optional.ofNullable(awardPersionList).orElse(new LinkedList<>()).forEach(award -> {
// 根据报名编号查询参赛者信息,都是个人赛场景 // 根据报名编号查询参赛者信息,都是个人赛场景
TeamManagement management = iTeamManagementService.getOne(new LambdaQueryWrapper<TeamManagement>() TeamManagement management = iTeamManagementService.getOne(new LambdaQueryWrapper<TeamManagement>()
@ -107,36 +127,71 @@ public class CompSystemBigScreenServiceImpl implements CompSystemBigScreenServic
AnnualCompPoint annualCompPoint = iAnnualCompPointService.getById(award.getAnnualCompP()); AnnualCompPoint annualCompPoint = iAnnualCompPointService.getById(award.getAnnualCompP());
award.setAnnualCompPname(annualCompPoint.getObjName()); award.setAnnualCompPname(annualCompPoint.getObjName());
}); });
//获奖列表
resultMap.put("awardList", awardPersionList); resultMap.put("awardList", awardPersionList);
List<PersonalCompTotalScore> personalCompScoreList = iPersonalCompTotalScoreService.list(new LambdaQueryWrapper<PersonalCompTotalScore>() List<PersonalCompTotalScore> personalCompScoreList = iPersonalCompTotalScoreService.list(new LambdaQueryWrapper<PersonalCompTotalScore>()
.eq(PersonalCompTotalScore::getDepet, departId)
.orderByDesc(PersonalCompTotalScore::getScore) .orderByDesc(PersonalCompTotalScore::getScore)
.last("limit 50")); .last("limit 50"));
//学生积分排名
resultMap.put("studentScore", personalCompScoreList); resultMap.put("studentScore", personalCompScoreList);
Map<String, Object> compCounts = new LinkedHashMap<>(); Map<String, Object> compCounts = new LinkedHashMap<>();
Long compCount = iCompService.count(); // Long pointCount = iAnnualCompPointService.count();
Long pointCount = iAnnualCompPointService.count(); Long compCount = iCompService.count(new LambdaQueryWrapper<Comp>().eq(Comp::getCompOrgan, departId));
//比赛数 //比赛数
compCounts.put("compCount", compCount); compCounts.put("compCount", compCount);
//年度项目比赛数 //年度项目比赛数
compCounts.put("pointCount", pointCount); // long pointCount = Optional.ofNullable(compVoList).orElse(new LinkedList<>()).stream().mapToInt(vo -> vo.getAnnualCompPointNumber()).sum();
//总报名数数 // compCounts.put("pointCount", pointCount);
Long count = iAnnualCompetitionProjectRegistrationService.count(); //总报名数
long count = Optional.ofNullable(compVoList).orElse(new LinkedList<>()).stream().mapToInt(vo -> vo.getNumber()).sum();
//总报名数
compCounts.put("count", count);
Long personCount = iAnnualCompetitionProjectRegistrationService.count(new LambdaQueryWrapper<AnnualCompetitionProjectRegistration>() Long personCount = iAnnualCompetitionProjectRegistrationService.count(new LambdaQueryWrapper<AnnualCompetitionProjectRegistration>()
.eq(AnnualCompetitionProjectRegistration::getEntryFormat, "0")); .eq(AnnualCompetitionProjectRegistration::getEntryFormat, "0")
.eq(AnnualCompetitionProjectRegistration::getSysOrgCode, sysDepart.getOrgCode()));
//学生人数 //学生人数
compCounts.put("personCompCount", personCount); compCounts.put("personCompCount", personCount);
Long teamCount = count - personCount; Long teamCount = count - personCount;
//队伍数 //队伍数
compCounts.put("teamCompCount", teamCount); compCounts.put("teamCompCount", teamCount);
//比赛统计
resultMap.put("compCounts", compCounts); resultMap.put("compCounts", compCounts);
List<DepartAbilityEvaluation> departAbilityEvaluations = iDepartAbilityEvaluationService.list();
resultMap.put("departAbilityEvaluation", departAbilityEvaluations); List<DepartAbilityEvaluation> departAbilityEvaluations = iDepartAbilityEvaluationService.list(new LambdaQueryWrapper<DepartAbilityEvaluation>()
.eq(DepartAbilityEvaluation::getDepetId, departId));
List<DepartAbilityEvaluation> vos = new LinkedList<>();
Map<String, List<DepartAbilityEvaluation>> capacityIdListMap = Optional.ofNullable(departAbilityEvaluations).orElse(new LinkedList<>()).stream()
.collect(Collectors.groupingBy(DepartAbilityEvaluation::getCapacityId));
//遍历分组后的结果
Optional.ofNullable(capacityIdListMap).orElse(new LinkedHashMap<>()).forEach((key, value) -> {
List<DepartAbilityEvaluation> departAbilityEvaluationList = value;
double sum = departAbilityEvaluationList.stream().mapToDouble(obj -> obj.getValue()).sum();
DecimalFormat decimalFormat = new DecimalFormat();
decimalFormat.setMaximumFractionDigits(2); // 保留两位小数
decimalFormat.setRoundingMode(RoundingMode.HALF_UP); // 设置具体的进位机制
double val = ComputeUtils.div2(sum, departAbilityEvaluationList.size());
DepartAbilityEvaluation vo = new DepartAbilityEvaluation();
vo.setDepetId(departId);
vo.setValue(val);
vo.setCapacityId(key);
vo.setCapacityName(departAbilityEvaluationList.get(0).getCapacityName());
vos.add(vo);
});
//能力评估
resultMap.put("departAbilityEvaluation", vos);
List<Integer> years = DateUtils.getLastxYear(5); List<Integer> years = DateUtils.getLastxYear(5);
List<Annual> annualList = iAnnualService.list(new LambdaQueryWrapper<Annual>().in(Annual::getAnnualName, years).orderByAsc(Annual::getAnnualName)); List<Annual> annualList = iAnnualService.list(new LambdaQueryWrapper<Annual>()
.in(Annual::getAnnualName, years)
.eq(Annual::getSysOrgCode, sysDepart.getOrgCode())
.orderByAsc(Annual::getAnnualName));
List<Last5YearDataVo> last5YearDataVos = new LinkedList<>(); List<Last5YearDataVo> last5YearDataVos = new LinkedList<>();
Optional.ofNullable(annualList).orElse(new LinkedList<>()).stream().forEach(annual -> { Optional.ofNullable(annualList).orElse(new LinkedList<>()).stream().forEach(annual -> {
Last5YearDataVo last5YearDataVo = new Last5YearDataVo(); Last5YearDataVo last5YearDataVo = new Last5YearDataVo();
@ -250,6 +305,108 @@ public class CompSystemBigScreenServiceImpl implements CompSystemBigScreenServic
return resultMap; 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);
Long count = iAnnualCompetitionProjectRegistrationService.count();
//总人数
compCounts.put("pointCount", 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();
List<DepartAbilityEvaluation> vos = new LinkedList<>();
Map<String, List<DepartAbilityEvaluation>> capacityIdListMap = Optional.ofNullable(departAbilityEvaluations).orElse(new LinkedList<>()).stream()
.collect(Collectors.groupingBy(DepartAbilityEvaluation::getCapacityId));
//遍历分组后的结果
Optional.ofNullable(capacityIdListMap).orElse(new LinkedHashMap<>()).forEach((key, value) -> {
List<DepartAbilityEvaluation> departAbilityEvaluationList = value;
double sum = departAbilityEvaluationList.stream().mapToDouble(obj -> obj.getValue()).sum();
DecimalFormat decimalFormat = new DecimalFormat();
decimalFormat.setMaximumFractionDigits(2); // 保留两位小数
decimalFormat.setRoundingMode(RoundingMode.HALF_UP); // 设置具体的进位机制
double val = ComputeUtils.div2(sum, departAbilityEvaluationList.size());
DepartAbilityEvaluation vo = new DepartAbilityEvaluation();
vo.setValue(val);
vo.setCapacityId(key);
vo.setCapacityName(departAbilityEvaluationList.get(0).getCapacityName());
vos.add(vo);
});
resultMap.put("abilityEvaluation", vos);
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<CompVo> getCompList() {
List<AnnualCompPoint> annualCompPointList = iAnnualCompPointService.list(new LambdaQueryWrapper<AnnualCompPoint>() List<AnnualCompPoint> annualCompPointList = iAnnualCompPointService.list(new LambdaQueryWrapper<AnnualCompPoint>()
.eq(AnnualCompPoint::getRequireApply, "Y")); .eq(AnnualCompPoint::getRequireApply, "Y"));
@ -264,7 +421,9 @@ public class CompSystemBigScreenServiceImpl implements CompSystemBigScreenServic
if (!ObjectUtils.isEmpty(annualComp)) { if (!ObjectUtils.isEmpty(annualComp)) {
Comp comp = iCompService.getById(annualComp.getCompid()); Comp comp = iCompService.getById(annualComp.getCompid());
if (!ObjectUtils.isEmpty(comp)) { if (!ObjectUtils.isEmpty(comp)) {
compVo.setCompId(comp.getId());
compVo.setCompName(comp.getCompName()); compVo.setCompName(comp.getCompName());
compVo.setCompOrganId(comp.getCompOrgan());
SysDepart sysDepart = iSysDepartService.getById(comp.getCompOrgan()); SysDepart sysDepart = iSysDepartService.getById(comp.getCompOrgan());
compVo.setCompOrganName(sysDepart.getDepartName()); compVo.setCompOrganName(sysDepart.getDepartName());
} }
@ -273,4 +432,40 @@ public class CompSystemBigScreenServiceImpl implements CompSystemBigScreenServic
}); });
return compVoList; return compVoList;
} }
List<CompVo> getCompList4Depart(SysDepart sysDepart) {
//比赛表
List<Comp> compList = iCompService.list(new LambdaQueryWrapper<Comp>().eq(Comp::getCompOrgan, sysDepart.getId()));
List<CompVo> compVoList = new LinkedList<>();
Optional.ofNullable(compList).orElse(new LinkedList<>()).stream().forEach(c -> {
CompVo compVo = new CompVo();
compVo.setCompId(c.getId());
compVo.setCompName(c.getCompName());
compVo.setCompOrganId(sysDepart.getId());
compVo.setCompOrganName(sysDepart.getDepartName());
compVo.setNumber(0);
compVo.setAnnualCompPointNumber(0);
//年度比赛表
List<AnnualComp> annualCompList = iAnnualCompService.list(new LambdaQueryWrapper<AnnualComp>().in(AnnualComp::getCompid, c.getId()));
Set<String> annualCompIds = Optional.ofNullable(annualCompList).orElse(new ArrayList<>()).stream().map(annualComp -> annualComp.getId()).collect(Collectors.toSet());
//年度比赛项目表
if (!ObjectUtils.isEmpty(annualCompIds)) {
List<AnnualCompPoint> annualCompPointList = iAnnualCompPointService.list(new LambdaQueryWrapper<AnnualCompPoint>()
.in(AnnualCompPoint::getAnnualCompId, annualCompIds));
compVo.setAnnualCompPointNumber(annualCompPointList.size());
Set<String> annualCompPointIds = Optional.ofNullable(annualCompPointList).orElse(new ArrayList<>()).stream().map(annualCompPoint -> annualCompPoint.getId()).collect(Collectors.toSet());
if (!ObjectUtils.isEmpty(annualCompPointIds)) {
//报名表
List<AnnualCompetitionProjectRegistration> list = iAnnualCompetitionProjectRegistrationService.list(new LambdaQueryWrapper<AnnualCompetitionProjectRegistration>()
.in(AnnualCompetitionProjectRegistration::getAnnualCompid, annualCompPointIds)
.eq(AnnualCompetitionProjectRegistration::getSysOrgCode, sysDepart.getOrgCode())
);
compVo.setNumber(list.size());
}
}
compVoList.add(compVo);
});
return compVoList;
}
} }

@ -14,8 +14,11 @@ import java.io.Serializable;
@Data @Data
public class CompVo implements Serializable { public class CompVo implements Serializable {
@ApiModelProperty(value = "主键") @ApiModelProperty(value = "比赛id")
private String id; private String compId;
// @ApiModelProperty(value = "年度比赛项目id")
// private String annualCompPointId;
/** /**
* 比赛名称 * 比赛名称
@ -23,11 +26,18 @@ public class CompVo implements Serializable {
@ApiModelProperty(value = "比赛名称") @ApiModelProperty(value = "比赛名称")
private String compName; private String compName;
@ApiModelProperty(value = "负责部门") @ApiModelProperty(value = "部门id")
private String compOrganId;
@ApiModelProperty(value = "部门名称")
private String compOrganName; private String compOrganName;
@ApiModelProperty(value = "奖项名称") @ApiModelProperty(value = "奖项名称")
private java.lang.String awardName; private java.lang.String awardName;
@ApiModelProperty(value = "参数人数")
private Integer number; private Integer number;
@ApiModelProperty(value = "年度比赛项目数")
private Integer annualCompPointNumber;
} }

@ -34,6 +34,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.demo.topic.service.ITopicService; import org.jeecg.modules.demo.topic.service.ITopicService;
import org.jeecg.modules.demo.upfile_persion.entity.UpfilePersion;
import org.jeecg.modules.demo.upfile_persion.service.IUpfilePersionService;
import org.jeecgframework.poi.excel.ExcelImportUtil; import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants; import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams; import org.jeecgframework.poi.excel.entity.ExportParams;
@ -76,6 +78,8 @@ public class ChaoseTopicPersionController extends JeecgController<ChaoseTopicPer
private IAnnComGroTopService annComGroTopService; private IAnnComGroTopService annComGroTopService;
@Autowired @Autowired
private IAnnComGroTopPService annComGroTopPService; private IAnnComGroTopPService annComGroTopPService;
@Autowired
private IUpfilePersionService upfilePersionService;
/** /**
* 分页列表查询 * 分页列表查询
@ -136,7 +140,6 @@ public class ChaoseTopicPersionController extends JeecgController<ChaoseTopicPer
/** /**
* 分页列表查询 * 分页列表查询
* *
* @param chaoseTopicPersion
* @param pageNo * @param pageNo
* @param pageSize * @param pageSize
* @param req * @param req
@ -145,28 +148,30 @@ public class ChaoseTopicPersionController extends JeecgController<ChaoseTopicPer
//@AutoLog(value = "比赛选题-分页列表查询") //@AutoLog(value = "比赛选题-分页列表查询")
@ApiOperation(value = "报名编号-分页列表查询", notes = "报名编号-分页列表查询") @ApiOperation(value = "报名编号-分页列表查询", notes = "报名编号-分页列表查询")
@GetMapping(value = "/bmbhlist") @GetMapping(value = "/bmbhlist")
public Result<IPage<ChaoseTopicPersion>> bmbhlist(ChaoseTopicPersion chaoseTopicPersion, public Result<IPage<UpfilePersion>> bmbhlist(UpfilePersion upfilePersion,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req,@RequestParam(name="xmtmid",required=true) String xmtmid) { HttpServletRequest req,@RequestParam(name="xmtmid",required=true) String xmtmid) {
AnnComGroTop annComGroTop = annComGroTopService.getById(xmtmid); AnnComGroTop annComGroTop = annComGroTopService.getById(xmtmid);
QueryWrapper<ChaoseTopicPersion> queryWrapper = QueryGenerator.initQueryWrapper(chaoseTopicPersion, req.getParameterMap()); QueryWrapper<UpfilePersion> queryWrapper = QueryGenerator.initQueryWrapper(upfilePersion, req.getParameterMap());
queryWrapper.eq("timul",annComGroTop.getTopid()); queryWrapper.eq("annual_id",annComGroTop.getAnnid());
queryWrapper.eq("status","2"); queryWrapper.eq("annual_comp_point_id",annComGroTop.getAnnComP());
queryWrapper.eq("status","0");
AnnComGroTopP annComGroTopP = new AnnComGroTopP(); AnnComGroTopP annComGroTopP = new AnnComGroTopP();
QueryWrapper<AnnComGroTopP> queryWrapperagt = QueryGenerator.initQueryWrapper(annComGroTopP, req.getParameterMap()); QueryWrapper<AnnComGroTopP> queryWrapperagt = QueryGenerator.initQueryWrapper(annComGroTopP, req.getParameterMap());
//queryWrapperagt.eq("ann_com_gro_topid",xmtmid); //queryWrapperagt.eq("ann_com_gro_topid",xmtmid);
queryWrapperagt.eq("topid",annComGroTop.getTopid()); queryWrapperagt.eq("annid",annComGroTop.getAnnid());
queryWrapperagt.eq("ann_com_p",annComGroTop.getAnnComP());
List<AnnComGroTopP> listact = annComGroTopPService.list(queryWrapperagt); List<AnnComGroTopP> listact = annComGroTopPService.list(queryWrapperagt);
String str = ""; String str = "";
for(int i = 0 ; i<listact.size();i++){ for(int i = 0 ; i<listact.size();i++){
str = str+listact.get(i).getBmcode()+","; str = str+listact.get(i).getBmcode()+",";
} }
if(str!=""){ if(str!=""){
queryWrapper.notIn("bmcode",str.split(",")); queryWrapper.notIn("apply_code",str.split(","));
} }
Page<ChaoseTopicPersion> page = new Page<>(pageNo, pageSize); Page<UpfilePersion> page = new Page<>(pageNo, pageSize);
IPage<ChaoseTopicPersion> pageList = chaoseTopicPersionService.page(page, queryWrapper); IPage<UpfilePersion> pageList = upfilePersionService.page(page, queryWrapper);
return Result.OK(pageList); return Result.OK(pageList);
} }
@ -182,12 +187,16 @@ public class ChaoseTopicPersionController extends JeecgController<ChaoseTopicPer
@GetMapping(value = "/bmbhadd") @GetMapping(value = "/bmbhadd")
public Result<String> bmbhadd(@RequestParam(name="ids",required=true) String ids,@RequestParam(name="xmtmid",required=true) String xmtmid) { public Result<String> bmbhadd(@RequestParam(name="ids",required=true) String ids,@RequestParam(name="xmtmid",required=true) String xmtmid) {
String strs[] = ids.split(","); String strs[] = ids.split(",");
AnnComGroTop annComGroTop = annComGroTopService.getById(xmtmid);
for (int i = 0 ; i < strs.length ; i++){ for (int i = 0 ; i < strs.length ; i++){
ChaoseTopicPersion chaoseTopicPersion = chaoseTopicPersionService.getById(strs[i]); UpfilePersion upfilePersion = upfilePersionService.getById(strs[i]);
AnnComGroTopP annComGroTopP = new AnnComGroTopP(); AnnComGroTopP annComGroTopP = new AnnComGroTopP();
annComGroTopP.setAnnComGroTopid(xmtmid); annComGroTopP.setAnnComGroTopid(xmtmid);
annComGroTopP.setTopid(chaoseTopicPersion.getTimul()); annComGroTopP.setBmcode(upfilePersion.getApplyCode());
annComGroTopP.setBmcode(chaoseTopicPersion.getBmcode()); annComGroTopP.setAnnid(annComGroTop.getAnnid());
annComGroTopP.setAnnComP(annComGroTop.getAnnComP());
annComGroTopP.setAnnComPG(annComGroTop.getAnnComPG());
annComGroTopP.setTopicName(upfilePersion.getTopicName());
annComGroTopPService.save(annComGroTopP); annComGroTopPService.save(annComGroTopP);
} }
return Result.OK("绑定成功!"); return Result.OK("绑定成功!");

@ -124,16 +124,15 @@ public class TopicController extends JeecgController<Topic, ITopicService> {
/** /**
* 添加 * 添加
* *
* @param ids
* @return * @return
*/ */
@AutoLog(value = "设置题目添加") @AutoLog(value = "设置题目添加")
@ApiOperation(value="设置题目添加", notes="设置题目添加") @ApiOperation(value="设置题目添加", notes="设置题目添加")
//@RequiresPermissions("expert:expert:add") //@RequiresPermissions("expert:expert:add")
@GetMapping(value = "/szadd") @GetMapping(value = "/szadd")
public Result<String> szadd(@RequestParam(name="ids",required=true) String ids,@RequestParam(name="ndbsxzid",required=true) String ndbsxzid) { public Result<String> szadd(@RequestParam(name="ndbsxzid",required=true) String ndbsxzid,HttpServletRequest req) {
AnnualCompGroup annualCompGroup = annualCompGroupService.getById(ndbsxzid); AnnualCompGroup annualCompGroup = annualCompGroupService.getById(ndbsxzid);
String str[] =ids.split(","); /* String str[] =ids.split(",");
for (int i = 0 ; i < str.length;i++){ for (int i = 0 ; i < str.length;i++){
AnnComGroTop annComGroTop = new AnnComGroTop(); AnnComGroTop annComGroTop = new AnnComGroTop();
annComGroTop.setAnnid(annualCompGroup.getAnnal()); annComGroTop.setAnnid(annualCompGroup.getAnnal());
@ -141,8 +140,23 @@ public class TopicController extends JeecgController<Topic, ITopicService> {
annComGroTop.setAnnComPG(ndbsxzid); annComGroTop.setAnnComPG(ndbsxzid);
annComGroTop.setTopid(str[i]); annComGroTop.setTopid(str[i]);
annComGroTopService.save(annComGroTop); annComGroTopService.save(annComGroTop);
}*/
AnnComGroTop annComGroTopnew = new AnnComGroTop();
QueryWrapper<AnnComGroTop> queryWrapper = QueryGenerator.initQueryWrapper(annComGroTopnew, req.getParameterMap());
queryWrapper.eq("annid",annualCompGroup.getAnnal());
queryWrapper.eq("ann_com_p",annualCompGroup.getAnnCompP());
queryWrapper.eq("ann_com_p_g",ndbsxzid);
List<AnnComGroTop> list = annComGroTopService.list(queryWrapper);
if(list.size()==0){
AnnComGroTop annComGroTop = new AnnComGroTop();
annComGroTop.setAnnid(annualCompGroup.getAnnal());
annComGroTop.setAnnComP(annualCompGroup.getAnnCompP());
annComGroTop.setAnnComPG(ndbsxzid);
annComGroTopService.save(annComGroTop);
return Result.OK(annComGroTop.getId());
}else{
return Result.OK(list.get(0).getId());
} }
return Result.OK("设置成功!");
} }
// @ApiOperation(value = "题目管理-教务处待审核", notes = "题目管理-分页列表查询") // @ApiOperation(value = "题目管理-教务处待审核", notes = "题目管理-分页列表查询")

@ -5,9 +5,9 @@ import { render } from '/@/utils/common/renderUtils';
//列表数据 //列表数据
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{ {
title: '题目', title: '作品名称',
align: "center", align: "center",
dataIndex: 'topid_dictText' dataIndex: 'topicName'
}, },
{ {
title: '报名编号', title: '报名编号',

@ -19,7 +19,7 @@
* 新增 * 新增
*/ */
function add() { function add() {
title.value = '绑定报名编号'; title.value = '绑定作品';
visible.value = true; visible.value = true;
/* nextTick(() => { /* nextTick(() => {
registerForm.value.add(); registerForm.value.add();

@ -3,20 +3,20 @@ import {FormSchema} from '/@/components/Table';
//列表数据 //列表数据
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{ {
title: '报名编号', title: '作品名称',
align: "center", align: "center",
dataIndex: 'bmcode' dataIndex: 'topicName'
}, },
{ {
title: '题目', title: '报名编号',
align: "center", align: "center",
dataIndex: 'timul_dictText' dataIndex: 'applyCode'
}, }
{ /* {
title: '状态', title: '状态',
align: "center", align: "center",
dataIndex: 'status_dictText' dataIndex: "待评分"
} }*/
]; ];
//查询数据 //查询数据
export const searchFormSchema: FormSchema[] = [ export const searchFormSchema: FormSchema[] = [

@ -12,6 +12,7 @@ enum Api {
importExcel = '/annualcompgroup/annualCompGroup/importExcel', importExcel = '/annualcompgroup/annualCompGroup/importExcel',
exportXls = '/annualcompgroup/annualCompGroup/exportXls', exportXls = '/annualcompgroup/annualCompGroup/exportXls',
queryCompId = '/annualcompgroup/annualCompGroup/queryCompId', queryCompId = '/annualcompgroup/annualCompGroup/queryCompId',
saveTop = '/topic/topic/szadd',
} }
/** /**
@ -73,3 +74,13 @@ export const saveOrUpdate = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save; let url = isUpdate ? Api.edit : Api.save;
return defHttp.post({ url: url, params }, { isTransformResponse: false }); return defHttp.post({ url: url, params }, { isTransformResponse: false });
} }
/**
*
* @param params
* @param isUpdate
*/
export const saveOrUpdateTop = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.saveTop;
return defHttp.get({ url: url, params }, { isTransformResponse: false });
}

@ -201,11 +201,11 @@
onClick: bdcy.bind(null, record), onClick: bdcy.bind(null, record),
//this.$Router.push //this.$Router.push
}, },
{ /* {
label: '设置题目', label: '设置题目',
onClick: sztm.bind(null, record), onClick: sztm.bind(null, record),
//this.$Router.push //this.$Router.push
}, },*/
] ]
} }

@ -0,0 +1,282 @@
<template>
<div>
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="24">
<a-col :lg="8">
<a-form-item label="年度" name="annal">
<j-dict-select-tag placeholder="请选择年度" v-model:value="queryParam.annal" dictCode="annual,annual_name,id"/>
</a-form-item>
</a-col>
<a-col :lg="8">
<a-form-item label="小组名称" name="name">
<a-input placeholder="请输入小组名称" v-model:value="queryParam.name"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
<a @click="toggleSearchStatus = !toggleSearchStatus" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<Icon :icon="toggleSearchStatus ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />
</a>
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题-->
<template #tableTitle>
<!-- <a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>-->
<a-dropdown v-if="selectedRowKeys.length > 0">
<template #overlay>
<a-menu>
<a-menu-item key="1" @click="batchHandleDelete">
<Icon icon="ant-design:delete-outlined"></Icon>
删除
</a-menu-item>
</a-menu>
</template>
<a-button>批量操作
<Icon icon="mdi:chevron-down"></Icon>
</a-button>
</a-dropdown>
</template>
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)"/>
</template>
<!--字段回显插槽-->
<template #htmlSlot="{text}">
<div v-html="text"></div>
</template>
<!--省市区字段回显插槽-->
<template #pcaSlot="{text}">
{{ getAreaTextByCode(text) }}
</template>
<template #fileSlot="{text}">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
</template>
</BasicTable>
<!-- 表单区域 -->
<AnnualCompGroupModal ref="registerModal" @success="handleSuccess"></AnnualCompGroupModal>
</div>
</template>
<script lang="ts" name="annualcompgroup-annualCompGroup" setup>
import { ref, reactive } from 'vue';
import { useRouter } from 'vue-router';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns } from './AnnualCompGroup.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl,saveOrUpdateTop } from './AnnualCompGroup.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import AnnualCompGroupModal from './components/AnnualCompGroupModal.vue'
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import JSearchSelect from '/@/components/Form/src/jeecg/components/JSearchSelect.vue';
import {saveOrUpdate} from "/@/views/anncomgrotop/components/Topic.api";
import {defHttp} from "/@/utils/http/axios";
const router = useRouter();
const formRef = ref();
const queryParam = reactive<any>({});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
title: '年度比赛项目专家小组',
api: list,
columns,
canResize:false,
useSearchForm: false,
actionColumn: {
width: 120,
fixed: 'right',
},
beforeFetch: (params) => {
return Object.assign(params, queryParam);
},
},
exportConfig: {
name: "年度比赛项目专家小组",
url: getExportUrl,
params: queryParam,
},
importConfig: {
url: getImportUrl,
success: handleSuccess
},
});
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
const labelCol = reactive({
xs: { span: 24 },
sm: { span: 7 },
});
const wrapperCol = reactive({
xs: { span: 24 },
sm: { span: 16 },
});
/**
* 新增事件
*/
function handleAdd() {
registerModal.value.disableSubmit = false;
registerModal.value.add();
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
registerModal.value.disableSubmit = false;
registerModal.value.edit(record);
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
registerModal.value.disableSubmit = true;
registerModal.value.edit(record);
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({ id: record.id }, handleSuccess);
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
}
/**
* 成功回调
*/
function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
/**
* 操作栏
*/
function getTableAction(record) {
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
},
{
label: '绑定作品',
onClick: sztm.bind(null, record),
//this.$Router.push
},
];
}
/**
* 下拉操作栏
*/
function getDropDownAction(record) {
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
}
},
/* {
label: '绑定成员',
onClick: bdcy.bind(null, record),
//this.$Router.push
},*/
]
}
/**
* 绑定成员事件
*/
function bdcy(record: Recordable) {
//console.log(record.annalComp)
//let ndbsid = record.annalComp;
let id= record.id;
router.push({ path: '/expgroup/ExpGroupList', query: {id} })
}
/**
* 设置题目事件
*/
async function sztm(record: Recordable) {
//console.log(record.annalComp)
//let ndbsid = record.annalComp;
let ndbsxzid= record.id;
await saveOrUpdateTop({ndbsxzid:ndbsxzid}, false)
.then((res) => {
if (res.success) {
console.log(res.result)
let id =res.result;
router.push({ path: '/anncomgrotopp/AnnComGroTopPList', query: {id} })
}
});
//router.push({ path: '/anncomgrotop/AnnComGroTopList', query: {id} })
}
/**
* 查询
*/
function searchQuery() {
reload();
}
/**
* 重置
*/
function searchReset() {
formRef.value.resetFields();
selectedRowKeys.value = [];
//
reload();
}
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
.table-page-search-submitButtons {
display: block;
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust{
width: calc(50% - 15px);
min-width: 100px !important;
}
.query-group-split-cust{
width: 30px;
display: inline-block;
text-align: center
}
}
</style>
Loading…
Cancel
Save