ny
23 小时以前 b6f169fe43a2b13f351aefc152374fc7f0bc8cb7
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
package jnpf.base.service;
 
import com.alibaba.fastjson.JSONObject;
import jnpf.base.model.synthirdinfo.QyWebChatDeptModel;
import jnpf.base.model.synthirdinfo.QyWebChatUserModel;
import jnpf.exception.WxErrorException;
import jnpf.model.BaseSystemInfo;
import jnpf.permission.entity.OrganizeEntity;
import jnpf.permission.entity.UserEntity;
 
import java.text.ParseException;
import java.util.List;
 
/**
 * 本系统的公司、部门、用户与企业微信的同步
 *
 * @版本: V3.1.0
 * @版权: 引迈信息技术有限公司(https://www.jnpfsoft.com)
 * @作者: JNPF开发平台组
 * @日期: 2021/4/27 11:12
 */
public interface SynThirdQyService {
 
    JSONObject unifyDepartmentSysToQy(boolean isBatch, OrganizeEntity deptEntity,String accessToken,String choice) throws WxErrorException;
    JSONObject unifyDepartmentSysToQy(boolean isBatch, List<OrganizeEntity> organizeEntities, String accessToken, String choice) throws WxErrorException;
 
    /**
     * 获取企业微信的配置信息
     * @return
     */
    BaseSystemInfo getQyhConfig();
 
    //------------------------------------本系统同步公司、部门到企业微信-------------------------------------
 
    /**
     * 本地同步单个公司或部门到企业微信(供调用)
     * @param isBatch   是否批量(批量不受开关限制)
     * @param deptEntity
     * @param accessToken (单条调用时为空)
     * @return
     * @throws WxErrorException
     */
    JSONObject createDepartmentSysToQy(boolean isBatch, OrganizeEntity deptEntity,String accessToken) throws WxErrorException;
 
    /**
     * 本地更新单个公司或部门到企业微信(供调用)
     * @param isBatch   是否批量(批量不受开关限制)
     * @param deptEntity
     * @param accessToken (单条调用时为空)
     * @return
     * @throws WxErrorException
     */
    JSONObject updateDepartmentSysToQy(boolean isBatch, OrganizeEntity deptEntity,String accessToken) throws WxErrorException;
 
    /**
     * 本地删除单个公司或部门,同步到企业微信(供调用)
     * @param isBatch   是否批量(批量不受开关限制)
     * @param id        本系统的公司或部门ID
     * @param accessToken (单条调用时为空)
     * @return
     * @throws WxErrorException
     */
    JSONObject deleteDepartmentSysToQy(boolean isBatch, String id,String accessToken) throws WxErrorException;
 
 
    //------------------------------------本系统同步用户到企业微信-------------------------------------
 
    /**
     * 本地用户创建同步到企业微信的成员(单个)
     * @param isBatch   是否批量(批量不受开关限制)
     * @param userEntity
     * @param accessToken (单条调用时为空)
     * @return
     * @throws WxErrorException
     */
    JSONObject createUserSysToQy(boolean isBatch, UserEntity userEntity,String accessToken) throws WxErrorException;
    JSONObject createUserSysToQy(boolean isBatch, List<UserEntity> userList, String accessToken,String positionId) throws WxErrorException;
    JSONObject createUserSysToQy(boolean isBatch, UserEntity userEntity, String accessToken,List<String> ids) throws ParseException, WxErrorException;
    /**
     * 本地更新用户信息或部门到企业微信的成员信息(单个)
     * @param isBatch   是否批量(批量不受开关限制)
     * @param userEntity
     * @param accessToken (单条调用时为空)
     * @return
     * @throws WxErrorException
     */
    JSONObject updateUserSysToQy(boolean isBatch, UserEntity userEntity,String accessToken,String corpToken) throws WxErrorException;
    JSONObject updateUserSysToQy(boolean isBatch, UserEntity userEntity,String accessToken,Integer single) throws WxErrorException;
    /**
     * 本地删除单个用户,同步到企业微信成员
     * @param isBatch   是否批量(批量不受开关限制)
     * @param id   本系统的公司或部门ID
     * @param accessToken (单条调用时为空)
     * @return
     * @throws WxErrorException
     */
    JSONObject deleteUserSysToQy(boolean isBatch, String id,String accessToken) throws WxErrorException;
    JSONObject deleteUserSysToQy(boolean isBatch, List<String> userList,String accessToken,String positionId) throws WxErrorException;
    /**
     * 企业微信同步更新公司或部门到本地(供调用)
     * @param isBatch   是否批量(批量不受开关限制)
     * @param deptEntity
     * @param accessToken (单条调用时为空)
     * @return
     */
    JSONObject updateDepartmentQyToSys(boolean isBatch, QyWebChatDeptModel deptEntity, String accessToken);
 
    /**
     * 企业微信同步公司或部门到本地(供调用)
     * @param isBatch   是否批量(批量不受开关限制)
     * @param deptEntity
     * @param accessToken (单条调用时为空)
     * @return
     */
    JSONObject createDepartmentQyToSys(boolean isBatch, QyWebChatDeptModel deptEntity, String accessToken);
 
    /**
     * 企业微信往本地同步用户
     * @param isBatch   是否批量(批量不受开关限制)
     * @param qyWebChatUserModel
     * @return
     */
    JSONObject createUserQyToSys(boolean isBatch, QyWebChatUserModel qyWebChatUserModel,String access_token)throws Exception;
 
    /**
     * 企业微信更新用户信息到本地
     * 将组织、用户的信息写入同步表
     */
    JSONObject updateUserQyToSystem(boolean isBatch, QyWebChatUserModel qyWebChatUserModel,String access_token) throws Exception;
 
 
}