|
@@ -266,8 +266,10 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
|
|
|
//企业ID
|
|
|
String tenant = ServletUtils.getRequest().getHeader("TenantId");
|
|
|
- SysTenant sysTenant = sysTenantService.getById(Long.valueOf(tenant));
|
|
|
-
|
|
|
+// SysTenant sysTenant = sysTenantService.getById(Long.valueOf(tenant));
|
|
|
+ SysOldOrg org = sysOldOrgService.list(new LambdaQueryWrapper<SysOldOrg>()
|
|
|
+ .eq(SysOldOrg::getTenantId, tenant)
|
|
|
+ .last("limit 1")).stream().findFirst().orElse(null);
|
|
|
//班级绑定学员资料推送和学时推送
|
|
|
List<ClassGradeInterface> list = iClassGradeInterfaceService.list(new LambdaQueryWrapper<ClassGradeInterface>()
|
|
|
.eq(ClassGradeInterface::getStatus, 1)
|
|
@@ -291,7 +293,7 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
//2021 和 2022 年的课程不在祥粤学习
|
|
|
if (businessName.contains("继续教育") && businessName.contains("施工现场专业人员")) {
|
|
|
String sevenYear = goods.getSevenYear();
|
|
|
- if (!Arrays.asList("2021,2022").contains(sevenYear)){
|
|
|
+ if (!Arrays.asList("2021","2022").contains(sevenYear)){
|
|
|
List<ClassGradeInterface> interfaceList = iClassGradeInterfaceService
|
|
|
.list(new LambdaQueryWrapper<ClassGradeInterface>()
|
|
|
.in(ClassGradeInterface::getType, Arrays.asList(1, 3))
|
|
@@ -310,111 +312,112 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
}
|
|
|
String sevenCode = getSevenCode(goodsId);
|
|
|
add.setSevenCode(sevenCode);
|
|
|
- }else if (("继续教育二级建造师".equals(businessName)) || ("继续教育二级造价师".equals(businessName))){
|
|
|
- erJfalg = true;
|
|
|
- ezJfalg = "继续教育二级造价师".equals(businessName);
|
|
|
- add.setOfficialName(ServletUtils.getEncoded("PIY"));
|
|
|
}
|
|
|
+// else if (("继续教育二级建造师".equals(businessName)) || ("继续教育二级造价师".equals(businessName))){
|
|
|
+// erJfalg = true;
|
|
|
+// ezJfalg = "继续教育二级造价师".equals(businessName);
|
|
|
+// add.setOfficialName(ServletUtils.getEncoded("PIY"));
|
|
|
+// }
|
|
|
}
|
|
|
//是否创建官方班级编号
|
|
|
-// if (bo.getClassGradeGoodsAddBos() != null &&
|
|
|
-// (ObjectUtils.isNull(bo.getClassStatus()) || 0 == bo.getClassStatus()) && org.getShareClass() == 1) {
|
|
|
-// Long goodsId = bo.getClassGradeGoodsAddBos()[0];
|
|
|
-// Goods goods = iGoodsService.getById(goodsId);
|
|
|
-// CourseBusiness business = iCourseBusinessService.getById(goods.getBusinessId());
|
|
|
-// CourseBusinessQueryBo businessQueryBo = new CourseBusinessQueryBo();
|
|
|
-// businessQueryBo.setId(goods.getBusinessId());
|
|
|
-// String fullName = iCourseBusinessService.queryFullName(businessQueryBo);
|
|
|
-// if (("继续教育二级建造师".equals(fullName)) || ("继续教育二级造价师".equals(fullName))) {
|
|
|
-// 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) {
|
|
|
-// //该业务层次下有多个商品
|
|
|
-// List<Long> goodsIds = goodsList.stream().filter(item -> !item.getGoodsId().equals(goodsId)).map(Goods::getGoodsId).collect(Collectors.toList());
|
|
|
-// List<ClassGradeGoods> goodsGradeList = iClassGradeGoodsService
|
|
|
-// .list(new LambdaQueryWrapper<ClassGradeGoods>()
|
|
|
-// .in(ClassGradeGoods::getGoodsId, goodsIds));
|
|
|
-// if (CollectionUtils.isNotEmpty(goodsGradeList)) {
|
|
|
-// Map<Long, List<ClassGradeGoods>> map = goodsGradeList.stream().collect(Collectors.groupingBy(ClassGradeGoods::getGoodsId));
|
|
|
-// List<ClassGradeSortBo> sortList = new ArrayList<>();
|
|
|
-// map.forEach((k, v) -> {
|
|
|
-// ClassGradeSortBo sortBo = new ClassGradeSortBo();
|
|
|
-// sortBo.setKey(k);
|
|
|
-// sortBo.setSize(v.size());
|
|
|
-// sortList.add(sortBo);
|
|
|
-// });
|
|
|
-// ClassGradeSortBo sortBo = sortList.stream().sorted(Comparator.comparing(ClassGradeSortBo::getSize).reversed()).findFirst().orElse(null);
|
|
|
-// List<ClassGradeGoods> classGradesMax = map.get(sortBo.getKey()).stream().sorted(Comparator.comparing(ClassGradeGoods::getCreateTime)).collect(Collectors.toList());
|
|
|
-// //班级信息
|
|
|
-// List<ClassGrade> listGrade = listByIds(classGradesMax.stream().map(ClassGradeGoods::getGradeId).collect(Collectors.toList()));
|
|
|
-// //获取当前机构商品下的班级
|
|
|
-// List<ClassGradeGoods> gradeGoods = iClassGradeGoodsService.getGradeGoodsList(goods.getGoodsId());
|
|
|
-// if (gradeGoods.size() < listGrade.size()) {
|
|
|
-// ClassGrade grade = listGrade.get(gradeGoods.size());
|
|
|
-// if (checkEjjjPeopleNumLimit(business.getId(), grade.getGradeId())) {
|
|
|
-// add.setOfficialName(listGrade.get(gradeGoods.size()).getOfficialName());
|
|
|
-// add.setClassStatus(0);
|
|
|
-// } else {
|
|
|
-// add.setOfficialName(ServletUtils.getEncoded("PIY"));
|
|
|
-// add.setClassStatus(0);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-//
|
|
|
-// if (StringUtils.isBlank(add.getOfficialName())) {
|
|
|
-// List<CourseSubject> courseSubjectList = iCourseSubjectService.listByIds(Arrays.asList(goods.getSubjectIds().split(",")));
|
|
|
-// List<String> subNames = courseSubjectList.stream().map(CourseSubject::getSubjectName).collect(Collectors.toList());
|
|
|
-// List<Long> subIds = iCourseSubjectService.getIdsByTenant(subNames);
|
|
|
-// //获取业务层次下所有班级
|
|
|
-// ClassGradeListBo bgListBo = new ClassGradeListBo();
|
|
|
-// bgListBo.setAliasName(business.getAliasName());
|
|
|
-// bgListBo.setSubIds(subIds);
|
|
|
-// List<ClassGrade> classGrades = baseMapper.getGradeListByTenant(bgListBo);
|
|
|
-// if (CollectionUtils.isEmpty(classGrades)) {
|
|
|
-// //生成预报名官方编号
|
|
|
-// add.setOfficialName(ServletUtils.getEncoded("PIY"));
|
|
|
-// add.setClassStatus(0);
|
|
|
-// } else {
|
|
|
-// //获取班级创建最多的机构
|
|
|
-// Map<Long, List<ClassGrade>> map = classGrades.stream().collect(Collectors.groupingBy(ClassGrade::getTenantId));
|
|
|
-// List<ClassGradeSortBo> sortList = new ArrayList<>();
|
|
|
-// map.forEach((k, v) -> {
|
|
|
-// ClassGradeSortBo sortBo = new ClassGradeSortBo();
|
|
|
-// sortBo.setKey(k);
|
|
|
-// Map<String, List<ClassGrade>> collect = v.stream().collect(Collectors.groupingBy(ClassGrade::getOfficialName));
|
|
|
-// sortBo.setSize(collect.keySet().size());
|
|
|
-// sortList.add(sortBo);
|
|
|
-// });
|
|
|
-// ClassGradeSortBo sortBo = sortList.stream().sorted(Comparator.comparing(ClassGradeSortBo::getSize).reversed()).findFirst().orElse(null);
|
|
|
-// List<ClassGrade> classGradesMax = map.get(sortBo.getKey()).stream().sorted(Comparator.comparing(ClassGrade::getCreateTime)).collect(Collectors.toList());
|
|
|
-// //去重
|
|
|
-// List<String> codeStrs = new ArrayList<>();
|
|
|
-// for (ClassGrade gradesMax : classGradesMax) {
|
|
|
-// if (codeStrs.contains(gradesMax.getOfficialName())) {
|
|
|
-// continue;
|
|
|
-// }
|
|
|
-// codeStrs.add(gradesMax.getOfficialName());
|
|
|
-// }
|
|
|
-// //获取当前机构商品下的班级
|
|
|
-// List<ClassGradeGoods> gradeGoods = iClassGradeGoodsService.getGradeGoodsList(goodsId);
|
|
|
-// if (gradeGoods.size() < codeStrs.size()) {
|
|
|
-// add.setOfficialName(codeStrs.get(gradeGoods.size()));
|
|
|
-// add.setClassStatus(0);
|
|
|
-// } else {
|
|
|
-// //生成预报名官方编号
|
|
|
-// add.setOfficialName(ServletUtils.getEncoded("PIY"));
|
|
|
-// add.setClassStatus(0);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
+ if (bo.getClassGradeGoodsAddBos() != null &&
|
|
|
+ (ObjectUtils.isNull(bo.getClassStatus()) || 0 == bo.getClassStatus()) && org.getShareClass() == 1) {
|
|
|
+ Long goodsId = bo.getClassGradeGoodsAddBos()[0];
|
|
|
+ Goods goods = iGoodsService.getById(goodsId);
|
|
|
+ CourseBusiness business = iCourseBusinessService.getById(goods.getBusinessId());
|
|
|
+ CourseBusinessQueryBo businessQueryBo = new CourseBusinessQueryBo();
|
|
|
+ businessQueryBo.setId(goods.getBusinessId());
|
|
|
+ String fullName = iCourseBusinessService.queryFullName(businessQueryBo);
|
|
|
+ if (("继续教育二级建造师".equals(fullName)) || ("继续教育二级造价师".equals(fullName))) {
|
|
|
+ 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) {
|
|
|
+ //该业务层次下有多个商品
|
|
|
+ List<Long> goodsIds = goodsList.stream().filter(item -> !item.getGoodsId().equals(goodsId)).map(Goods::getGoodsId).collect(Collectors.toList());
|
|
|
+ List<ClassGradeGoods> goodsGradeList = iClassGradeGoodsService
|
|
|
+ .list(new LambdaQueryWrapper<ClassGradeGoods>()
|
|
|
+ .in(ClassGradeGoods::getGoodsId, goodsIds));
|
|
|
+ if (CollectionUtils.isNotEmpty(goodsGradeList)) {
|
|
|
+ Map<Long, List<ClassGradeGoods>> map = goodsGradeList.stream().collect(Collectors.groupingBy(ClassGradeGoods::getGoodsId));
|
|
|
+ List<ClassGradeSortBo> sortList = new ArrayList<>();
|
|
|
+ map.forEach((k, v) -> {
|
|
|
+ ClassGradeSortBo sortBo = new ClassGradeSortBo();
|
|
|
+ sortBo.setKey(k);
|
|
|
+ sortBo.setSize(v.size());
|
|
|
+ sortList.add(sortBo);
|
|
|
+ });
|
|
|
+ ClassGradeSortBo sortBo = sortList.stream().sorted(Comparator.comparing(ClassGradeSortBo::getSize).reversed()).findFirst().orElse(null);
|
|
|
+ List<ClassGradeGoods> classGradesMax = map.get(sortBo.getKey()).stream().sorted(Comparator.comparing(ClassGradeGoods::getCreateTime)).collect(Collectors.toList());
|
|
|
+ //班级信息
|
|
|
+ List<ClassGrade> listGrade = listByIds(classGradesMax.stream().map(ClassGradeGoods::getGradeId).collect(Collectors.toList()));
|
|
|
+ //获取当前机构商品下的班级
|
|
|
+ List<ClassGradeGoods> gradeGoods = iClassGradeGoodsService.getGradeGoodsList(goods.getGoodsId());
|
|
|
+ if (gradeGoods.size() < listGrade.size()) {
|
|
|
+ ClassGrade grade = listGrade.get(gradeGoods.size());
|
|
|
+ if (checkEjjjPeopleNumLimit(business.getId(), grade.getGradeId())) {
|
|
|
+ add.setOfficialName(listGrade.get(gradeGoods.size()).getOfficialName());
|
|
|
+ add.setClassStatus(0);
|
|
|
+ } else {
|
|
|
+ add.setOfficialName(ServletUtils.getEncoded("PIY"));
|
|
|
+ add.setClassStatus(0);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (StringUtils.isBlank(add.getOfficialName())) {
|
|
|
+ List<CourseSubject> courseSubjectList = iCourseSubjectService.listByIds(Arrays.asList(goods.getSubjectIds().split(",")));
|
|
|
+ List<String> subNames = courseSubjectList.stream().map(CourseSubject::getSubjectName).collect(Collectors.toList());
|
|
|
+ List<Long> subIds = iCourseSubjectService.getIdsByTenant(subNames);
|
|
|
+ //获取业务层次下所有班级
|
|
|
+ ClassGradeListBo bgListBo = new ClassGradeListBo();
|
|
|
+ bgListBo.setAliasName(business.getAliasName());
|
|
|
+ bgListBo.setSubIds(subIds);
|
|
|
+ List<ClassGrade> classGrades = baseMapper.getGradeListByTenant(bgListBo);
|
|
|
+ if (CollectionUtils.isEmpty(classGrades)) {
|
|
|
+ //生成预报名官方编号
|
|
|
+ add.setOfficialName(ServletUtils.getEncoded("PIY"));
|
|
|
+ add.setClassStatus(0);
|
|
|
+ } else {
|
|
|
+ //获取班级创建最多的机构
|
|
|
+ Map<Long, List<ClassGrade>> map = classGrades.stream().collect(Collectors.groupingBy(ClassGrade::getTenantId));
|
|
|
+ List<ClassGradeSortBo> sortList = new ArrayList<>();
|
|
|
+ map.forEach((k, v) -> {
|
|
|
+ ClassGradeSortBo sortBo = new ClassGradeSortBo();
|
|
|
+ sortBo.setKey(k);
|
|
|
+ Map<String, List<ClassGrade>> collect = v.stream().collect(Collectors.groupingBy(ClassGrade::getOfficialName));
|
|
|
+ sortBo.setSize(collect.keySet().size());
|
|
|
+ sortList.add(sortBo);
|
|
|
+ });
|
|
|
+ ClassGradeSortBo sortBo = sortList.stream().sorted(Comparator.comparing(ClassGradeSortBo::getSize).reversed()).findFirst().orElse(null);
|
|
|
+ List<ClassGrade> classGradesMax = map.get(sortBo.getKey()).stream().sorted(Comparator.comparing(ClassGrade::getCreateTime)).collect(Collectors.toList());
|
|
|
+ //去重
|
|
|
+ List<String> codeStrs = new ArrayList<>();
|
|
|
+ for (ClassGrade gradesMax : classGradesMax) {
|
|
|
+ if (codeStrs.contains(gradesMax.getOfficialName())) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ codeStrs.add(gradesMax.getOfficialName());
|
|
|
+ }
|
|
|
+ //获取当前机构商品下的班级
|
|
|
+ List<ClassGradeGoods> gradeGoods = iClassGradeGoodsService.getGradeGoodsList(goodsId);
|
|
|
+ if (gradeGoods.size() < codeStrs.size()) {
|
|
|
+ add.setOfficialName(codeStrs.get(gradeGoods.size()));
|
|
|
+ add.setClassStatus(0);
|
|
|
+ } else {
|
|
|
+ //生成预报名官方编号
|
|
|
+ add.setOfficialName(ServletUtils.getEncoded("PIY"));
|
|
|
+ add.setClassStatus(0);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
boolean save = this.save(add);
|
|
|
|
|
|
//添加班级商品
|
|
@@ -442,42 +445,42 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
classGradeSysService.save(classGradeSys);
|
|
|
}
|
|
|
|
|
|
- if (erJfalg && bo.getClassGradeGoodsAddBos() != null){
|
|
|
- //二建继教班级创建,所有共享班级机构同步创建
|
|
|
- synchronousCreation(add,sysTenant,bo.getClassGradeGoodsAddBos()[0]);
|
|
|
- //通知旧系统
|
|
|
- CreateSameClassBo classBo = new CreateSameClassBo();
|
|
|
- if (ObjectUtils.isNotNull(bo.getClassStatus()) && bo.getClassStatus() == 1){
|
|
|
- classBo.setClassNo(add.getOfficialName());
|
|
|
- classBo.setOpenclassState(1);
|
|
|
- classBo.setBeginTime(DateUtils.timestampToDateFormat(add.getClassStartTime(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
- classBo.setEndTime(DateUtils.timestampToDateFormat(add.getClassEndTime(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
- }else {
|
|
|
- classBo.setClassNo(add.getOfficialName());
|
|
|
- classBo.setOpenclassState(0);
|
|
|
- }
|
|
|
- classBo.setCategoryName(add.getClassName());
|
|
|
- classBo.setPlatformId(ezJfalg?8:5);
|
|
|
- Goods goods = iGoodsService.getById(bo.getClassGradeGoodsAddBos()[0]);
|
|
|
- Major major = iMajorService.getById(goods.getMajorId());
|
|
|
- if (ObjectUtils.isNotNull(major)){
|
|
|
- classBo.setMajorName(major.getCategoryName());
|
|
|
- }
|
|
|
- Long nowTime = DateUtils.getNowTime();
|
|
|
- String sign = ToolsUtils.EncoderByMd5(classBo.getClassNo()+nowTime.toString() + "pubilc2022");
|
|
|
- classBo.setSign(sign);
|
|
|
- classBo.setStamp(nowTime);
|
|
|
- JSONObject param = JSONObject.parseObject(JSONObject.toJSONString(classBo));
|
|
|
- String respone = "";
|
|
|
- try {
|
|
|
- respone = HttpUtils.sendPost(CREATE_EXAM_PATH, param);
|
|
|
- if (!respone.contains("\"Status\":true")) {
|
|
|
- throw new CustomException("旧系统创建班级错误" + respone);
|
|
|
- }
|
|
|
- } catch (Exception e) {
|
|
|
- throw new CustomException("旧系统创建班级错误" + e.getMessage());
|
|
|
- }
|
|
|
- }
|
|
|
+// if (erJfalg && bo.getClassGradeGoodsAddBos() != null){
|
|
|
+// //二建继教班级创建,所有共享班级机构同步创建
|
|
|
+// synchronousCreation(add,sysTenant,bo.getClassGradeGoodsAddBos()[0]);
|
|
|
+// //通知旧系统
|
|
|
+// CreateSameClassBo classBo = new CreateSameClassBo();
|
|
|
+// if (ObjectUtils.isNotNull(bo.getClassStatus()) && bo.getClassStatus() == 1){
|
|
|
+// classBo.setClassNo(add.getOfficialName());
|
|
|
+// classBo.setOpenclassState(1);
|
|
|
+// classBo.setBeginTime(DateUtils.timestampToDateFormat(add.getClassStartTime(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
+// classBo.setEndTime(DateUtils.timestampToDateFormat(add.getClassEndTime(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
+// }else {
|
|
|
+// classBo.setClassNo(add.getOfficialName());
|
|
|
+// classBo.setOpenclassState(0);
|
|
|
+// }
|
|
|
+// classBo.setCategoryName(add.getClassName());
|
|
|
+// classBo.setPlatformId(ezJfalg?8:5);
|
|
|
+// Goods goods = iGoodsService.getById(bo.getClassGradeGoodsAddBos()[0]);
|
|
|
+// Major major = iMajorService.getById(goods.getMajorId());
|
|
|
+// if (ObjectUtils.isNotNull(major)){
|
|
|
+// classBo.setMajorName(major.getCategoryName());
|
|
|
+// }
|
|
|
+// Long nowTime = DateUtils.getNowTime();
|
|
|
+// String sign = ToolsUtils.EncoderByMd5(classBo.getClassNo()+nowTime.toString() + "pubilc2022");
|
|
|
+// classBo.setSign(sign);
|
|
|
+// classBo.setStamp(nowTime);
|
|
|
+// JSONObject param = JSONObject.parseObject(JSONObject.toJSONString(classBo));
|
|
|
+// String respone = "";
|
|
|
+// try {
|
|
|
+// respone = HttpUtils.sendPost(CREATE_EXAM_PATH, param);
|
|
|
+// if (!respone.contains("\"Status\":true")) {
|
|
|
+// throw new CustomException("旧系统创建班级错误" + respone);
|
|
|
+// }
|
|
|
+// } catch (Exception e) {
|
|
|
+// throw new CustomException("旧系统创建班级错误" + e.getMessage());
|
|
|
+// }
|
|
|
+// }
|
|
|
|
|
|
return save;
|
|
|
}
|
|
@@ -582,6 +585,10 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
if (!checkClassUserNum(goods.getBusinessId(), update.getGradeId())) {
|
|
|
throw new RuntimeException("班级人数超过上限,不能开班,请检查!");
|
|
|
}
|
|
|
+ ClassGrade gradeGrade = getById(update.getGradeId());
|
|
|
+ if (StringUtils.isNotBlank(gradeGrade.getOfficialName())) {
|
|
|
+ update.setRegisterCode(gradeGrade.getOfficialName());
|
|
|
+ }
|
|
|
//二建/二造官方信息推送开关打开
|
|
|
List<ClassGradeInterface> interfaceList = iClassGradeInterfaceService
|
|
|
.list(new LambdaQueryWrapper<ClassGradeInterface>()
|
|
@@ -696,10 +703,24 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
|
|
|
ClassGrade grade = getById(update.getGradeId());
|
|
|
if ((("继续教育二级建造师".equals(fullName)) || ("继续教育二级造价师".equals(fullName))) && org.getShareClass() == 1) {
|
|
|
- if (ObjectUtils.isNotNull(grade) && ObjectUtils.isNotNull(grade.getClassStatus()) && grade.getClassStatus() == 1) {
|
|
|
+ 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())
|
|
|
+// .set(ClassGrade::getInterfacePushId,update.getInterfacePushId())
|
|
|
+// .in(ClassGrade::getGradeId,list.stream().map(ClassGrade::getGradeId).collect(Collectors.toList())));
|
|
|
+// }
|
|
|
+
|
|
|
ClassGradeOpenBo openBo = new ClassGradeOpenBo();
|
|
|
- openBo.setRegisterCode(officialName);
|
|
|
openBo.setOfficialName(grade.getOfficialName());
|
|
|
+ openBo.setRegisterCode(grade.getRegisterCode());
|
|
|
openBo.setClassName(grade.getClassName());
|
|
|
openBo.setClassStartTime(grade.getClassStartTime());
|
|
|
openBo.setClassEndTime(grade.getClassEndTime());
|
|
@@ -715,7 +736,6 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
JSONObject param = JSONObject.parseObject(JSONObject.toJSONString(openBo));
|
|
|
String respone = "";
|
|
|
try {
|
|
|
- System.out.println("param = " + param);
|
|
|
respone = HttpUtils.sendPost(CLASS_OPEN_PATH, param);
|
|
|
log.info("查询旧系统班级开班接口结果" + respone, "");
|
|
|
if (!respone.contains("\"Status\":true")) {
|
|
@@ -1499,7 +1519,7 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
}
|
|
|
List<Long> ids = list.stream().map(ClassGrade::getGradeId).collect(Collectors.toList());
|
|
|
// //保留预报名编号
|
|
|
-// baseMapper.UpGradeCodeByIdTenant(ids);
|
|
|
+ baseMapper.UpGradeCodeByIdTenant(ids);
|
|
|
|
|
|
ClassGradeOpenUpBo openUpBo = new ClassGradeOpenUpBo();
|
|
|
openUpBo.setGradeIds(ids);
|