package cn.com.countrygarden.bi.main.service.experience;

import cn.com.countrygarden.bi.main.core.Result;
import cn.com.countrygarden.bi.main.dto.experience.WcxEmployeeDto;
import cn.com.countrygarden.bi.main.dto.experience.WcxEmployeeManageDto;
import cn.com.countrygarden.bi.main.model.AccessToken;
import cn.com.countrygarden.bi.main.model.experience.WcxEmployeesManage;
import cn.com.countrygarden.bi.main.model.experience.WcxEmployeesManageDto;
import cn.com.countrygarden.bi.main.model.experience.WcxPublishMessage;
import cn.com.countrygarden.bi.main.util.Query;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.List;
import java.util.Map;

public interface WcxExperienceService {

    /**
     * 查询员工管理列表
     * @param params
     * @return
     * @throws Exception
     */
    List<WcxEmployeesManage> queryPageList(Map<String,Object> params) throws Exception;

    WcxEmployeesManage queryById(Long id) throws Exception;

    List<WcxPublishMessage> queryPublishList(String phone) throws Exception;

    int count(Map<String,Object> params) throws Exception;

    /**
     * 删除员工数据
     * @param id
     * @return
     * @throws Exception
     */
    int delete(Long id) throws Exception;

    /**
     * 设置账号启用/停用
     * @param dto
     * @return
     * @throws Exception
     */
    int setEnable(WcxEmployeeDto dto) throws Exception;

    /**
     * 保存/更新员工用户信息
     * @param dto
     * @return
     * @throws Exception
     */
    WcxEmployeesManage createOrUpdate(WcxEmployeeManageDto dto, AccessToken accessToken) throws Exception;

    /**
     * 下载员工用户模板
     * @param request
     * @param response
     * @throws Exception
     */
    void downloadEmployeeTemplate(HttpServletRequest request, HttpServletResponse response) throws Exception;

    /**
     * 导入员工用户数据
     * @param inputStream
     * @param originalFilename
     * @return
     * @throws Exception
     */
    Result importEmployees(InputStream inputStream, String originalFilename,String fileType,AccessToken accessToken) throws Exception;

    /**
     * 查询总部/中心部门
     * @return
     * @throws Exception
     */
    Result findSysDepartment() throws Exception;

    List<WcxEmployeesManageDto> queryList(Map<String,Object> params) throws Exception;
}
