package org.jeecg.modules.dnc.service;
|
|
import com.baomidou.mybatisplus.extension.service.IService;
|
import org.jeecg.modules.dnc.dto.DeviceGroupExt;
|
import org.jeecg.modules.dnc.entity.DeviceGroup;
|
import org.jeecg.modules.dnc.ucenter.Department;
|
import org.jeecg.modules.system.entity.SysUser;
|
|
import java.util.Collection;
|
import java.util.List;
|
|
public interface IDeviceGroupService extends IService<DeviceGroup> {
|
/**
|
* 新增设备分组
|
* @param deviceGroup
|
* @return
|
*/
|
boolean addDeviceGroup(DeviceGroup deviceGroup);
|
|
/**
|
* 按名称查询数据
|
* @param groupName
|
* @return
|
*/
|
DeviceGroup findByGroupName(String groupName);
|
|
/**
|
* 编辑设备分组
|
* @param id
|
* @param deviceGroup
|
* @return
|
*/
|
boolean editDeviceGroup(String id, DeviceGroup deviceGroup);
|
/**
|
* 查询所有父节点名称
|
* @param parentId
|
* @param stringList
|
* @return
|
*/
|
List<String> findListParentTree(String parentId,List<String> stringList);
|
/**
|
* 删除设备分组
|
* @param id
|
* @return
|
*/
|
boolean deleteDeviceGroup(String id);
|
|
/**
|
* 获取设备父子父子结构数据
|
* @return
|
*/
|
List<DeviceGroupExt> findExtAll();
|
|
/**
|
* 获取用户授权关联的设备分组
|
* @param userId
|
* @return
|
*/
|
List<DeviceGroupExt> getByUserPerms(String userId);
|
|
/**
|
* 获取用户授权关联的设备分组 向上查询父
|
* @param userId
|
* @return
|
*/
|
List<DeviceGroupExt> getByUserPermsAs(String userId);
|
/**
|
* 查询所有父节点和本节点名称
|
* @param groupId
|
* @return
|
*/
|
List<String> findListParentTreeAll(String groupId);
|
/**
|
* 获取分组下所有的子分组
|
* @param groupId
|
* @return
|
*/
|
List<DeviceGroup> getChildrenByParentId(String groupId);
|
|
|
/**
|
* 分配设备用户
|
* @param deviceGroup
|
* @param userList
|
* @return
|
*/
|
boolean assignAddUser(DeviceGroup deviceGroup, Collection<SysUser> userList);
|
|
/**
|
* 删除设备用户
|
* @param deviceGroup
|
* @param userList
|
* @return
|
*/
|
boolean assignRemoveUser(DeviceGroup deviceGroup, Collection<SysUser> userList);
|
|
/**
|
* 获取分组已分配的部门
|
* @param groupId
|
* @return
|
*/
|
List<Department> getDepartPermsList(String groupId);
|
|
/**
|
* 获取分组未分配的部门
|
* @param groupId
|
* @return
|
*/
|
List<Department> getDepartNonPermsList(String groupId);
|
|
/**
|
* 给分组分配部门权限
|
* @param groupId
|
* @param relativeFlag
|
* @param departmentIds
|
* @return
|
*/
|
boolean assignAddDepartment(String groupId, Integer relativeFlag, String[] departmentIds);
|
|
/**
|
* 移除分组分配部门权限
|
* @param groupId
|
* @param relativeFlag
|
* @param departmentIds
|
* @return
|
*/
|
boolean assignRemoveDepartment(String groupId, Integer relativeFlag, String[] departmentIds);
|
|
/**
|
* 给分组分配部门权限
|
* @param deviceGroup
|
* @param departmentList
|
* @return
|
*/
|
boolean assignAddDepartment(DeviceGroup deviceGroup, Collection<Department> departmentList);
|
|
/**
|
* 移除分组分配部门权限
|
* @param deviceGroup
|
* @param departmentList
|
* @return
|
*/
|
boolean assignRemoveDepartment(DeviceGroup deviceGroup, Collection<Department> departmentList);
|
|
/**
|
*
|
* @param departIds
|
* @return
|
*/
|
List<DeviceGroupExt> findExtByDeparts(List<String> departIds);
|
}
|