
# 批量增加子任务（API名称：openTaskScene/batchSaveSubTask）
#### 功能介绍
批量增加子任务。
#### 相关接口
| **接口名称**                                                             | **调用说明**                                                     |
|:---|:---|
| [获取Token](https://support.huaweicloud.com/api-isdp/api_01_0019.html) | 调用该接口获取到Token，再调用其他接口时，需要在请求消息头中添加"Authorization"，其值即为Token。 |
   
#### URL
| **请求方式** | **HTTPS地址**                                                     | **服务架构** | **消息体类型**        |
|:---|:---|:---|:---|
| POST     | https://***isdp+域名***/openapi/v1/openTaskScene/batchSaveSubTask | OpenAPI  | application/json |
   
#### 请求头
| **KEY**       | VALUE                  | 是否必填 | **描述**                                                                                           |
|:---|:---|:---|:---|
| Content-Type  | application/json       | 是    | 无                                                                                                |
| Authorization | bearer ${access_token} | 是    | bearer +" "+[5.2.1](https://support.huaweicloud.com/api-isdp/api_01_0019.html)中获取的access_token的值 |
   
#### 请求参数
| 参数            | 类型     | 是否必填 | 描述    |
|:---|:---|:---|:---|
| sceneTaskId   | Long   | 是    | 父任务ID |
| operUserNo    | String | 是    | 操作人编号 |
| subTaskVOList | List   | 是    | 子任务列表 |
   
subTaskVOList：
| 参数                         | 类型                   | 是否必填 | 描述                                |
|:---|:---|:---|:---|
| address                    | String               | 否    | 详细地址                              |
| administrativeDivision     | String               | 否    | 行政区域                              |
| administrativeDivisionName | String               | 否    | 行政区域名称                            |
| assignedUserId             | String               | 否    | 执行人id                             |
| assignedUserName           | String               | 否    | 执行人名称                             |
| beginTimestamp             | Long                 | 否    | 计划开始时间                            |
| ccPerson                   | String               | 否    | 抄送人                               |
| ccPersonGroup              | String               | 否    | 抄送组群                              |
| ccPersonGroupName          | String               | 否    | 抄送组群名称                            |
| ccPersonName               | String               | 否    | 抄送人名称                             |
| collectionReviewId         | Long                 | 否    | 采集评审审批流                           |
| collectionReviewName       | String               | 否    | 采集评审审批流名称                         |
| collectionProcessType      | Integer              | 否    | 采集审批流类型(0-标准审批流；1-临时审批流；2-自定义审批流) |
| description                | String               | 否    | 子任务描述                             |
| isAppraisal                | Integer              | 否    | 是否需要采集评审（否:0,是:1)                 |
| isNA                       | Integer              | 否    | 子任务是否是NA状态 默认0(0-否 1-是)           |
| issueId                    | Long                 | 否    | 问题id                              |
| jobDuration                | Integer              | 否    | 标准作业时长                            |
| licenseSwitch              | Integer              | 否    | 是否受许可控制开关：1-是，0-否                 |
| modeOrder                  | Integer              | 否    | 子任务顺序                             |
| oldTaskName                | String               | 否    | 旧的子任务名称。用于关联关系的在名称被修改之后匹配原来子任务用。  |
| operationGuideList         | List\<UploadFileVO\> | 否    | 操作指导文件                            |
| owner                      | String               | 否    | 责任人                               |
| ownerGroup                 | String               | 否    | 责任人群组                             |
| ownerGroupName             | String               | 否    | 责任人群组名称                           |
| ownerName                  | String               | 否    | 责任人名称                             |
| priority                   | String               | 否    | 优先级                               |
| projectDuration            | Integer              | 否    | 项目                                |
| regionId                   | String               | 否    | 行政区域ID                            |
| regionName                 | String               | 否    | 行政区域名称                            |
| regionPath                 | String               | 否    | 行政区域路径(包括最低层)                     |
| sceneModeCode              | Long                 | 否    | 任务场景子任务关联标识（存放任务场景子任务id）          |
| sceneTaskId                | Long                 | 否    | 子任务/工序ID                          |
| signSiteCode               | String               | 否    | 站点编码                              |
| signSiteName               | String               | 否    | 站点名称                              |
| skill                      | String               | 否    | 要求的技能                             |
| taskName                   | String               | 是    | 子任务名称                             |
| templateCode               | String               | 否    | 任务模板编码                            |
| templateName               | String               | 否    | 任务模板名称                            |
| userGroup                  | String               | 否    | 用户组                               |
| userGroupName              | String               | 否    | 用户组名称                             |
| version                    | String               | 否    | 模板版本                              |
| procedureList              | List                 | 否    | 工序列表                              |
| taskExtend                 | List                 | 否    | 扩展字段                              |
   
operationGuideList：
| 参数       | 类型     | 是否必填 | 描述   |
|:---|:---|:---|:---|
| fileId   | Long   | 否    | 文件ID |
| fileName | String | 否    | 文件名字 |
| fileSize | Long   | 否    | 文件大小 |
| fileType | String | 否    | 文件类型 |
   
procedureList：
| 参数                   | 类型      | 是否必填 | 描述                     |
|:---|:---|:---|:---|
| description          | String  | 否    | 工序描述                   |
| taskName             | String  | 否    | 工序名称                   |
| collectionReviewId   | Long    | 否    | 采集评审审批流                |
| collectionReviewName | String  | 否    | 采集评审审批流名称              |
| isAppraisal          | Integer | 否    | 是否需要采集评审（否:0,是:1)      |
| licenseSwitch        | Integer | 否    | 是否受许可控制开关：1-是，0-否      |
| licenseTag           | Integer | 否    | 许可标识：0-无，1-许可启动，2-许可终结 |
| operationGuideList   | List    | 否    | 操作指导文件                 |
| procedureOrder       | Integer | 否    | 工序顺序                   |
| templateCode         | String  | 否    | 任务模板名称                 |
| templateName         | String  | 否    | 任务模板名称                 |
| version              | String  | 否    | 模板版本                   |
   
