|
@@ -38,9 +38,10 @@ import com.zhongzheng.modules.inform.service.IInformRemindService;
|
|
|
import com.zhongzheng.modules.inform.service.IInformUserService;
|
|
|
import com.zhongzheng.modules.inform.vo.InformRemindBusinessVo;
|
|
|
import com.zhongzheng.modules.inform.vo.InformRemindVo;
|
|
|
-import com.zhongzheng.modules.order.bo.OrderShareMoneyAddBo;
|
|
|
import com.zhongzheng.modules.order.mapper.OrderMapper;
|
|
|
+import com.zhongzheng.modules.system.domain.SysOldOrg;
|
|
|
import com.zhongzheng.modules.system.domain.SysTenant;
|
|
|
+import com.zhongzheng.modules.system.service.ISysOldOrgService;
|
|
|
import com.zhongzheng.modules.system.service.ISysTenantService;
|
|
|
import com.zhongzheng.modules.user.bo.SubjectStudyRecordQueryBo;
|
|
|
import com.zhongzheng.modules.user.bo.UserUpdateQueryBo;
|
|
@@ -146,6 +147,9 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
@Autowired
|
|
|
private IClassGradeGoodsService iClassGradeGoodsService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ISysOldOrgService iSysOldOrgService;
|
|
|
+
|
|
|
@Autowired
|
|
|
private com.zhongzheng.modules.alisms.service.IAliSmsService IAliSmsService;
|
|
|
|
|
@@ -161,6 +165,9 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
@Value("${oldStudySys.classUserListPath}")
|
|
|
private String CLASS_LIST_PATH;
|
|
|
|
|
|
+ @Value("${oldStudySys.classOpenPath}")
|
|
|
+ private String CLASS_OPEN_PATH;
|
|
|
+
|
|
|
@Override
|
|
|
public ClassGradeVo queryById(Long gradeId) {
|
|
|
ClassGradeQueryBo classGradeQueryBo = new ClassGradeQueryBo();
|
|
@@ -403,7 +410,35 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
classGradeVo.setClassEndTime(update.getClassEndTime());
|
|
|
sendClassSMS(classGradeVo);
|
|
|
}
|
|
|
- return this.updateById(update);
|
|
|
+ this.updateById(update);
|
|
|
+
|
|
|
+ ClassGrade grade = getById(update.getGradeId());
|
|
|
+ if (ObjectUtils.isNotNull(grade) && ObjectUtils.isNotNull(grade.getClassStatus())
|
|
|
+ && StringUtils.isNotBlank(grade.getOfficialName()) && grade.getClassStatus() == 1){
|
|
|
+ //官方班级开班通知旧系统
|
|
|
+ ClassGradeOpenBo openBo = new ClassGradeOpenBo();
|
|
|
+ openBo.setOfficialName(grade.getOfficialName());
|
|
|
+ openBo.setRegisterCode(grade.getRegisterCode());
|
|
|
+ openBo.setClassName(grade.getClassName());
|
|
|
+ openBo.setClassStartTime(grade.getClassStartTime());
|
|
|
+ openBo.setClassEndTime(grade.getClassEndTime());
|
|
|
+ Long nowTime = DateUtils.getNowTime();
|
|
|
+ String sign = ToolsUtils.EncoderByMd5(nowTime.toString()+"pubilc2022");
|
|
|
+ openBo.setSign(sign);
|
|
|
+ openBo.setStamp(nowTime);
|
|
|
+ JSONObject param = JSONObject.parseObject(JSONObject.toJSONString(openBo));
|
|
|
+ String respone = "";
|
|
|
+ try {
|
|
|
+ respone = HttpUtils.sendPost(CLASS_OPEN_PATH, param);
|
|
|
+ log.info("查询旧系统班级开班接口结果" + respone, "");
|
|
|
+ if (!respone.contains("\"Status\":true")) {
|
|
|
+ throw new CustomException("同步请求错误" + respone);
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new CustomException("同步请求错误"+e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return true;
|
|
|
}
|
|
|
|
|
|
private void sendClassSMS(ClassGradeVo classGradeVo) {
|
|
@@ -1087,11 +1122,31 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
openUpBo.setGradeIds(ids);
|
|
|
openUpBo.setClassStatus(bo.getClassStatus());
|
|
|
openUpBo.setOfficialName(bo.getOfficialName());
|
|
|
+ openUpBo.setClassName(bo.getClassName());
|
|
|
+ openUpBo.setClassStartTime(bo.getClassStartTime());
|
|
|
+ openUpBo.setClassEndTime(bo.getClassEndTime());
|
|
|
baseMapper.UpGradeStatusByTenant(openUpBo);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public List<ClassNpUserInfoVo> otherClassUserList(ClassNpUserInfoBo bo) {
|
|
|
+ ClassGrade grade = getById(bo.getGradeId());
|
|
|
+ if (ObjectUtils.isNull(grade) || StringUtils.isBlank(grade.getOfficialName())){
|
|
|
+ throw new CustomException("班级信息有有误,请联系管理员!");
|
|
|
+ }
|
|
|
+ //查询旧机构对应新系统ID
|
|
|
+ if (ObjectUtils.isNotNull(bo.getTrainOrgId())){
|
|
|
+ List<SysOldOrg> list = iSysOldOrgService.list(new LambdaQueryWrapper<SysOldOrg>()
|
|
|
+ .eq(SysOldOrg::getOrgId, bo.getTrainOrgId())
|
|
|
+ .eq(SysOldOrg::getStatus, 1));
|
|
|
+ if (CollectionUtils.isNotEmpty(list)){
|
|
|
+ SysOldOrg sysOldOrg = list.get(0);
|
|
|
+ bo.setTenantId(ObjectUtils.isNotNull(sysOldOrg.getTenantId())?sysOldOrg.getTenantId():0L);
|
|
|
+ }else {
|
|
|
+ bo.setTenantId(0L);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ bo.setOfficialName(grade.getOfficialName());
|
|
|
//新系统二建/二造班级学员信息
|
|
|
List<ClassNpUserInfoVo> result = baseMapper.getGradeDetailByTenant(bo);
|
|
|
if (CollectionUtils.isNotEmpty(result)){
|