|
|
|
@ -1,7 +1,5 @@
|
|
|
|
|
package com.dsideal.FengHuang.DingTalk.Util;
|
|
|
|
|
|
|
|
|
|
import cn.binarywang.tools.generator.ChineseMobileNumberGenerator;
|
|
|
|
|
import cn.hutool.core.util.PhoneUtil;
|
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.aspose.slides.Collections.ArrayList;
|
|
|
|
@ -11,12 +9,10 @@ import com.dingtalk.api.request.*;
|
|
|
|
|
import com.dingtalk.api.response.*;
|
|
|
|
|
import com.dsideal.FengHuang.Util.CommonUtil;
|
|
|
|
|
import com.jfinal.kit.Kv;
|
|
|
|
|
import com.jfinal.kit.StrKit;
|
|
|
|
|
import com.jfinal.plugin.activerecord.Db;
|
|
|
|
|
import com.jfinal.plugin.activerecord.Record;
|
|
|
|
|
import com.taobao.api.ApiException;
|
|
|
|
|
|
|
|
|
|
import java.util.*;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
public class OrgPerson {
|
|
|
|
|
|
|
|
|
@ -107,21 +103,6 @@ public class OrgPerson {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static JSONObject getDeptInfo(String access_token, long deptId) {
|
|
|
|
|
JSONObject jo;
|
|
|
|
|
try {
|
|
|
|
|
DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/v2/department/get");
|
|
|
|
|
OapiV2DepartmentGetRequest req = new OapiV2DepartmentGetRequest();
|
|
|
|
|
req.setDeptId(deptId);
|
|
|
|
|
req.setLanguage("zh_CN");
|
|
|
|
|
OapiV2DepartmentGetResponse rsp = client.execute(req, access_token);
|
|
|
|
|
jo = JSONObject.parseObject(rsp.getBody());
|
|
|
|
|
} catch (Exception err) {
|
|
|
|
|
jo = JSONObject.parseObject(err.toString());
|
|
|
|
|
}
|
|
|
|
|
return jo;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static void InitOrg(String accessToken, Record rOrg) throws ApiException {
|
|
|
|
|
int bureau_id = rOrg.getInt("org_id");
|
|
|
|
|
//云平台
|
|
|
|
|