|
@@ -311,25 +311,21 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
Long goodsId = bo.getClassGradeGoodsAddBos()[0];
|
|
|
Goods goods = iGoodsService.getById(goodsId);
|
|
|
String businessName = iGoodsService.getGoodsBusinessName(goodsId);
|
|
|
- //2021 和 2022 年的课程不在祥粤学习
|
|
|
if (businessName.contains("继续教育") && businessName.contains("施工现场专业人员")) {
|
|
|
- String sevenYear = goods.getSevenYear();
|
|
|
- if (!Arrays.asList("2021","2022").contains(sevenYear)){
|
|
|
- List<ClassGradeInterface> interfaceList = iClassGradeInterfaceService
|
|
|
- .list(new LambdaQueryWrapper<ClassGradeInterface>()
|
|
|
- .in(ClassGradeInterface::getType, Arrays.asList(1, 3))
|
|
|
- .eq(ClassGradeInterface::getStatus, 1));
|
|
|
- if (CollectionUtils.isNotEmpty(interfaceList)){
|
|
|
- interfaceList.forEach(item -> {
|
|
|
- if (item.getType() == 1){
|
|
|
- //官方信息推送
|
|
|
- add.setInterfacePushId(item.getId());
|
|
|
- }else if (item.getType() == 3){
|
|
|
- //学时推送
|
|
|
- add.setInterfacePeriodId(item.getId());
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
+ List<ClassGradeInterface> interfaceList = iClassGradeInterfaceService
|
|
|
+ .list(new LambdaQueryWrapper<ClassGradeInterface>()
|
|
|
+ .in(ClassGradeInterface::getType, Arrays.asList(1, 3))
|
|
|
+ .eq(ClassGradeInterface::getStatus, 1));
|
|
|
+ if (CollectionUtils.isNotEmpty(interfaceList)){
|
|
|
+ interfaceList.forEach(item -> {
|
|
|
+ if (item.getType() == 1){
|
|
|
+ //官方信息推送
|
|
|
+ add.setInterfacePushId(item.getId());
|
|
|
+ }else if (item.getType() == 3){
|
|
|
+ //学时推送
|
|
|
+ add.setInterfacePeriodId(item.getId());
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
String sevenCode = getSevenCode(goodsId);
|
|
|
add.setSevenCode(sevenCode);
|
|
@@ -703,28 +699,14 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
classGradeVo.setClassEndTime(update.getClassEndTime());
|
|
|
sendClassSMS(classGradeVo);
|
|
|
}
|
|
|
- if (fullName.contains("继续教育") && fullName.contains("施工现场专业人员") &&
|
|
|
- StringUtils.isNotBlank(goods.getSevenYear()) && Arrays.asList("2021","2022").contains(goods.getSevenYear())){
|
|
|
- //七大员继教2021 2022年班级不开班
|
|
|
- update.setClassStatus(0);
|
|
|
- update.setInterfacePushId(null);
|
|
|
- update.setInterfacePeriodId(null);
|
|
|
- }
|
|
|
this.updateById(update);
|
|
|
if (fullName.contains("继续教育") && fullName.contains("施工现场专业人员") && StringUtils.isNotBlank(classGradeVo.getSevenCode())){
|
|
|
List<ClassGrade> list = baseMapper.getListNoTenant(classGradeVo.getSevenCode(),update.getGradeId());
|
|
|
if (CollectionUtils.isNotEmpty(list)){
|
|
|
- List<ClassGrade> collect = list.stream().filter(item -> {
|
|
|
- ClassGradeGoods classGradeGoods = iClassGradeGoodsService.getOneNoTenant(item.getGradeId());
|
|
|
- Goods goodsOne = iGoodsService.getGoodsByIdNotTenant(classGradeGoods.getGoodsId());
|
|
|
- return StringUtils.isNotBlank(goodsOne.getSevenYear()) && !Arrays.asList("2021", "2022").contains(goodsOne.getSevenYear());
|
|
|
- }).collect(Collectors.toList());
|
|
|
- if (CollectionUtils.isNotEmpty(collect)){
|
|
|
- list.forEach(item ->{
|
|
|
- update.setGradeId(item.getGradeId());
|
|
|
- updateByIdNoTenant(update);
|
|
|
- });
|
|
|
- }
|
|
|
+ list.forEach(item ->{
|
|
|
+ update.setGradeId(item.getGradeId());
|
|
|
+ updateByIdNoTenant(update);
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
|