|
@@ -34,12 +34,11 @@ import com.zhongzheng.modules.grade.bo.UserPeriodQueryBo;
|
|
|
import com.zhongzheng.modules.grade.domain.ClassGradeUser;
|
|
|
import com.zhongzheng.modules.grade.domain.UserPeriod;
|
|
|
import com.zhongzheng.modules.grade.domain.UserPeriodStatus;
|
|
|
+import com.zhongzheng.modules.grade.mapper.ClassGradeUserMapper;
|
|
|
import com.zhongzheng.modules.grade.service.IClassGradeUserService;
|
|
|
import com.zhongzheng.modules.grade.service.IUserPeriodService;
|
|
|
import com.zhongzheng.modules.grade.service.IUserPeriodStatusService;
|
|
|
-import com.zhongzheng.modules.grade.vo.ClassPeriodStudentVo;
|
|
|
-import com.zhongzheng.modules.grade.vo.ClassPeriodVo;
|
|
|
-import com.zhongzheng.modules.grade.vo.UserPeriodStatusVo;
|
|
|
+import com.zhongzheng.modules.grade.vo.*;
|
|
|
import com.zhongzheng.modules.inform.bo.InformRemindQueryBo;
|
|
|
import com.zhongzheng.modules.inform.bo.InformUserAddBo;
|
|
|
import com.zhongzheng.modules.inform.service.IInformRemindService;
|
|
@@ -151,6 +150,9 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
|
|
|
@Autowired
|
|
|
private ICourseMenuExamService courseMenuExamService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ClassGradeUserMapper classGradeUserMapper;
|
|
|
+
|
|
|
@Override
|
|
|
public UserStudyRecordVo queryById(Long recordId) {
|
|
|
UserStudyRecord db = this.baseMapper.selectById(recordId);
|
|
@@ -315,7 +317,6 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public Integer insertByAddBo(UserStudyRecordAddBo bo) {
|
|
|
- Boolean erJianErZao = false;
|
|
|
CourseSectionVo courseSectionVo =iCourseSectionService.queryById(bo.getSectionId());
|
|
|
//判断录播拍照是否达标
|
|
|
if(courseSectionVo.getSectionType()==1&&Validator.isNotEmpty(bo.getStatus())&&bo.getStatus()==1){
|
|
@@ -326,7 +327,6 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
|
|
|
String fullName = iCourseBusinessService.queryFullName(queryBo);
|
|
|
if(Validator.isNotEmpty(fullName)){
|
|
|
if(fullName.equals("继续教育二级建造师")||fullName.equals("继续教育二级造价师")){
|
|
|
- erJianErZao = true;
|
|
|
if(Validator.isNotEmpty(courseSectionVo.getDurationTime())||Validator.isNotEmpty(bo.getVideoCurrentTime())){
|
|
|
Long videoTime = 0L;
|
|
|
if(Validator.isNotEmpty(courseSectionVo.getDurationTime())&&courseSectionVo.getDurationTime().longValue()>0){
|
|
@@ -434,7 +434,7 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
|
|
|
UserStudyRecordVo lastVo = queryLast(queryBo);
|
|
|
if(Validator.isEmpty(lastVo)||Validator.isNotEmpty(bo.getPhoto())||Validator.isEmpty(lastVo.getVideoCurrentTime())||lastVo.getVideoCurrentTime().longValue()>add.getVideoCurrentTime().longValue()){
|
|
|
//如果没有历史数据或者之前播放时长比现在晚,或者携带照片则新增观看记录
|
|
|
- if(erJianErZao&&Validator.isEmpty(bo.getPhoto())&&(lastVo.getVideoCurrentTime().longValue()>add.getVideoCurrentTime().longValue())){
|
|
|
+ if(Validator.isNotEmpty(lastVo)&&Validator.isNotEmpty(bo.getErJianErZao())&&bo.getErJianErZao()&&Validator.isEmpty(bo.getPhoto())&&(lastVo.getVideoCurrentTime().longValue()>add.getVideoCurrentTime().longValue())){
|
|
|
return 0;
|
|
|
}else{
|
|
|
this.save(add);
|
|
@@ -708,9 +708,24 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
|
|
|
classSectionVo.setModuleId(classPeriodVo.getId());
|
|
|
classSectionVo.setChapterId(classChapterVo.getId());
|
|
|
classSectionVo.setSectionId(classSectionVo.getId());
|
|
|
+ classSectionVo.setType(3L);
|
|
|
+ sectionList.add(classSectionVo);
|
|
|
+ }
|
|
|
+ List<ClassPeriodSectionVo> cExamList= classGradeUserMapper.listperiodExam(classChapterVo.getId(), null, classPeriodVo.getCourseId(), null, classPeriodVo.getId());
|
|
|
+ for (ClassPeriodSectionVo sectionVo : cExamList) {
|
|
|
+ ClassPeriodVo classSectionVo = BeanUtil.toBean(sectionVo,ClassPeriodVo.class);
|
|
|
+ classSectionVo.setType(4L);
|
|
|
+ classSectionVo.setExamId(sectionVo.getId());
|
|
|
sectionList.add(classSectionVo);
|
|
|
}
|
|
|
}
|
|
|
+ List<ClassPeriodChapterVo> mExamList = classGradeUserMapper.listperiodModuleExam( null, classPeriodVo.getCourseId(), null, classPeriodVo.getId());
|
|
|
+ for (ClassPeriodChapterVo chapterVo : mExamList) {
|
|
|
+ ClassPeriodVo classSectionVo = BeanUtil.toBean(chapterVo,ClassPeriodVo.class);
|
|
|
+ classSectionVo.setType(5L);
|
|
|
+ classSectionVo.setExamId(chapterVo.getId());
|
|
|
+ sectionList.add(classSectionVo);
|
|
|
+ }
|
|
|
}
|
|
|
//为章搜索节记录
|
|
|
if (classPeriodVo.getType() == 2){
|
|
@@ -723,8 +738,17 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
|
|
|
classSectionVo.setModuleId(0L);
|
|
|
classSectionVo.setChapterId(classPeriodVo.getId());
|
|
|
classSectionVo.setSectionId(classSectionVo.getId());
|
|
|
+ classSectionVo.setType(3L);
|
|
|
+ sectionList.add(classSectionVo);
|
|
|
+ }
|
|
|
+ List<ClassPeriodSectionVo> cExamList= classGradeUserMapper.listperiodExam(classPeriodVo.getId(), null, classPeriodVo.getCourseId(), null, 0L);
|
|
|
+ for (ClassPeriodSectionVo sectionVo : cExamList) {
|
|
|
+ ClassPeriodVo classSectionVo = BeanUtil.toBean(sectionVo,ClassPeriodVo.class);
|
|
|
+ classSectionVo.setType(4L);
|
|
|
+ classSectionVo.setExamId(sectionVo.getId());
|
|
|
sectionList.add(classSectionVo);
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
//为节搜索学时记录
|
|
|
if (classPeriodVo.getType() == 3){
|