package com.jiayue.ipfcst.dataexchange.repository;

import com.jiayue.ipfcst.common.data.entity.EquipmentAttribute;
import com.jiayue.ipfcst.common.data.entity.ProtocolGatherDataPoint;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * 采集通道点位表信息仓库
 *
 * @author 修唯xiuwei
 * @version 3.0
 */
public interface ProtocolGatherDataPointRepository extends JpaRepository<ProtocolGatherDataPoint, Integer>, JpaSpecificationExecutor<ProtocolGatherDataPoint> {
  List<ProtocolGatherDataPoint> findByEquipmentIdAndEquipmentAttribute(Integer equipmentId, EquipmentAttribute equipmentAttribute);

  List<ProtocolGatherDataPoint> findByTunnelIdAndEquipmentId(String tunnelId, Integer equipmentId);

  List<ProtocolGatherDataPoint> findByTunnelId(String tunnelId);

  List<ProtocolGatherDataPoint> findByEquipmentIdOrEquipmentId(Integer eqId, Integer orEqId);

  List<ProtocolGatherDataPoint> findByEquipmentAttributeIdIn(Integer[] eqIds);
}
