package com.huatek.busi.service;

import com.huatek.busi.dto.cable.BusiCableThresholdDto;
import com.huatek.busi.entity.BusiCableThreshold;
import com.huatek.busi.vo.cable.BusiCableThresholdVo;
import com.huatek.busi.vo.cable.CableCirculationDataVo;
import org.apache.ibatis.annotations.Param;

import java.util.Map;

public interface IBusiCableThresholdService {

    int deleteCableThresholdBySensorCode(@Param("sensorCode") String sensorCode);

    /**
     * 根据sensor编码更新其他阈值
     *
     * @param oldSensorCode
     * @param newSensorCode
     * @return
     */
    int  updateCableThresholdBySensorCode(String oldSensorCode,String newSensorCode);

    /**
     * 根据id查询电缆环流信息
     *
     * @param dto
     * @return
     */
    Map<String, Object> findCableVo(BusiCableThresholdDto dto);


    /**
     * 根据id查询电缆环流信息
     *
     * @param dto
     * @return
     */
    Map<String, Object> getGrowthRate(BusiCableThresholdDto dto);




    /**
     * 保存、编辑其他阈值
     *
     * @param token
     * @param dto
     * @return
     */
    Map<String, Object> saveCableThreshold(String token, BusiCableThresholdDto dto);

    Map<String, Object> deleteCableThreshold(BusiCableThresholdDto dto);

    /**
     * 根据站点设备树ID获取其他阈值
     *
     * @param mainTreeId
     * @param runState
     * @param sensorCode
     * @return
     */
    BusiCableThreshold getCableThreshold(String mainTreeId, String runState, String sensorCode);

    /**
     * 根据sensorCode获取当前数据
     *
     * @param sensorCode
     * @return
     */
    CableCirculationDataVo getCableData(String sensorCode, String transformerId);

    /**
     * 根据站点设备树ID获取其他阈
     * @param sensorCode
     * @return
     */
    BusiCableThreshold getCableBySensorCodeThreshold(String sensorCode);
}
