|
|
|
@ -975,7 +975,17 @@ public class AnnualCompetitionProjectRegistrationController { |
|
|
|
|
@GetMapping(value = "/zwhsybsjs") |
|
|
|
|
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.put("annualCompName",annualCompList.get(0).getName()); |
|
|
|
@ -992,18 +1002,33 @@ public class AnnualCompetitionProjectRegistrationController { |
|
|
|
|
map.put("bsxmSum",listacp.size()); |
|
|
|
|
//前五条项目名称数据以及对应的报名数
|
|
|
|
|
List<Map<String,Object>> xmListMap = new ArrayList<>(); |
|
|
|
|
for (int i = 0 ; i <5;i++){ |
|
|
|
|
AnnualCompetitionProjectRegistration annualCompetitionProjectRegistration = new AnnualCompetitionProjectRegistration(); |
|
|
|
|
QueryWrapper<AnnualCompetitionProjectRegistration> queryWrapperbm = QueryGenerator.initQueryWrapper(annualCompetitionProjectRegistration, req.getParameterMap()); |
|
|
|
|
queryWrapperbm.eq("annual_compid",listacp.get(i).getId()); |
|
|
|
|
queryWrapperbm.eq("enroll_static", "2"); |
|
|
|
|
List<AnnualCompetitionProjectRegistration> listbm = annualCompetitionProjectRegistrationService.list(queryWrapperbm); |
|
|
|
|
Map<String, Object> map1 = new HashMap<>(); |
|
|
|
|
map1.put("xmname",listacp.get(i).getObjName()); |
|
|
|
|
map1.put("xmbmrs",listbm.size()); |
|
|
|
|
xmListMap.add(map1); |
|
|
|
|
if(listacp.size()>5){ |
|
|
|
|
for (int i = 0 ; i <5;i++){ |
|
|
|
|
AnnualCompetitionProjectRegistration annualCompetitionProjectRegistration = new AnnualCompetitionProjectRegistration(); |
|
|
|
|
QueryWrapper<AnnualCompetitionProjectRegistration> queryWrapperbm = QueryGenerator.initQueryWrapper(annualCompetitionProjectRegistration, req.getParameterMap()); |
|
|
|
|
queryWrapperbm.eq("annual_compid",listacp.get(i).getId()); |
|
|
|
|
queryWrapperbm.eq("enroll_static", "2"); |
|
|
|
|
List<AnnualCompetitionProjectRegistration> listbm = annualCompetitionProjectRegistrationService.list(queryWrapperbm); |
|
|
|
|
Map<String, Object> map1 = new HashMap<>(); |
|
|
|
|
map1.put("xmname",listacp.get(i).getObjName()); |
|
|
|
|
map1.put("xmbmrs",listbm.size()); |
|
|
|
|
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); |
|
|
|
|
//参加比赛队伍数(报名数)
|
|
|
|
|
List<String> acpIds = listacp.stream().map(AnnualCompPoint::getId).collect(Collectors.toList()); |
|
|
|
@ -1102,8 +1127,8 @@ public class AnnualCompetitionProjectRegistrationController { |
|
|
|
|
} |
|
|
|
|
//参赛院系人数排名(只取前六条)
|
|
|
|
|
if(listcs.size()==0){ |
|
|
|
|
map.put("csyxbmpm",null); |
|
|
|
|
map.put("bmxsxxList",null); |
|
|
|
|
map.put("csyxbmpm",new ArrayList<>()); |
|
|
|
|
map.put("bmxsxxList",new ArrayList<>()); |
|
|
|
|
}else { |
|
|
|
|
//拿到所有的userid
|
|
|
|
|
List<String> userIds = listcs.stream().map(TeamManagement::getUserId).collect(Collectors.toList()); |
|
|
|
|