package com.ho.business.service;

import com.ho.business.entity.DeviceTypeConfig;
import com.ho.business.vo.req.device.DeviceTypeConfigAddReq;
import com.ho.business.vo.req.device.DeviceTypeQuery;
import com.ho.business.vo.req.deviceModel.SynchronousReqVo;
import com.ho.business.vo.resp.DeviceRespVO;
import com.ho.business.vo.resp.point.DevicePointResp;

import java.util.List;

/**
 * @author fancl
 * @desc:
 * @date 2023/3/18
 */
public interface DeviceTypeConfigService {

    DeviceTypeConfig queryById(Integer id);
    //根据条件查询
    List<DeviceTypeConfig> queryListByCondition(DeviceTypeQuery deviceTypeQuery);

    //获取站维度可以查看到的设备类型
    List<String> getStationDeviceTypes(Integer stationId);

    void add(DeviceTypeConfig deviceTypeConfig);

    void updateById(DeviceTypeConfig deviceTypeConfig);

    void deleteById(Integer id);

    /**
     * 根据设备类型查询设备类型配置
     * @param deviceType 设备类型
     * @return
     */
    DeviceTypeConfig selectByDeviceType(String deviceType,Integer groupId);

    List<DeviceTypeConfig> selectByType(String deviceType,Integer stationId);

    List<DevicePointResp> getTreeDevices(List<DeviceRespVO> deviceRespVOS);

    /**
     * 根据srcId过滤树
     * @param deviceRespVOS
     * @param srcId
     * @return
     */
    List<DevicePointResp> getTreeDevices(List<DeviceRespVO> deviceRespVOS,Integer srcId);


    void update(DeviceTypeConfigAddReq reqVo);

    /**
     * 一键同步设备类型配置
     * @param vo
     * @return
     */
    int syDeviceTypeConfig(SynchronousReqVo vo);

    /**
     * 批量更新设备类型
     * @param list
     */
    void updateDeviceTypeConfigList(List<DeviceTypeConfig> list);
}
