package com.huatek.busi.mapper;

import java.util.List;

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

import com.github.pagehelper.Page;
import com.huatek.busi.dto.BusiTemperPointDto;
import com.huatek.busi.entity.BusiTemperPoint;
import com.huatek.busi.vo.BusiSensorVo;
import com.huatek.busi.vo.BusiTemperPointVo;

/**
 * 测温柜/点信息表 Mapper
 *
 * @author anker_cheng
 * @date Jul 1, 2019 4:05:01 PM
 */
@Repository
public interface BusiTemperPointMapper {

    /**
     * 分页查询 测温柜/点信息表
     *
     * @param busiTemperPointDto
     *            测温柜/点信息表Dto
     * @return Page 测温柜/点信息表List
     */
    Page<BusiTemperPointVo> selectBusiTemperPointPage(BusiTemperPointDto busiTemperPointDto);

    /**
     * 获取测温点
     * 
     * @param siteId
     *            站点ID
     * @param sensorId
     *            sensorId
     * @return
     */
    BusiTemperPoint getBusiTemperPoint(@Param("siteId") String siteId, @Param("sensorId") String sensorId);

    /**
     * 获取所有信息
     * 
     * @return
     */
    List<BusiTemperPoint> findAll();

    /**
     * @Title: page
     * @Description: 分页
     * @createDate: Jul 19, 2019 3:36:24 PM
     * @param equipmentId
     *            站点设ID
     * @return Page<BusiSensorVo>
     */
    Page<BusiSensorVo> page(@Param("equipmentId") String equipmentId);

    List<BusiSensorVo> findSensorList(@Param("equipmentId") String equipmentId);

    /**
     * 根据传感器编码获取测温点
     * 
     * @param sensorCode
     *            传感器编码
     * @return
     */
    BusiTemperPointVo getBySensor(@Param("sensorCode")String sensorCode);
    
    /**
     * 校验当前sensor是否存在
     */
    Integer  checkSensorCode(@Param("sensorCode")String sensorCode,@Param("id")String id);

    BusiSensorVo getBusiSensorVo(@Param("sensorCode")String sensorCode);

    BusiSensorVo getBusiSensorVoById(@Param("id")String id);
}