/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.workstaff.dao;

import com.jeeplus.common.persistence.CrudDao;
import com.jeeplus.common.persistence.annotation.MyBatisDao;
import com.jeeplus.modules.workstaff.entity.WorkStaffBasicInfo;
import com.sun.corba.se.spi.orbutil.threadpool.Work;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 员工基本信息DAO接口
 * @author ssrh
 * @version 2018-07-26
 */
@MyBatisDao
public interface WorkStaffBasicInfoDao extends CrudDao<WorkStaffBasicInfo> {
    /**
     * 根据用户id,多表查询获取用户入职信息
     * @param userId
     * @return
     */
    public WorkStaffBasicInfo  getWorkStaffBasicInfoByUserId(String userId);

    public WorkStaffBasicInfo  getWorkStaffBasicInfo(String id);//根据用户获取用户入职信息
    public Integer getByCompany(WorkStaffBasicInfo workStaffBasicInfo);//根据用户获取用户入职信息
    public WorkStaffBasicInfo getByCompanyInfo(WorkStaffBasicInfo workStaffBasicInfo);//根据用户获取用户入职信息

    public  String queryMaxNoWithCompany(WorkStaffBasicInfo workStaffBasicInfo);

    public List<WorkStaffBasicInfo>  findUserList(WorkStaffBasicInfo workStaffBasicInfo);

    List<WorkStaffBasicInfo> findListByIdCard(WorkStaffBasicInfo select);

    List<WorkStaffBasicInfo> findListByRoleList(WorkStaffBasicInfo select);

    List<WorkStaffBasicInfo> findAddressBook(WorkStaffBasicInfo select);   //通讯录

    List<WorkStaffBasicInfo> findListByAchiveId(WorkStaffBasicInfo workStaffBasicInfo);

    List<WorkStaffBasicInfo> findListByUserId(WorkStaffBasicInfo workStaffBasicInfo);

    void updateStatus(@Param("id") String id, @Param("status") String status);

    int deleteByLogic(WorkStaffBasicInfo workStaffBasicInfo);

    WorkStaffBasicInfo getNo(String no);

    List<WorkStaffBasicInfo> findByMob(WorkStaffBasicInfo workStaffBasicInfo);

    WorkStaffBasicInfo findByCard(String cardNo);

    List<WorkStaffBasicInfo> findByName(String name);

    int updateWorkStaffBasicInfo(WorkStaffBasicInfo workStaffBasicInfo);

    WorkStaffBasicInfo getByAchieveId(String achieveId);

    /**
     * 更新员工职级
     * @param userId
     * @param jobGradeId
     * @return
     */
    int updateJobGradeByUserId(@Param("userId") String userId,@Param("jobGradeId") String jobGradeId);

    /**
     * 更新员工所属部门
     * @param userId
     * @param officeId
     * @return
     */
    int updateOfficeByUserId(@Param("userId") String userId,@Param("officeId") String officeId);
}