package com.bonus.system.holiday.dao;

import com.bonus.system.api.domain.SysRole;
import com.bonus.system.holiday.entity.HolidayBean;
import com.bonus.system.holiday.entity.HolidayImportBean;
import com.bonus.system.holiday.entity.HolidayKeyBean;
import com.bonus.system.holiday.entity.WorkReportBean;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.time.LocalDate;
import java.util.List;
import java.util.Map;

/**
 * 项目部角色-数据访问层
 * @author fly
 */
@Repository("WorkReportDao")
public interface WorkReportDao {
    /**
     * 新增请假记录
     * @param o
     * @return
     */
    int insertHoliday(HolidayBean o);

    /**
     * 获取数据
     * @param month
     * @return
     */
    List<WorkReportBean> selectDataByMonth(String month);

    /**
     * 新增
     * @param bean
     * @return
     */
    int insertWorkReportData(WorkReportBean bean);

    /**
     * 查询列表
     * @param bean
     * @return
     */
    List<WorkReportBean> getWorkReportList(WorkReportBean bean);

    /**
     * 详情查询
     * @param bean
     * @return
     */
    List<WorkReportBean> getDetailsList(WorkReportBean bean);

    /**
     * 根据用户id查询角色
     * @param userId
     * @return
     */
    List<SysRole> getRoleListByUserId(Long userId);

    /**
     * 修改状态
     * @param id
     * @return
     */
    WorkReportBean selectEvectionById(Long id);

    /**
     * 修改
     * @param bean
     * @return
     */
    int updateEvection(WorkReportBean bean);

    /**
     * 根据用户id查询组织id
     * @param userId
     * @return
     */
    List<Long> selectOrgIdByUserId(Long userId);

    /**
     * 查询该人员是哪些部门的考勤员和部门负责人
     * @param userId
     * @return
     */
    List<Long> selectOrgIdByRoleAndUserId(Long userId);
}
