cuikaidong
2025-06-12 44e283b774bb1168d0c17dfe5070a1ca8e2274cd
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
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
package org.jeecg.common.system.api;
 
import java.sql.SQLException;
import java.util.List;
import java.util.Map;
 
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import org.jeecg.common.system.vo.*;
import org.springframework.web.multipart.MultipartFile;
 
import javax.servlet.http.HttpServletResponse;
 
/**
 * @Description: 底层共通业务API,提供其他独立模块调用
 * @Author: scott
 * @Date:2019-4-20 
 * @Version:V1.0
 */
public interface ISysBaseAPI {
 
    /**
     * 日志添加
     * @param LogContent 内容
     * @param logType 日志类型(0:操作日志;1:登录日志;2:定时任务)
     * @param operatetype 操作类型(1:添加;2:修改;3:删除;)
     */
    void addLog(String LogContent, Integer logType, Integer operatetype);
    
    /**
      * 根据用户账号查询用户信息
     * @param username
     * @return
     */
    public LoginUser getUserByName(String username);
    
    /**
      * 根据用户id查询用户信息
     * @param id
     * @return
     */
    public LoginUser getUserById(String id);
    
    /**
     * 通过用户账号查询角色集合
     * @param username
     * @return
     */
    public List<String> getRolesByUsername(String username);
 
    /**
     * 通过用户账号查询部门集合
     * @param username
     * @return 部门 id
     */
    List<String> getDepartIdsByUsername(String username);
 
    /**
     * 通过用户账号查询部门 name
     * @param username
     * @return 部门 name
     */
    List<String> getDepartNamesByUsername(String username);
 
    /**
     * 获取当前数据库类型
     * @return
     * @throws Exception 
     */
    public String getDatabaseType() throws SQLException;
    
    /**
      * 获取数据字典
     * @param code
     * @return
     */
    public List<DictModel> queryDictItemsByCode(String code);
 
    /** 查询所有的父级字典,按照create_time排序 */
    public List<DictModel> queryAllDict();
 
    /**
     * 查询所有分类字典
     * @return
     */
    public List<SysCategoryModel> queryAllDSysCategory();
 
    /**
      * 获取表数据字典
     * @param table
     * @param text
     * @param code
     * @return
     */
    List<DictModel> queryTableDictItemsByCode(String table, String text, String code);
    
    /**
        * 查询所有部门 作为字典信息 id -->value,departName -->text
        * @return
        */
       public List<DictModel> queryAllDepartBackDictModel();
 
    /**
        * 查询所有部门,拼接查询条件
        * @return
        */
       List<JSONObject> queryAllDepart(Wrapper wrapper);
 
    /**
     * 发送系统消息
     * @param fromUser 发送人(用户登录账户)
     * @param toUser  发送给(用户登录账户)
     * @param title  消息主题
     * @param msgContent  消息内容
     */
    public void sendSysAnnouncement(String fromUser,String toUser,String title, String msgContent);
 
    /**
     * 发送系统消息
     * @param fromUser 发送人(用户登录账户)
     * @param toUser   发送给(用户登录账户)
     * @param title    通知标题
     * @param map         模板参数
     * @param templateCode  模板编码
     */
    public void sendSysAnnouncement(String fromUser, String toUser,String title, Map<String, String> map, String templateCode);
 
    /**
     *
     * @param fromUser 发送人(用户登录账户)
     * @param toUser 发送给(用户登录账户)
     * @param title 通知标题
     * @param map 模板参数
     * @param templateCode 模板编码
     * @param busType 业务类型
     * @param busId 业务id
     */
    public void sendSysAnnouncement(String fromUser, String toUser,String title, Map<String, String> map, String templateCode,String busType,String busId);
 
    /**
     * 通过消息中心模板,生成推送内容
     *
     * @param templateCode 模板编码
     * @param map          模板参数
     * @return
     */
    public String parseTemplateByCode(String templateCode, Map<String, String> map);
 
 
    /**
     * 发送系统消息
     * @param fromUser 发送人(用户登录账户)
     * @param toUser  发送给(用户登录账户)
     * @param title  消息主题
     * @param msgContent  消息内容
     * @param setMsgCategory  消息类型 1:消息2:系统消息
     */
    public void sendSysAnnouncement(String fromUser, String toUser, String title, String msgContent, String setMsgCategory);
 
