|
@@ -27,12 +27,8 @@ import com.zhongzheng.modules.goods.domain.Goods;
|
|
|
import com.zhongzheng.modules.goods.service.IGoodsService;
|
|
|
import com.zhongzheng.modules.goods.vo.GoodsVo;
|
|
|
import com.zhongzheng.modules.grade.bo.*;
|
|
|
-import com.zhongzheng.modules.grade.domain.ClassGradeGoods;
|
|
|
-import com.zhongzheng.modules.grade.domain.ClassGradeSys;
|
|
|
-import com.zhongzheng.modules.grade.domain.ClassGradeUser;
|
|
|
-import com.zhongzheng.modules.grade.service.IClassGradeGoodsService;
|
|
|
-import com.zhongzheng.modules.grade.service.IClassGradeSysService;
|
|
|
-import com.zhongzheng.modules.grade.service.IClassGradeUserService;
|
|
|
+import com.zhongzheng.modules.grade.domain.*;
|
|
|
+import com.zhongzheng.modules.grade.service.*;
|
|
|
import com.zhongzheng.modules.grade.vo.*;
|
|
|
import com.zhongzheng.modules.inform.bo.InformUserAddBo;
|
|
|
import com.zhongzheng.modules.inform.service.IInformRemindService;
|
|
@@ -66,9 +62,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.github.pagehelper.Page;
|
|
|
-import com.zhongzheng.modules.grade.domain.ClassGrade;
|
|
|
import com.zhongzheng.modules.grade.mapper.ClassGradeMapper;
|
|
|
-import com.zhongzheng.modules.grade.service.IClassGradeService;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import java.io.IOException;
|
|
@@ -149,6 +143,9 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
@Autowired
|
|
|
private IClassGradeGoodsService iClassGradeGoodsService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IClassGradeInterfaceService iClassGradeInterfaceService;
|
|
|
+
|
|
|
@Autowired
|
|
|
private ISysOldOrgService iSysOldOrgService;
|
|
|
|
|
@@ -404,6 +401,13 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
if (StringUtils.isNotBlank(gradeGrade.getOfficialName())){
|
|
|
update.setRegisterCode(gradeGrade.getOfficialName());
|
|
|
}
|
|
|
+ //二建/二造官方信息推送开关打开
|
|
|
+ List<ClassGradeInterface> interfaceList = iClassGradeInterfaceService
|
|
|
+ .list(new LambdaQueryWrapper<ClassGradeInterface>()
|
|
|
+ .eq(ClassGradeInterface::getType, 1).last("limit 1"));
|
|
|
+ if (CollectionUtils.isNotEmpty(interfaceList)){
|
|
|
+ update.setInterfacePushId(interfaceList.get(0).getId());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -490,25 +494,28 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
if (("继续教育二级建造师".equals(fullName)) || ("继续教育二级造价师".equals(fullName))) {
|
|
|
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())));
|
|
|
- }
|
|
|
- //官方班级开班通知旧系统
|
|
|
+// 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.setOfficialName(grade.getOfficialName());
|
|
|
openBo.setRegisterCode(grade.getRegisterCode());
|
|
|
openBo.setClassName(grade.getClassName());
|
|
|
openBo.setClassStartTime(grade.getClassStartTime());
|
|
|
openBo.setClassEndTime(grade.getClassEndTime());
|
|
|
+ //开班修改预报名班级下 所有班级
|
|
|
+ this.openOfficialGrade(openBo);
|
|
|
+ //官方班级开班通知旧系统
|
|
|
Long nowTime = DateUtils.getNowTime();
|
|
|
String sign = ToolsUtils.EncoderByMd5(nowTime.toString()+"pubilc2022");
|
|
|
openBo.setSign(sign);
|
|
@@ -1273,6 +1280,18 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
openUpBo.setClassStartTime(bo.getClassStartTime());
|
|
|
openUpBo.setClassEndTime(bo.getClassEndTime());
|
|
|
baseMapper.UpGradeStatusByTenant(openUpBo);
|
|
|
+
|
|
|
+ //开启官方信息推送
|
|
|
+ list.forEach(item -> {
|
|
|
+ ClassGradeInterface interfaceInterface = iClassGradeInterfaceService.getInfterFaceByTenant(1,item.getTenantId());
|
|
|
+ if (ObjectUtils.isNotNull(interfaceInterface)){
|
|
|
+ ClassGradeOpenUpBo upBo = new ClassGradeOpenUpBo();
|
|
|
+ upBo.setGradeId(item.getGradeId());
|
|
|
+ upBo.setInterfacePushId(interfaceInterface.getId());
|
|
|
+ baseMapper.UpGradeInterfaceByTenant(upBo);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
}
|
|
|
|
|
|
@Override
|