|
|
@ -447,6 +447,7 @@ public class CompeteService implements ICompeteService{ |
|
|
|
|
|
|
|
/** |
|
|
|
* 判断是否已加入其他团队 |
|
|
|
* |
|
|
|
* @param project 项目信息 |
|
|
|
* @param competeTimeId 比赛ID |
|
|
|
* @param player 选手信息 |
|
|
@ -728,7 +729,7 @@ public class CompeteService implements ICompeteService{ |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public String enrollPlayCount() throws IOException { |
|
|
|
public String enrollPlayCountDownLoad() throws IOException { |
|
|
|
//查询该类型下所有项目的id,name,team信息,排除level为1的的集合
|
|
|
|
int typeId = 2; |
|
|
|
//放总数据集合
|
|
|
@ -811,4 +812,44 @@ public class CompeteService implements ICompeteService{ |
|
|
|
} |
|
|
|
return PropUtil.imgDomain + filepath; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<CompeteVo.GroupNum> enrollPlayCount() { |
|
|
|
//查询该类型下所有项目的id,name,team信息,排除level为1的的集合
|
|
|
|
int typeId = 2; |
|
|
|
//放总数据集合
|
|
|
|
List<CompeteVo.GroupNum> list1 = new ArrayList<>(); |
|
|
|
//根据type 查项目
|
|
|
|
List<CompeteVo.ProjectInfo> projectInfoList = competeEnrollDao.getProject(typeId); |
|
|
|
//根据type 查组别id,组别名
|
|
|
|
List<CompeteVo.Count> groupIdAndNameList = competeEnrollDao.getGroupIdNameFromGroup(typeId); |
|
|
|
for (CompeteVo.ProjectInfo projectInfo : projectInfoList) { |
|
|
|
CompeteVo.GroupNum groupNum = new CompeteVo.GroupNum(); |
|
|
|
groupNum.setName(projectInfo.getName()); |
|
|
|
List<CompeteVo.Count> countList = new ArrayList<>(); |
|
|
|
if (CollectionUtil.isNotEmpty(groupIdAndNameList)) { |
|
|
|
for (CompeteVo.Count groupIdAndName : groupIdAndNameList) { |
|
|
|
CompeteVo.Count count1 = new CompeteVo.Count(); |
|
|
|
count1.setGroup_name(groupIdAndName.getGroup_name()); |
|
|
|
// groupIdAndNameList.forEach(groupIdAndName -> {
|
|
|
|
if (projectInfo.getTeam() == 0) { |
|
|
|
CompeteProjectPlayerExample projectPlayerExample = new CompeteProjectPlayerExample(); |
|
|
|
projectPlayerExample.createCriteria().andProjectIdEqualTo(projectInfo.getId()).andCompeteGroupIdEqualTo(groupIdAndName.getCompete_group_id()); |
|
|
|
long count = competeProjectPlayerMapper.countByExample(projectPlayerExample); |
|
|
|
count1.setCount((int) count); |
|
|
|
} else { |
|
|
|
CompeteTeamExample teamExample = new CompeteTeamExample(); |
|
|
|
teamExample.createCriteria().andProjectIdEqualTo(projectInfo.getId()).andCompeteGroupIdEqualTo(groupIdAndName.getCompete_group_id()); |
|
|
|
long count = competeTeamDao.countByExample(teamExample); |
|
|
|
count1.setCount((int) count); |
|
|
|
} |
|
|
|
// });
|
|
|
|
countList.add(count1); |
|
|
|
} |
|
|
|
} |
|
|
|
groupNum.setCountList(countList); |
|
|
|
list1.add(groupNum); |
|
|
|
} |
|
|
|
return list1; |
|
|
|
} |
|
|
|
} |