# 接口说明
- 1.该接口是非行程模式差旅审批单的更新接口,将用户已同意的审批单进行更新。
- 2.非行程模式差旅审批需要新版审批流才能使用。
- 3.创建和变更的三方审批单id不能重复
| 名称 | 描述 |
|---|---|
| HTTP方法 | POST |
| Content-Type | application/x-www-form-urlencoded |
| method | /openapi/func/apply/trip/multi/update |
| 字段 | 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|---|
| access_token | token | string | Y | 登录 token |
| sign | 签名 | string | Y | oihfnlyeofdh98 |
| timestamp | 时间戳 | long | Y | 13位时间戳 1241243250000 |
| data | 请求数据 | jsonobject | Y | 请求数据 |
| data.apply_id | 原审批单id | string | Y | 原审批单id |
| data.third_type | 原审批单类型 | integer | Y | 1:分贝通审批单 2:第三方审批单 |
| data.apply | 申请单内容 | jsonobject | Y | 申请单内容 |
| data.apply.apply_reason | 申请事由 | String | N | 申请事由,不能超过200字符 |
| data.apply.third_id | 申请单id | string | Y | 第三方申请单id |
| data.apply.employee_id | 员工id | string | Y | 第三方人员id,操作人id |
| data.apply.change_reason | 变更事由 | string | Y | 变更事由 |
| data.apply.change_reason_desc | 变更事由补充描述 | string | N | 变更事由补充描述,小于100字 |
| data.apply.budget | 申请单预算 | BigDecimal | N | ⚠️单位为分,预算总额(为trip_list中estimated_amount的总和 ) |
| data.apply.new_cost_attributions | (新)费用归属对象集合 | jsonarray | N | (新)费用归属对象集合 |
| data.apply.new_cost_attributions.type | (新)费用归属类型 | Integer | N | (新)费用归属类型1.部门 2.项目,3自定义档案 |
| data.apply.new_cost_attributions.third_archive_id | (新)三方自定义档案id | string | N | 三方自定义档案id(type为3时必传) |
| data.apply.new_cost_attributions.archive_name | (新)自定义档案名称 | string | N | 自定义档案名称(type为3时必传) |
| data.apply.new_cost_attributions.details | (新)费用归属详情 | jsonArray | N | (新)费用归属详情 |
| data.apply.new_cost_attributions.details.third_id | (新)三方费用归属id | string | N | 费用归属类型(type)为1时,该字段值为部门三方id;费用归属类型(type)为2时,该字段为项目三方ID;费用归属类型(type)为3时,该字段值为自定义档案项目三方ID |
| data.apply.new_cost_attributions.details.name | (新)费用归属名称 | string | N | 费用归属类型(type)为1时,该字段值为部门name;费用归属类型(type)为2时,该字段为项目name;费用归属类型(type)为3时,该字段值为自定义档案项目name |
| data.apply.cost_attribution_list | 费用归属 | jsonarray | N | 费用归属对象集合 |
| data.apply.cost_attribution_list.cost_attribution_id | 费用归属id | string | N | 部门ID或项目ID,当传递费用归属时,费用归属三个属性必须同时传递,否则无法识别 |
| data.apply.cost_attribution_list.cost_attribution_name | 费用归属名称 | string | N | 部门名称或项目名称,当传递费用归属时,费用归属三个属性必须同时传递,否则无法识别 |
| data.apply.cost_attribution_list.cost_attribution_category | 费用归属类型 | integer | N | 费用归属类型 1.部门 2.项目,当传递费用归属时,费用归属三个属性必须同时传递,否则无法识别 |
| data.trip | 行程内容 | jsonobject | Y | 行程内容 |
| data.trip.multi_trip_city | 出行城市 | jsonarray | N | 出行城市列表 |
| data.trip.multi_trip_city.key | 出行城市编码 | string | N | 出行城市的分贝通编码 |
| data.trip.multi_trip_city.value | 出行城市名称 | string | N | 出行城市名称 |
| data.trip.multi_trip_scene | 出行方式 | jsonarray | Y | 出行方式 7-国内机票 11-酒店 15-火车 40-国际机票 135-汽车票 |
| data.trip.start_time | 开始时间 | string | Y | 开始时间 格式:yyyy-MM-dd |
| data.trip.end_time | 结束时间 | string | Y | 结束时间 格式:yyyy-MM-dd |
| data.trip.estimated_amount | 预估金额 | BigDecimal | N | 预估金额,⚠️单位为元 |
| data.guest_list | 出行人列表 | jsonarray | N | 出行人列表 |
| data.guest_list.name | 出行人名称 | string | N | 出行人名称 |
| data.guest_list.phone_num | 出行人手机号 | string | N | 出行人手机号 |
| data.custom_fields | 自定义字段 | jsonarray | N | 自定义字段 |
| data.custom_fields.type | 自定义字段类型 | string | N | 自定义字段类型 |
| data.custom_fields.value | 自定义字段值 | string | N | 自定义字段值 |
请求示例:
"access_token": "5747fbc10f0e60e0709d8d722",
"timestamp": 1635820323000,
"sign": "oihfnlyeofdh98",
"data": {
"apply_id": "687678687",
"third_type": 1,
"apply": {
"apply_reason":"",
"third_id": "57613c455eac323d0c17",
"employee_id": "manager4242",
"change_reason": "变更事由",
"change_reason_desc": "不是出去玩",
"new_cost_attributions":[
{
"type":"1",
"third_archive_id":"5f361f6523445f0f90a7a8db",
"archive_name":"xxx",
"details":[
{
"third_id":"5f361f652323223445f0f90a7a8db",
"name":"xxx"
}
]
}
],
"cost_attribution_list": [{
"cost_attribution_id": "5cc1598623445f612c73b27a",
"cost_attribution_name": "测试韩钉钉对接企业",
"cost_attribution_category": 1
}]
},
"trip": {
"multi_trip_city": [{
"key": "10010",
"value": "上海市"
}],
"multi_trip_scene": [
7,
135
],
"start_time": "2016-02-27",
"end_time": "2017-02-28"
},
"guest_list": [{
"name": "韩美美",
"phone_num": "18518270668"
}],
"custom_fields": [{
"type": "",
"value": ""
}]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
响应结果:
{
"code": 0,
"msg": "success",
"data": {
"apply_id": "60dd91d191b4915974452a07"
},
"request_id": "p1D1owryBm4fqT9f"
}
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8