    /**queryTableDictByKeys
     * 发送系统消息
     * @param fromUser 发送人(用户登录账户)
     * @param toUser  发送给(用户登录账户)
     * @param title  消息主题
     * @param msgContent  消息内容
     * @param setMsgCategory  消息类型 1:消息2:系统消息
     * @param busType  业务类型
     * @param busId  业务id
     */
    public void sendSysAnnouncement(String fromUser, String toUser, String title, String msgContent, String setMsgCategory,String busType,String busId);
 
    /**
     * 根据业务类型及业务id修改消息已读
     * @param busType
     * @param busId
     */
    public void updateSysAnnounReadFlag(String busType,String busId);
    /**
     * 查询表字典 支持过滤数据
     * @param table
     * @param text
     * @param code
     * @param filterSql
     * @return
     */
    public List<DictModel> queryFilterTableDictInfo(String table, String text, String code, String filterSql);
 
    /**
     * 查询指定table的 text code 获取字典,包含text和value
     * @param table
     * @param text
     * @param code
     * @param keyArray
     * @return
     */
    @Deprecated
    public List<String> queryTableDictByKeys(String table, String text, String code, String[] keyArray);
 
    /**
     * 获取所有有效用户
     * @return
     */
    public List<ComboModel> queryAllUser();
 
    /**
     * 获取所有有效用户 带参
     * userIds 默认选中用户
     * @return
     */
    public JSONObject queryAllUser(String[] userIds, int pageNo, int pageSize);
 
    /**
     * 获取所有有效用户 拼接查询条件
     *
     * @return
     */
    List<JSONObject> queryAllUser(Wrapper wrapper);
 
    /**
     * 获取所有角色
     * @return
     */
    public List<ComboModel> queryAllRole();
 
    /**
     * 获取所有角色 带参
     * roleIds 默认选中角色
     * @return
     */
    public List<ComboModel> queryAllRole(String[] roleIds );
 
    /**
     * 通过用户账号查询角色Id集合
     * @param username
     * @return
     */
    public List<String> getRoleIdsByUsername(String username);
 
    /**
     * 通过部门编号查询部门id
     * @param orgCode
     * @return
     */
    public String getDepartIdsByOrgCode(String orgCode);
 
    /**
     * 查询上一级部门
     * @param departId
     * @return
     */
    public DictModel getParentDepartId(String departId);
 
    /**
     * 查询所有部门
     * @return
     */
    public List<SysDepartModel> getAllSysDepart();
 
    /**
     * 根据 id 查询数据库中存储的 DynamicDataSourceModel
     *
     * @param dbSourceId
     * @return
     */
    DynamicDataSourceModel getDynamicDbSourceById(String dbSourceId);
 
    /**
     * 根据 code 查询数据库中存储的 DynamicDataSourceModel
     *
     * @param dbSourceCode
     * @return
     */
    DynamicDataSourceModel getDynamicDbSourceByCode(String dbSourceCode);
 
    /**
     * 根据部门Id获取部门负责人
     * @param deptId
     * @return
     */
    public List<String> getDeptHeadByDepId(String deptId);
 
    /**
     * 文件上传
     * @param file 文件
     * @param bizPath 自定义路径
     * @param uploadType 上传方式
     * @return
     */
    public String upload(MultipartFile file,String bizPath,String uploadType);
 
    /**
     * 文件上传 自定义桶
     * @param file
     * @param bizPath
     * @param uploadType
     * @param customBucket
     * @return
     */
    public String upload(MultipartFile file,String bizPath,String uploadType,String customBucket);
 
    /**
     * 文档管理文件下载预览
     * @param filePath
     * @param uploadpath
     * @param response
     */
    public void viewAndDownload(String filePath, String uploadpath, String uploadType,HttpServletResponse response);
 
 
    /**
     * 给指定用户发消息
     * @param userIds
     * @param cmd
     */
    public void sendWebSocketMsg(String[] userIds, String cmd);
 
    /**
     * 根据id获取所有参与用户
     * userIds
     * @return
     */
    public List<LoginUser> queryAllUserByIds(String[] userIds);
    /**
     * 将会议签到信息推动到预览
     * userIds
     * @return
     * @param userId
     */
    void meetingSignWebsocket(String userId);
    /**
     * 根据name获取所有参与用户
     * userNames
     * @return
     */
    List<LoginUser> queryUserByNames(String[] userNames);
}