|
@@ -2657,7 +2657,11 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
|
String businessName = iGoodsService.getBusinessName(goodsId);
|
|
String businessName = iGoodsService.getBusinessName(goodsId);
|
|
|
- if (StringUtils.isNotBlank(businessName) && businessName.contains("二级造价师")){
|
|
|
|
|
|
|
+ String tenantId = ServletUtils.getRequest().getHeader("TenantId");
|
|
|
|
|
+ SysTenant tenant = iSysTenantService.getById(tenantId);
|
|
|
|
|
+ if (StringUtils.isNotBlank(businessName) && businessName.contains("二级造价师")
|
|
|
|
|
+ && ObjectUtils.isNotNull(tenant.getSlabSign()) && tenant.getSlabSign() == 2){
|
|
|
|
|
+ //学校二造可以重复
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
|
OrderGoodsQueryBo orderGoodsQueryBo = new OrderGoodsQueryBo();
|
|
OrderGoodsQueryBo orderGoodsQueryBo = new OrderGoodsQueryBo();
|
|
@@ -2829,20 +2833,28 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
}
|
|
}
|
|
|
//预留0空位避免超人数
|
|
//预留0空位避免超人数
|
|
|
if ((classGradeVo.getStudentUpper() - locakStudentNum) > 0) {
|
|
if ((classGradeVo.getStudentUpper() - locakStudentNum) > 0) {
|
|
|
- ClassGradeUser gradeUser = iClassGradeUserService.getOne(new LambdaQueryWrapper<ClassGradeUser>().eq(ClassGradeUser::getGradeId, gradeId)
|
|
|
|
|
- .eq(sevenFlag,ClassGradeUser::getOrderGoodsId,orderGoodsId)
|
|
|
|
|
- .eq(ClassGradeUser::getUserId, userId)
|
|
|
|
|
- .last("limit 1"));
|
|
|
|
|
- if (ObjectUtils.isNotNull(gradeUser) && gradeUser.getStatus() == 1){
|
|
|
|
|
- throw new CustomException("学员已在此班级报名,请选择其他班级!");
|
|
|
|
|
- }
|
|
|
|
|
- //不在此班级内
|
|
|
|
|
- if (Validator.isEmpty(gradeUser)) {
|
|
|
|
|
|
|
+ if (ObjectUtils.isNotNull(sysTenant.getSlabSign()) && sysTenant.getSlabSign() == 2 && businessFull.contains("二级造价师")){
|
|
|
|
|
+ //学校的二造可以重复购买同个班级
|
|
|
//班级还有剩位,直接锁定班级
|
|
//班级还有剩位,直接锁定班级
|
|
|
if (iClassGradeService.checkEjjjPeopleNumLimit(businessId, gradeId)) { //判断全系统平台二建班级人数是否超300
|
|
if (iClassGradeService.checkEjjjPeopleNumLimit(businessId, gradeId)) { //判断全系统平台二建班级人数是否超300
|
|
|
return lockGrade(orderGoodsId, gradeId, userId, goodsId, orderSn,orderGoods.getSevenYear());
|
|
return lockGrade(orderGoodsId, gradeId, userId, goodsId, orderSn,orderGoods.getSevenYear());
|
|
|
}
|
|
}
|
|
|
|
|
+ }else {
|
|
|
|
|
+ ClassGradeUser gradeUser = iClassGradeUserService.getOne(new LambdaQueryWrapper<ClassGradeUser>().eq(ClassGradeUser::getGradeId, gradeId)
|
|
|
|
|
+ .eq(sevenFlag,ClassGradeUser::getOrderGoodsId,orderGoodsId)
|
|
|
|
|
+ .eq(ClassGradeUser::getUserId, userId)
|
|
|
|
|
+ .last("limit 1"));
|
|
|
|
|
+ if (ObjectUtils.isNotNull(gradeUser) && gradeUser.getStatus() == 1){
|
|
|
|
|
+ throw new CustomException("学员已在此班级报名,请选择其他班级!");
|
|
|
|
|
+ }
|
|
|
|
|
+ //不在此班级内
|
|
|
|
|
+ if (Validator.isEmpty(gradeUser)) {
|
|
|
|
|
+ //班级还有剩位,直接锁定班级
|
|
|
|
|
+ if (iClassGradeService.checkEjjjPeopleNumLimit(businessId, gradeId)) { //判断全系统平台二建班级人数是否超300
|
|
|
|
|
+ return lockGrade(orderGoodsId, gradeId, userId, goodsId, orderSn,orderGoods.getSevenYear());
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|