|
@@ -1531,6 +1531,30 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
|
|
//课程状态更新为COMPLETE
|
|
//课程状态更新为COMPLETE
|
|
baseMapper.updateEndTime(userList);
|
|
baseMapper.updateEndTime(userList);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ //查完完成的课程
|
|
|
|
+ List<CourseCompleteVo> completeList=baseMapper.selectComplete();
|
|
|
|
+ if (CollectionUtils.isNotEmpty(completeList)){
|
|
|
|
+ List<Long> gids = completeList.stream().map(CourseCompleteVo::getCourseGroupId).collect(Collectors.toList());
|
|
|
|
+ List<CourseGroup> courseGroups = courseGroupService.getDao().selectList(Wrappers.<CourseGroup>lambdaQuery().in(CourseGroup::getId, gids));
|
|
|
|
+ if(CollectionUtils.isNotEmpty(courseGroups)){
|
|
|
|
+ List<Long> ids=new ArrayList<>();
|
|
|
|
+ for (CourseGroup group : courseGroups) {
|
|
|
|
+ for (CourseCompleteVo complete : completeList) {
|
|
|
|
+ Integer courseNum = group.getCourseNum();
|
|
|
|
+ Integer completeCount = complete.getCourseCount();
|
|
|
|
+ if (courseNum.equals(completeCount)){
|
|
|
|
+ ids.add(complete.getCourseGroupId());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(CollectionUtils.isNotEmpty(ids)){
|
|
|
|
+ //同步课程组状态
|
|
|
|
+ courseGroupService.getDao().updateBatch(ids);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -1664,7 +1688,7 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
|
|
courseGroup.setSubjectId(arrangeCourseVo.getSubjectId());
|
|
courseGroup.setSubjectId(arrangeCourseVo.getSubjectId());
|
|
courseGroup.setSingleCourseMinutes(singleClssTime);
|
|
courseGroup.setSingleCourseMinutes(singleClssTime);
|
|
courseGroup.setCourseNum(classNum);
|
|
courseGroup.setCourseNum(classNum);
|
|
- courseGroup.setStatus(CourseGroupEnum.NOT_SALE.getCode());
|
|
|
|
|
|
+ courseGroup.setStatus(CourseGroupEnum.ING.getCode());
|
|
courseGroup.setCreatedBy(teacherId);
|
|
courseGroup.setCreatedBy(teacherId);
|
|
courseGroupService.getDao().insert(courseGroup);
|
|
courseGroupService.getDao().insert(courseGroup);
|
|
|
|
|
|
@@ -1704,11 +1728,24 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 根据月份查询消耗记录
|
|
|
|
|
|
+ * @Description: 根据月份查询消耗记录
|
|
|
|
+ * @Author: cy
|
|
|
|
+ * @Date: 2022/5/30
|
|
*/
|
|
*/
|
|
public Map<String, Object> selectConsumeTime(String month, Long teacherId) {
|
|
public Map<String, Object> selectConsumeTime(String month, Long teacherId) {
|
|
Map<String, Object> map = new HashMap();
|
|
Map<String, Object> map = new HashMap();
|
|
map.put("consumeTime", recordDao.countTimeByTeacherId(teacherId, month));
|
|
map.put("consumeTime", recordDao.countTimeByTeacherId(teacherId, month));
|
|
return map;
|
|
return map;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * @Description: 消耗时长详情
|
|
|
|
+ * @Author: cy
|
|
|
|
+ * @Date: 2022/5/30
|
|
|
|
+ */
|
|
|
|
+ @Override
|
|
|
|
+ public PageInfo<CourseScheduleRecordVo> selectConsumeTimeList(Map<String, Object> param) {
|
|
|
|
+ param.put("type",CourseScheduleEnum.PIANO_ROOM_CLASS.getCode());
|
|
|
|
+ return PageUtil.pageInfo(recordDao.selectConsumeTimeList(PageUtil.getPageInfo(param), param));
|
|
|
|
+ }
|
|
}
|
|
}
|