package com.huatek.busi.mapper;

import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

import com.huatek.busi.entity.BusiSiteTree;
import com.huatek.busi.entity.BusiTransformerSensor;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import com.huatek.busi.entity.TransformerEpaAbsIncreaseCache;
import com.huatek.busi.entity.TransformerEpaIncreaseCache;
import com.huatek.busi.vo.epa.EpaEvaluateDataVo;
import com.huatek.busi.vo.epa.EpaOneDataVo;
import com.huatek.busi.vo.stability.OilStabilityVo;

/**
 * 变压器油色谱原始数据(未根据偏差率修改的数据) Mapper
 *
 * @author anker_cheng
 * @date Jul 15, 2019 11:13:50 AM
 */
@Repository
public interface TransformerEpaDataOriginMapper {

    /**
     *
     * @param startDate
     * @param endDate
     * @return
     */
    List<EpaOneDataVo> getOneData(@Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime, @Param("sensorCode")String sensorCode);

    /**
     * @Title: getEvaluatData
     * @Description: 获取评测数据
     * @createDate: Sep 6, 2019 2:16:47 PM
     * @param
     * @return EpaEvaluateDataVo
     */
    EpaEvaluateDataVo getEvaluatData(@Param("mainEquipmentId") String mainEquipmentId,
        @Param("startDate") Date startDate, @Param("endDate") Date endDate, @Param("sensorCode") String sensorCode);

    /**
     * 获取油色谱绝对增长率
     */
    TransformerEpaAbsIncreaseCache getEpaAbsIncreaseCacheInfo(@Param("sensorCode")String sensorCode);

    /**
    * 获取油色谱相对增长率
    */
    TransformerEpaIncreaseCache getEpaRelativeIncreaseCacheInfo(@Param("sensorCode")String sensorCode);


    /**
	* @Title: getByStatus
	* @Description: 油色谱稳定性
	* @createDate: Dec 10, 2019 12:05:34 PM
	* @param
	* @return   List<OilStabilityVo>
	* @throws
	*/
	List<OilStabilityVo> getByStatus(@Param("sensorCode")String sensorCode, @Param("startTime")LocalDateTime begin,@Param("endTime") LocalDateTime end);
	
	String getSensorCodeById(@Param("id") String id, @Param("deleted") String deleted, @Param("type") String type, @Param("oilType") String oilType);


    List<BusiSiteTree> getSubId(@Param("mainEquipmentId") String mainEquipmentId, @Param("type") String type);

    List<BusiTransformerSensor> getSensorCode(@Param("id") String id);

    String getTemperature(@Param("sensorCode") String sensorCode, @Param("startDate")  Date startDate, @Param("endDate") Date endDate);
}
