|
@@ -72,21 +72,26 @@ public class DegreeController extends BaseController {
|
|
|
}
|
|
|
degreeRegistration.setUserId(user.getId());
|
|
|
|
|
|
- IdcardValidator idcardValidator = new IdcardValidator();
|
|
|
- if (!idcardValidator.isValidatedAllIdcard(degreeRegistration.getIdcard())) {
|
|
|
- throw new BizException("身份证号不正确,请核对");
|
|
|
- }
|
|
|
+ if(StringUtils.isNotBlank(degreeRegistration.getIdcard())){
|
|
|
+ IdcardValidator idcardValidator = new IdcardValidator();
|
|
|
+ if (!idcardValidator.isValidatedAllIdcard(degreeRegistration.getIdcard())) {
|
|
|
+ throw new BizException("身份证号不正确,请核对");
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
if(Objects.isNull(degreeRegistration.getOrganId())){
|
|
|
return failed("该分部暂未参与此活动");
|
|
|
}
|
|
|
|
|
|
- SporadicChargeInfo info = sporadicChargeInfoDao.get(degreeRegistration.getSporadicId());
|
|
|
- if (info == null || info.getDelFlag().equals(1)) {
|
|
|
- return failed("报名信息不存在");
|
|
|
- }
|
|
|
- if (info.getOrganId() != 42 || !info.getChargeType().equals(SporadicChargeTypeEnum.LEVEL)) {
|
|
|
- return failed("报名信息不存在");
|
|
|
+ if(Objects.nonNull(degreeRegistration.getSporadicId())){
|
|
|
+ SporadicChargeInfo info = sporadicChargeInfoDao.get(degreeRegistration.getSporadicId());
|
|
|
+ if (info == null || info.getDelFlag().equals(1)) {
|
|
|
+ return failed("报名信息不存在");
|
|
|
+ }
|
|
|
+ if (info.getOrganId() != 42 || !info.getChargeType().equals(SporadicChargeTypeEnum.LEVEL)) {
|
|
|
+ return failed("报名信息不存在");
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
DegreeRegistration degree = degreeRegistrationDao.getWithUserIdAndActivityTag(user.getId(), DegreeRegistrationService.ACTIVITY_TAG);
|