package com.ruoyi.oa.mapper;

import com.ruoyi.oa.domain.ProjectAttendance;
import com.ruoyi.oa.domain.vo.ProjectAttendanceVo;
import com.ruoyi.oa.domain.OaAttendanceRecord;
import com.ruoyi.oa.domain.vo.OaAttendanceRecordVo;
import com.ruoyi.common.core.mapper.BaseMapperPlus;
import com.ruoyi.oa.domain.vo.SysOaProjectVo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * 计算记录Mapper接口
 *
 * @author ruoyi
 * @date 2025-05-15
 */
public interface OaAttendanceRecordMapper extends BaseMapperPlus<OaAttendanceRecordMapper, OaAttendanceRecord, OaAttendanceRecordVo> {

    /**
     * 获取全部的生成日期
     * @param date
     * @return
     */
    List<String> listGenDate(String date);

    /**
     * 获取全部相同日期数据
     *
     * @param date
     * @param firstDay
     * @return
     */
    List<Long> listCommonDateRecord(@Param("date") String date, @Param("firstDay") Date firstDay);

    /**
     * 查询详情
     * @param recordId
     * @return
     */
    OaAttendanceRecordVo selectVoByIdPlus(Long recordId);

    List<ProjectAttendance> getAttendance(@Param("userIds") List<Long> userIds, @Param("calcTime") String calcTime, @Param("relationMonth") String relationMonth);

    SysOaProjectVo getProjectById(Long projectId);

    Long getWorkDays(@Param("userId") Long userId, @Param("projectIds") String[] projectIds, @Param("calcTime") String calcTime, @Param("relationMonth") String relationMonth);

    List<String> selectProjectIds(@Param("userIds") List<Long> userIds, @Param("calcTime") String calcTime, @Param("relationMonth") String relationMonth);
}
