|
|
@@ -6,6 +6,7 @@ import cn.hutool.core.lang.Validator;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
|
|
import com.zhongzheng.common.annotation.DataScope;
|
|
|
@@ -247,6 +248,8 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
List<Goods> goodsList = iGoodsService.list(new LambdaQueryWrapper<Goods>()
|
|
|
.eq(Goods::getEducationTypeId, goods.getEducationTypeId())
|
|
|
.eq(Goods::getBusinessId, goods.getBusinessId())
|
|
|
+ .eq(Goods::getStatus,1)
|
|
|
+ .eq(Goods::getGoodsStatus,1)
|
|
|
.eq(Goods::getProjectId, goods.getProjectId())
|
|
|
.eq(Goods::getSubjectIds, goods.getSubjectIds()));
|
|
|
if (goodsList.size() > 1){
|
|
|
@@ -468,6 +471,18 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
ClassGrade grade = getById(update.getGradeId());
|
|
|
if (ObjectUtils.isNotNull(grade) && ObjectUtils.isNotNull(grade.getClassStatus())
|
|
|
&& StringUtils.isNotBlank(grade.getOfficialName()) && grade.getClassStatus() == 1){
|
|
|
+ //开班修改预报名班级下 所有班级
|
|
|
+ List<ClassGrade> list = list(new LambdaQueryWrapper<ClassGrade>().eq(ClassGrade::getOfficialName, update.getRegisterCode()));
|
|
|
+ if (CollectionUtils.isNotEmpty(list)){
|
|
|
+ update(new LambdaUpdateWrapper<ClassGrade>()
|
|
|
+ .set(ClassGrade::getOfficialName,update.getOfficialName())
|
|
|
+ .set(ClassGrade::getRegisterCode,update.getRegisterCode())
|
|
|
+ .set(ClassGrade::getClassStartTime,update.getClassStartTime())
|
|
|
+ .set(ClassGrade::getClassEndTime,update.getClassEndTime())
|
|
|
+ .set(ClassGrade::getClassStatus,update.getClassStatus())
|
|
|
+ .set(ClassGrade::getLearningStatus,update.getLearningStatus())
|
|
|
+ .in(ClassGrade::getGradeId,list.stream().map(ClassGrade::getGradeId).collect(Collectors.toList())));
|
|
|
+ }
|
|
|
//官方班级开班通知旧系统
|
|
|
ClassGradeOpenBo openBo = new ClassGradeOpenBo();
|
|
|
openBo.setOfficialName(grade.getOfficialName());
|
|
|
@@ -969,7 +984,7 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
log.info("查询业务系统班级人数失败参数" + params, "");
|
|
|
throw new CustomException("同步查询班级人数请求错误" + e.getMessage());
|
|
|
}
|
|
|
- if ((peopleNum + oldGradeNum) >= 7) { //全系统平台二建班级人数不能超300
|
|
|
+ if ((peopleNum + oldGradeNum) >= 300) { //全系统平台二建班级人数不能超300
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
@@ -1014,7 +1029,7 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
log.info("查询业务系统班级人数失败参数" + params, "");
|
|
|
throw new CustomException("同步查询班级人数请求错误" + e.getMessage());
|
|
|
}
|
|
|
- if ((peopleNum + oldGradeNum) > 7) { //全系统平台二建班级人数不能超300
|
|
|
+ if ((peopleNum + oldGradeNum) > 300) { //全系统平台二建班级人数不能超300
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
@@ -1159,7 +1174,7 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public String getOfficialGradeNum(ClassOfficialNumBo bo) {
|
|
|
+ public ClassUserNumBo getOfficialGradeNum(ClassOfficialNumBo bo) {
|
|
|
List<Long> subIds = iCourseSubjectService.getIdsByTenant(Arrays.asList(bo.getSubName()));
|
|
|
//获取业务层次下所有班级
|
|
|
ClassGradeListBo bgListBo = new ClassGradeListBo();
|
|
|
@@ -1193,13 +1208,26 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
List<ClassGrade> classGradesMax = map.get(sortBo.getKey()).stream().sorted(Comparator.comparing(ClassGrade::getCreateTime)).collect(Collectors.toList());
|
|
|
if(bo.getSortNum() < classGradesMax.size()){
|
|
|
ClassGrade classGrade = classGradesMax.get(bo.getSortNum());
|
|
|
- return classGrade.getOfficialName();
|
|
|
+ ClassUserNumBo classUserNumBo = new ClassUserNumBo();
|
|
|
+ classUserNumBo.setOfficialName(classGrade.getOfficialName());
|
|
|
+ ClassGradeQueryBo classGradeQueryBo = new ClassGradeQueryBo();
|
|
|
+ classGradeQueryBo.setOfficialName(classGrade.getOfficialName());
|
|
|
+ Integer count = baseMapper.queryOfficialGradeCount(classGradeQueryBo);
|
|
|
+ classUserNumBo.setNum(ObjectUtils.isNotNull(count)?count:0);
|
|
|
+ return classUserNumBo;
|
|
|
}else {
|
|
|
//创建新预报名班级
|
|
|
creatClass(goodsIds.get(0),tenantId,encoded);
|
|
|
}
|
|
|
}
|
|
|
- return encoded;
|
|
|
+
|
|
|
+ ClassUserNumBo classUserNumBo = new ClassUserNumBo();
|
|
|
+ classUserNumBo.setOfficialName(encoded);
|
|
|
+ ClassGradeQueryBo classGradeQueryBo = new ClassGradeQueryBo();
|
|
|
+ classGradeQueryBo.setOfficialName(encoded);
|
|
|
+ Integer count = baseMapper.queryOfficialGradeCount(classGradeQueryBo);
|
|
|
+ classUserNumBo.setNum(ObjectUtils.isNotNull(count)?count:0);
|
|
|
+ return classUserNumBo;
|
|
|
}
|
|
|
|
|
|
@Override
|