|
@@ -236,6 +236,19 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
if (CollectionUtils.isNotEmpty(list)) {
|
|
if (CollectionUtils.isNotEmpty(list)) {
|
|
throw new RuntimeException("班级名称不能重复");
|
|
throw new RuntimeException("班级名称不能重复");
|
|
}
|
|
}
|
|
|
|
+ //校验是否二建/二造商品创建班级
|
|
|
|
+ if (bo.getClassGradeGoodsAddBos() != null &&
|
|
|
|
+ (ObjectUtils.isNull(bo.getClassStatus()) || 1 == bo.getClassStatus())) {
|
|
|
|
+ Long goodsId = bo.getClassGradeGoodsAddBos()[0];
|
|
|
|
+ Goods goods = iGoodsService.getById(goodsId);
|
|
|
|
+ CourseBusinessQueryBo businessQueryBo = new CourseBusinessQueryBo();
|
|
|
|
+ businessQueryBo.setId(goods.getBusinessId());
|
|
|
|
+ String fullName = iCourseBusinessService.queryFullName(businessQueryBo);
|
|
|
|
+ if (("继续教育二级建造师".equals(fullName)) || ("继续教育二级造价师".equals(fullName))) {
|
|
|
|
+ throw new CustomException("二建/二造不允许直接创建开班班级!");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
//是否创建官方班级编号
|
|
//是否创建官方班级编号
|
|
if (bo.getClassGradeGoodsAddBos() != null &&
|
|
if (bo.getClassGradeGoodsAddBos() != null &&
|
|
(ObjectUtils.isNull(bo.getClassStatus()) || 0 == bo.getClassStatus())) {
|
|
(ObjectUtils.isNull(bo.getClassStatus()) || 0 == bo.getClassStatus())) {
|