批量创建父子任务(API名称:batchCreateSubTaskList)
功能介绍
用于批量创建父子任务
相关接口
请求头
KEY |
VALUE |
是否必填 |
描述 |
---|---|---|---|
Content-Type |
application/json |
是 |
无 |
Authorization |
bearer ${access_token} |
是 |
bearer +“ ”+5.2.1中获取的access_token的值 |
URL
请求方式 |
HTTPS地址 |
服务架构 |
消息体类型 |
---|---|---|---|
POST |
https://isdp+域名/openapi/v1/openSceneTask/batchCreateSubTaskList |
OpenAPI |
application/json |
请求参数
参数 |
类型 |
是否必填 |
描述 |
---|---|---|---|
taskQueries |
List |
是 |
入参 |
taskQueries入参(注意:任务的基础字段是由场景配置的,最大批量创建10个父子任务):
参数 |
类型 |
是否必填 |
描述 |
---|---|---|---|
customerTaskId |
String |
是 |
客户任务ID |
creatorAccount |
String |
否 |
创建人账号(isdp+中存在的人员账号) |
taskName |
String |
是 |
父任务名称 |
signSiteName |
String |
否 |
作业对象名称 |
sceneName |
String |
是 |
场景名称,取最新版本 |
projectNo |
String |
否 |
项目编码 |
assignedUserType |
Integer |
是 |
执行人类型:1-执行人;2-群组 |
assignedUser |
String |
是 |
执行人(如果是执行人,则传执行人账号,多个用“;”隔开;如果是群组,传群组名称,只能单个) |
supplierName |
String |
否 |
供应商名称 |
reviewRuleName |
Long |
否 |
任务申请审批流名称,需要审批时为必填 |
collectionReviewName |
Long |
否 |
检查单采集审批流名称,需要审批时为必填(只有挂检查单的场景才有) |
beginTimestamp |
Long |
否 |
计划开始时间时间戳 |
endTimestamp |
Long |
否 |
计划完成时间时间戳 |
taskRemark |
String |
否 |
任务描述 |
administrativeDivisionName |
String |
否 |
行政区域 |
priority |
String |
否 |
优先级 |
jobDuration |
Integer |
否 |
标准作业时长 |
projectDuration |
Integer |
否 |
工期 |
schedulingMode |
String |
否 |
调度模式 |
address |
String |
否 |
任务地址(最多1000个字符) |
requiredStartTime |
Long |
否 |
要求开始时间 |
requiredEndTime |
Long |
否 |
要求结束时间 |
skill |
Stirng |
否 |
技能 |
customerName |
String |
否 |
客户名称 |
geoType |
String |
否 |
父任务经纬度类型(值只能为BD或者为空) |
longitude |
String |
否 |
父任务经度信息 |
latitude |
String |
否 |
父任务纬度信息 |
geoType |
String |
否 |
子任务经纬度类型(值只能为BD或者为空) |
longitude |
String |
否 |
子任务经度信息 |
latitude |
String |
否 |
子任务纬度信息 |
subTaskList |
List<Object> |
是 |
子任务列表,场景配置了多少子任务,这里就要填写多少个,否则会报错 |
taskExtendList |
List<Object> |
否 |
拓展属性列表 |
saveDraft |
String |
否 |
保存/提交 0:保存草稿 1:提交 |
isCustomerTaskIdDuplicate |
String |
否 |
是否允许客户任务ID重复,Y:允许 N:不允许重复为空或默认为N |
preTaskList |
List |
否 |
子任务前后置关系 |
subTaskList列表入参:
参数 |
类型 |
是否必填 |
描述 |
---|---|---|---|
modeOrder |
Int |
是 |
序号,从1开始,对应场景配置的序号 |
taskName |
String |
否 |
子任务名称,以入参为准,入参为空则取场景的名称 |
signSiteName |
String |
否 |
作业对象名称 |
assignedUserType |
Integer |
是 |
执行人类型:1-执行人;2-群组 |
assignedUser |
String |
否 |
执行人(如果是执行人,则传执行人账号,多个用“;”隔开;如果是群组,传群组名称,只能单个,如果入参是空,则取场景里的值) |
collectionReviewName |
String |
否 |
采集审批流名称,优先取场景里配置的名称,如果没有再取入参的名称 |
beginTimestamp |
Long |
否 |
计划开始时间时间戳 |
endTimestamp |
Long |
否 |
计划完成时间时间戳 |
taskRemark |
String |
否 |
任务描述 |
administrativeDivisionName |
String |
否 |
行政区域 |
priority |
String |
否 |
优先级 |
jobDuration |
Integer |
否 |
标准作业时长 |
projectDuration |
Integer |
否 |
工期 |
address |
String |
否 |
任务地址(最多1000个字符) |
requiredStartTime |
Long |
否 |
要求开始时间 |
requiredEndTime |
Long |
否 |
要求结束时间 |
skill |
Stirng |
否 |
技能 |
taskExtendList |
List<Object> |
否 |
子任务拓展属性列表 |
procedureList |
List<Object> |
否 |
工序列表,这里只可以给对应的工序配置采集审批流。 |
taskExtendList列表入参(父子任务的入参一样):
参数 |
类型 |
是否必填 |
描述 |
---|---|---|---|
fieldName |
String |
是 |
拓展属性字段名称 |
extendValue |
String |
是 |
拓展属性值(如果是时间和日期,值必须是时间戳) |
stage |
Integer |
否 |
任务扩展属性阶段:1创建阶段 2执行阶段 不填写默认为创建阶段(与场景中的扩展属性阶段匹配) |
procedureList列表入参:
参数 |
类型 |
是否必填 |
描述 |
---|---|---|---|
modeOrder |
Int |
是 |
序号,从1开始,对应场景配置的序号 |
collectionReviewName |
Long |
否 |
检查单采集审批流名称,需要审批时为必填(只有挂检查单的场景才有) |
preTaskList子任务前后置关系每个Object字段说明:
参数 |
类型 |
是否必填 |
描述 |
---|---|---|---|
isEnabledScenePre |
String |
否 |
是否继承场景前后置关系 Y:从场景获取,不取接口参数 N :不从场景获取,只取接口入参为准;默认Y,从场景集成 |
preTaskName |
String |
是 |
前置任务名称 |
preTaskLocation |
String |
是 |
前置任务位置信息 |
taskPreName |
String |
是 |
后置任务名称 |
taskPreLocation |
String |
是 |
后置任务位置 |
preType |
String |
是 |
前置后置关系 |
preTaskLocation参数说明:
参数 |
类型 |
是否必填 |
描述 |
---|---|---|---|
x |
int |
是 |
|
y |
int |
是 |
taskPreLocation参数说明:
参数 |
类型 |
是否必填 |
描述 |
---|---|---|---|
x |
int |
是 |
|
y |
int |
是 |
响应参数
参数 |
类型 |
描述 |
---|---|---|
stateCode |
String |
响应状态码:0-成功;其他-失败 |
errorMessage |
String |
响应描述 |
result |
Object |
响应结果内容data、分页数据 |
data出参:
参数 |
类型 |
描述 |
---|---|---|
customerTaskId |
String |
客户任务ID |
taskId |
Long |
创建成功的任务id |
status |
Integer |
返回状态:0-成功;1-失败 |
message |
String |
返回的失败消息。 |
请求示例
{ "taskQueries": [ { "supplierName": "", "taskRemark": "", "beginTimestamp": "", "collectionReviewName": "", "sceneName": "zhang子任务前后置关系_串行", "latitude": "", "signSiteName": "", "isCustomerTaskIdDuplicate": "Y", "customerTaskId": "QA2233", "projectNo": "", "assignedUserType": "1", "geoType": "", "reviewRuleName": "", "taskName": "openapi_批量创建zhang子任务前后置关系_串行02", "assignedUser": "Zhang123456", "endTimestamp": "", "saveDraft": 1, "taskExtendList": [], "longitude": "", "isEnabledScenePre": "Y", "preTaskList": [], "subTaskList": [ { "taskExtendList": [], "signSiteName": "", "modeOrder": 1, "projectNo": "", "assignedUserType": 1, "assignedUser": "Zhang123456", "ccPersonType": 4, "ccPerson": "", "ownerType": 5, "owner": "", "supplierName": "", "reviewRuleName": "", "beginTimestamp": "", "endTimestamp": "", "requiredStartTime": "", "longitude": "", "latitude": "", "geoType": "", "requiredEndTime": "", "taskRemark": "", "collectionReviewName": "", "priority": "", "jobDuration": "", "projectDuration": "", "schedulingMode": "", "administrativeDivisionName": "", "address": "", "skill": "", "customerName": "", "procedureList": [] }, { "taskExtendList": [], "signSiteName": "", "modeOrder": 2, "projectNo": "", "assignedUserType": 1, "assignedUser": "Zhang123456", "ccPersonType": 4, "ccPerson": "", "ownerType": 5, "owner": "", "supplierName": "", "reviewRuleName": "", "beginTimestamp": "", "endTimestamp": "", "requiredStartTime": "", "longitude": "", "latitude": "", "geoType": "", "requiredEndTime": "", "taskRemark": "", "collectionReviewName": "", "priority": "", "jobDuration": "", "projectDuration": "", "schedulingMode": "", "administrativeDivisionName": "", "address": "", "skill": "", "customerName": "", "procedureList": [] }, { "taskExtendList": [], "signSiteName": "", "modeOrder": 3, "projectNo": "", "assignedUserType": 1, "assignedUser": "Zhang123456", "ccPersonType": 4, "ccPerson": "", "ownerType": 5, "owner": "", "supplierName": "", "reviewRuleName": "", "beginTimestamp": "", "endTimestamp": "", "requiredStartTime": "", "longitude": "", "latitude": "", "geoType": "", "requiredEndTime": "", "taskRemark": "", "collectionReviewName": "", "priority": "", "jobDuration": "", "projectDuration": "", "schedulingMode": "", "administrativeDivisionName": "", "address": "", "skill": "", "customerName": "", "procedureList": [] } ] }, { "supplierName": "", "taskRemark": "", "beginTimestamp": "", "collectionReviewName": "", "sceneName": "zhang子任务无配置关系", "latitude": "", "signSiteName": "", "isCustomerTaskIdDuplicate": "Y", "customerTaskId": "QA2414", "projectNo": "", "assignedUserType": "1", "geoType": "", "reviewRuleName": "", "taskName": "openapi_批量创建zhang子任务无配置关系02", "assignedUser": "Zhang123456", "endTimestamp": "", "taskExtendList": [], "longitude": "", "saveDraft": 0, "isEnabledScenePre": "N", "preTaskList": [ { "preTaskName": "子任务11", "preTaskLocation": "{\"x\":700,\"y\":70}", "taskPreName": "子任务22", "taskPreLocation": "{\"x\":700,\"y\":190}", "preType": "FS" }, { "preTaskName": "子任务11", "preTaskLocation": "{\"x\":700,\"y\":70}", "taskPreName": "子任务33", "taskPreLocation": "{\"x\":700,\"y\":340}", "preType": "FS" } ], "subTaskList": [ { "taskExtendList": [], "signSiteName": "", "modeOrder": 1, "projectNo": "", "assignedUserType": 1, "assignedUser": "Zhang123456", "ccPersonType": 4, "ccPerson": "", "ownerType": 5, "owner": "", "supplierName": "", "reviewRuleName": "", "beginTimestamp": "", "endTimestamp": "", "requiredStartTime": "", "longitude": "", "latitude": "", "geoType": "", "requiredEndTime": "", "taskRemark": "", "collectionReviewName": "", "priority": "", "jobDuration": "", "projectDuration": "", "schedulingMode": "", "administrativeDivisionName": "", "address": "", "skill": "", "customerName": "", "procedureList": [] }, { "taskExtendList": [], "signSiteName": "", "modeOrder": 2, "projectNo": "", "assignedUserType": 1, "assignedUser": "Zhang123456", "ccPersonType": 4, "ccPerson": "", "ownerType": 5, "owner": "", "supplierName": "", "reviewRuleName": "", "beginTimestamp": "", "endTimestamp": "", "requiredStartTime": "", "longitude": "", "latitude": "", "geoType": "", "requiredEndTime": "", "taskRemark": "", "collectionReviewName": "", "priority": "", "jobDuration": "", "projectDuration": "", "schedulingMode": "", "administrativeDivisionName": "", "address": "", "skill": "", "customerName": "", "procedureList": [] }, { "taskExtendList": [], "signSiteName": "", "modeOrder": 3, "projectNo": "", "assignedUserType": 1, "assignedUser": "Zhang123456", "ccPersonType": 4, "ccPerson": "", "ownerType": 5, "owner": "", "supplierName": "", "reviewRuleName": "", "beginTimestamp": "", "endTimestamp": "", "requiredStartTime": "", "longitude": "", "latitude": "", "geoType": "", "requiredEndTime": "", "taskRemark": "", "collectionReviewName": "", "priority": "", "jobDuration": "", "projectDuration": "", "schedulingMode": "", "administrativeDivisionName": "", "address": "", "skill": "", "customerName": "", "procedureList": [] } ] }, { "supplierName": "", "taskRemark": "", "beginTimestamp": "", "collectionReviewName": "", "sceneName": "zhang4个子任务_有一个无配置关系", "latitude": "", "signSiteName": "", "isCustomerTaskIdDuplicate": "Y", "customerTaskId": "20qe333", "projectNo": "", "assignedUserType": "1", "geoType": "", "reviewRuleName": "", "taskName": "openapi_批量创建zhang4个子任务_有一个无配置关系02", "assignedUser": "Zhang123456", "endTimestamp": "", "saveDraft": 0, "taskExtendList": [], "longitude": "", "isEnabledScenePre": "N", "preTaskList": [ { "preTaskName": "子任务11", "preTaskLocation": "{\"x\":700,\"y\":70}", "taskPreName": "子任务22", "taskPreLocation": "{\"x\":700,\"y\":190}", "preType": "FS" }, { "preTaskName": "子任务11", "preTaskLocation": "{\"x\":700,\"y\":70}", "taskPreName": "子任务33", "taskPreLocation": "{\"x\":700,\"y\":340}", "preType": "FS" }, { "preTaskName": "子任务44", "preTaskLocation": "{\"x\":700,\"y\":340}", "taskPreName": "子任务22", "taskPreLocation": "{\"x\":100,\"y\":70}", "preType": "FS" } ], "subTaskList": [ { "taskExtendList": [], "signSiteName": "", "modeOrder": 1, "projectNo": "", "assignedUserType": 1, "assignedUser": "Zhang123456", "ccPersonType": 4, "ccPerson": "", "ownerType": 5, "owner": "", "supplierName": "", "reviewRuleName": "", "beginTimestamp": "", "endTimestamp": "", "requiredStartTime": "", "longitude": "", "latitude": "", "geoType": "", "requiredEndTime": "", "taskRemark": "", "collectionReviewName": "", "priority": "", "jobDuration": "", "projectDuration": "", "schedulingMode": "", "administrativeDivisionName": "", "address": "", "skill": "", "customerName": "", "procedureList": [] }, { "taskExtendList": [], "signSiteName": "", "modeOrder": 2, "projectNo": "", "assignedUserType": 1, "assignedUser": "Zhang123456", "ccPersonType": 4, "ccPerson": "", "ownerType": 5, "owner": "", "supplierName": "", "reviewRuleName": "", "beginTimestamp": "", "endTimestamp": "", "requiredStartTime": "", "longitude": "", "latitude": "", "geoType": "", "requiredEndTime": "", "taskRemark": "", "collectionReviewName": "", "priority": "", "jobDuration": "", "projectDuration": "", "schedulingMode": "", "administrativeDivisionName": "", "address": "", "skill": "", "customerName": "", "procedureList": [] }, { "taskExtendList": [], "signSiteName": "", "modeOrder": 3, "projectNo": "", "assignedUserType": 1, "assignedUser": "Zhang123456", "ccPersonType": 4, "ccPerson": "", "ownerType": 5, "owner": "", "supplierName": "", "reviewRuleName": "", "beginTimestamp": "", "endTimestamp": "", "requiredStartTime": "", "longitude": "", "latitude": "", "geoType": "", "requiredEndTime": "", "taskRemark": "", "collectionReviewName": "", "priority": "", "jobDuration": "", "projectDuration": "", "schedulingMode": "", "administrativeDivisionName": "", "address": "", "skill": "", "customerName": "", "procedureList": [] }, { "taskExtendList": [], "signSiteName": "", "modeOrder": 4, "projectNo": "", "assignedUserType": 1, "assignedUser": "Zhang123456", "ccPersonType": 4, "ccPerson": "", "ownerType": 5, "owner": "", "supplierName": "", "reviewRuleName": "", "beginTimestamp": "", "endTimestamp": "", "requiredStartTime": "", "longitude": "", "latitude": "", "geoType": "", "requiredEndTime": "", "taskRemark": "", "collectionReviewName": "", "priority": "", "jobDuration": "", "projectDuration": "", "schedulingMode": "", "administrativeDivisionName": "", "address": "", "skill": "", "customerName": "", "procedureList": [] } ] } ] }
响应示例
{ "stateCode": "0", "errorMessage": null, "result": [ { "reviewRuleId": null, "subTaskOrNot": 1, "submitBy": 864711, "licenseSwitch": null, "lastUpdateDate": "2023-04-04 16:42:02", "submitDate": 1680597722422, "schedulerBy": -1, "deleteFlag": 0, "lastUpdateTimestamp": 1680597722422, "entityName": "SceneTask", "isApplyApprove": 0, "reviewRuleName": "", "creationTimestamp": 1680597722422, "schedulerName": "OpenApi", "sceneMode": 4, "lastUpdatedBy": 864711, "operationTimestamp": 1680597722422, "address": null, "appName": "isdp-task-server", "errorMessage": null, "creationDate": "2023-04-04 16:42:02", "customerTaskId": "QA2233", "submitName": "zhang_sit", "sceneTaskId": 3245536, "signInConfig": null, "createdBy": 864711, "schedulerTimestamp": 1680597722422, "affectedRows": 1, "procedureOrNot": 0, "tenantId": 886, "stateCode": "0", "lastUpdateName": "zhang_sit", "ticketId": 0, "createName": "zhang_sit", "schedulerDate": "2023-04-04 16:42:02", "status": 1 }, { "reviewRuleId": null, "subTaskOrNot": 1, "submitBy": 864711, "licenseSwitch": null, "lastUpdateDate": "2023-04-04 16:42:02", "submitDate": 1680597722408, "schedulerBy": -1, "deleteFlag": 0, "lastUpdateTimestamp": 1680597722408, "entityName": "SceneTask", "isApplyApprove": 0, "reviewRuleName": "", "creationTimestamp": 1680597722408, "schedulerName": "OpenApi", "sceneMode": 4, "lastUpdatedBy": 864711, "operationTimestamp": 1680597722408, "address": null, "appName": "isdp-task-server", "errorMessage": null, "creationDate": "2023-04-04 16:42:02", "customerTaskId": "QA2414", "submitName": "zhang_sit", "sceneTaskId": 3245534, "signInConfig": null, "createdBy": 864711, "schedulerTimestamp": 1680597722408, "affectedRows": 1, "procedureOrNot": 0, "tenantId": 886, "stateCode": "0", "lastUpdateName": "zhang_sit", "ticketId": 0, "createName": "zhang_sit", "schedulerDate": "2023-04-04 16:42:02", "status": 0 }, { "reviewRuleId": null, "subTaskOrNot": 1, "submitBy": 864711, "licenseSwitch": null, "lastUpdateDate": "2023-04-04 16:42:02", "submitDate": 1680597722422, "schedulerBy": -1, "deleteFlag": 0, "lastUpdateTimestamp": 1680597722422, "entityName": "SceneTask", "isApplyApprove": 0, "reviewRuleName": "", "creationTimestamp": 1680597722422, "schedulerName": "OpenApi", "sceneMode": 4, "lastUpdatedBy": 864711, "operationTimestamp": 1680597722422, "address": null, "appName": "isdp-task-server", "errorMessage": null, "creationDate": "2023-04-04 16:42:02", "customerTaskId": "20qe333", "submitName": "zhang_sit", "sceneTaskId": 3245535, "signInConfig": null, "createdBy": 864711, "schedulerTimestamp": 1680597722422, "affectedRows": 1, "procedureOrNot": 0, "tenantId": 886, "stateCode": "0", "lastUpdateName": "zhang_sit", "ticketId": 0, "createName": "zhang_sit", "schedulerDate": "2023-04-04 16:42:02", "status": 0 } ] }
状态码
状态码请参见状态码。
错误码
错误码请参见错误码。