package com.huatek.busi.mapper;

import java.util.Map;

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

import com.github.pagehelper.Page;
import com.huatek.busi.dto.TransformerOilThresholdDto;
import com.huatek.busi.vo.TransformerOilThresholdVo;

/**
 * 变压器油色谱阈值表 Mapper
 *
 * @author anker_cheng
 * @date Aug 5, 2019 5:29:19 PM
 */
@Repository
public interface  TransformerOilThresholdMapper {

	/**
	 * 分页查询 变压器油色谱阈值表
     *
	 * @param transformerOilThresholdDto 变压器油色谱阈值表Dto
	 * @return Page 变压器油色谱阈值表List
	 */
	Page<TransformerOilThresholdVo> selectTransformerOilThresholdPage(TransformerOilThresholdDto transformerOilThresholdDto);
	
	/** 
	* @Title: selectBySensorCode 
	* @Description: 根据传感器Code获取 
	* @createDate: Aug 7, 2019 2:44:34 PM
	* @param    sensorId 传感器Code
	* @return   TransformerOilThresholdVo    
	*/ 
	TransformerOilThresholdVo selectBySensorCode(@Param("sensorCode" )String sensorCode);
	
	/**
     * 根据sensor编码更新油色谱阈值
     * 
     * @param oldSensorCode
     * @param newSensorCode
     * @return
     */
    public int updateTransformerOilThresholdBySensorCode(@Param("oldSensorCode") String oldSensorCode,@Param("newSensorCode") String newSensorCode);
    
    /**
     * 根据sensor编码删除油色谱阈值
     * 
     * @param sensorCode
     * @return
     */
    public int delTransformerOilThresholdBySensorCode(@Param("sensorCode") String sensorCode);

    /**
     * 返回阈值、预警值等
     * 
     * @param sensorCode
     * @return
     */
    Map<String, Object> getThresholdMap(@Param("sensorCode") String sensorCode);
}