钉钉审批分审批任务和审批实例之前启蒙博客有简单说过审批任务和审批实例有什么不同,那么在审批时回调的流程和数据时什么样的呢?

在提交审批后,审批任务里就会返回一条数据,实例如下

array(11) {
  ["processInstanceId"] => string(36) "656fbd76-3814-4626-84b1-8af2de1c0114" //审批任务的id
  ["corpId"] => string(36) "ding6c1a9352369eeafd35c2f4657eb6378f"
  ["EventType"] => string(16) "bpms_task_change"                //审批任务类型
  ["businessId"] => string(21) "202102251002000249799"
  ["title"] => string(37) "启蒙博客提交的易资产-资产申领"
  ["type"] => string(5) "start"    //状态                               
  ["createTime"] => int(1614218545000)
  ["processCode"] => string(41) "PROC-DA0804CF-7618-45D2-9544-569C7348C9E6" //审批模板
  ["bizCategoryId"] => string(0) ""
  ["staffId"] => string(18) "180449373126790529"  //下一步是交给谁申请
  ["taskId"] => int(67544131247)
}
在上面代码中只需要记住启蒙博客所备注标识的几个字段就可以了。

接下来就开始进入审批环节了,这里启蒙播放粘贴两种不同的结果,一种是直接拒绝掉,一种是同意,测试为2个人审批。

例如:启蒙博客发起申请资产,a管理员同意审批,b管理员同意审批,启蒙博客在确认收货
这个是直接被拒绝掉的审批我们可以看他的type值和result值,finish就是这个审批已经完成了结束了,result是审批结果,refuse就是拒绝审批了。
array(14) {
  ["processInstanceId"] => string(36) "656fbd76-3814-4626-84b1-8af2de1c0114"
  ["finishTime"] => int(1614218942000)
  ["corpId"] => string(36) "ding6c1a9352369eeafd35c2f4657eb6378f"
  ["EventType"] => string(16) "bpms_task_change"
  ["businessId"] => string(21) "202102251002000249799"
  ["remark"] => string(0) ""
  ["title"] => string(37) "启蒙博客提交的易资产-资产申领"
["type"] => string(6) "finish" ["result"] => string(6) "refuse" ["createTime"] => int(1614218545000) ["processCode"] => string(41) "PROC-DA0804CF-7618-45D2-9544-569C7348C9E6" ["bizCategoryId"] => string(0) "" ["staffId"] => string(18) "180449373126790529" ["taskId"] => int(67544131247) }
这个是第一个人同意后的审批,type状态会和最初一样为开始只是staffid改变了,变成了下一个审批人的userid
array(11) {
  ["processInstanceId"] => string(36) "a9ff8e0e-b50b-4a9a-8564-e52f062b8783"
  ["corpId"] => string(36) "ding6c1a9352369eeafd35c2f4657eb6378f"
  ["EventType"] => string(16) "bpms_task_change"
  ["businessId"] => string(21) "202102250937000490904"
  ["title"] => string(37) "启蒙博客提交的易资产-资产申领"
["type"] => string(5) "start" ["createTime"] => int(1614217070000) ["processCode"] => string(41) "PROC-DA0804CF-7618-45D2-9544-569C7348C9E6" ["bizCategoryId"] => string(0) "" ["staffId"] => string(18) "240532355926485294" ["taskId"] => int(67502521604) }

这个是第二个人同意后的审批

array(14) {
  ["processInstanceId"] => string(36) "a9ff8e0e-b50b-4a9a-8564-e52f062b8783"
  ["finishTime"] => int(1614217562000)
  ["corpId"] => string(36) "ding6c1a9352369eeafd35c2f4657eb6378f"
  ["EventType"] => string(16) "bpms_task_change"
  ["businessId"] => string(21) "202102250937000490904"
  ["remark"] => string(0) ""
  ["title"] => string(37) "启蒙博客提交的易资产-资产申领"
  ["type"] => string(6) "finish"
  ["result"] => string(5) "agree"
  ["createTime"] => int(1614217070000)
  ["processCode"] => string(41) "PROC-DA0804CF-7618-45D2-9544-569C7348C9E6"
  ["bizCategoryId"] => string(0) ""
  ["staffId"] => string(18) "240532355926485294"
  ["taskId"] => int(67502521604)
}

第三个人确认收货后的回调数据

array(13) {
  ["processInstanceId"] => string(36) "a9ff8e0e-b50b-4a9a-8564-e52f062b8783"
  ["finishTime"] => int(1614220136000)
  ["corpId"] => string(36) "ding6c1a9352369eeafd35c2f4657eb6378f"
  ["EventType"] => string(16) "bpms_task_change"
  ["businessId"] => string(21) "202102250937000490904"
  ["title"] => string(37) "启蒙博客提交的易资产-资产申领"
["type"] => string(6) "finish" ["result"] => string(5) "agree" ["createTime"] => int(1614217070000) ["processCode"] => string(41) "PROC-DA0804CF-7618-45D2-9544-569C7348C9E6" ["bizCategoryId"] => string(0) "" ["staffId"] => string(17) "15932478242344100" ["taskId"] => int(67502521605) }

点赞(0) 打赏

Comment list 共有 0 条评论

暂无评论

微信小程序

微信扫一扫体验

立即
投稿

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部