1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
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 parentId
     * @param stringList
     * @return
     */
    List<String> findListParentTree(String parentId,List<String> stringList);
 
 
    /**
     * 获取设备父子父子结构数据
     * @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 departIds
     * @return
     */
    List<DeviceGroupExt> findExtByDeparts(List<String> departIds);
}