he2802 2 yıl önce
ebeveyn
işleme
e444a06778

+ 14 - 14
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/service/impl/ClassGradeServiceImpl.java

@@ -241,18 +241,18 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
         SysOldOrg org = sysOldOrgService.list(new LambdaQueryWrapper<SysOldOrg>()
                 .eq(SysOldOrg::getTenantId, tenant)
                 .last("limit 1")).stream().findFirst().orElse(null);
-        //校验是否二建/二造商品创建班级
-        if (bo.getClassGradeGoodsAddBos() != null &&
-                (ObjectUtils.isNull(bo.getClassStatus()) || 1 == bo.getClassStatus()) && org.getShareClass() == 1) {
-            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 &&
+//                (ObjectUtils.isNull(bo.getClassStatus()) || 1 == bo.getClassStatus()) && org.getShareClass() == 1) {
+//            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 &&
@@ -293,9 +293,9 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
                         //获取当前机构商品下的班级
                         List<ClassGradeGoods> gradeGoods = iClassGradeGoodsService.getGradeGoodsList(goods.getGoodsId());
                         if (gradeGoods.size() < listGrade.size()) {
-                            ClassGrade grade = list.get(gradeGoods.size());
+                            ClassGrade grade = listGrade.get(gradeGoods.size());
                             if (checkEjjjPeopleNumLimit(business.getId(), grade.getGradeId())) {
-                                add.setOfficialName(list.get(gradeGoods.size()).getOfficialName());
+                                add.setOfficialName(listGrade.get(gradeGoods.size()).getOfficialName());
                                 add.setClassStatus(0);
                             } else {
                                 add.setOfficialName(ServletUtils.getEncoded("PIY"));