OA

  1. $config = [
  2. 'corp_id' => 'xxxxxxxxxxxxxxxxx',
  3. 'secret' => 'xxxxxxxxxx',
  4. //...
  5. ];
  6. $app = Factory::work($config);

获取打卡数据

API:

  1. mixed checkinRecords(int $startTime, int $endTime, array $userList, int $type = 3)

{info} $type: 打卡类型 1:上下班打卡;2:外出打卡;3:全部打卡

  1. // 全部打卡数据
  2. $app->oa->checkinRecords(1492617600, 1492790400, ["james","paul"]);
  3. // 获取上下班打卡
  4. $app->oa->checkinRecords(1492617600, 1492790400, ["james","paul"], 1);
  5. // 获取外出打卡
  6. $app->oa->checkinRecords(1492617600, 1492790400, ["james","paul"], 2);

获取审批数据

API:

  1. mixed approvalRecords(int $startTime, int $endTime, int $nextNumber = null)

{info} $nextNumber: 第一个拉取的审批单号,不填从该时间段的第一个审批单拉取

  1. $app->oa->approvalRecords(1492617600, 1492790400);
  2. // 指定第一个拉取的审批单号,不填从该时间段的第一个审批单拉取
  3. $app->oa->approvalRecords(1492617600, 1492790400, '201704240001');