package com.ym.mec.biz.service;

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

import com.ym.mec.biz.dal.dto.FeeStudentDto;
import com.ym.mec.biz.dal.dto.MusicArrearageStudentDto;
import com.ym.mec.biz.dal.dto.SimpleUserDto;
import com.ym.mec.biz.dal.entity.MusicGroup;
import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender;
import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalenderDetail;
import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalenderStudentDetail;
import com.ym.mec.biz.dal.page.ArrearageStudentsQueryInfo;
import com.ym.mec.common.page.PageInfo;
import com.ym.mec.common.page.QueryInfo;
import com.ym.mec.common.service.BaseService;
import org.apache.ibatis.annotations.Param;

public interface MusicGroupPaymentCalenderDetailService extends BaseService<Long, MusicGroupPaymentCalenderDetail> {

    /**
     * 修改学员预计缴费金额
     * @param expectAmount
     * @param ids
     * @return
     */
    void updateExpectAmount(BigDecimal expectAmount,BigDecimal expectMemberAmount,String ids);

    /**
     * 开启缴费
     * @param ids
     */
    String openPayment(String ids);

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

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

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

    /**
     * 跨团合班新增学员
     * @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);
}
