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

import cn.com.countrygarden.bi.main.model.performance.AssessmentTarget;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AssessmentTargetMapper {
    int deleteByPrimaryKey(Integer atid);

    int insertSelective(AssessmentTarget record);

    AssessmentTarget selectByPrimaryKey(Integer atid);

    int updateByPrimaryKeySelective(AssessmentTarget record);

    AssessmentTarget selectJudgeLock(AssessmentTarget record);

    AssessmentTarget selectLastPublic(@Param(value = "year") Integer year, @Param(value = "quarterly") String quarterly);

    List<AssessmentTarget> selectLastPublicOrgan(@Param(value = "year") Integer year, @Param(value = "quarterly") String quarterly);

    List<AssessmentTarget> selectLastPublicCompany(@Param(value = "year") Integer year, @Param(value = "quarterly") String quarterly);

    List<AssessmentTarget> selectUnLock(@Param(value = "year") Integer year, @Param(value = "quarterly") String quarterly);

    //得到当前季度未锁定的数据-区域
    List<AssessmentTarget> selectUnLockOrgan(@Param(value = "year") Integer year, @Param(value = "quarterly") String quarterly);

    //得到当前季度未锁定的数据-城市公司
    List<AssessmentTarget> selectUnLockCompany(@Param(value = "year") Integer year, @Param(value = "quarterly") String quarterly);

    //update 发布状态-区域
    int updatePublicStatusOrgan(@Param(value = "year") Integer year, @Param(value = "quarterly") String quarterly);

    //update 发布状态-城市公司
    int updatePublicStatusCompany(@Param(value = "year") Integer year, @Param(value = "quarterly") String quarterly);

}