关于钉钉考勤
Re关于钉钉考勤
可以的 我做过实验
1 > 通过 [size=; font-size: 12pt,12pt]
String url = [size=; font-size: 12pt,12pt]
'https://oapi.dingtalk.com/gettoken?corpid=' [size=; font-size: 12pt,12pt]
+ [size=; font-size: 12pt,12pt]
CorpId [size=; font-size: 12pt,12pt]
+ [size=; font-size: 12pt,12pt]
'&corpsecret=' [size=; font-size: 12pt,12pt]
+ [size=; font-size: 12pt,12pt]
CorpSecret[size=; font-size: 12pt,12pt]
;
[size=; font-size: 12pt,12pt]
拿到 [size=; font-size: 12pt,12pt]
access_token
[size=; font-size: 12pt,12pt]
[size=; font-size: 12pt,12pt]
2 > 通过这个 [size=; font-size: 12pt,12pt]
String url = [size=; font-size: 12pt,12pt]
'https://oapi.dingtalk.com/checkin/record' [size=; font-size: 12pt,12pt]
+
'?access_token=' +
access_token +
'&department_id=1&start_time=' +
start +
'&end_time=' +
end +
'&offset=0&size=100&order=asc';时间转换下
start =
'2018-01-01 21:00:06';
end =
'2018-01-30 21:59:06';
SimpleDateFormat sdf =
new SimpleDateFormat(
'yyyy-MM-dd HH:mm:ss');
try {
start = String.
valueOf(sdf.parse(
start).getTime());
end = String.
valueOf(sdf.parse(
end).getTime());
}
catch (ParseException e) {
e.printStackTrace();
}能获取 部门下的打卡记录
-------------------------
回 2楼金豆银豆的帖子
你了解钉钉的jsapi吗 感觉阿里的文档巨坑..
赞0
踩0