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


import cn.com.countrygarden.bi.main.core.Mapper;
import cn.com.countrygarden.bi.main.model.performance.PerformanceElement;
import cn.com.countrygarden.bi.main.model.performance.dto.PerformanceDetailInfoDto;
import com.sun.javafx.collections.MappingChange;
import org.apache.ibatis.annotations.Param;


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


/**
 * 指标项
 *
 * @author leo 严明斌
 * @version 2018-4-3 16:58:32
 *
 */

public interface PerformanceElementMapper extends Mapper<PerformanceElement> {
    public List<PerformanceDetailInfoDto> selectScoreInfo(@Param("hierarchyIdList")List<String> hierarchyIdList, @Param("year")Integer year);
    public List<PerformanceElement> selectFirstElement(@Param("element")PerformanceElement  element);

    /**
     * 根据上级指标编号模糊查询所有的下级指标
     * eg: 1006% return 1006001、1006001001、1006002、1006002001...
     *
     * @Author Geoffrey
     * @param firstElementId 考核指标编号
     * @return
     */
    List<PerformanceElement> selectElementByPreElementId(@Param("firstElementId") long firstElementId);

    /**
     * 得到所有一级大指标指标
     * @author ccj
     * @return List
     */
    List<PerformanceElement> selectBigElement();

    List<PerformanceElement> selectUserCodePower(@Param("sign")int sign,@Param("userCode")String userCode);

    //通过id查询指标名称
    PerformanceElement selectElementNameById(@Param("elementId") long elementId);

    //根据类型获取分类指标
    List<PerformanceElement> selectElementByType(@Param("type")String type);
}
