package com.xjrsoft.module.classtime.service;

import com.github.yulichang.base.MPJBaseService;
import com.xjrsoft.module.classtime.dto.AddClassTimeStatisticsDto;
import com.xjrsoft.module.classtime.entity.ClassTimeStatistics;
import com.xjrsoft.module.classtime.vo.ClassTimeStatisticsRecordVo;
import org.apache.ibatis.annotations.Param;

import java.io.IOException;
import java.util.List;

/**
* @title: 课时统计
* @Author dzx
* @Date: 2024-09-26
* @Version 1.0
*/

public interface IClassTimeStatisticsService extends MPJBaseService<ClassTimeStatistics> {
    /**
    * 新增
    *
    * @param classTimeStatistics
    * @return
    */
    Boolean add(ClassTimeStatistics classTimeStatistics);

    /**
    * 更新
    *
    * @param classTimeStatistics
    * @return
    */
    Boolean update(ClassTimeStatistics classTimeStatistics);

    /**
    * 删除
    *
    * @param ids
    * @return
    */
    Boolean delete(List<Long> ids);

    /**
     * 新增课时统计
     * @param dto
     * @return
     */
    Boolean add(AddClassTimeStatisticsDto dto);

    Boolean refreshRecord(ClassTimeStatistics statistics);

    /**
     * 锁定数据
     * @param id
     * @return
     */
    Boolean lockData(Long id);

    List<ClassTimeStatisticsRecordVo> getRecordList(@Param("id") Long id);

    /**
     * 导出明细
     * @param id
     * @return
     */
    byte[] recordExport(Long id) throws IOException;
}
