package com.ho.business.mapper;

import com.ho.business.entity.DropDownVo;
import com.ho.business.entity.PlanningCurveTemplate;
import com.ho.business.entity.PlanningPolicy;
import org.apache.ibatis.annotations.Param;

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

public interface PlanningPolicyMapper {

    /**
     * 查询策略列表
     * @param policy
     * @return
     */
    public List<PlanningPolicy> getPlanningPolicys(PlanningPolicy policy);

    /**
     * 策略详情查询（详情按钮、编辑）
     * @param policy
     * @return
     */
    public List<PlanningPolicy> getPlanningPolicyDetail4Modify(PlanningPolicy policy);


    /**
     * 新增策略
     * @param policy
     * @return
     */
    public int addPlanningPolicy(PlanningPolicy policy);


    /**
     * 编辑策略
     * @param policy
     * @return
     */
    public int modifyPlanningPolicy(PlanningPolicy policy);

    /**
     * 删除策略
     * @param ids
     * @return
     */
    public int deletePlanningPolicy(List<Integer> ids);

    /**
     * 查询策略类型下拉框数据
     * @return
     */
    public List<DropDownVo> queryPolicyTypes();

    /**
     * 查询策略优先级下拉框数据
     * @return
     */
    public List<DropDownVo> queryPolicyPriority();

    /**
     * 新增策略（批量）
     * @param policys
     * @return
     */
    public int batchPlanningPolicy(List<PlanningPolicy> policys);

    /**
     * 根据电站id获取计划曲线模板
     * @param stationId
     * @return
     */
    public List<PlanningCurveTemplate> getPlanningCurveTemplates(Integer stationId);

    /**
     * 校验名称是否重复 1：策略名称  2：自定义策略名称
     * @param policyId
     * @param name
     * @return
     */
    public int checkName(@Param("policyId")Integer policyId, @Param("name")String name, @Param("type")int type);


}
