package com.pqs9300.service.strategy;


import com.pqs9300.pojo.strategy.ThsAlarmFormAss;
import com.pqs9300.pojo.strategy.ThsAlarmFormDTO;
import com.pqs9300.pojo.strategy.DicStrategyRVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * @Description
 * @Author cdf
 * @Date 2020/6/17 15:35
 **/
public interface WarnStrategyService {

    /**
     * @Author chendaofei
     * @Description 新增预警策略
     * @Date 15:27 2020/6/17
     **/
    String addEarlyWarn(ThsAlarmFormDTO thsAlarmFormDTO);

    /**
     * @Author chendaofei
     * @Description 修改预警策略
     * @Date 15:27 2020/6/17
     **/
    String updateEarlyWarn(ThsAlarmFormDTO thsAlarmFormDTO);

    /**
     * @Author chendaofei
     * @Description 修改预警策略指标类型与或
     * @Date 15:27 2020/6/17
     **/
    Integer updateEarlyWarnAndOr(String wfIndex,Integer operation);

    /**
     * @Author chendaofei
     * @Description 控制是否启用策略
     * @Date 15:27 2020/6/17
     **/
    Integer statusController(String wfIndex,Integer state);

    /**
     * @Author chendaofei
     * @Description 删除预警策略
     * @Date 15:27 2020/6/17
     **/
    String delEarlyWarn(String wfIndex);

    /**
     * @Author chendaofei
     * @Description 是否存在绑定事件
     * @Date 15:27 2020/6/17
     **/
    Integer isExitBindEvent(String wfIndex);

    /**
     * @Author chendaofei
     * @Description 删除预警策略
     * @Date 15:27 2020/6/17
     **/
    List<ThsAlarmFormDTO> getEarlyWarnList(Integer grade);

    /**
     * @Author chendaofei
     * @Description 通过id获取预警策略
     * @Date 15:27 2020/6/17
     **/
    ThsAlarmFormDTO getEarlyWarnById(String wfIndex);



    /*------------------操作THS_WarnFormAss表--------------------------*/
    /**
     * @Author chendaofei
     * @Description 新增预警策略关系表
     * @Date 15:27 2020/6/17
     **/
    String addEarlyWarnAss(String wfIndex,Integer state,List<ThsAlarmFormAss> list);


    /**
     * @Author chendaofei
     * @Description 删除预警策略
     * @Date 15:27 2020/6/17
     **/
    /*String delEarlyWarnAss(String wfIndex,String wfassIndex,Integer type);*/

    /**
     * @Author chendaofei
     * @Description 获取预警策略列表
     * @Date 15:27 2020/6/17
     **/
    List<ThsAlarmFormAss> getStrategyLine(String wfIndex,Integer type);

    /**
     * @Author chendaofei
     * @Description 获取预警策略列表
     * @Date 15:27 2020/6/17
     **/
    List<DicStrategyRVO> getEarlyWarnAss(String wfIndex, Integer type);

}
