package com.srs.routine.mapper;

import java.util.List;

import com.srs.routine.domain.RtStuLeaveApplication;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.srs.routine.domain.vo.ClassStuLeaveDataStatistics;
import com.srs.routine.domain.vo.StuInfoReturnVo;
import com.srs.routine.domain.vo.StuLeaveApplicationDetailsVo;
import com.srs.routine.domain.vo.StuLeaveApplicationVo;
import com.srs.routine.domain.dto.StuLeaveApplicationDto;
import com.srs.common.doman.vo.TeacherVo;
import org.apache.ibatis.annotations.Param;

/**
 * 学生请假申请Mapper接口
 *
 * @author LSD
 * @date 2024-03-30
 */
public interface RtStuLeaveApplicationMapper extends BaseMapper<RtStuLeaveApplication> {
    /**
     * 查询学生请假申请
     *
     * @param leaveApplicationId 学生请假申请主键
     * @return 学生请假申请
     */
    public RtStuLeaveApplication selectRtStuLeaveApplicationByLeaveApplicationId(Long leaveApplicationId);

    /**
     * 查询学生请假申请列表
     *
     * @param rtStuLeaveApplication 学生请假申请
     * @return 学生请假申请集合
     */
    List<RtStuLeaveApplication> selectRtStuLeaveApplicationList(RtStuLeaveApplication rtStuLeaveApplication);

    /**
     * 查询学生请假申请列表
     *
     * @param dto 学生请假申请
     * @return 学生请假申请集合
     */
    List<StuLeaveApplicationVo> selectRtStuLeaveApplicationListByDto(StuLeaveApplicationDto dto);

    /**
     * 查询学生请假申请列表
     *
     * @param dto 学生请假申请
     * @return 学生请假申请集合
     */
    List<StuLeaveApplicationVo> selectRtStuLeaveApplicationListVo(StuLeaveApplicationDto dto);

    /**
     * 新增学生请假申请
     *
     * @param rtStuLeaveApplication 学生请假申请
     * @return 结果
     */
    int insertRtStuLeaveApplication(RtStuLeaveApplication rtStuLeaveApplication);

    /**
     * 修改学生请假申请
     *
     * @param rtStuLeaveApplication 学生请假申请
     * @return 结果
     */
    int updateRtStuLeaveApplication(RtStuLeaveApplication rtStuLeaveApplication);

    /**
     * 删除学生请假申请
     *
     * @param leaveApplicationId 学生请假申请主键
     * @return 结果
     */
    int deleteRtStuLeaveApplicationByLeaveApplicationId(Long leaveApplicationId);

    /**
     * 批量删除学生请假申请
     *
     * @param leaveApplicationIds 需要删除的数据主键集合
     * @return 结果
     */
    int deleteRtStuLeaveApplicationByLeaveApplicationIds(Long[] leaveApplicationIds);

    /**
     * 获取学生请假申请详细信息
     *
     * @param leaveApplicationId 学生请假申请主键
     * @return 学生请假申请详细信息
     */
    StuLeaveApplicationDetailsVo selectRtStuLeaveApplicationDetailsByLeaveApplicationId(Long leaveApplicationId);

    /**
     * 获取学生请假申请详细信息
     * @param stuNo
     * @return
     */
    StuInfoReturnVo selectStuInfoReturn(@Param("stuNo") String stuNo);


    /**
     * 根据学生学号，获取辅导员在sys_user表信息
     * @param stuId
     * @return
     */
    TeacherVo getCounselorInfo(Long stuId);

    /**
     * 根据流程实例id，获取请假申请详细信息
     * @param procInsId
     * @return
     */
    StuLeaveApplicationDetailsVo selectLeaveApplicationByProcInsId(String procInsId);

    /**
     * 根据辅导员工号，获取所带班级的请假人数统计
     * @param username
     * @return
     */
    List<ClassStuLeaveDataStatistics> selectClassLeaveNumber(String username);

    /**
     * 学务获取请假数据
     * @param rtStuLeaveApplication
     * @return
     */
    List<StuLeaveApplicationVo> getRtStuLeaveApplicationListByXW(StuLeaveApplicationDto rtStuLeaveApplication);

}
