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


import cn.com.countrygarden.bi.main.model.performance.PerformanceTarget;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

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

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

public interface PerformanceTargetMapper extends Mapper<PerformanceTarget> {
    public int insertTargetList(@Param("targetList") List<PerformanceTarget> targetList);

    public List<PerformanceTarget> selectTargetList(@Param("target") PerformanceTarget target);

    public List<PerformanceTarget> getNewTargetList(@Param("target") PerformanceTarget target);

    public List<PerformanceTarget> getTargetList(@Param("target") PerformanceTarget target);

    public PerformanceTarget getByHierarchyId(@Param("target") PerformanceTarget target);

    public PerformanceTarget getNewByHierarchyId(@Param("target") PerformanceTarget target);

    public PerformanceTarget getTotalPage(@Param("target") PerformanceTarget target);

    public void UpdateNewtarget(@Param("scores") PerformanceTarget scores);

    void updateTargetByTargetId(@Param("target") PerformanceTarget target);

    void insertTargetSelective(PerformanceTarget target);

    void updateTargetSelective(PerformanceTarget target);

    Map<String, Object> getNewYearQuarter();

    //得到数据库记录中最新的年,季度—区域
    List<PerformanceTarget> getNewYearQuarterOrgan();

    //得到数据库记录中最新的年,季度—城市公司
    Map<String, Object> getNewYearQuarterCompany();

    //------------------以下为三期重构接口 Date:2018/10/23---------------
    PerformanceTarget selectByRecordId(long recordId);

}
