package com.ym.mec.biz.dal.dao;

import com.ym.mec.biz.dal.dto.*;
import com.ym.mec.biz.dal.entity.CourseSchedule;
import com.ym.mec.biz.dal.entity.VipGroup;
import com.ym.mec.common.dal.BaseDAO;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

public interface VipGroupDao extends BaseDAO<Long, VipGroup> {

	/**
	 * @Author: Joburgess
	 * @Date: 2019/10/9
	 * @params [organId]
	 * @return java.util.List<com.ym.mec.biz.dal.entity.VipGroup>
	 * @describe 根据部门获取
	 */
	List<VipGroup> findAllByOrgan(Map<String,Object> params);
	int countVipGroupByOrgan(Map<String,Object> params);

	/**
	 * @Author: Joburgess
	 * @Date: 2019/10/9
	 * @params [params]
	 * @return java.util.List<com.ym.mec.biz.dal.dto.VipGroupStudentDto>
	 * @describe 获取小课学员
	 */
	List<VipGroupStudentDto> findVipGroupStudents(Map<String,Object> params);
	int countVipGroupStudents(Map<String,Object> params);

	/**
	 * @Author: Joburgess
	 * @Date: 2019/10/9
	 * @params [params]
	 * @return java.util.List<com.ym.mec.biz.dal.dto.VipGroupCourseSchduleRecordDto>
	 * @describe 获取vip课教学记录
	 */
	List<VipGroupCourseSchduleRecordDto> findTeachingRecord(Map<String,Object> params);
	int countTeachingRecord(Map<String,Object> params);

	/**
	 * @Author: Joburgess
	 * @Date: 2019/10/9
	 * @params [vipGroupId]
	 * @return int
	 * @describe 统计已结算课程数量
	 */
	int countIsSalaryNum(Long vipGroupId);

	/**
	 * @Author: Joburgess
	 * @Date: 2019/10/9
	 * @params [vipGroupId]
	 * @return int
	 * @describe 统计被投诉课程数量
	 */
	int countComplaintsNum(Long vipGroupId);

	/**
	 * @Author: Joburgess
	 * @Date: 2019/10/9
	 * @params [vipGroupId]
	 * @return com.ym.mec.biz.dal.dto.TeachingRecordBaseInfo
	 * @describe 获取vip课的总课次及已上课次
	 */
	TeachingRecordBaseInfo getClassTimes(Long vipGroupId);

	/**
	 * @Author: Joburgess
	 * @Date: 2019/10/3
	 * @params [userID]
	 * @return java.util.List<com.ym.mec.biz.dal.dto.StudentManageVipGroupDto>
	 * @describe 获取对应学生vip课
	 */
	List<StudentManageVipGroupDto> findStudentVipGroups(Integer userId);

	/**
	 * @Author: Joburgess
	 * @Date: 2019/10/3
	 * @params [params]
	 * @return java.util.List<com.ym.mec.biz.dal.dto.StudentVipGroupShowListDto>
	 * @describe 学生端获取vip课列表
	 */
	List<StudentVipGroupShowListDto> findVipGroups(Map<String,Object> params);

	/**
	 * @Author: Joburgess
	 * @Date: 2019/10/3
	 * @params [params]
	 * @return int
	 * @describe 统计vip数
	 */
	int countVipGorups(Map<String,Object> params);

	/**
	 * @Author: Joburgess
	 * @Date: 2019/10/3
	 * @params [vipGroupId]
	 * @return com.ym.mec.biz.dal.dto.VipGroupManageDetailDto
	 * @describe 获取小课详情
	 */
	VipGroupManageDetailDto getVipGroupBaseInfo(Long vipGroupId);

	/**
	 * @Author: Joburgess
	 * @Date: 2019/10/11
	 * @params [vipGroupId]
	 * @return com.ym.mec.biz.dal.dto.VipGroupSalaryBaseInfo
	 * @describe 获取vip课财务基本信息
	 */
	VipGroupSalaryBaseInfo getVipGroupSalaryInfo(Long vipGroupId);

	/**
	 * @Author: Joburgess
	 * @Date: 2019/10/11
	 * @params [vipGroupId]
	 * @return int
	 * @describe 统计扣费笔数
	 */
	int countVipGroupDeductionNum(Long vipGroupId);

	/**
	 * @Author: Joburgess
	 * @Date: 2019/10/3
	 * @params [params]
	 * @return java.util.List<com.ym.mec.biz.dal.entity.CourseSchedule>
	 * @describe 获取小课考勤记录
	 */
    List<CourseSchedule> findVipGroupAttendances(Map<String,Object> params);

    /**
     * @Author: Joburgess
     * @Date: 2019/10/3
     * @params [params]
     * @return int
     * @describe 统计小课考勤记录数
     */
    int countVipGroupAttendance(Map<String,Object> params);

    /**
     * @Author: Joburgess
     * @Date: 2019/10/3
     * @params [vipGroupId]
     * @return com.ym.mec.biz.dal.dto.StudentVipGroupDetailDto
     * @describe 获取vip课详情
     */
    StudentVipGroupDetailDto getVipGroupDetail(Long vipGroupId);

    /**
     * @Author: Joburgess
     * @Date: 2019/10/3
     * @params [vipGroupId]
     * @return java.util.List<java.util.Map<java.lang.String,java.lang.Integer>>
     * @describe 统计剩余课时数
     */
    List<Map<String,Integer>> countSurplusClassTimes(Long vipGroupId);

    /**
     * @Author: Joburgess
     * @Date: 2019/10/12
     * @params [vipGroupId]
     * @return java.math.BigDecimal
     * @describe 统计学生vip课未上课时费用
     */
    List<Map<Long,BigDecimal>> countSurplusCourseFee(Long vipGroupId);

    /**
     * @Author: Joburgess
     * @Date: 2019/10/14
     * @params [teacherId]
     * @return int
     * @describe 统计老师开启的vip课数
     */
    int countTeacherVipGroups(Long teacherId);
}