package cn.com.countrygarden.bi.main.dao.performance;

import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

import cn.com.countrygarden.bi.main.dto.HouseKeeperNameTreeDTO;
import cn.com.countrygarden.bi.main.dto.ManagerMapDTO;
import cn.com.countrygarden.bi.main.dto.ManagerMapOrganTreeDTO;
import cn.com.countrygarden.bi.main.dto.PersonInfoVO;
import cn.com.countrygarden.bi.main.dto.bdpsndocDTO;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import cn.com.countrygarden.bi.main.core.Mapper;
import cn.com.countrygarden.bi.main.model.AccessToken;
import cn.com.countrygarden.bi.main.model.bd_psndoc;
import cn.com.countrygarden.bi.main.model.performance.PerformanceEnv;
import cn.com.countrygarden.bi.main.model.personnel.Personnel;


public interface bdpsndocMapper extends  Mapper<bd_psndoc> {
   public void insertOrUpdate(@Param("bd") List<bd_psndoc> bd);

    List<PersonInfoVO> selectByPersonInfoByCodeOrName(@Param("search") String search,@Param("userIds") List<String> userIds,@Param("userquyu") List<String> userquyu);

    List<HouseKeeperNameTreeDTO> findALLNameData(@Param("name") String name,@Param("regionName") String regionName);

    List<HouseKeeperNameTreeDTO> findALLPhoneNum(@Param("phone") String phone,@Param("regionName") String regionName);

    List<String> findPhoneNumByUserCode(@Param("userCode")String userCode);
    
    List<String> findPhoneNumTreeByUserCode(@Param("userCode")String userCode);

    List<bdpsndocDTO> bdpsndoc(@Param("bdid") String bdid);


    Personnel findByPersonInfoByCodeOrName(@Param(value="userId")String userId,@Param(value="name")String name);
    
    List<String> findRegionName(@Param(value="userId")String userId);
    /**
     * 根据userCode查询所在区域下的所用用户userCode
     * @param userCode
     * @return
     */
    
    List<String> findErpUserCodes(@Param("userCode")String userCode,@Param("userquyu")String userquyu);
}