
# 创建检查单模板头信息（API名称：createQcTemplate）
#### 功能介绍
用于创建检查单模板信息，用于快速创建检查单。
#### 相关接口
| **接口名称**                                                             | **调用说明**                                                     |
|:---|:---|
| [获取Token](https://support.huaweicloud.com/api-isdp/api_01_0019.html) | 调用该接口获取到Token，再调用其他接口时，需要在请求消息头中添加"Authorization"，其值即为Token。 |
   
#### URL
| **请求方式** | **HTTPS地址**                                                | **服务架构** | **消息体类型**        |
|:---|:---|:---|:---|
| POST     | https://***isdp+域名***/openapi/v1/openTask/createQcTemplate | 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的值 |
   
#### 请求参数
| **参数**                 | **类型**  | **是否必填** | **描述**                                                                               |
|:---|:---|:---|:---|
| dataSource             | String  | 是        | 创建来源标识                                                                               |
| submitterAccount       | String  | 是        | 提交人账号                                                                                |
| templateCode           | String  | 是        | 模板编码                                                                                 |
| type                   | Integer | 是        | 模板类型 (1-采集模板 2-检查模板)      |
| templateChildType      | Integer | 是        | 模板子类型 (1-质检2-巡检 3-作业)     |
| templateName           | String  | 是        | 模板名称                                                                                 |
| serviceType            | String  | 是        | 业务类型                                                                                 |
| locationType           | String  | 否        | 位置类型                                                                                 |
| adminOrganizationCode  | String  | 是        | 组织单元ID                                                                               |
| adminOrganizationName  | String  | 是        | 组织单元名称                                                                               |
| isManualReviewAutoPass | Integer | 否        | AI评审通过则条目的人工评审自动通过（0：否；1：是）                                                          |
| isVideoAcceptance      | Integer | 否        | 是否视频审核(1:是；0:否)                                                                      |
| isDesignItem           | Integer | 否        | 是否按设计生成检查项(0-否 1-是)                                                                  |
| isDefaultTemplate      | Integer | 否        | 是否为默认模板(0-否 1-是)                                                                     |
| validRequired          | Integer | 否        | 必填项全采后才能提交任务评审 (1-是 2-否) |
| isCommandTemplate      | Integer | 否        | 是否指令式采集模板 (1: 是; 0: 否)   |
| remarks                | String  | 否        | 备注                                                                                   |
| version                | String  | 否        | 版本号                                                                                  |
   
#### 响应参数
| **参数**       | **类型** | **描述**          |
|:---|:---|:---|
| stateCode    | String | 响应编码：0-成功；其他-失败 |
| errorMessage | String | 错误信息            |
| result       | Object | 响应数据            |
   
#### 请求示例
```
{
"submitterAccount": "13875817654",
  "dataSource": "appcube",
  "type": 1,
  "templateChildType": 3,
  "templateCode": "QC2022XXXXXXXXXXXXX",
  "templateName": "模板名称010",
  "serviceType": "作业",
  "locationType": "",
  "adminOrganizationCode": "1543",
  "adminOrganizationName": "1508098844233300",
  "version": "1.0",
  "isCommandTemplate": 0,
  "isDefaultTemplate": 0,
  "isManualReviewAutoPass": 1,
  "isVideoAcceptance": 0,
  "isDesignItem": 0,
  "validRequired": 0
}
```
#### 响应示例
```
{
    "stateCode": "0",
    "errorMessage": null,
    "result": {
        "submitterAccount": "13875817654",
        "dataSource": "appcube",
        "type": 1,
        "templateChildType": 3,
        "templateCode": "QC2022XXXXXXXXXXXXX",
        "templateName": "模板名称010",
        "serviceType": "作业",
        "locationType": "",
        "adminOrganizationCode": "1543",
        "adminOrganizationName": "1508098844233300",
        "version": "1.0",
        "isDefaultTemplate": 0,
        "isManualReviewAutoPass": 1,
        "isVideoAcceptance": 0,
        "isDesignItem": 0,
        "validRequired": 0,
        "status": 2,
        "isNewVersion": "Y",
        "deleteFlag": "0",
        "lastUpdateName": "测试",
        "lastUpdateTimestamp": 1657609058116,
        "deliveryScene": null,
        "productType": null,
        "productForm": null,
        "templateId": 268611773,
        "lastUpdatedBy": 17867,
        "lastUpdateDate": 1657609058357,
        "affectedRows": 1,
        "originalTemplateId": 268611773,
        "entityName": "qcTemplate"
    }
}
```
#### 状态码
状态码请参见[状态码](https://support.huaweicloud.com/api-isdp/api_01_0326.html)。
#### 错误码
错误码请参见[错误码](https://support.huaweicloud.com/api-isdp/api_01_0327.html)。
