package com.huatek.busi.mapper;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

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

import com.huatek.busi.dto.curve.IecBydworkParamPointDto;
import com.huatek.busi.entity.IecBydworkParam;
import com.huatek.busi.vo.curve.IecBydworkParamPointVo;

/**
 * 
 * @author buck_guo
 * @date 2019/08/15
 */
@Repository
public interface IecBydworkParamMapper {
	public List<IecBydworkParam> getOneData(IecBydworkParam iecBydworkParam);		
	
	
	/** 
	* @Title: getIecType 
	* @Description: 获取电站状态 
	* @createDate: Aug 1, 2019 2:26:58 PM
	* @param    eqmCode  设备编码
	* @param    cacDate  CAC 采集时间
	* @return   IecBydworkParam    
	*/ 
	public IecBydworkParam  getIecType(@Param("eqmCode")String eqmCode, @Param("cacDate")LocalDateTime cacDate);
	
	
	/** 
	* @Title: getIecType2 
	* @Description: 获取电站状态 
	* @createDate: Aug 1, 2019 2:26:58 PM
	* @param    eqmCode  设备编码
	* @return   IecBydworkParam    
	*/ 
	public IecBydworkParam  getIecType2(@Param("eqmCode")String eqmCode);

	
	/** 
	* @Title: getBeforToCurrenttWork 
	* @Description: 获取前天到当天的变压器工作集合 
	* @createDate: Sep 3, 2019 3:53:36 PM
	* @param   
	* @return   List<IecBydworkParam>    
	*/ 
	List<IecBydworkParam> getBeforToCurrenttWork (@Param("siteId")String siteId ,@Param("eqmCode")String eqmCode, @Param("startTime")Date startTime,
			@Param("endTime")Date endTime );
	
	/** 
	* @Title: getCurrnetWork 
	* @Description: 获取当天变压器工作集合  
	* @createDate: Sep 3, 2019 3:53:38 PM
	* @param   
	* @return   List<IecBydworkParam>    
	*/ 
	List<IecBydworkParam> getCurrnetWork (@Param("siteId")String siteId ,@Param("eqmCode")String eqmCode, @Param("startTime")Date startTime,
			@Param("endTime")Date endTime );
	
	/** 
	* @Title: getCurrentToAfterWork 
	* @Description: 获取当天到后天的变压器工作集合  
	* @createDate: Sep 3, 2019 3:53:41 PM
	* @param   
	* @return   List<IecBydworkParam>    
	*/ 
	List<IecBydworkParam> getCurrentToAfterWork (@Param("siteId")String siteId ,@Param("eqmCode")String eqmCode, @Param("startTime")Date startTime,
			@Param("endTime")Date endTime );

    /**
     * 查询${equipmentId}在${time}时刻时候的状态和电压电流信息
     * 
     * @param equipmentId
     *            变压器设备ID
     * @param time
     *            时间
     * @return
     */
    IecBydworkParam getIecBydworkParam(@Param("equipmentId") String equipmentId, @Param("time") LocalDateTime time);

    /**
     * 获取变压器一天的工作状态数据列表，按时间升序排列
     * 
     * @param param
     * @return
     */
    List<IecBydworkParamPointVo> queryIecBydworkParamPointList(IecBydworkParamPointDto param);
    
    
    List<IecBydworkParam> getIecBydworkParamWorks(@Param("siteId")String siteId ,@Param("eqmCode")String eqmCode, @Param("startTime")Date startTime,
			@Param("endTime")Date endTime );

	/**
	 * 根据主变id查询数据
	 *
	 * @param eqmCode
	 * @return
	 */
	List<IecBydworkParamPointVo> getdworkParamByEqmCode(@Param("eqmCode")String eqmCode);

	List<IecBydworkParam> getIecBydworkParamWorksCal(@Param("stype") String stype, @Param("recordDate") String recordDate);

}