|
|
|
@ -471,11 +471,19 @@ public class AnnualCompetitionProjectRegistrationController { |
|
|
|
|
|
|
|
|
|
//判断队伍人数是否合格
|
|
|
|
|
AnnualCompPoint compPoint = annualCompPointService.query().eq("id", info.getAnnualCompid()).one(); |
|
|
|
|
if (managements.size() != compPoint.getTeamNumber()) |
|
|
|
|
return Result.error("队伍人数要求" + compPoint.getTeamNumber() + "人,请重新组队"); |
|
|
|
|
if (instructorSheetList.size() != compPoint.getTeacherNumber()) |
|
|
|
|
return Result.error("老师人数要求" + compPoint.getTeacherNumber() + "人,请重新选择"); |
|
|
|
|
|
|
|
|
|
//只有是团队赛的时候才进行判断,个人赛值判断是不是自己一个人
|
|
|
|
|
if (compPoint.getEntryForm().equals("Y")) { |
|
|
|
|
if (managements.size() != compPoint.getTeamNumber()) |
|
|
|
|
return Result.error("队伍人数要求" + compPoint.getTeamNumber() + "人,请重新组队"); |
|
|
|
|
if (instructorSheetList.size() != compPoint.getTeacherNumber()) |
|
|
|
|
return Result.error("老师人数要求" + compPoint.getTeacherNumber() + "人,请重新选择"); |
|
|
|
|
} else if (compPoint.getEntryForm().equals("N")) { |
|
|
|
|
if (managements.size() >1){ |
|
|
|
|
return Result.error("个人赛只能一个人参加"); |
|
|
|
|
} else if ( !managements.get(0).getUserId().equals(loginUser.getId())) { |
|
|
|
|
return Result.error("你只能为你自己报名"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//判断队员是否已经参加这个比赛
|
|
|
|
|
int i = 1; |
|
|
|
|
for (TeamManagement management : managements) { |
|
|
|
|