package com.mes.device.service;
|
|
import com.mes.device.vo.DeviceGroupVO;
|
import java.util.List;
|
|
/**
|
* 设备组关系管理服务接口
|
*
|
* @author mes
|
* @since 2024-10-30
|
*/
|
public interface DeviceGroupRelationService {
|
|
/**
|
* 添加设备到设备组
|
*
|
* @param groupId 设备组ID
|
* @param deviceId 设备ID
|
* @param deviceRole 设备角色
|
*/
|
void addDeviceToGroup(Long groupId, Long deviceId, String deviceRole);
|
|
/**
|
* 从设备组中移除设备
|
*
|
* @param groupId 设备组ID
|
* @param deviceId 设备ID
|
*/
|
void removeDeviceFromGroup(Long groupId, Long deviceId);
|
|
/**
|
* 更新设备在设备组中的角色
|
*
|
* @param groupId 设备组ID
|
* @param deviceId 设备ID
|
* @param deviceRole 设备角色
|
*/
|
void updateDeviceRole(Long groupId, Long deviceId, String deviceRole);
|
|
/**
|
* 获取设备组下的设备列表
|
*
|
* @param groupId 设备组ID
|
* @return 设备信息列表
|
*/
|
List<DeviceGroupVO.DeviceInfo> getGroupDevices(Long groupId);
|
|
/**
|
* 获取设备所属的设备组列表
|
*
|
* @param deviceId 设备ID
|
* @return 设备组信息列表
|
*/
|
List<DeviceGroupVO.GroupInfo> getDeviceGroups(Long deviceId);
|
|
/**
|
* 批量添加设备到设备组
|
*
|
* @param groupId 设备组ID
|
* @param deviceIds 设备ID列表
|
*/
|
void batchAddDevicesToGroup(Long groupId, List<Long> deviceIds);
|
|
/**
|
* 批量从设备组移除设备
|
*
|
* @param groupId 设备组ID
|
* @param deviceIds 设备ID列表
|
*/
|
void batchRemoveDevicesFromGroup(Long groupId, List<Long> deviceIds);
|
}
|