|
|
@@ -29,10 +29,8 @@ import com.zhongzheng.modules.alioss.service.OssService;
|
|
|
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.service.ICourseBusinessService;
|
|
|
-import com.zhongzheng.modules.course.service.ICourseEducationTypeService;
|
|
|
-import com.zhongzheng.modules.course.service.ICourseModuleService;
|
|
|
-import com.zhongzheng.modules.course.service.ICourseProjectTypeService;
|
|
|
+import com.zhongzheng.modules.course.domain.Major;
|
|
|
+import com.zhongzheng.modules.course.service.*;
|
|
|
import com.zhongzheng.modules.course.vo.CourseBusinessVo;
|
|
|
import com.zhongzheng.modules.course.vo.CourseChapterVo;
|
|
|
import com.zhongzheng.modules.course.vo.CourseModuleVo;
|
|
|
@@ -191,6 +189,9 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
@Autowired
|
|
|
private ISysOldOrgService sysOldOrgService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IMajorService iMajorService;
|
|
|
+
|
|
|
|
|
|
private String SEVEN_OFFICIALPUSH_INFOACCOUNT;
|
|
|
private String SEVEN_OFFICIALPUSH_TOKEN;
|
|
|
@@ -619,7 +620,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
queryBo.setId(goods.getBusinessId());
|
|
|
String fullName = iCourseBusinessService.queryFullName(queryBo);
|
|
|
if(fullName.contains("继续教育")&&fullName.contains("施工现场专业人员")){
|
|
|
- return pushSevenOfficialInfo(bo,userVo,orderGoods);
|
|
|
+ return pushSevenOfficialInfo(bo,userVo,orderGoods,goods);
|
|
|
}
|
|
|
Long bmrq = 0L;
|
|
|
if (Validator.isEmpty(userVo.getClassStartTime())) {
|
|
|
@@ -633,6 +634,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
if (Validator.isEmpty(userVo.getRealName()) || Validator.isEmpty(userVo.getIdCard()) || Validator.isEmpty(userVo.getTelPhone())) {
|
|
|
return "用户信息缺失";
|
|
|
}
|
|
|
+ userVo.setRealName(userVo.getRealName().trim());
|
|
|
if(Validator.isNotEmpty(configService.selectConfigByKeyNoCache("office.account"))){
|
|
|
OFFICIALPUSH_INFOACCOUNT = configService.selectConfigByKeyNoCache("office.account");
|
|
|
OFFICIALPUSH_TOKEN = configService.selectConfigByKeyNoCache("office.token");
|
|
|
@@ -689,7 +691,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
}
|
|
|
|
|
|
|
|
|
- public String pushSevenOfficialInfo(ClassGradeUserQueryBo bo,ClassGradeUserVo userVo,OrderGoodsVo orderGoods) {
|
|
|
+ public String pushSevenOfficialInfo(ClassGradeUserQueryBo bo,ClassGradeUserVo userVo,OrderGoodsVo orderGoods,Goods goods) {
|
|
|
SEVEN_OFFICIALPUSH_INFOACCOUNT=null;
|
|
|
SEVEN_OFFICIALPUSH_TOKEN=null;
|
|
|
log.info("报名信息推送" + JSON.toJSONString(bo));
|
|
|
@@ -747,6 +749,20 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
if (Validator.isEmpty(userVo.getEduLevel()) || Validator.isEmpty(userVo.getCompanyName()) || Validator.isEmpty(userVo.getSex())) {
|
|
|
return "用户详细信息缺失";
|
|
|
}
|
|
|
+ if(Validator.isEmpty(goods.getMajorId())){
|
|
|
+ throw new CustomException("商品专业不存在");
|
|
|
+ }
|
|
|
+ Major major = iMajorService.getOne(new LambdaQueryWrapper<Major>()
|
|
|
+ .eq(Major::getId, goods.getMajorId()));
|
|
|
+ if("材料员".equals(major.getCategoryName())||"劳务员".equals(major.getCategoryName())||"资料员".equals(major.getCategoryName())){
|
|
|
+ if(userVo.getEduLevel().equals("小学")||userVo.getEduLevel().equals("中学")){
|
|
|
+ userVo.setEduLevel("高中");
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ if(userVo.getEduLevel().equals("小学")||userVo.getEduLevel().equals("中学")||userVo.getEduLevel().equals("职高")||userVo.getEduLevel().equals("高中")){
|
|
|
+ userVo.setEduLevel("专科");
|
|
|
+ }
|
|
|
+ }
|
|
|
if (Validator.isEmpty(orderGoods.getSevenYear())) {
|
|
|
return "商品年份缺失";
|
|
|
}
|
|
|
@@ -1050,6 +1066,9 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
if (Validator.isEmpty(userVo)) {
|
|
|
return "用户不存在";
|
|
|
}
|
|
|
+ if(Validator.isNotEmpty(userVo.getRealName())){
|
|
|
+ userVo.setRealName(userVo.getRealName().trim());
|
|
|
+ }
|
|
|
if (Validator.isEmpty(userVo.getInterfacePushId())) {
|
|
|
return "没开通信息推送";
|
|
|
}
|
|
|
@@ -1602,6 +1621,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
exportVo.setStatus(0);
|
|
|
exportVo.setDurationTime(classPeriodSectionVo.getDurationTime());
|
|
|
exportVo.setSectionType(classPeriodSectionVo.getSectionType());
|
|
|
+ exportVo.setFromPlat(vo.getFromPlat());
|
|
|
studyList.add(exportVo);
|
|
|
}
|
|
|
endTime = vo.getEndTime();
|
|
|
@@ -2785,15 +2805,20 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
Long startTotalTime = 0L;
|
|
|
Long endTotalTime = 0L;
|
|
|
Long secTotalTime = 0L;
|
|
|
+ Long moduleTotal = 0L;
|
|
|
+ Long chapterTotal = 0L;
|
|
|
+ Long sectionTotal = 0L;
|
|
|
for (ClassPeriodVo classPeriodVo : classPeriodVos) {
|
|
|
//为模块搜索下面的章 和节 并搜索学时记录
|
|
|
if (classPeriodVo.getType() == 1) {
|
|
|
+ moduleTotal++;
|
|
|
CourseModuleVo moduleVo = iCourseModuleService.queryById(classPeriodVo.getId());
|
|
|
List<ClassPeriodChapterVo> classPeriodChapterVos = baseMapper.listperiodChapter(classPeriodVo.getId(), bo.getGoodsId(), classPeriodVo.getCourseId(), bo.getUserId(), bo.getGradeId(),bo.getOrderGoodsId());
|
|
|
Collections.sort(classPeriodChapterVos);
|
|
|
classPeriodChapterVos.addAll(baseMapper.listperiodModuleExam(bo.getGoodsId(), classPeriodVo.getCourseId(), bo.getUserId(), classPeriodVo.getId()));
|
|
|
for (ClassPeriodChapterVo classPeriodChapterVo : classPeriodChapterVos) {
|
|
|
if (classPeriodChapterVo.getType() == 2) {
|
|
|
+ chapterTotal++;
|
|
|
Long ChapterEndTime = 0L;
|
|
|
Long ChapterStartTime = 0L;
|
|
|
List<ClassPeriodSectionVo> classPeriodSectionVos = baseMapper.listPeriodSection(classPeriodChapterVo.getId(), bo.getGoodsId(), classPeriodVo.getCourseId(), bo.getUserId());
|
|
|
@@ -2801,6 +2826,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
classPeriodSectionVos.addAll(baseMapper.listperiodExam(classPeriodChapterVo.getId(), bo.getGoodsId(), classPeriodVo.getCourseId(), bo.getUserId(), classPeriodVo.getId()));
|
|
|
for (ClassPeriodSectionVo classPeriodSectionVo : classPeriodSectionVos) {
|
|
|
if (classPeriodSectionVo.getType() == 3) {
|
|
|
+ sectionTotal++;
|
|
|
secTotalTime += classPeriodSectionVo.getDurationTime();
|
|
|
//节
|
|
|
UserPeriodQueryBo userPeriodQueryBo = new UserPeriodQueryBo();
|
|
|
@@ -2954,11 +2980,13 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
}
|
|
|
//为章搜索节记录和学时记录
|
|
|
if (classPeriodVo.getType() == 2) {
|
|
|
+ chapterTotal++;
|
|
|
Long ChapterEndTime = 0L;
|
|
|
Long ChapterStartTime = 0L;
|
|
|
List<ClassPeriodSectionVo> classPeriodSectionVos = baseMapper.listPeriodSection(classPeriodVo.getId(), bo.getGoodsId(), classPeriodVo.getCourseId(), bo.getUserId());
|
|
|
Collections.sort(classPeriodSectionVos);
|
|
|
for (ClassPeriodSectionVo classPeriodSectionVo : classPeriodSectionVos) {
|
|
|
+ sectionTotal++;
|
|
|
secTotalTime += classPeriodSectionVo.getDurationTime();
|
|
|
UserPeriodQueryBo userPeriodQueryBo = new UserPeriodQueryBo();
|
|
|
userPeriodQueryBo.setSectionId(classPeriodSectionVo.getId());
|
|
|
@@ -3075,6 +3103,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
|
|
|
//为节搜索学时记录
|
|
|
if (classPeriodVo.getType() == 3) {
|
|
|
+ sectionTotal++;
|
|
|
secTotalTime += classPeriodVo.getDurationTime();
|
|
|
UserPeriodQueryBo userPeriodQueryBo = new UserPeriodQueryBo();
|
|
|
userPeriodQueryBo.setSectionId(classPeriodVo.getId());
|
|
|
@@ -3132,6 +3161,9 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
classPeriodVos.get(0).setStartTotalTime(startTotalTime);
|
|
|
classPeriodVos.get(0).setEndTotalTime(endTotalTime);
|
|
|
classPeriodVos.get(0).setSecTotalTime(secTotalTime);
|
|
|
+ classPeriodVos.get(0).setModuleTotal(moduleTotal);
|
|
|
+ classPeriodVos.get(0).setChapterTotal(chapterTotal);
|
|
|
+ classPeriodVos.get(0).setSectionTotal(sectionTotal);
|
|
|
|
|
|
}
|
|
|
return classPeriodVos;
|
|
|
@@ -3389,6 +3421,56 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
return baseMapper.getClassInfoByUser(userId);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public List<ClassPeriodStudentVo> listVideoUserPeriod(ClassGradeUserQueryBo bo) {
|
|
|
+ //查询班级学员信息
|
|
|
+ List<ClassPeriodStudentVo> classPeriodStudentVos = baseMapper.listVideoUserPeriod(bo);
|
|
|
+ //查找学员学习记录
|
|
|
+ for (ClassPeriodStudentVo classPeriodStudentVo : classPeriodStudentVos) {
|
|
|
+ Long secLong = 0L;
|
|
|
+ Long studyLong = 0L;
|
|
|
+
|
|
|
+ SubjectStudyRecordQueryBo subjectStudyRecordQueryBo = new SubjectStudyRecordQueryBo();
|
|
|
+ subjectStudyRecordQueryBo.setGoodsId(classPeriodStudentVo.getGoodsId());
|
|
|
+ subjectStudyRecordQueryBo.setUserId(classPeriodStudentVo.getUserId());
|
|
|
+ subjectStudyRecordQueryBo.setGradeId(classPeriodStudentVo.getGradeId());
|
|
|
+ List<SubjectStudyRecordVo> subjectStudyRecordVos = iUserStudyRecordService.listSubject(subjectStudyRecordQueryBo);
|
|
|
+ for (SubjectStudyRecordVo subjectStudyRecordVo : subjectStudyRecordVos) {
|
|
|
+ secLong = new BigDecimal(secLong.toString()).add(new BigDecimal(subjectStudyRecordVo.getSectionNum().toString())).longValue();
|
|
|
+ studyLong = new BigDecimal(studyLong.toString()).add(new BigDecimal(subjectStudyRecordVo.getRecordNum().toString())).longValue();
|
|
|
+ }
|
|
|
+ //总节数
|
|
|
+ classPeriodStudentVo.setSecAllNum(secLong);
|
|
|
+ //学习节数
|
|
|
+ classPeriodStudentVo.setStuAllNum(studyLong);
|
|
|
+
|
|
|
+ //总的审核状态按照策划规则
|
|
|
+ ClassGradeUserQueryBo classGradeUserQueryBo = new ClassGradeUserQueryBo();
|
|
|
+ classGradeUserQueryBo.setGradeId(classPeriodStudentVo.getGradeId());
|
|
|
+ classGradeUserQueryBo.setUserId(classPeriodStudentVo.getUserId());
|
|
|
+ classGradeUserQueryBo.setGoodsId(classPeriodStudentVo.getGoodsId());
|
|
|
+ List<ClassPeriodUserVo> classPeriodUserVos1 = baseMapper.listPeriod(classGradeUserQueryBo);
|
|
|
+ ClassPeriodUserVo classPeriodUserVos = classPeriodUserVos1.get(0);
|
|
|
+ classPeriodUserVos.setPending(classPeriodStudentVo.getSecAllNum() - classPeriodUserVos.getPass() - classPeriodUserVos.getCheat());
|
|
|
+ classPeriodUserVos.setExamPending(classPeriodUserVos.getExamNum() - classPeriodUserVos.getExamPass() - classPeriodUserVos.getExamCheat());
|
|
|
+ //當前班級學員審核狀態 -1不可审核 0待審 1未通过 2通过
|
|
|
+ Integer gradePeriodStatus = 0; //班级里的审核状态字段,保持一致 0 未通过 1通过 2待审核 -1 不可审核
|
|
|
+
|
|
|
+ classPeriodStudentVo.setAllStatus(changePeriodStatus(classPeriodStudentVo.getPeriodStatus()));
|
|
|
+
|
|
|
+ classPeriodStudentVo.setWaitRebuildNum(classPeriodUserVos.getCheat() + classPeriodUserVos.getExamCheat());
|
|
|
+ if (!CollectionUtils.isEmpty(baseMapper.selectStart(classPeriodStudentVo.getUserId(), classPeriodStudentVo.getGoodsId(), classPeriodStudentVo.getGradeId(),classPeriodStudentVo.getOrderGoodsId()))) {
|
|
|
+ //查找开始学习时间
|
|
|
+ classPeriodStudentVo.setStartTime(baseMapper.selectStart(classPeriodStudentVo.getUserId(), classPeriodStudentVo.getGoodsId(), classPeriodStudentVo.getGradeId(),classPeriodStudentVo.getOrderGoodsId()).get(0));
|
|
|
+ }else{
|
|
|
+ classPeriodStudentVo.setStartTime(baseMapper.selectStartNoPhoto(classPeriodStudentVo.getUserId(), classPeriodStudentVo.getGoodsId(), classPeriodStudentVo.getGradeId(),classPeriodStudentVo.getOrderGoodsId())
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ return classPeriodStudentVos;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 实体类转化成视图对象
|