package com.ho.business.service;


import com.ho.business.entity.DeviceType;
import com.ho.business.entity.Station;
import com.ho.business.entity.Topology;
import com.ho.business.entity.TopologyQuery;
import com.ho.business.vo.req.TopologyInReqVo;
import com.ho.business.vo.req.TopologyReqVo;
import com.ho.business.vo.req.TopologyType;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author yule
 * @description 针对表【topology】的数据库操作Service
 * @createDate 2022-08-25 16:06:40
 */
public interface TopologyService {

    //根据stationId和设备id找设备类型
    String findDeviceType(Integer stationId, Integer deviceId);

    DeviceType findDeviceTypeOne(Integer stationId, Integer deviceId);

    int insertSelective(Topology record);

    Topology selectByPrimaryKey(@Param("id") Integer id);

    Topology selectOne(TopologyQuery topologyQuery);

    List<Topology> selectList(TopologyQuery topologyQuery);

    //根据id查询
    List<Topology> selectByStationId(@Param("id") Integer id);

    //更新
    int updateByPrimaryKeySelective(TopologyInReqVo vo);

    int updateByPrimaryKey(Topology vo);

    //删除
    void deleteBytopologyId(Integer id);

    //过滤条件
    Topology selectBysev(TopologyReqVo vo);


    List<Topology> selectByWarehouse(@Param("srcId") Integer srcId);

    List<Topology> selectByStack(@Param("srcId") Integer srcId);

    Topology selectByStation(Integer stationId, Integer deptId, Integer groupId);

    List<Topology> selectByType(TopologyType topologyType, List<Station> list);

    List<Topology> getTopologies(Integer stationId, String deviceType);

    //(1,1,3)
    Topology getStationTopology(Integer stationId);

    //(可进行灵活根据category、type、subType查询)
    List<Topology> getCategoryTopology(Topology topology);

    List<Topology> getTopology(Integer stationId);
}
