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

import cn.com.countrygarden.bi.main.model.performance.PerformanceMonthly;

import java.util.Map;

/**
 * 绩效考核月度表
 *
 * @author Max  Date:2018/09/18
 * @version 1.0
 * @since 1.8
 */
public interface PerformanceMonthlyService {
    int deleteByPrimaryKey(Long monthId);

    int insertSelective(PerformanceMonthly record);

    PerformanceMonthly selectByPrimaryKey(Long monthId);

    int updateByPrimaryKeySelective(PerformanceMonthly record);

    //通过年，月度，区域，指标查询唯一一条记录
    PerformanceMonthly getSelect(PerformanceMonthly record);

    //查询月度区域最新的年、月
    Map<String,Integer> selectOrganYearAndMonth();

    //查询月度城市公司最新的年、月
    Map<String,Integer> selectCompanyYearAndMonth();

    //设置平均分和排名
    void saveMonthAverageAndRank(long elementId, int year, int month);
}
