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

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

import org.apache.ibatis.annotations.Param;

import cn.com.countrygarden.bi.main.core.Mapper;
import cn.com.countrygarden.bi.main.dto.PersonInfoVO;
import cn.com.countrygarden.bi.main.dto.PersonnelAdvisorDTO;
import cn.com.countrygarden.bi.main.dto.PersonnelTgDTO;
import cn.com.countrygarden.bi.main.dto.ReviewScoreProblemDTO;
import cn.com.countrygarden.bi.main.model.test.Test;
import cn.com.countrygarden.bi.main.model.personnel.Personnel;
import cn.com.countrygarden.bi.main.model.personnel.PersonnelAdvisor;
/**
 * 导师信息-数据层
 *
 * @author 吕伟峰
 * @email www.justintoforest@gamail.com
 * @url 
 * @date 2018-09-27
 */
public interface PersonnelAdvisorMapper extends Mapper<PersonnelAdvisor>{
	
	List<PersonnelAdvisorDTO> peradvisorlist(PersonnelAdvisor personnelAdvisor);
	
	List<PersonnelAdvisorDTO> queryPageList(PersonnelAdvisorDTO personnelAdvisor);
	
	List<PersonnelAdvisorDTO> queryPageListadnamelist(PersonnelAdvisorDTO personnelAdvisor);
	
	List<PersonnelAdvisorDTO> queryById(@Param("id")Integer id);
	
	int edit(PersonnelAdvisor personnelAdvisor);
	
	List<PersonInfoVO> selectByPersonInfoByCodeOrName(@Param("search") String search,@Param("userIds") List<String> userIds,@Param("userquyu")List<String> userquyu);
	
	List<PersonnelAdvisorDTO> exxlspersonnelAdvisor(@Param("personnelAdvisor") PersonnelAdvisorDTO personnelAdvisor,@Param("rolesMap") Map<String, Object> rolesMap,@Param("personnelId") List<Integer> personnelId,@Param("userquyu")List<String> userquyu);
	
	List<PersonnelAdvisorDTO> exxlspersonnelAdvisorall(@Param("personnelAdvisor") PersonnelAdvisorDTO personnelAdvisor,@Param("rolesMap") Map<String, Object> rolesMap,@Param("personnelId") List<Integer> personnelId); 
	
	List<PersonnelAdvisorDTO> exxlspersonneall(@Param("rolesMap") Map<String, Object> rolesMap,@Param("userquyu")List<String> userquyu);
	List<PersonInfoVO> selectByPersonInfoByCodeOrName1(@Param("search") String search,@Param("userIds") List<String> userIds);
	Personnel perone(@Param("userId") String userId);  
	
	PersonnelAdvisorDTO peaduserid(@Param("userId") String userId,@Param("advisorUserId") String advisorUserId,
			@Param("positivevaluation") String positivevaluation,@Param("fixedpostevaluation") String fixedpostevaluation);
	
	int insertadd(PersonnelAdvisorDTO personnelAdvisor);
	
	int deletepead(@Param("personnelId") Integer personnelId,@Param("personneltagId") Integer personneltagId);
	
	int deletepeadpead(@Param("personnelId") Integer personnelId,@Param("personnelTypeId") Integer personnelTypeId,@Param("personneltagId") Integer personneltagId);
	
	int delpiliang(@Param("persId") List<String> persId,@Param("pertagId") List<String> pertagId);
	
	List<PersonnelAdvisorDTO> peaduseridlist(@Param("userId") String userId);
	
	List<PersonnelAdvisorDTO> peadone(@Param("personnelId") Integer personnelId);
	
	List<PersonnelTgDTO> findExistWrittenexamination(@Param("personnelAdvisor") PersonnelAdvisorDTO personnelAdvisor,@Param("rolesMap") Map<String, Object> rolesMap,@Param("userquyu")List<String> userquyu);
	
    List<PersonnelAdvisorDTO> queryPageListadd(PersonnelAdvisorDTO personnelAdvisor);
	 
}