package com.huatek.busi.mapper;

import com.github.pagehelper.Page;
import com.huatek.busi.dto.BusiSensorQueryParamDto;
import com.huatek.busi.vo.BusiSensorVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
public interface BusiGeneratorSensorMapper {

    /**
     * @Title: page @Description: 分页 @createDate: Jul 18, 2019 3:41:03 PM @param equipmentId 外挂设备树ID @return
     * Page<BusiSensorVo> @throws
     */
    public Page<BusiSensorVo> page(@Param("equipmentId") String equipmentId);

    /**
     * 统计sensor个数
     *
     * @param siteId
     *            站点ID
     * @param equipmentId
     *            外挂设备树ID
     * @return
     */
    Integer getSenerCount(@Param("siteId") String siteId, @Param("equipmentId") String equipmentId);

    /**
     * 校验当前sensor是否存在
     */
    Integer checkSensorCode(@Param("sensorCode") String sensorCode, @Param("id") String id);

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

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

    /**
     * sensor查询方法
     *
     * @param param
     *            参数
     * @return sensor列表
     */
    List<BusiSensorVo> findSensorList(BusiSensorQueryParamDto param);

    int findSensorCount(@Param("equipmentType") String equipmentType);

    List<BusiSensorVo> findZdSensor(@Param("equipmentId") String equipmentId, @Param("status") String status, @Param("zdType") String zdType);
}
