lyh
2025-01-17 ea704e018a27c26ef6deeaea4adc8a28b4d0b27e
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
package org.jeecg.modules.dnc.service;
 
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.dnc.entity.ProductInfo;
import org.jeecg.modules.dnc.response.CommonGenericTree;
import org.jeecg.modules.dnc.ucenter.Department;
import org.jeecg.modules.dnc.ucenter.UserDepartExt;
import org.jeecg.modules.system.entity.SysUser;
 
import java.util.Collection;
import java.util.List;
 
public interface IProductInfoService extends IService<ProductInfo> {
    /**
     * 新增产品信息
     * @param deviceGroup
     * @return
     */
    boolean addProductInfo(ProductInfo deviceGroup);
 
    /**
     * 编辑产品信息
     * @param id
     * @param productInfo
     * @return
     */
    boolean editProductInfo(String id ,ProductInfo productInfo);
 
    /**
     * 获取产品结构树接口
     * @return
     */
    List<CommonGenericTree> loadProductTree(String userId);
 
    /**
     * 根据用户id获取用户的产品数据
     * @param userId
     * @return
     */
    List<ProductInfo> getByUserPerms(String userId);
 
    /**
     * 根据用户id和查询条件获取用户的产品数据
     * @param userId
     * @param queryParam
     * @return
     */
    List<ProductInfo> getByUserPerms(String userId, String queryParam);
 
    /**
     * 删除产品
     * @param id
     * @return
     */
    boolean deleteProductInfo(String id);
 
    /**
     * 检查产品树节点的查看权限
     * @param nodeType
     * @param paramId
     * @return
     */
    boolean checkProductPerm(Integer nodeType, String paramId);
 
    /**
     * 获取已分配的用户
     * @param nodeType
     * @param paramId
     * @return
     */
    List<UserDepartExt> getUserPermsList(Integer nodeType, String paramId);
 
    /**
     * 获取未分配的用户
     * @param nodeType
     * @param paramId
     * @return
     */
    List<SysUser> getUserNonPermsList(Integer nodeType, String paramId);
 
    /**
     * 获取已分配的部门
     * @param nodeType
     * @param paramId
     * @return
     */
    List<Department> getDepartPermsList(Integer nodeType, String paramId);
 
    /**
     * 获取未分配的部门
     * @param nodeType
     * @param paramId
     * @return
     */
    List<Department> getDepartNonPermsList(Integer nodeType, String paramId);
 
    /**
     * 指派产品树节点的用户权限
     * @param nodeType 1 产品 2 部件 3 零件
     * @param paramId 产品树节点id
     * @param userIds 添加用户ids
     * @param relativeFlag 1 是 2 否
     * @return
     */
    boolean assignAddUser(Integer nodeType, String paramId, Integer relativeFlag, String[] userIds);
 
    /**
     * 移除产品树节点的用户权限
     * @param nodeType 1 产品 2 部件 3 零件
     * @param paramId 产品树节点id
     * @param userIds 移除用户ids
     * @param relativeFlag 1 是 2 否
     * @return
     */
    boolean assignRemoveUser(Integer nodeType, String paramId, Integer relativeFlag, String[] userIds);
 
    /**
     * 指派产品树节点的部门权限
     * @param nodeType 1 产品 2 部件 3 零件
     * @param paramId 产品树节点id
     * @param departmentIds 添加部门ids
     * @param relativeFlag 1 是 2 否
     * @return
     */
    boolean assignAddDepartment(Integer nodeType, String paramId, Integer relativeFlag, String[] departmentIds);
 
    /**
     * 移除产品树节点的部门权限
     * @param nodeType 1 产品 2 部件 3 零件
     * @param paramId 产品树节点id
     * @param departmentIds 移除部门ids
     * @param relativeFlag 1 是 2 否
     * @return
     */
    boolean assignRemoveDepartment(Integer nodeType, String paramId, Integer relativeFlag, String[] departmentIds);
 
 
    /**
     * 给产品树节点添加用户权限
     * @param productInfo
     * @param userList
     * @return
     */
    boolean assignAddUser(ProductInfo productInfo, Collection<SysUser> userList);
 
    /**
     * 移除产品树节点添加用户权限
     * @param productInfo
     * @param userList
     * @return
     */
    boolean assignRemoveUser(ProductInfo productInfo, Collection<SysUser> userList);
 
 
    /**
     * 给产品树节点添加部门权限
     * @param productInfo
     * @param departmentList
     * @return
     */
    boolean assignAddDepartment(ProductInfo productInfo, Collection<Department> departmentList);
 
 
    /**
     * 移除产品树节点添加部门权限
     * @param productInfo
     * @param departmentList
     * @return
     */
    boolean assignRemoveDepartment(ProductInfo productInfo, Collection<Department> departmentList);
 
    /**
     * 获取节点的部门权限
     * @param nodeType
     * @param paramId
     * @return
     */
    List<String> getDepartIdsByParams(Integer nodeType, String paramId);
 
    /**
     * 获取唯一产品编号
     * @param productNo
     * @return
     */
    ProductInfo getByProductNo(String productNo);
 
    /**
     * 获取产品树的第一级和第二级
     * @param userId
     * @return
     */
    List<CommonGenericTree> loadBaseTree(String userId);
 
    /**
     * 加载产品树子节点数据
     * @param userId
     * @param nodeType
     * @param paramId
     * @return
     */
    List<CommonGenericTree> loadTree(String userId, Integer nodeType, String paramId);
 
    /**
     * 搜索接口
     * @param userId
     * @param queryParam
     * @return
     */
    List<CommonGenericTree> searchProductTree(String userId, String queryParam);
}