|
|
@@ -30,8 +30,14 @@ import com.zhongzheng.modules.alioss.service.OssService;
|
|
|
import com.zhongzheng.modules.alioss.vo.FileBean;
|
|
|
import com.zhongzheng.modules.base.bo.ConsoleQueryBo;
|
|
|
import com.zhongzheng.modules.base.bo.UserProfileFit;
|
|
|
+import com.zhongzheng.modules.course.domain.CourseBusiness;
|
|
|
+import com.zhongzheng.modules.course.domain.CourseEducationType;
|
|
|
+import com.zhongzheng.modules.course.domain.CourseProjectType;
|
|
|
import com.zhongzheng.modules.course.domain.Major;
|
|
|
import com.zhongzheng.modules.course.mapper.CourseMapper;
|
|
|
+import com.zhongzheng.modules.course.service.ICourseBusinessService;
|
|
|
+import com.zhongzheng.modules.course.service.ICourseEducationTypeService;
|
|
|
+import com.zhongzheng.modules.course.service.ICourseProjectTypeService;
|
|
|
import com.zhongzheng.modules.course.service.IMajorService;
|
|
|
import com.zhongzheng.modules.exam.bo.*;
|
|
|
import com.zhongzheng.modules.exam.domain.ExamApply;
|
|
|
@@ -48,6 +54,8 @@ import com.zhongzheng.modules.exam.vo.ExamApplySiteVo;
|
|
|
import com.zhongzheng.modules.exam.vo.ExamApplyVo;
|
|
|
import com.zhongzheng.modules.exam.vo.ExamSessionVo;
|
|
|
import com.zhongzheng.modules.goods.domain.Goods;
|
|
|
+import com.zhongzheng.modules.goods.domain.GoodsQuestionRel;
|
|
|
+import com.zhongzheng.modules.goods.service.IGoodsQuestionRelService;
|
|
|
import com.zhongzheng.modules.goods.service.IGoodsService;
|
|
|
import com.zhongzheng.modules.goods.vo.GoodsVo;
|
|
|
import com.zhongzheng.modules.grade.domain.ClassGradeUser;
|
|
|
@@ -156,6 +164,14 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
|
|
|
private IClassGradeUserService iClassGradeUserService;
|
|
|
@Autowired
|
|
|
private IUserStudyRecordPhotoService iUserStudyRecordPhotoService;
|
|
|
+ @Autowired
|
|
|
+ private IGoodsQuestionRelService iGoodsQuestionRelService;
|
|
|
+ @Autowired
|
|
|
+ private ICourseEducationTypeService iCourseEducationTypeService;
|
|
|
+ @Autowired
|
|
|
+ private ICourseProjectTypeService iCourseProjectTypeService;
|
|
|
+ @Autowired
|
|
|
+ private ICourseBusinessService iCourseBusinessService;
|
|
|
|
|
|
@Value("${aliyun.sms.cancellationReminder}")
|
|
|
private String cancellationReminder;
|
|
|
@@ -772,6 +788,16 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
|
|
|
bo.getSubscribeId()
|
|
|
};
|
|
|
userSubscribeEditBo.setSubscribeId(s);
|
|
|
+
|
|
|
+ //是否关联题库
|
|
|
+ GoodsQuestionRel questionRel = iGoodsQuestionRelService.getOne(new LambdaQueryWrapper<GoodsQuestionRel>()
|
|
|
+ .eq(GoodsQuestionRel::getOrderGoodsId, bo.getOrderGoodsId())
|
|
|
+ .eq(GoodsQuestionRel::getStatus, 1)
|
|
|
+ .gt(GoodsQuestionRel::getQuestionDoNum, 0));
|
|
|
+ if (ObjectUtils.isNotNull(questionRel)){
|
|
|
+ questionRel.setStatus(0);
|
|
|
+ iGoodsQuestionRelService.updateById(questionRel);
|
|
|
+ }
|
|
|
//发送消息
|
|
|
// sendExamcancel(userSubscribeEditBo);
|
|
|
}
|
|
|
@@ -850,6 +876,17 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
|
|
|
}
|
|
|
}
|
|
|
List<UserSubscribeVo> userSubscribeVos = baseMapper.listSubscribe(bo);
|
|
|
+ if (CollectionUtils.isNotEmpty(userSubscribeVos)){
|
|
|
+ userSubscribeVos.forEach(item -> {
|
|
|
+ Goods goods = iGoodsService.getById(item.getGoodsId());
|
|
|
+ CourseEducationType educationType = iCourseEducationTypeService.getById(goods.getEducationTypeId());
|
|
|
+ item.setEducationTypeName(educationType.getEducationName());
|
|
|
+ CourseProjectType projectType = iCourseProjectTypeService.getById(goods.getProjectId());
|
|
|
+ item.setProjectName(projectType.getProjectName());
|
|
|
+ CourseBusiness business = iCourseBusinessService.getById(goods.getBusinessId());
|
|
|
+ item.setBusinessName(business.getBusinessName());
|
|
|
+ });
|
|
|
+ }
|
|
|
return userSubscribeVos;
|
|
|
}
|
|
|
|
|
|
@@ -2230,17 +2267,26 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
|
|
|
add.setUpdateTime(DateUtils.getNowTime());
|
|
|
add.setExamineeCode(ServletUtils.getEncoded("ZZ"+ ToolsUtils.autoGenericCode(String.valueOf(add.getApplyId()),4) +ToolsUtils.autoGenericCode(String.valueOf(add.getUserId()),4)));
|
|
|
this.save(add);
|
|
|
- //签署疫情防控书
|
|
|
-// if (org.apache.commons.lang3.StringUtils.isNotBlank(bo.getSignImageStr())){
|
|
|
-// UserSubscribeSignReportBo reportBo = new UserSubscribeSignReportBo();
|
|
|
-// reportBo.setSubscribeId(add.getSubscribeId());
|
|
|
-// User user = iUserService.getById(bo.getUserId());
|
|
|
-// reportBo.setUserId(bo.getUserId());
|
|
|
-// reportBo.setPhone(user.getTelphone());
|
|
|
-// reportBo.setIdCard(user.getIdCard());
|
|
|
-// reportBo.setSignImageStr(bo.getSignImageStr());
|
|
|
-// this.signReport(reportBo);
|
|
|
-// }
|
|
|
+
|
|
|
+ //预约成功刷新题库时间
|
|
|
+ GoodsQuestionRel questionRel = iGoodsQuestionRelService
|
|
|
+ .getOne(new LambdaQueryWrapper<GoodsQuestionRel>()
|
|
|
+ .eq(GoodsQuestionRel::getOrderGoodsId, bo.getOrderGoodsId())
|
|
|
+ .gt(GoodsQuestionRel::getQuestionDoNum, 0)
|
|
|
+ .last("limit 1"));
|
|
|
+ if (ObjectUtils.isNotNull(questionRel)){
|
|
|
+ //考试日期
|
|
|
+ Long examTime = add.getApplySiteExamTime();
|
|
|
+ Long dayBefore = DateUtils.getDayBefore(examTime, 8);
|
|
|
+ OrderGoods orderGoods = iOrderGoodsService.getById(questionRel.getQsOrderGoodsId());
|
|
|
+ if (ObjectUtils.isNotNull(orderGoods)){
|
|
|
+ orderGoods.setServiceStartTime(dayBefore);
|
|
|
+ orderGoods.setServiceEndTime(examTime);
|
|
|
+ }
|
|
|
+ //激活题库
|
|
|
+ questionRel.setStatus(1);
|
|
|
+ iGoodsQuestionRelService.updateById(questionRel);
|
|
|
+ }
|
|
|
|
|
|
//发送预约考试消息
|
|
|
sendExamSucceed(bo);
|