he2802 před 3 roky
rodič
revize
509ee3e962

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

@@ -730,14 +730,11 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
 
 
     @Override
     @Override
     public boolean checkEjjjPeopleNumLimit(Long businessId, Long gradeId) {
     public boolean checkEjjjPeopleNumLimit(Long businessId, Long gradeId) {
-        CourseEducationType educationType = iCourseEducationTypeService.getOne(new LambdaQueryWrapper<CourseEducationType>().eq(CourseEducationType::getStatus, 1).eq(CourseEducationType::getEducationName,"继续教育").last("limit 1"));
-        if(Validator.isEmpty(educationType)){
-            return true;
-        }
-        CourseProjectType projectType = iCourseProjectTypeService.getOne(new LambdaQueryWrapper<CourseProjectType>().eq(CourseProjectType::getStatus, 1).eq(CourseProjectType::getEducationId,educationType.getId()).eq(CourseProjectType::getProjectName,"建造师").last("limit 1"));
-        CourseBusiness business = iCourseBusinessService.getOne(new LambdaQueryWrapper<CourseBusiness>().eq(CourseBusiness::getStatus, 1).eq(CourseBusiness::getProjectId,projectType.getId()).eq(CourseBusiness::getBusinessName,"二级").last("limit 1"));
-        if(businessId.longValue()==business.getId().longValue()){
-            //继教二建班级
+        CourseBusinessQueryBo businessQueryBo = new CourseBusinessQueryBo();
+        businessQueryBo.setId(businessId);
+        String fullName = iCourseBusinessService.queryFullName(businessQueryBo);
+        if(("继续教育二级建造师".equals(fullName))||("继续教育二级造价师".equals(fullName))){
+            //继教二建或者继教二造班级
             ClassGradeVo gradeVo = queryById(gradeId);
             ClassGradeVo gradeVo = queryById(gradeId);
             if(Validator.isNotEmpty(gradeVo)&&Validator.isNotEmpty(gradeVo.getOfficialName())){
             if(Validator.isNotEmpty(gradeVo)&&Validator.isNotEmpty(gradeVo.getOfficialName())){
                 ClassGradeQueryBo queryBo = new ClassGradeQueryBo();
                 ClassGradeQueryBo queryBo = new ClassGradeQueryBo();