|
@@ -442,17 +442,18 @@ public class UserPeriodServiceImpl extends ServiceImpl<UserPeriodMapper, UserPer
|
|
|
objectLambdaUpdateWrapper.set(ClassGradeUser::getFinishStatus, 1);
|
|
|
}
|
|
|
}
|
|
|
- iClassGradeUserService.update(null, objectLambdaUpdateWrapper);
|
|
|
- ClassGradeUserQueryBo classGradeUserQueryBo = new ClassGradeUserQueryBo();
|
|
|
- classGradeUserQueryBo.setUserId(bo.getUserId());
|
|
|
- classGradeUserQueryBo.setGradeId(bo.getGradeId());
|
|
|
- classGradeUserQueryBo.setGoodsId(bo.getGoodsId());
|
|
|
- periodPass(classGradeUserQueryBo);
|
|
|
- //发送消息
|
|
|
- bo.setStatus(1);
|
|
|
- sendPeriodSMS(bo);
|
|
|
- sendPeriodSevenSMS(bo);
|
|
|
- syncStudyLogToOld(bo);
|
|
|
+ if(syncStudyLogToOld(bo)){
|
|
|
+ iClassGradeUserService.update(null, objectLambdaUpdateWrapper);
|
|
|
+ ClassGradeUserQueryBo classGradeUserQueryBo = new ClassGradeUserQueryBo();
|
|
|
+ classGradeUserQueryBo.setUserId(bo.getUserId());
|
|
|
+ classGradeUserQueryBo.setGradeId(bo.getGradeId());
|
|
|
+ classGradeUserQueryBo.setGoodsId(bo.getGoodsId());
|
|
|
+ periodPass(classGradeUserQueryBo);
|
|
|
+ //发送消息
|
|
|
+ bo.setStatus(1);
|
|
|
+ sendPeriodSMS(bo);
|
|
|
+ sendPeriodSevenSMS(bo);
|
|
|
+ }
|
|
|
return true;
|
|
|
}
|
|
|
|
|
@@ -517,7 +518,7 @@ public class UserPeriodServiceImpl extends ServiceImpl<UserPeriodMapper, UserPer
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public SyncUserCourseStudyRec syncStudyLogToOld(UserPeriodEditBo bo) {
|
|
|
+ public boolean syncStudyLogToOld(UserPeriodEditBo bo) {
|
|
|
//企业ID
|
|
|
String tenant = ServletUtils.getRequest().getHeader("TenantId");
|
|
|
SysOldOrg org = sysOldOrgService.list(new LambdaQueryWrapper<SysOldOrg>()
|
|
@@ -525,7 +526,7 @@ public class UserPeriodServiceImpl extends ServiceImpl<UserPeriodMapper, UserPer
|
|
|
.last("limit 1")).stream().findFirst().orElse(null);
|
|
|
if (org.getShareClass() == 0){
|
|
|
//有职能的机构学时不推送旧系统
|
|
|
- return null;
|
|
|
+ return false;
|
|
|
}
|
|
|
CourseEducationType educationType = iCourseEducationTypeService.getOne(new LambdaQueryWrapper<CourseEducationType>().eq(CourseEducationType::getStatus, 1).eq(CourseEducationType::getEducationName,"继续教育").last("limit 1"));
|
|
|
CourseProjectType projectType = iCourseProjectTypeService.getOne(new LambdaQueryWrapper<CourseProjectType>().eq(CourseProjectType::getStatus, 1).eq(CourseProjectType::getEducationId,educationType.getId()).eq(CourseProjectType::getProjectName,"建造师").last("limit 1"));
|
|
@@ -540,7 +541,7 @@ public class UserPeriodServiceImpl extends ServiceImpl<UserPeriodMapper, UserPer
|
|
|
CourseBusiness business7 = iCourseBusinessService.getOne(new LambdaQueryWrapper<CourseBusiness>().eq(CourseBusiness::getStatus, 1).eq(CourseBusiness::getId,goodsVo.getBusinessId()).last("limit 1"));
|
|
|
if(Validator.isEmpty(business7)||(Validator.isNotEmpty(business7)&&!"七大员".equals(business7.getBusinessName()))){
|
|
|
if(!"继续教育二级造价师".equals(fullName)){
|
|
|
- return null;
|
|
|
+ return false;
|
|
|
}
|
|
|
}
|
|
|
if(Validator.isNotEmpty(business7)&&"七大员".equals(business7.getBusinessName())){
|
|
@@ -576,10 +577,14 @@ public class UserPeriodServiceImpl extends ServiceImpl<UserPeriodMapper, UserPer
|
|
|
studyRec.setClassNo(classGrade.getOfficialName());
|
|
|
studyRec.setOrderGoodsId(orderGoods.getOrderGoodsId());
|
|
|
Long bmrq = 0L;
|
|
|
- if(classGrade.getClassStartTime().longValue()<orderGoods.getCreateTime().longValue()){
|
|
|
- bmrq = orderGoods.getCreateTime();
|
|
|
+ if(Validator.isNotEmpty(classGrade.getClassStartTime())){
|
|
|
+ if(classGrade.getClassStartTime().longValue()<orderGoods.getCreateTime().longValue()){
|
|
|
+ bmrq = orderGoods.getCreateTime();
|
|
|
+ }else{
|
|
|
+ bmrq = classGrade.getClassStartTime();
|
|
|
+ }
|
|
|
}else{
|
|
|
- bmrq = classGrade.getClassStartTime();
|
|
|
+ bmrq = orderGoods.getCreateTime();
|
|
|
}
|
|
|
studyRec.setToRegCenterTime(DateUtils.timestampToDate(bmrq));
|
|
|
Long studyStartTime = null;
|
|
@@ -839,7 +844,7 @@ public class UserPeriodServiceImpl extends ServiceImpl<UserPeriodMapper, UserPer
|
|
|
throw new CustomException("同步请求错误"+e.getMessage());
|
|
|
}
|
|
|
iClassGradeUserService.update(null, objectLambdaUpdateWrapper);
|
|
|
- return studyRec;
|
|
|
+ return false;
|
|
|
}
|
|
|
|
|
|
/**
|