Merge remote-tracking branch 'origin/main'

main
王家东 4 months ago
commit cf4d45aeb6
  1. 3
      jeecg-boot-master/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java
  2. 31
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java
  3. 35
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/vo/Last5YearDataVo.java
  4. 6
      jeecgboot-vue3-master/src/api/common/api.ts
  5. 7
      jeecgboot-vue3-master/src/views/depart/workbench/components/organizingCommittee/organizingCommittee.vue

@ -99,7 +99,7 @@ public class ShiroConfig {
filterChainDefinitionMap.put("/sys/getQrcodeToken/**", "anon"); //监听扫码 filterChainDefinitionMap.put("/sys/getQrcodeToken/**", "anon"); //监听扫码
filterChainDefinitionMap.put("/sys/checkAuth", "anon"); //授权接口排除 filterChainDefinitionMap.put("/sys/checkAuth", "anon"); //授权接口排除
filterChainDefinitionMap.put("/cms/front/**", "anon"); //cms不拦截 filterChainDefinitionMap.put("/cms/front/**", "anon"); //cms不拦截
filterChainDefinitionMap.put("/annualcompetitionprojectregistration/annualCompetitionProjectRegistration/zwhsybsjs", "anon"); //组委会首页接口不拦截 //filterChainDefinitionMap.put("/annualcompetitionprojectregistration/annualCompetitionProjectRegistration/zwhsybsjs", "anon"); //组委会首页接口不拦截
//CMS门户 //CMS门户
filterChainDefinitionMap.put("/cms/front/**","anon"); filterChainDefinitionMap.put("/cms/front/**","anon");
@ -140,7 +140,6 @@ public class ShiroConfig {
//filterChainDefinitionMap.put("/test/jeecgDemo/html", "anon"); //模板页面 //filterChainDefinitionMap.put("/test/jeecgDemo/html", "anon"); //模板页面
//filterChainDefinitionMap.put("/test/jeecgDemo/redis/**", "anon"); //redis测试 //filterChainDefinitionMap.put("/test/jeecgDemo/redis/**", "anon"); //redis测试
filterChainDefinitionMap.put("/comp/bigScreen/**", "anon");//比赛大屏 filterChainDefinitionMap.put("/comp/bigScreen/**", "anon");//比赛大屏
filterChainDefinitionMap.put("/user/login/homepage/**", "anon");//比赛大屏
filterChainDefinitionMap.put("/admin/inde/inde", "anon");//比赛大屏 filterChainDefinitionMap.put("/admin/inde/inde", "anon");//比赛大屏
//websocket排除 //websocket排除

@ -975,7 +975,17 @@ public class AnnualCompetitionProjectRegistrationController {
@GetMapping(value = "/zwhsybsjs") @GetMapping(value = "/zwhsybsjs")
public Result<?> zwhsybsjs( HttpServletRequest req) { public Result<?> zwhsybsjs( HttpServletRequest req) {
//获取当前登录用户 最新的年度比赛记录 //获取当前登录用户 最新的年度比赛记录
List<AnnualComp> annualCompList = getZXAnnualComp(req); LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
Comp comp = new Comp();
QueryWrapper<Comp> queryWrappercomp = QueryGenerator.initQueryWrapper(comp, req.getParameterMap());
queryWrappercomp.like("comp_admin",user.getUsername());
List<Comp> list = compService.list(queryWrappercomp);
List<String> ids = list.stream().map(Comp::getId).collect(Collectors.toList());
QueryWrapper<AnnualComp> queryWrapperAnnual = new QueryWrapper<>();
queryWrapperAnnual.in(ids.size()!=0,"compid",ids);
queryWrapperAnnual.orderByDesc("create_time");
List<AnnualComp> annualCompList = annualCompService.list(queryWrapperAnnual);
//List<AnnualComp> annualCompList = getZXAnnualComp(req);
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
//年度比赛名称 //年度比赛名称
map.put("annualCompName",annualCompList.get(0).getName()); map.put("annualCompName",annualCompList.get(0).getName());
@ -992,6 +1002,7 @@ public class AnnualCompetitionProjectRegistrationController {
map.put("bsxmSum",listacp.size()); map.put("bsxmSum",listacp.size());
//前五条项目名称数据以及对应的报名数 //前五条项目名称数据以及对应的报名数
List<Map<String,Object>> xmListMap = new ArrayList<>(); List<Map<String,Object>> xmListMap = new ArrayList<>();
if(listacp.size()>5){
for (int i = 0 ; i <5;i++){ for (int i = 0 ; i <5;i++){
AnnualCompetitionProjectRegistration annualCompetitionProjectRegistration = new AnnualCompetitionProjectRegistration(); AnnualCompetitionProjectRegistration annualCompetitionProjectRegistration = new AnnualCompetitionProjectRegistration();
QueryWrapper<AnnualCompetitionProjectRegistration> queryWrapperbm = QueryGenerator.initQueryWrapper(annualCompetitionProjectRegistration, req.getParameterMap()); QueryWrapper<AnnualCompetitionProjectRegistration> queryWrapperbm = QueryGenerator.initQueryWrapper(annualCompetitionProjectRegistration, req.getParameterMap());
@ -1003,6 +1014,20 @@ public class AnnualCompetitionProjectRegistrationController {
map1.put("xmbmrs",listbm.size()); map1.put("xmbmrs",listbm.size());
xmListMap.add(map1); xmListMap.add(map1);
} }
}else{
for (int m = 0 ; m <listacp.size();m++){
AnnualCompetitionProjectRegistration annualCompetitionProjectRegistration = new AnnualCompetitionProjectRegistration();
QueryWrapper<AnnualCompetitionProjectRegistration> queryWrapperbm = QueryGenerator.initQueryWrapper(annualCompetitionProjectRegistration, req.getParameterMap());
queryWrapperbm.eq("annual_compid",listacp.get(m).getId());
queryWrapperbm.eq("enroll_static", "2");
List<AnnualCompetitionProjectRegistration> listbm = annualCompetitionProjectRegistrationService.list(queryWrapperbm);
Map<String, Object> map1 = new HashMap<>();
map1.put("xmname",listacp.get(m).getObjName());
map1.put("xmbmrs",listbm.size());
xmListMap.add(map1);
}
}
map.put("qwtxmList",xmListMap); map.put("qwtxmList",xmListMap);
//参加比赛队伍数(报名数) //参加比赛队伍数(报名数)
@ -1102,8 +1127,8 @@ public class AnnualCompetitionProjectRegistrationController {
} }
//参赛院系人数排名(只取前六条) //参赛院系人数排名(只取前六条)
if(listcs.size()==0){ if(listcs.size()==0){
map.put("csyxbmpm",null); map.put("csyxbmpm",new ArrayList<>());
map.put("bmxsxxList",null); map.put("bmxsxxList",new ArrayList<>());
}else { }else {
//拿到所有的userid //拿到所有的userid
List<String> userIds = listcs.stream().map(TeamManagement::getUserId).collect(Collectors.toList()); List<String> userIds = listcs.stream().map(TeamManagement::getUserId).collect(Collectors.toList());

@ -1,35 +0,0 @@
package org.jeecg.modules.demo.homepage.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @Description: TODO
* @Author: Z.H.C
* @CreateTime: 2023-11-30 16:08
* @Version: 1.0
*/
@Data
public class Last5YearDataVo implements Serializable {
// @ApiModelProperty(value = "主键")
// private String id;
/**
* 比赛名称
*/
// @ApiModelProperty(value = "比赛名称")
// private String compName;
@ApiModelProperty(value = "年度")
private String year;
@ApiModelProperty(value = "比赛数量")
private Integer compCount;
@ApiModelProperty(value = "参赛人数量")
private Integer personCount;
}

@ -153,3 +153,9 @@ export const getFileblob = (url, parameter) => {
export const uploadMyFile = (url, data) => { export const uploadMyFile = (url, data) => {
return defHttp.uploadMyFile(url, data); return defHttp.uploadMyFile(url, data);
}; };
// 组委会首页
export const getOrganizingCommittee = () => {
return defHttp.get({
url:'/annualcompetitionprojectregistration/annualCompetitionProjectRegistration/zwhsybsjs'
})
}

@ -99,6 +99,7 @@
import cardListTow from '../components/cardListtow.vue'; import cardListTow from '../components/cardListtow.vue';
import cardListThree from '../components/cardListThree.vue'; import cardListThree from '../components/cardListThree.vue';
import echarts from '/@/utils/lib/echarts'; import echarts from '/@/utils/lib/echarts';
import { getOrganizingCommittee }from '/@/api/common/api'
const throttle = (fn: any) => { const throttle = (fn: any) => {
let timer: any; let timer: any;
return function () { return function () {
@ -112,6 +113,12 @@
}, 1000); }, 1000);
}; };
}; };
const getOrganizingCommitteeEvent = async () => {
const res = await getOrganizingCommittee()
console.log(res);
}
getOrganizingCommitteeEvent()
const initContent = () => { const initContent = () => {
const myChart = echarts.init(document.getElementById('chart-content')); const myChart = echarts.init(document.getElementById('chart-content'));
const option = { const option = {

Loading…
Cancel
Save