| | |
| | | package com.dsh.course.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.course.entity.CoursePackageScheduling; |
| | | import com.dsh.course.entity.CoursePackageStudent; |
| | | import com.dsh.course.entity.StudentClassInfo; |
| | | import com.dsh.course.entity.TAppUser; |
| | |
| | | import com.dsh.course.feignclient.account.StudentClient; |
| | | import com.dsh.course.feignclient.account.model.AppUser; |
| | | import com.dsh.course.feignclient.account.model.Student; |
| | | import com.dsh.course.mapper.CoursePackageSchedulingMapper; |
| | | import com.dsh.course.mapper.CoursePackageStudentMapper; |
| | | import com.dsh.course.model.QueryCoursePackageStudentList; |
| | | import com.dsh.course.service.CoursePackageSchedulingService; |
| | | import com.dsh.course.service.CoursePackageStudentService; |
| | | import com.dsh.course.util.ToolUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private CoursePackageSchedulingMapper coursePackageSchedulingService; |
| | | |
| | | /** |
| | | * 获取排课预约数据 |
| | |
| | | studentId = students.stream().map(Student::getId).collect(Collectors.toList()); |
| | | } |
| | | } |
| | | List<Map<String, Object>> list = this.baseMapper.queryCoursePackageStudentList(page, queryCoursePackageStudentList.getCoursePackageSchedulingId(), userId, studentId); |
| | | |
| | | |
| | | CoursePackageScheduling coursePackageScheduling = coursePackageSchedulingService.selectById(queryCoursePackageStudentList.getCoursePackageSchedulingId()); |
| | | List<CoursePackageScheduling> coursePackageSchedulings = coursePackageSchedulingService.selectList(new QueryWrapper<CoursePackageScheduling>().eq("coursePackageId", coursePackageScheduling.getCoursePackageId()).eq("classDate", coursePackageScheduling.getClassDate())); |
| | | |
| | | |
| | | List<Long> ids = new ArrayList<>(); |
| | | for (CoursePackageScheduling packageScheduling : coursePackageSchedulings) { |
| | | ids.add(packageScheduling.getId()); |
| | | } |
| | | |
| | | List<Map<String, Object>> list = this.baseMapper.queryCoursePackageStudentList(page, ids, userId, studentId); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy"); |
| | | Integer now = Integer.valueOf(sdf.format(new Date())); |
| | | for (Map<String, Object> map : list) { |