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

import cn.com.countrygarden.bi.main.model.performance.PerformanceCompany;
import cn.com.countrygarden.bi.main.model.performance.PerformanceMonthly;
import cn.com.countrygarden.bi.main.model.performance.PerformanceScore;
import cn.com.countrygarden.bi.main.model.performance.dto.PerformanceCompanyDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 城市公司信息
 *
 * @author Max Date:2018/09/12
 * @version 1.0
 * @since 1.8
 */
public interface PerformanceCompanyMapper {
    int deleteByPrimaryKey(Long comId);

    int insertSelective(PerformanceCompany record);

    PerformanceCompany selectByPrimaryKey(Long comId);

    int updateByPrimaryKeySelective(PerformanceCompany record);

    List<PerformanceCompany> selectPerformanceCompany();

    List<String> selectNotInNameCompany(PerformanceScore performanceScore);

    List<String> selectMonthlyNotInNameCompany(@Param("year") int year,@Param("month") int month,@Param("elementId") long elementId);

    //通过多个id查询城市公司
    List<PerformanceCompanyDto> selectByIds(@Param("hierarchyIdList") List<String> hierarchyIdList);

    //过滤区域
    public List<String> selectCompFilter(List<String> list);

    //通过hierachyId得到数据
    List<PerformanceCompany> selectByHierarchyId(String hierarchy_id);

    //查询所有
    List<PerformanceCompany> selectValidCompany();

    //通过城市公司id获得对应的城市公司类型
    String getTypeByHierarchyId(@Param("hierarchyId") String hierarchyId);
}