package com.ym.mec.biz.service;

import com.ym.mec.biz.dal.dto.FeeStudentDto;
import com.ym.mec.biz.dal.dto.MusicArrearageStudentDto;
import com.ym.mec.biz.dal.dto.MusicGroupPaymentCalenderDetailDto;
import com.ym.mec.biz.dal.dto.SimpleUserDto;
import com.ym.mec.biz.dal.entity.*;
import com.ym.mec.biz.dal.page.ArrearageStudentsQueryInfo;
import com.ym.mec.biz.dal.page.MusicCalenderDetailQueryInfo;
import com.ym.mec.common.page.PageInfo;
import com.ym.mec.common.service.BaseService;

import java.util.Date;
import java.util.List;
import java.util.Set;

public interface MusicGroupPaymentCalenderDetailService extends BaseService<Long, MusicGroupPaymentCalenderDetail> {


    /**
     * 开启缴费
     * @param ids
     * @param startPaymentDate
     * @param deadlinePaymentDate
     */
    String openPayment(String ids, Date startPaymentDate, Date deadlinePaymentDate);

    /**
     * 根据声部获取乐团下完成缴费的学员
     * @param musicGroupId
     * @param subjectId
     * @return
     */
    List<SimpleUserDto> findMusicGroupStudentWithSubject(String musicGroupId,Integer subjectId);

    /**
     * 刷新学员乐团付费状态
     */
    void refreshUserMusicGroupPaymentStatusTask();


    /**
     * 跨团合班新增学员
     * @param musicGroupPaymentCalender
     * @param musicGroupPaymentCalenderStudentDetails
     */
    void batchAdd(MusicGroupPaymentCalender musicGroupPaymentCalender, List<MusicGroupPaymentCalenderStudentDetail> musicGroupPaymentCalenderStudentDetails);

    /**
     * 乐团缴费记录新增学员
     * @param batchNo
     * @param userIdList
     */
    void batchAdd(String batchNo, Set<Integer> userIdList);

    /**
     * 获取fee表学员列表
     * @param musicGroupId
     * @return
     */
    List<FeeStudentDto> queryFeeStudents(String musicGroupId,String search,Integer subjectId);

    /**
     * 批量删除缴费信息
     * @param musicGroupPaymentCalenderDetailIds
     */
    void batchDel(String musicGroupPaymentCalenderDetailIds);

    /**
     * @describe 未缴费学员列表
     * @author Joburgess
     * @date 2021/2/3 0003
     * @param queryInfo:
     * @return com.ym.mec.common.page.PageInfo<com.ym.mec.biz.dal.dto.MusicArrearageStudentDto>
     */
    PageInfo<MusicArrearageStudentDto> queryArrearageStudents(ArrearageStudentsQueryInfo queryInfo);

    /**
     * @describe 获取未缴费学员关联乐团列表
     * @author Joburgess
     * @date 2021/2/3 0003
     * @param organIds:
     * @return java.util.List<com.ym.mec.biz.dal.entity.MusicGroup>
     */
    List<MusicGroup> getNoPaymentStudentMusicGroups(String organIds);

    /**
     * 主动发送学员待续费通知
     * @param calenderId
     * @param studentIds
     * @return
     */
    void pushWaitRenewMessage(Long calenderId, String studentIds);

    PageInfo<MusicGroupPaymentCalenderDetailDto> queryDetailPage(MusicCalenderDetailQueryInfo queryInfo);

    /**
    * @description: 生成缴费项目学员详情
     * @param studentPaymentOrder
 * @param studentRegistration
    * @return void
    * @author zx
    * @date 2021/12/30 15:16
    */
    void addCalenderDetail(StudentPaymentOrder studentPaymentOrder,StudentRegistration studentRegistration);
}
