package com.huatek.busi.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import com.huatek.busi.dto.TransformerIcgeThresholdDto;
import com.huatek.busi.entity.TransformerIcgeThreshold;
import com.huatek.busi.vo.TransformerIcgeThresholdVo;

/**
 * 变压器铁芯、夹件阈值表 Mapper
 *
 * @author anker_cheng
 * @date Aug 2, 2019 1:56:07 PM
 */
@Repository
public interface TransformerIcgeThresholdMapper {

    /**
     * 根据站点设备树ID获取变压器铁芯、夹件阈值
     * 
     * @param mainTreeId
     *            站点设备树ID
     * @param runState
     *            设备状态
     * @param sensorCode
     *            传感器编码
     * @return
     */
    TransformerIcgeThreshold getTransformerIcgeThreshold(@Param("mainTreeId") String mainTreeId,
        @Param("runState") String runState, @Param("sensorCode") String sensorCode);

    TransformerIcgeThresholdVo getTransformerIcgeThresholdVo(TransformerIcgeThresholdDto transformerIcgeThresholdDto);

    List<TransformerIcgeThresholdVo> getTransformerIcgeThresholdVoList(TransformerIcgeThresholdDto transformerIcgeThresholdDto);
    
    /**
     * 根据铁芯、夹件 sensor编码更新阈值
     * 
     * @param oldSensorCode
     * @param newSensorCode
     * @return
     */
    public int updateTransformerIcgeThresholdBySensorCode(@Param("oldSensorCode") String oldSensorCode,@Param("newSensorCode") String newSensorCode);
    
    /**
     * 根据铁芯、夹件 sensor编码删除阈值
     * 
     * @param sensorCode
     * @return
     */
    public int delTransformerIcgeThresholdBySensorCode(@Param("sensorCode") String sensorCode);
}
