通过api批量获取审批数据,userid和groupname字段为空。其他的字段都是有数据的。
<?php
include_once("wechat/api/src/CorpAPI.class.php");
include_once("wechat/api/src/ServiceCorpAPI.class.php");
include_once("wechat/api//src/ServiceProviderAPI.class.php");
$api = new CorpAPI('', '');
$start_time=strtotime('2020-12-01');
$end_time=strtotime('2020-12-31');
try {
$ApprovalDataList = $api->ApprovalDataGet($start_time, $end_time);
$arr=(json_encode($ApprovalDataList));
print_r(json_decode($arr,true));
} catch (Exception $e) {
// echo $e->getMessage() . "\n";
}
返回的数据
[data] => Array
(
[0] => Array
(
[userid] =>
[groupname] =>
[checkin_type] =>
[exception_type] =>
[checkin_time] =>
[location_title] =>
[location_detail] =>
[wifiname] =>
[notes] =>
[wifimac] =>
[mediaids] => Array
(
)
[spname] => 费用申请
[apply_name] => 员工姓名
[apply_org] => 房企事业部
[approval_name] => Array
(
[0] => 老板A
)
[notify_name] => Array
(
[0] => 老板B
)
[sp_status] => 2
[sp_num] => 202012010001
[apply_time] => 1606785418
[apply_user_id] => LaoBanA
[comm] => Array
(
[apply_data] => [{"id":"item-1494248811896","title":"报销类型","type":"select","value":"活动物料"},{"id":"Text-1606147433459","title":"报销事由","type":"text","value":"11月暖场活动"},{"id":"item-1494249104239","title":"费用金额","type":"number","value":"2500"},{"id":"item-1494249113679","title":"发生日期","type":"date","value":"1606752000000"},{"id":"Table-1605594320035","title":"明细","type":"list","value":[[{"id":"Text-1605594358538","title":"名称","type":"text","value":"报销内容"},{"id":"Number-1606147938838","title":"数量","type":"number","value":"1"},{"id":"Money-1605594364026","title":"金额","type":"price","value":"2500"}]]},{"id":"item-1494249126248","title":"备注","type":"textarea","value":""}]
)
)
你好,批量获取审批单号返回的是审批单号列表,没有userid和groupname字段返回的呀