package cn.iocoder.yudao.module.train.service;

import cn.iocoder.yudao.module.base.vo.BusinessRecordExportVO;
import cn.iocoder.yudao.module.train.entity.DriveSchoolCoachClock;
import cn.iocoder.yudao.module.train.vo.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 教练打卡表 服务类
 * </p>
 *
 * @author author
 * @since 2025-07-16
 */
public interface IDriveSchoolCoachClockService extends IService<DriveSchoolCoachClock> {

    /**
     * 获得教练打卡记录分页
     * @param pageReqVO
     * @param page
     * @return
     */
    IPage<DriveSchoolCoachClockVO> queryListPage(DriveSchoolCoachClockVO pageReqVO, Page<DriveSchoolCoachClockVO> page);

    /**
     * 查询今天未离场的打卡记录
     */
    DriveSchoolCoachClock selectTodayClockRecord(Long userId,String carNo);

    /**
     * 到场打卡
     **/
    String createObj(DriveSchoolCoachClockVO coachClockVO);

    /**
     * 离场打卡
     **/
    void updateObj(DriveSchoolCoachClockVO coachClockVO);

    /**
     * 统计训练车辆台次
     */
    TrainCarCountVO countTrainCar(TrainCarCountVO trainCarCountVO);

    /**
     * 车辆列表
     * @param trainCarCountVO
     * @return
     */
    List<TrainCarCountVO> trainClockByCar(TrainCarCountVO trainCarCountVO);

    /**
     * 车辆打卡训练详细信息，包含打卡基本信息和学员信息
     */
    List<TrainDetailsByCarVO> trainClockByCarDetail(TrainDetailsByCarVO trainDetailsByCarVO);

    /**
     * PC端打卡统计数据获取
     */
    CloakAndTrainCountVO getCloakAndTrainCount(CloakAndTrainCountVO cloakAndTrainCountVO);

    /**
     * 每天晚上7点提醒未进行离场打卡的教练进行打卡
     */
    void noClockInRemind();

    /**
     * 导出数据获取
     */
    IPage<CoachClockExportVO> coachClockAll(CoachClockExportVO exportVO, Page<CoachClockExportVO> page);

    /**
     * 导出的三种形式
     * @param exportVO
     * @return
     */
    List<CoachClockExportVO> getCoachClockRecordList(CoachClockExportVO exportVO);
    List<CoachClockExportVO> getAllCoachClockRecordList(CoachClockExportVO exportVO);
    List<CoachClockExportVO> getCoachClockListByRange(CoachClockExportVO exportVO);

    /**
     * 获取当日实时训练情况统计
     */
    CloakAndTrainCountVO getTodayTrainSituation();

    /**
     * 获取正在训练的车辆信息列表
     */
    List<DriveSchoolCoachClockVO> getTodayCarTrainSituation(DriveSchoolCoachClock driveSchoolCoachClock);

    /**
     * 根据教练id查询当日打卡记录的车牌号列表
     */
    List<String> getClockCarNoByUserId(Long userId);
    DriveSchoolCoachClock getClockCarInfoByUserId(Long userId, String carNo);

    /**
     * 获得教练异常打卡记录分页
     * @param pageReqVO
     * @param page
     * @return
     */
    IPage<DriveSchoolCoachClockVO> queryErrorClockListPage(DriveSchoolCoachClockVO pageReqVO, Page<DriveSchoolCoachClockVO> page);

}
