package com.lz.modules.app.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lz.common.utils.PageUtils;
import com.lz.modules.app.dto.GraphicsStatisticalDto;
import com.lz.modules.app.dto.StaffBaseInfoDto;
import com.lz.modules.app.dto.StaffDto;
import com.lz.modules.app.dto.StaffStatisticalDto;
import com.lz.modules.app.entity.StaffEntity;
import com.lz.modules.job.model.responseBo.DepartmentStaffBo;

import java.util.List;
import java.util.Map;

/**
 * 员工基本信息表
 *
 * @author fumeiai
 * @email fumeiai@linzikg.com
 * @date 2020-04-29 20:59:20
 */
public interface StaffService extends IService<StaffEntity> {

    PageUtils queryPage(Map<String, Object> params);

    List<StaffEntity> updateStaffsInfo(List<DepartmentStaffBo> staffs);

    StaffEntity getStaffInfoByOpenId(String openId);

    StaffEntity getByName(String name);

    List<StaffDto> getStaffInfos(int currentPage, int limit, String departmentId, String name, Integer staffStatus);

    int getStaffInfoCount(String departmentId, String name, Integer staffStatus);

    StaffBaseInfoDto getBaseInfo(Long staffId);

    StaffStatisticalDto getStatisticalData(String departmentId, String beginDate, String endDate);

    List<GraphicsStatisticalDto> getGenderData(String departmentId, String beginDate, String endDate);


    List<GraphicsStatisticalDto> getAgeData(String departmentId, String beginDate, String endDate);

    List<GraphicsStatisticalDto> getJobSeniorityData(String departmentId, String beginDate, String endDate);

    List<GraphicsStatisticalDto> getEducationData(String departmentId, String beginDate, String endDate);


    void enterDatabase(List<Map<String, String>> sheet12List, List<Map<String, String>> sheet3List, List<Map<String, String>> sheet4List);

    List<StaffEntity> selectByName(String name);

    List<StaffEntity> selectByIds(List<Long> staffIds);


    StaffEntity selectStaffById(Long id);


    Long insertStaff(StaffEntity staff);


    int updateStaffById(StaffEntity staff);


    int updateCoverStaffById(StaffEntity staff);


    int deleteStaffById(Long id);

    StaffEntity selectByPhone(String userName);
}

