Php实现钉钉OA一级审批,二级审批
Php实现钉钉OA一级审批,二级审批
一级审批
public function oaPush($user_id,$person,$data){//测试数据,上线需要删除$user_id = '154502333155';//发起人$person = ['154502665555'];//审批人$len = count($person);$result = null;if($len>0){$approve_config = DingApproveConfig::where("type", 8)->first();$url = $approve_config->url;$rep['originatorUserId'] = $user_id;$rep['processCode'] = $approve_config->processCode;$type = $len>1?'AND':'NONE';$rep['approvers'][] = ['actionType'=>$type,'userIds'=>$person];$rep['microappAgentId'] = env("DD_AGENT_ID");$rep['formComponentValues'] = $data;$result = $this->oaCurl($url,$rep);}return $result;}