lyh
2025-01-13 137d008bd9b7d932160436a3a560b24512f6d1db
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
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);
}