using OASystem.Domain.Dtos.QiYeWeChat;
using OASystem.Domain.ViewModels.QiYeWeChat;

namespace OASystem.API.OAMethodLib.QiYeWeChatAPI
{
    /// <summary>
    /// 企业微信Api 服务
    /// </summary>
    public interface IQiYeWeChatApiService
    {

        ///// <summary>
        ///// 获取access_token
        ///// </summary>
        ///// <param name="applicationType">
        ///// 1：人事助手 
        ///// 2：打卡
        ///// 3：邮件
        ///// </param>
        ///// <returns></returns>
        //Task<Access_TokenView> GetToken(int applicationType);

        /// <summary>
        /// 创建员工
        /// </summary>
        /// <param name="create_Request"></param>
        /// <returns></returns>
        Task<ResponseBase> CreateAsync(Create_Request create_Request);

        /// <summary>
        /// 获取成员ID列表
        /// </summary>
        /// <returns></returns>
        Task<UserIdListView> GetUserIdListAsync();

        /// <summary>
        /// 获取月打卡数据
        /// </summary>
        /// <param name="startDt"></param>
        /// <param name="endDt"></param>
        /// <returns></returns>
        Task<CheckInView> GetCheckin_MonthDataAsync(DateTime startDt, DateTime endDt);

        /// <summary>
        /// 获取月打卡数据 Redis
        /// </summary>
        /// <param name="startDt"></param>
        /// <param name="endDt"></param>
        /// <returns></returns>
        Task<CheckInView> GetCheckin_MonthDataRedisAsync(DateTime startDt, DateTime endDt);

        /// <summary>
        /// 获取打卡记录数据
        /// </summary>
        /// <param name="useridlist">需要获取打卡记录的用户列表</param>
        /// <param name="opencheckindatatype">打卡类型。1：上下班打卡；2：外出打卡；3：全部打卡</param>
        /// <param name="startDt">获取打卡记录的开始时间。Unix时间戳</param>
        /// <param name="endDt">获取打卡记录的结束时间。Unix时间戳</param>
        /// <returns></returns>
        Task<CheckInDataView> GetCheckinDataAsync(List<string> useridlist, int opencheckindatatype, DateTime startDt, DateTime endDt);

        /// <summary>
        /// 获取打卡日报数据
        /// </summary>
        /// <param name="useridlist"></param>
        /// <param name="startDt"></param>
        /// <param name="endDt"></param>
        /// <returns></returns>
        Task<CheckInDayDataView> GetCheckInDayDataAsync(List<string> useridlist, DateTime startDt, DateTime endDt);

        /// <summary>
        /// 获取审批数据（旧）
        /// </summary>
        /// <param name="startDt"></param>
        /// <param name="endDt"></param>
        /// <returns></returns>
        Task<ApprovalDataView> GetApprovalDataAsync(DateTime startDt, DateTime endDt);

        /// <summary>
        /// 获取审批数据（旧）
        /// </summary>
        /// <param name="startDt"></param>
        /// <param name="endDt"></param>
        /// <returns></returns>
        Task<List<Sp_Info>> GetApprovalDatasAsync(DateTime startDt, DateTime endDt);

        /// <summary>
        /// 获取审批数据（旧）(redis缓存)
        /// </summary>
        /// <param name="startDt"></param>
        /// <param name="endDt"></param>
        /// <returns></returns>
        Task<List<Sp_Info>> GetApprovalDatasRedisAsync(DateTime startDt, DateTime endDt);

        ///// <summary>
        ///// 批量获取审批单号
        ///// </summary>
        ///// <param name="startDt"></param>
        ///// <param name="endDt"></param>
        ///// <param name="record_type">
        ///// sp_status-审批单状态（1-审批中；2-已通过；3-已驳回；4-已撤销；6-通过后撤销；7-已删除；10-已支付）
        ///// </param>
        ///// <returns></returns>
        //Task<ApprovalInfoView> GetApprovalInfoAsync(DateTime startDt, DateTime endDt, int record_type);

        //// <summary>
        /// 批量获取审批详情
        /// <param name="startDt"></param>
        /// <param name="endDt"></param>
        /// <param name="creator">
        /// 申请人
        /// </param>
        /// <param name="sp_status">
        /// sp_status-审批单状态（1-审批中；2-已通过；3-已驳回；4-已撤销；6-通过后撤销；7-已删除；10-已支付）
        /// </param>
        /// <param name="record_type">
        /// record_type - 审批单类型属性，1-请假；2-打卡补卡；3-出差；4-外出；5-加班； 6- 调班；7-会议室预定；8-退款审批；9-红包报销审批
        /// </param>
        /// <returns></returns>
        Task<List<Sp_Detail>> GetApprovalDetailsAsync(DateTime startDt, DateTime endDt, string creator, int sp_status, int record_type);

        /// <summary>
        /// 获取审批模板详情
        /// </summary>
        /// <param name="template_id">模板Id</param>
        /// <returns></returns>
        Task<TemplateDetailView> GetTemplateDetailAsync(string template_id);
    }
}
