钉钉审批:
一、创建应用得到:AgentId、AppKey、AppSecret
开发者后台首页拿到:corp_id
审批人部门ID、审批人ID
二、创建审批单得到:processCode (创建审批单时的url里有)
三、配置开启stream模式
以上需要公司提供。
钉钉审批接口文档:(含git地址)
https://open.dingtalk.com/document/isvapp/workflow-tutorial
stream模式推送的监听代码:
https://open.dingtalk.com/document/orgapp/stream
配置开启stream模式:
https://open-dev.dingtalk.com/fe/app#/appMgr/inner/h5/2761246255/9
开发者后台配置审批流程:
https://oa.dingtalk.com/#/welcome(或者从钉钉的更多进入管理后台)
三、服务端开发:
1.发起审批用client.execute()方法
DefaultDingTalkClient client = new DefaultDingTalkClient(URLConstant.URL_PROCESSINSTANCE_START);
OapiProcessinstanceCreateRequest request = new OapiProcessinstanceCreateRequest();
//表单id
request.setProcessCode(Constant.PROCESS_CODE);
//设置表单组件
r