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 { /** * 新增设备分组 * @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 findListParentTree(String parentId,List stringList); /** * 删除设备分组 * @param id * @return */ boolean deleteDeviceGroup(String id); /** * 获取设备父子父子结构数据 * @return */ List findExtAll(); /** * 获取用户授权关联的设备分组 * @param userId * @return */ List getByUserPerms(String userId); /** * 获取用户授权关联的设备分组 向上查询父 * @param userId * @return */ List getByUserPermsAs(String userId); /** * 查询所有父节点和本节点名称 * @param groupId * @return */ List findListParentTreeAll(String groupId); /** * 获取分组下所有的子分组 * @param groupId * @return */ List getChildrenByParentId(String groupId); /** * 分配设备用户 * @param deviceGroup * @param userList * @return */ boolean assignAddUser(DeviceGroup deviceGroup, Collection userList); /** * 删除设备用户 * @param deviceGroup * @param userList * @return */ boolean assignRemoveUser(DeviceGroup deviceGroup, Collection userList); /** * 获取分组已分配的部门 * @param groupId * @return */ List getDepartPermsList(String groupId); /** * 获取分组未分配的部门 * @param groupId * @return */ List 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 departmentList); /** * 移除分组分配部门权限 * @param deviceGroup * @param departmentList * @return */ boolean assignRemoveDepartment(DeviceGroup deviceGroup, Collection departmentList); /** * * @param departIds * @return */ List findExtByDeparts(List departIds); }