taskExtend
| 参数          | 类型      | 是否必填 | 描述        |
|:---|:---|:---|:---|
| extendValue | String  | 否    | 扩展字段名称    |
| udfName     | String  | 否    | 扩展字段udf名称 |
| Stage       | Integer | 是    | 扩展字段执行状态  |
   
#### 响应参数
| **参数**       | **类型** | **描述**                                                                                                                                                                                                                                                                                                                                                                                              |
|:---|:---|:---|
| stateCode    | String | 响应状态码： - 0-成功  - 其他-失败   |
| errorMessage | String | 响应描述                                                                                                                                                                                                                                                                                                                                                                                                |
| result       | Object | 响应结果内容data、分页数据                                                                                                                                                                                                                                                                                                                                                                                     |
   
#### 请求示例
```
{
    "operUserNo": 15675496556,
    "sceneTaskId": 3312144,
    "subTaskVOList": [
        {
            "address": "",
            "administrativeDivision": "",
            "administrativeDivisionName": "",
            "assignedUserId": "930218",
            "assignedUserName": "张三",
            "beginTimestamp": 1705939200000,
            "ccPerson": "",
            "ccPersonGroup": "",
            "ccPersonGroupName": "",
            "ccPersonName": "",
            "collectionReviewId": "",
            "collectionReviewName": "",
            "description": "",
            "isAppraisal": 0,
            "isNA": 0,
            "issueId": null,
            "jobDuration": 12,
            "licenseSwitch": 0,
            "modeOrder": 1,
            "oldTaskName": "子任务1",
            "operationGuideList": [],
            "owner": "",
            "ownerGroup": "",
            "ownerGroupName": "",
            "ownerName": "",
            "priority": null,
            "procedureList": [
                {
                    "collectionReviewId": "",
                    "collectionReviewName": "",
                    "description": "",
                    "isAppraisal": 0,
                    "licenseSwitch": 0,
                    "licenseTag": 0,
                    "operationGuideList": [],
                    "procedureOrder": 1,
                    "taskName": "工序1",
                    "templateCode": null,
                    "templateName": null,
                    "version": null
                },
                {
                    "collectionReviewId": "",
                    "collectionReviewName": "",
                    "description": "",
                    "isAppraisal": 0,
                    "licenseSwitch": 0,
                    "licenseTag": 0,
                    "operationGuideList": [],
                    "procedureOrder": 2,
                    "taskName": "工序2",
                    "templateCode": null,
                    "templateName": null,
                    "version": null
                }
            ],
            "projectDuration": 1,
            "regionId": null,
            "regionName": null,
            "regionPath": null,
            "sceneModeCode": "267364",
            "signSiteCode": "",
            "signSiteName": "",
            "skill": null,
            "taskExtend": [
                {
                    "extendValue": "",
                    "stage": 1,
                    "udfName": "UDF22"
                },
                {
                    "extendValue": "",
                    "stage": 2,
                    "udfName": "UDF23"
                },
                {
                    "extendValue": "",
                    "stage": 1,
                    "udfName": "UDF24"
                },
                {
                    "extendValue": "",
                    "stage": 1,
                    "udfName": "UDF25"
                },
                {
                    "extendValue": "",
                    "stage": 1,
                    "udfName": "UDF26"
                },
                {
                    "extendValue": "",
                    "stage": 1,
                    "udfName": "UDF38"
                }
            ],
            "taskName": "子任务221",
            "templateCode": null,
            "templateName": null,
            "userGroup": "",
            "userGroupName": "",
            "version": null
        }
    ]
}
```
#### 响应示例
```
{
    "stateCode": "0",
    "errorMessage": "",
    "result": null
}
```
