|
@@ -1,8 +1,26 @@
|
|
|
package com.zhongzheng.modules.inform.service.impl;
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
+import cn.hutool.core.convert.Convert;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
|
import com.zhongzheng.common.utils.DateUtils;
|
|
|
+import com.zhongzheng.modules.course.bo.CourseBusinessQueryBo;
|
|
|
+import com.zhongzheng.modules.course.bo.CourseEducationTypeQueryBo;
|
|
|
+import com.zhongzheng.modules.course.bo.CourseProjectTypeQueryBo;
|
|
|
+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.vo.*;
|
|
|
+import com.zhongzheng.modules.goods.service.IGoodsService;
|
|
|
+import com.zhongzheng.modules.grade.bo.ClassGradeQueryBo;
|
|
|
+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.vo.ClassGradeStudentVo;
|
|
|
+import com.zhongzheng.modules.user.service.IUserStudyRecordService;
|
|
|
+import com.zhongzheng.modules.user.service.IUserUpdateService;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
@@ -30,6 +48,34 @@ import java.util.stream.Collectors;
|
|
|
@Service
|
|
|
public class InformRemindServiceImpl extends ServiceImpl<InformRemindMapper, InformRemind> implements IInformRemindService {
|
|
|
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IGoodsService iGoodsService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ICourseEducationTypeService courseEducationTypeService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ICourseProjectTypeService courseProjectTypeService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ICourseBusinessService courseBusinessService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IClassGradeSysService classGradeSysService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IClassGradeGoodsService classGradeGoodsService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IUserStudyRecordService iUserStudyRecordService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IClassGradeUserService iClassGradeUserService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IUserUpdateService iUserUpdateService;
|
|
|
+
|
|
|
@Override
|
|
|
public InformRemindVo queryById(Long id){
|
|
|
InformRemind db = this.baseMapper.selectById(id);
|
|
@@ -100,4 +146,49 @@ public class InformRemindServiceImpl extends ServiceImpl<InformRemindMapper, Inf
|
|
|
}
|
|
|
return this.removeByIds(ids);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<CourseUserEducationTypeVo> listGradeService(ClassGradeQueryBo bo) {
|
|
|
+ CourseEducationTypeQueryBo courseEducationTypeQueryBo = new CourseEducationTypeQueryBo();
|
|
|
+ courseEducationTypeQueryBo.setStatus(bo.getStatus());
|
|
|
+ List<CourseUserEducationTypeVo> courseUserEducationTypeVos = entity2EducationVo(courseEducationTypeService.queryList(courseEducationTypeQueryBo));
|
|
|
+ for (CourseUserEducationTypeVo courseUserEducationTypeVo : courseUserEducationTypeVos) {
|
|
|
+ CourseProjectTypeQueryBo courseProjectTypeQueryBo = new CourseProjectTypeQueryBo();
|
|
|
+ courseProjectTypeQueryBo.setStatus(bo.getStatus());
|
|
|
+ courseProjectTypeQueryBo.setEducationId(Convert.toInt(courseUserEducationTypeVo.getId()));
|
|
|
+ List<CourseUserProjectTypeVo> courseUserProjectTypeVos = entity2ServiceProjectVo(courseProjectTypeService.queryList(courseProjectTypeQueryBo));
|
|
|
+ if (CollectionUtils.isNotEmpty(courseUserProjectTypeVos)) {
|
|
|
+ for (CourseUserProjectTypeVo courseUserProjectTypeVo : courseUserProjectTypeVos) {
|
|
|
+ CourseBusinessQueryBo courseBusinessQueryBo = new CourseBusinessQueryBo();
|
|
|
+ courseBusinessQueryBo.setStatus(bo.getStatus());
|
|
|
+ courseBusinessQueryBo.setProjectId(Convert.toInt(courseUserProjectTypeVo.getId()));
|
|
|
+ List<CourseUserBusinessVo> courseUserBusinessVos = entity2ServiceBusinessVo(courseBusinessService.queryList(courseBusinessQueryBo));
|
|
|
+ courseUserProjectTypeVo.setCourseUserBusiness(courseUserBusinessVos);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ courseUserEducationTypeVo.setCourseUserProjectTypeVo(courseUserProjectTypeVos);
|
|
|
+ }
|
|
|
+ return courseUserEducationTypeVos;
|
|
|
+ }
|
|
|
+
|
|
|
+ private List<CourseUserEducationTypeVo> entity2EducationVo(Collection<CourseEducationTypeVo> collection) {
|
|
|
+ List<CourseUserEducationTypeVo> voList = collection.stream()
|
|
|
+ .map(any -> BeanUtil.toBean(any, CourseUserEducationTypeVo.class))
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ return voList;
|
|
|
+ }
|
|
|
+
|
|
|
+ private List<CourseUserProjectTypeVo> entity2ServiceProjectVo(Collection<CourseProjectTypeVo> collection) {
|
|
|
+ List<CourseUserProjectTypeVo> voList = collection.stream()
|
|
|
+ .map(any -> BeanUtil.toBean(any, CourseUserProjectTypeVo.class))
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ return voList;
|
|
|
+ }
|
|
|
+
|
|
|
+ private List<CourseUserBusinessVo> entity2ServiceBusinessVo(Collection<CourseBusinessVo> collection) {
|
|
|
+ List<CourseUserBusinessVo> voList = collection.stream()
|
|
|
+ .map(any -> BeanUtil.toBean(any, CourseUserBusinessVo.class))
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ return voList;
|
|
|
+ }
|
|
|
}
|