package com.ho.business.mapper;

import com.ho.business.entity.*;
import com.ho.business.vo.Holiday;
import com.ho.business.vo.PolicyConfigVo;
import com.ho.business.vo.req.PolicyConfigData;
import com.ho.business.vo.resp.planningCurve.PlanningIssueVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PeakShavingMapper {

    public int getSeq();

    public int checkNo(@Param("templateNo")String templateNo,@Param("stationId")Integer stationId,@Param("temId")Integer temId);

    public int checkName(@Param("templateName")String templateName, @Param("stationId")Integer stationId, @Param("temId")Integer temId);

    public int addPlanningCurveTemplate(PlanningCurveTemplate template);

    public int addPlanningCurve(@Param("curves") List<PlanningCurve> curves, @Param("planningTemplateId") Integer planningTemplateId);

    /**
     * 编辑计划曲线模板
     *
     * @param template
     * @return
     */
    public int modifyPlanningCurveTemplate(PlanningCurveTemplate template);

    /**
     * 删除计划曲线数据
     *
     * @param id
     * @return
     */
    public int deleteCurves(@Param("temId") Integer temId);

    public int deleteTemplateById(@Param("temId") Integer temId);

    public int getPeakSeq();

    public int addPolicyConfig(PolicyConfig policyConfig);

    public int addPolicyConfigData(@Param("datas")List<PolicyConfigData> policyConfigData);

    public List<PolicyConfigData> queryPolicyConifg(PolicyConfig policyConfig);


    public List<PolicyConfig> queryPolicyConifgMonth(PolicyConfig policyConfig);

    public List<PlanningCurveTemplate> getPlanningCurveTemplates(PlanningCurveTemplate template);

    public List<PlanningCurveTableTemplate> getPlanningCurveTableTemplates(PlanningCurveTemplate template);

    public PlanningCurveTemplate getPlanningCurveTemplate(PlanningCurveTemplate template);

    public List<Integer> getTemplateIds(Integer stationId);

    /**
     * 根据模板id查询曲线
     * @param temId
     * @return
     */
    public List<PlanningCurve> queryTemplateCurves(Integer temId);

    public int deletePolicyConfig(PolicyConfig policyConfig);

    public List<PlanningIssueVo> getIssueDevice(String deviceType);

    public PolicyConfigVo queryPolicyConfigByParam(PolicyConfigVo vo);

    /**
     * 根据temId查询是否有正在使用的模板
     * @param template
     * @return
     */
    public int checkUse(PlanningCurveTemplate template);
    public int checkUse2(PlanningCurveTemplate template);

    public Integer queryIssueDevice(Integer stationId);

    public String getSnByStationId(Integer stationId);

    public List<PolicyConfigData> queryPeakPolicyConfigData(@Param("stationId")Integer stationId,@Param("type")Integer type);

    public List<PolicyConfigPlan> queryPlanList(PolicyConfigPlan policyConfigPlan);

    public List<PeakShavingBean> queryPeakPolicyList(PolicyConfigPlan policyConfigPlan);

    public void deletePlan(PolicyConfigPlan policyConfigPlan);

    public int checkPlanUse(PolicyConfigPlan policyConfigPlan);

    public int getPlanSeq();

    public int addPlan(PolicyConfigPlan policyConfigPlan);

    public List<PolicyConfigData> queryPolicyConifgDetail(PolicyConfig policyConfig);

    public int deletePolicyConfigByMonth(@Param("stationId")Integer stationId,@Param("month")Integer month);

    public List<Holiday> queryHolidayList(Holiday holiday);

    public int queryTemplateStatus(PlanningCurveTemplate template);

    public int checkPlanName(PolicyConfigPlan policyConfigPlan);

    PlanningCurveTemplate getPCT(@Param("templateNo")String templateNo,@Param("stationId")Integer stationId,@Param("templateName")String templateName);

    int insertPlanningCurve(PlanningCurve planningCurve);

    int deletePlanningCurve(@Param("templateId")Integer templateId,@Param("startTime")String startTime);
}
