|
@@ -24,6 +24,8 @@ import com.zhongzheng.common.utils.polyv.PolyvUtils;
|
|
|
import com.zhongzheng.modules.alioss.service.OssService;
|
|
|
import com.zhongzheng.modules.base.domain.UserProfile;
|
|
|
import com.zhongzheng.modules.base.service.IUserProfileService;
|
|
|
+import com.zhongzheng.modules.course.bo.CourseBusinessQueryBo;
|
|
|
+import com.zhongzheng.modules.course.bo.CourseProjectTypeQueryBo;
|
|
|
import com.zhongzheng.modules.course.domain.CourseBusiness;
|
|
|
import com.zhongzheng.modules.course.domain.CourseEducationType;
|
|
|
import com.zhongzheng.modules.course.domain.CourseMenuExam;
|
|
@@ -33,6 +35,7 @@ import com.zhongzheng.modules.course.service.ICourseEducationTypeService;
|
|
|
import com.zhongzheng.modules.course.service.ICourseProjectTypeService;
|
|
|
import com.zhongzheng.modules.course.vo.CourseBusinessVo;
|
|
|
import com.zhongzheng.modules.course.vo.CourseChapterVo;
|
|
|
+import com.zhongzheng.modules.course.vo.CourseProjectTypeVo;
|
|
|
import com.zhongzheng.modules.goods.bo.GoodsQueryBo;
|
|
|
import com.zhongzheng.modules.goods.domain.Goods;
|
|
|
import com.zhongzheng.modules.goods.service.IGoodsService;
|
|
@@ -575,7 +578,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
return "审核状态错误";
|
|
|
}
|
|
|
//只要待审核时间早于班级结束时间就允许推送
|
|
|
- if ( userVo.getPeriodWaitTime().longValue()>= userVo.getClassEndTime().longValue()) {
|
|
|
+ if (userVo.getPeriodWaitTime().longValue() >= userVo.getClassEndTime().longValue()) {
|
|
|
return "班级有效期已结束";
|
|
|
}
|
|
|
}
|
|
@@ -1002,8 +1005,8 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
classPeriodStudentVo.setStartTime(baseMapper.selectStart(classPeriodStudentVo.getUserId(), classPeriodStudentVo.getGoodsId(), classPeriodStudentVo.getGradeId()).get(0));
|
|
|
}
|
|
|
//取学时所有拍照最新的一张
|
|
|
- String recentPhoto = userStudyRecordPhotoMapper.selectGradeRecentOnePhoto(classPeriodStudentVo.getUserId(),classPeriodStudentVo.getGradeId());
|
|
|
- if(Validator.isNotEmpty(recentPhoto)){
|
|
|
+ String recentPhoto = userStudyRecordPhotoMapper.selectGradeRecentOnePhoto(classPeriodStudentVo.getUserId(), classPeriodStudentVo.getGradeId());
|
|
|
+ if (Validator.isNotEmpty(recentPhoto)) {
|
|
|
classPeriodStudentVo.setIdCardImg1(recentPhoto);
|
|
|
}
|
|
|
if (Validator.isNotEmpty(bo.getUserPhoto()) && bo.getUserPhoto() == 1) {
|
|
@@ -1640,28 +1643,33 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
|
|
|
@Override
|
|
|
public List<StudyAccountStatusVo> listStudyAccountStatus(StudyAccountStatusQueryBo bo) {
|
|
|
- LambdaQueryWrapper<Goods> lqw = Wrappers.lambdaQuery();
|
|
|
+ /*LambdaQueryWrapper<Goods> lqw = Wrappers.lambdaQuery();
|
|
|
lqw.eq(bo.getEducationTypeId() != null, Goods::getEducationTypeId, bo.getEducationTypeId())
|
|
|
.eq(Goods::getStatus, "1");
|
|
|
List<Goods> goodsList = iGoodsService.list(lqw);
|
|
|
- Set<Long> set = new HashSet<Long>();
|
|
|
+ Set<Long> set = new HashSet<>();
|
|
|
//去重
|
|
|
if (!CollectionUtils.isEmpty(goodsList)) {
|
|
|
goodsList.stream().forEach(goods -> {
|
|
|
set.add(goods.getBusinessId());
|
|
|
});
|
|
|
- }
|
|
|
+ }*/
|
|
|
+ CourseProjectTypeQueryBo bo1 = new CourseProjectTypeQueryBo();
|
|
|
+ bo1.setEducationId(bo.getEducationTypeId().intValue());
|
|
|
+ List<Integer> status1 = Arrays.asList(1);
|
|
|
+ bo1.setStatus(status1);
|
|
|
+ List<CourseProjectTypeVo> courseProjectTypeVoList = iCourseProjectTypeService.queryList(bo1);
|
|
|
+
|
|
|
|
|
|
List<StudyAccountStatusVo> list = new ArrayList<>();
|
|
|
- if (!CollectionUtils.isEmpty(set)) {
|
|
|
- for (Long businessId : set) {
|
|
|
- LambdaQueryWrapper<CourseBusiness> lqw1 = Wrappers.lambdaQuery();
|
|
|
- lqw1.eq(CourseBusiness::getId, businessId);
|
|
|
- lqw1.eq(CourseBusiness::getStatus, 1);
|
|
|
- CourseBusiness cb = iCourseBusinessService.getOne(lqw1);
|
|
|
- if (cb == null) {
|
|
|
- continue;
|
|
|
- }
|
|
|
+ for (CourseProjectTypeVo courseProjectTypeVo : courseProjectTypeVoList) {
|
|
|
+ CourseBusinessQueryBo bo2 = new CourseBusinessQueryBo();
|
|
|
+ bo2.setEducationId(bo.getEducationTypeId().intValue());
|
|
|
+ bo2.setProjectId(courseProjectTypeVo.getId().intValue());
|
|
|
+ List<Integer> status2 = Arrays.asList(1);
|
|
|
+ bo2.setStatus(status2);
|
|
|
+ List<CourseBusinessVo> courseBusinessVoList = iCourseBusinessService.queryList(bo2);
|
|
|
+ for (CourseBusinessVo courseBusinessVo : courseBusinessVoList) {
|
|
|
Integer notConfiguredNum = 0;
|
|
|
Integer interfaceNum = 0;
|
|
|
Integer noInterfaceNum = 0;
|
|
@@ -1671,29 +1679,13 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
Integer finishNum = 0;
|
|
|
Integer noFinishNum = 0;
|
|
|
StudyAccountStatusVo vo = new StudyAccountStatusVo();
|
|
|
- vo.setBusinessId(businessId);
|
|
|
- LambdaQueryWrapper<CourseBusiness> lqw2 = Wrappers.lambdaQuery();
|
|
|
- lqw2.eq(CourseBusiness::getId, businessId);
|
|
|
- CourseBusiness courseBusiness = iCourseBusinessService.getOne(lqw2);
|
|
|
- vo.setBusinessName(courseBusiness.getBusinessName());
|
|
|
- lqw.clear();
|
|
|
- lqw.eq(Goods::getBusinessId, businessId);
|
|
|
- Goods goods = iGoodsService.list(lqw).get(0);
|
|
|
- LambdaQueryWrapper<CourseProjectType> lqw3 = Wrappers.lambdaQuery();
|
|
|
- lqw3.eq(CourseProjectType::getId, goods.getProjectId());
|
|
|
- List<CourseProjectType> courseProjectTypeList = iCourseProjectTypeService.list(lqw3);
|
|
|
- if (Validator.isNotEmpty(courseProjectTypeList)) {
|
|
|
- vo.setProjectName(courseProjectTypeList.get(0).getProjectName());
|
|
|
- vo.setProjectId(goods.getProjectId());
|
|
|
- }
|
|
|
- LambdaQueryWrapper<CourseEducationType> lqw4 = Wrappers.lambdaQuery();
|
|
|
- lqw4.eq(Validator.isNotEmpty(goods.getEducationTypeId()), CourseEducationType::getId, goods.getEducationTypeId());
|
|
|
- CourseEducationType courseEducationType = iCourseEducationTypeService.getOne(lqw4);
|
|
|
- if (Validator.isNotEmpty(courseEducationType)) {
|
|
|
- vo.setEducationName(courseEducationType.getEducationName());
|
|
|
- vo.setEducationTypeId(courseEducationType.getId());
|
|
|
- }
|
|
|
- List<ClassGradeUserVo> countList = queryCountList(goods.getProjectId(), 0);
|
|
|
+ vo.setBusinessId(courseBusinessVo.getId());
|
|
|
+ vo.setBusinessName(courseBusinessVo.getBusinessName());
|
|
|
+ vo.setProjectName(courseProjectTypeVo.getProjectName());
|
|
|
+ vo.setProjectId(courseProjectTypeVo.getId().intValue());
|
|
|
+ vo.setEducationName(courseProjectTypeVo.getEducationName());
|
|
|
+ vo.setEducationTypeId(courseProjectTypeVo.getEducationId().longValue());
|
|
|
+ List<ClassGradeUserVo> countList = queryCountList(courseProjectTypeVo.getId().intValue(), 0);
|
|
|
for (ClassGradeUserVo classGradeUser : countList) {
|
|
|
if (Validator.isNotEmpty(classGradeUser.getLearnStatus())) {
|
|
|
//统计账号未开通数量
|
|
@@ -1720,7 +1712,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- List<ClassGradeVo> countClassGradeList = iClassGradeService.queryCountList(businessId);
|
|
|
+ List<ClassGradeVo> countClassGradeList = iClassGradeService.queryCountList(courseBusinessVo.getId());
|
|
|
for (ClassGradeVo classGradeVo : countClassGradeList) {
|
|
|
//统计未配置班级数量
|
|
|
if (Validator.isEmpty(classGradeVo.getInterfaceAccountId()) && Validator.isEmpty(classGradeVo.getNoInterfaceAccountId())) {
|
|
@@ -1736,7 +1728,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
}
|
|
|
}
|
|
|
//统计所有班级人数
|
|
|
- vo.setUserNum(queryCountList(goods.getProjectId(), null).size());
|
|
|
+ vo.setUserNum(queryCountList(courseProjectTypeVo.getId().intValue(), null).size());
|
|
|
vo.setNotConfiguredNum(notConfiguredNum);
|
|
|
vo.setInterfaceNum(interfaceNum);
|
|
|
vo.setNoInterfaceNum(noInterfaceNum);
|
|
@@ -1745,7 +1737,6 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
vo.setFailNum(failNum);
|
|
|
vo.setFinishNum(finishNum);
|
|
|
vo.setNoFinishNum(noFinishNum);
|
|
|
-
|
|
|
list.add(vo);
|
|
|
}
|
|
|
}
|