|
@@ -54,6 +54,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
+import javax.annotation.Resource;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.math.RoundingMode;
|
|
|
import java.text.SimpleDateFormat;
|
|
@@ -149,6 +150,8 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
|
|
|
private TeacherAttendanceService teacherAttendanceService;
|
|
|
@Autowired
|
|
|
private SubjectService subjectService;
|
|
|
+ @Resource
|
|
|
+ private CoursePlanService coursePlanService;
|
|
|
|
|
|
@Override
|
|
|
public CourseScheduleDao getDao() {
|
|
@@ -1125,7 +1128,6 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
|
|
|
@Override
|
|
|
public PageInfo<CourseStudent> queryStudentLiveCourse(Map<String, Object> param) {
|
|
|
//本月的最后一天
|
|
|
- param.put("type", CourseScheduleEnum.LIVE.getCode());
|
|
|
param.put("orderState", OrderStatusEnum.PAID.getCode());
|
|
|
Page<CourseStudent> pageInfo = PageUtil.getPageInfo(param);
|
|
|
return PageUtil.pageInfo(baseMapper.queryStudentLiveCourse(pageInfo, param));
|
|
@@ -2883,6 +2885,11 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
|
|
|
List<CourseScheduleWrapper.MyCourseVo> courseVos = Lists.newArrayList();
|
|
|
CourseGroup courseGroup = courseGroupService.lambdaQuery().eq(CourseGroup::getId, query.getCourseGroupId()).one();
|
|
|
Subject subject = subjectService.get(courseGroup.getSubjectId());
|
|
|
+ List<LiveCourseInfoVo.PlanVo> planVos = coursePlanService.queryCoursePlanByGroupId(courseGroup.getId());
|
|
|
+ Map<Long, LiveCourseInfoVo.PlanVo> planMap = new HashMap<>();
|
|
|
+ if(CollectionUtils.isNotEmpty(planVos)){
|
|
|
+ planMap = planVos.stream().collect(Collectors.toMap(LiveCourseInfoVo.PlanVo::getId, Function.identity()));
|
|
|
+ }
|
|
|
for (CourseSchedule courseSchedule : courseSchedules) {
|
|
|
CourseScheduleWrapper.MyCourseVo courseVo = new CourseScheduleWrapper.MyCourseVo();
|
|
|
courseVo.setCourseId(courseSchedule.getId());
|
|
@@ -2894,6 +2901,10 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
|
|
|
courseVo.setCourseGroupName(courseGroup.getName() + "-第" + courseSchedule.getClassNum() + "课");
|
|
|
courseVo.setSubjectId(courseGroup.getSubjectId());
|
|
|
courseVo.setSubjectName(subject.getName());
|
|
|
+ LiveCourseInfoVo.PlanVo planVo = planMap.get(courseSchedule.getId());
|
|
|
+ if(planVo != null){
|
|
|
+ courseVo.setCoursePlan(planVo.getPlan());
|
|
|
+ }
|
|
|
if(query.getAttendanceStatus() == null){
|
|
|
courseVo.setAttendanceStatus(attendanceList.stream().anyMatch(studentAttendance -> studentAttendance.getCourseScheduleId().equals(courseSchedule.getId())));
|
|
|
}else {
|