|
|
|
@ -281,4 +281,53 @@ public class AnnualCompetitionProjectRegistrationServiceImpl extends ServiceImpl |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//这个主要适用于
|
|
|
|
|
/* @Override |
|
|
|
|
public String trueorflase(StudentSignUpVo studentSignUpVo) { |
|
|
|
|
AnnualCompPoint annualCompPoint = iAnnualCompPointService.getById(studentSignUpVo.getId()); |
|
|
|
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
|
|
|
|
//用于判断个人赛还是团队赛,个人赛是N团队赛是Y
|
|
|
|
|
String flag ="0"; |
|
|
|
|
if (StringUtils.equals("Y", annualCompPoint.getEntryForm())) { |
|
|
|
|
String[] numbersArray = studentSignUpVo.getTeamManagementList().split(","); |
|
|
|
|
List<String> numbersList = Arrays.asList(numbersArray); |
|
|
|
|
//查询是否已经报名过了
|
|
|
|
|
for(int i=0;i<numbersList.size();i++){ |
|
|
|
|
if (finisbaoming(studentSignUpVo.getId(),sysUser.getUsername())){ |
|
|
|
|
flag = "1"; |
|
|
|
|
} |
|
|
|
|
else if (finisbaoming(studentSignUpVo.getId(),numbersList.get(i))){ |
|
|
|
|
flag = "2"; |
|
|
|
|
}else{ |
|
|
|
|
flag = "0"; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
if(finisbaoming(studentSignUpVo.getId(),sysUser.getUsername())){ |
|
|
|
|
flag = "1"; |
|
|
|
|
} else { |
|
|
|
|
flag = "0"; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return flag; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//公共方法,用于检测这个用户是否已经在这个年度比赛项目中已报名
|
|
|
|
|
public boolean finisbaoming(String acpid,String uname){ |
|
|
|
|
boolean flag ; |
|
|
|
|
Integer istrue =0; |
|
|
|
|
SysUser user = iSysUserService.getUserByName(uname); |
|
|
|
|
istrue = annualCompetitionProjectRegistrationMapper.finisbaoming(acpid,user.getId()); |
|
|
|
|
if (istrue>=1){ |
|
|
|
|
flag =true; |
|
|
|
|
} else if (istrue==null){ |
|
|
|
|
flag = false; |
|
|
|
|
} else { |
|
|
|
|
flag = false; |
|
|
|
|
} |
|
|
|
|
return flag; |
|
|
|
|
}*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|