package com.yida.data.device.telephone.service;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yida.data.common.core.entity.telephone.EduTelephoneCard;
import com.yida.data.device.vo.OnlineCountVO;
import com.yida.data.device.vo.telephone.IcCardVO;
import com.yida.data.device.vo.telephone.TelephoneCardVO;

import java.util.List;
import org.springframework.scheduling.annotation.Async;

import javax.servlet.http.HttpServletResponse;

/**
 * 亲情电话-ic卡 Service接口
 *
 * @author zhanghaijun
 * @date 2021-08-10 16:28:12
 */
public interface EduTelephoneCardService extends IService<EduTelephoneCard> {
    /**
     * 查询ic卡列表
     *
     * @param page
     * @param status
     * @param iccId
     * @param studentName
     */
    IPage<IcCardVO> findCardList(Page page, Integer status, String iccId, String studentName, Long schoolId, Long campusId, Long sectionId, Long gradeId, Long classId);

    TelephoneCardVO findCard(Long id);


    /**
     * 查询学生ic卡详情
     *
     * @param id
     * @return
     */
    EduTelephoneCard findStudentCard(Long id);

    /**
     * 批量上传ic卡
     *
     * @param file
     */
    @Async
    void batchUpIcCard(String path, String key);

    void downloadTemplate(HttpServletResponse response);

    /**
     * 获取ic卡状态分布
     * @return
     */
    OnlineCountVO getOnlineDistrib(List<Long> schoolIds);

}
