|
@@ -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;
|
|
@@ -468,6 +469,16 @@ 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())
|
|
|
+ .eq(ClassGrade::getGradeId,list.stream().map(ClassGrade::getGradeId).collect(Collectors.toList())));
|
|
|
+ }
|
|
|
//官方班级开班通知旧系统
|
|
|
ClassGradeOpenBo openBo = new ClassGradeOpenBo();
|
|
|
openBo.setOfficialName(grade.getOfficialName());
|
|
@@ -1199,7 +1210,14 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
creatClass(goodsIds.get(0),tenantId,encoded);
|
|
|
}
|
|
|
}
|
|
|
- return encoded;
|
|
|
+
|
|
|
+ Map<String,String> result = new HashMap<>();
|
|
|
+ result.put("officialName",encoded);
|
|
|
+ ClassGradeQueryBo classGradeQueryBo = new ClassGradeQueryBo();
|
|
|
+ classGradeQueryBo.setOfficialName(encoded);
|
|
|
+ Integer count = baseMapper.queryOfficialGradeCount(classGradeQueryBo);
|
|
|
+ result.put("num",ObjectUtils.isNotNull(count.toString())?count.toString():"0");
|
|
|
+ return JSONObject.toJSONString(result);
|
|
|
}
|
|
|
|
|
|
@Override
|