ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
>[info] 创建班次 调用本接口,创建钉钉考勤班次。 **官方文档地址:** [链接](https://open.dingtalk.com/document/orgapp/create-modify-shifts) ***** * 代码: ~~~ $op_user_id = '123xxxxxxx5644'; $shift = [ 'name' => '测试排班名称', 'sections' => [ [ 'times' => [ [ 'check_type' => 'OnDuty', 'across' => 0, 'check_time' => '2022-04-25 09:00:00' ], [ 'check_type' => 'OffDuty', 'across' => 0, 'check_time' => '2022-04-25 12:00:00' ] ] ], [ 'times' => [ [ 'check_type' => 'OnDuty', 'across' => 0, 'check_time' => '2022-04-25 14:00:00' ], [ 'check_type' => 'OffDuty', 'across' => 0, 'check_time' => '2022-04-25 18:00:00' ] ] ] ] ]; $res = Shift::add($op_user_id, $shift); echo $res; ~~~ * 返回: ``` { "errcode": 0, "result": { "id": 1052730170, "name": "测试排班名称" }, "success": true, "request_id": "16mkxy13yuy82" } ```