请求地址
/v2/webservice/apply/apply-modify-table
请求参数
| 参数名称 |
类型 |
是否必填 |
说明 |
| app_id |
int |
是 |
业务ID |
| attach_ids |
array |
是 |
文件ID |
| tables |
array |
是 |
每个要变更的表, 结构说明见下方 |
| auto_check |
bool |
否 |
是否自动审核。(默认跟随集群配置),当集群设置为自动审核的时候,才能设置为true |
| attention_man |
string[] |
否 |
关注人/协作人, 允许其他开发角色执行此单据生成的任务,(不需要指定项目管理员为关注人, 因为项目管理员本身就拥有执行任务的权限) |
tables为object数组,object字段说明
| 参数名称 |
类型 |
是否必填 |
说明 |
| zone_id |
number |
是 |
|
| table_name |
string |
是 |
|
| auto_execute_task |
boolean |
否 |
默认跟随集群, 集群开启自动执行的时候,才能支持设置为true。 |
请求示例
{
"app_id": 2,
"attach_ids": [
592
],
"tables": [
{
"zone_id": 4,
"table_name": "ListTableDemo",
"auto_execute_task": true
}
]
}
返回参数,data字段说明
| 参数名称 |
类型 |
说明 |
| check_result |
number |
仅自动审核开启的时候有意义, 0表示审核成功,-1表示审核失败 |
| app_id |
number |
|
| apply_list |
object |
单据列表 |
| task_list |
object |
任务列表, 单据自动审核的时候才会有返回 |
array_list为object数组,object字段说明
| 参数名称 |
类型 |
说明 |
| apply_id |
number |
0表示成功,-1表示,生成的任务存在失败, |
| app_id |
number |
项目ID |
| zone_id |
number |
区ID |
| table_name |
string |
|
| table_type |
number |
表类型, 0表示generice, 1表示list |
| apply_type |
number |
单据类型 |
| execute_status |
number |
单据状态, 1表示已审核,0表示待审核,(如果审核不成功也是0) |
task_list为object数组,object字段说明
| 参数名称 |
类型 |
说明 |
| result |
number |
0表示创建任务成功 |
| task_id |
number |
生成的任务ID, 任务执行过程是异步的 |
| apply_id |
number |
0表示成功,-1表示,生成的任务存在失败, |
| set_id |
number |
|
| app_id |
|
|
| zone_id |
|
|
| table_name |
|
成功返回示例
{
"code": 0,
"request_id": "d8958a4e-cc11-4fcf-b6f7-c112851fd159",
"data": {
"check_result": 0,
"app_id": 5,
"apply_list": [
{
"apply_id": 1660,
"apply_type_text": "表变更",
"zone_id": "1",
"app_id": 5,
"table_name": "tbAcntInfo",
"execute_status": 1,
"table_type": 0,
"tdr": "141,142",
"apply_type": 3
}
],
"task_list": [
{
"apply_id": 1660,
"set_id": 1,
"app_id": 5,
"zone_id": "1",
"table_name": "tbAcntInfo",
"table_type": 0,
"table_maxnum": 0,
"fmt_type": "TDR",
"task_id": 1458,
"result": 0,
"msg": "审核成功, 请查看生成的任务"
}
],
"apply_user": "username",
"check_user": "username",
"apply_begin_time": "2025-01-21 11:36:32",
"apply_finishi_time": "2025-01-21 11:36:37",
"check_finish_time": "2025-01-21 11:36:40",
"msg": "提交申请成功, 请查看审核结果或任务执行状态",
"execute_task_user": "username",
"is_auto_check": 1
}
}
失败返回示例 (失败原因:单据冲突)
{
"request_id": "b2a6afca-aadf-4667-82fd-8edba1f9ce75",
"code": 102,
"message": "存在待处理的表单据, 不能重复提交",
"debug_message": [
{
"apply_id": 219,
"app_id": 2,
"zone_id": "2",
"table_name": "jxlin_test_table",
"apply_type": 0,
"execute_status": 0
}
]
}