package com.ym.mec.web.controller.education;

import com.ym.mec.biz.dal.page.StudentQueryInfo;
import com.ym.mec.biz.service.StudentManageService;
import com.ym.mec.common.page.QueryInfo;
import io.swagger.annotations.ApiOperation;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import com.ym.mec.biz.dal.page.StudentAttendanceQueryInfo;
import com.ym.mec.biz.service.StudentAttendanceService;
import com.ym.mec.biz.service.StudentRegistrationService;
import com.ym.mec.common.controller.BaseController;

/**
 * @Author Joburgess
 * @Date 2020.09.14
 */
@RestController
public class EduStudentStudentController extends BaseController {

    @Autowired
    private StudentAttendanceService studentAttendanceService;
    @Autowired
    private StudentRegistrationService studentRegistrationService;
    @Autowired
    private StudentManageService studentManageService;

    @ApiOperation(value = "获取某节课学生签到列表")
    @GetMapping("eduStudentAttendance/findStudentAttendance")
    public Object findStudentAttendance(StudentAttendanceQueryInfo queryInfo){
        return succeed(studentAttendanceService.findStudentAttendance(queryInfo));
    }

    @ApiOperation(value = "获取学员详情页，包含所在乐团信息")
    @PostMapping("studentManage/detail")
    public Object getStudentDetail(Integer studentId){
        return succeed(studentRegistrationService.getStudentDetail(studentId));
    }

    @ApiOperation(value = "教务老师关联的学员列表")
    @GetMapping("studentManage/queryGroupStudents")
    public Object queryGroupStudents(StudentQueryInfo queryInfo){
        return succeed(studentManageService.queryGroupStudents(queryInfo));
    }

    @ApiOperation(value = "获取当前教务老师关联的课程组上该学员的所有剩余课程")
    @GetMapping("studentManage/queryStudentNoStartCourse")
    public Object queryStudentNoStartCourse(StudentQueryInfo queryInfo){
        return succeed(studentManageService.queryStudentNoStartCourse(queryInfo));
    }

}
