
# 更新定时抽检计划
#### 场景描述
更新定时抽检计划
#### 接口方法
POST
#### 接口URI
https://域名/apiaccess/CCSQM/rest/ccisqm/v1/regularqualitytask/updateQualityTask，例如域名是service.besclouds.com
#### 请求说明
表1请求头参数 
| 序号 | 名称            | 参数类型   | 是否必选  | 说明                                                                                                                                         |
|:---|:---|:---|:---|:---|
| 1  | Content-Type  | string | False | 固定填 application/json;charset=UTF-8。                                                                                                        |
| 2  | x-app-key     | string | False | appKey标识                                                                                                                                   |
| 3  | Authorization | string | True  | 鉴权字段，内容格式为: Bearer +tokenByAKSK接口的返回值中AccessToken（Bearer后有空格）                                                                              |
| 4  | x-UserId      | string | True  | 操作员标识 可在登录后，进入员工管理页面，查看接口返回的userId |
   
表2请求体参数 
| 序号       | 名称               | 参数类型            | 是否必选  | 说明                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
|:---|:---|:---|:---|:---|
| 1.1      | appointQuality   | object          | True  | 指派质检员                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| 1.1.1    | setCounts        | array\[object\] | True  | 设置质检员                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| 1.1.1.1  | count            | number          | False | 数量。 - setCountsType!=2时，count必填。  - setCountsType==2时，setCounts中所有count总和为100。   |
| 1.1.1.2  | personID         | string          | True  | 质检员ID                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| 1.1.2    | setCountsType    | integer         | True  | 设置数量的类别：0-平均分配，2-百分比                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| 1.2      | cronStructure    | object          | True  | 设置周期                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| 1.2.1    | qiqtCycleType    | string          | True  | 重复方式： 1，每天，2.每周，3.每月                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| 1.2.2    | qiqtEndTime      | integer         | False | 结束时间：当qiqtEndType 为2 时有效，秒级，最大长度10位                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| 1.2.3    | qiqtEndType      | string          | True  | 结束条件： 1.次数 2.时间                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| 1.2.4    | qiqtStartTime    | integer         | True  | 开始时间，秒级，最大长度10位                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| 1.2.5    | qiqtTotalTimes   | string          | False | 总计次数，最大长度8位。 qiqtEndType==1时，qiqtTotalTimes必填。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| 1.3      | currentRole      | string          | False | 用户角色                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| 1.4      | extractionRange  | object          | True  | 设定抽检范围                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| 1.4.1    | currentRole      | string          | False | 用户角色                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| 1.4.2    | fixedColumns     | object          | True  | 抽检范围条件设定                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| 1.4.2.1  | qualityNum       | string          | True  | 抽检数量，最大数量10000                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| 1.4.2.2  | qualityType      | integer         | True  | 抽检类型：1.通话范围 2.座席抽检数量类型 3.座席抽检百分比类型                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| 1.4.2.3  | durationStart    | integer         | False | 通话最短时间，毫秒级，最大长度11位                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| 1.4.2.4  | qualityCondition | integer         | True  | 抽检状态：0.不限制 1.未抽检 2.已抽检                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| 1.4.2.5  | durationEnd      | string          | False | 通话最长时间，毫秒级，最大长度11位                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| 1.4.2.6  | maxNum           | string          | False | 最大抽检量，最大数量10000 qualityType!=2时，maxNum参数必填且参数值大于等于1。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| 1.4.2.7  | scoreEnd         | string          | False | 最高分数，最大分数10000                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| 1.4.2.8  | scoreStart       | string          | False | 最低分数，最大分数10000                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| 1.4.2.9  | staffIds         | array\[string\] | False | 座席人员                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| 1.4.2.10 | interactionType  | integer         | True  | 交互类型 - 0：录音  - 2：文本                                                           |
| 1.4.3    | userId           | string          | False | 用户ID                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| 1.5      | qiqtName         | string          | True  | 抽检任务名称，最大长度64位                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| 1.6      | userId           | string          | False | 用户ID                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| 1.7      | qiqtId           | string          | True  | 定时抽检计划ID，最大长度20位。 同regularQualityTaskId、qiqId                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
   
#### 响应说明
- **响应状态码: 200**
表3响应体参数 
| 序号  | 名称         | 参数类型                                                                                                                  | 是否必选  | 说明                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
|:---|:---|:---|:---|:---|
| 1.1 | resultCode | string  | False | 返回码 - 0408000 表示成功  - 其他表示失败   |
| 1.2 | resultDesc | string                                                                                                                | False | 返回描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| 1.3 | objId      | string                                                                                                                | False | 定时抽检计划ID，最大长度20位。 同regularQualityTaskId、qiqId                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
   
- **响应状态码: 400**
  错误的请求：请检查请求路径及参数。
  
- **响应状态码: 401**
  未授权：1. 请确认是否购买了相关服务。 2. 请联系客服人员检查您账号的当前状态。
  
- **响应状态码: 404**
  请求的内容未找到：请检查请求的路径。
  
- **响应状态码: 500**
  业务失败：请依次确认您请求中各参数的取值。
  
 
#### 错误码
无。
#### 报文样例
- 场景描述：更新定时抽检计划 请求头:
  ```
  Content-Type:application/json  
  x-app-key:xxxx-xxxx-xxxx-xxxx-xxxx  
  x-UserId:xxxx  
  Authorization:Bearer ********************************
  ```
  请求参数:
  ```
  {
      "extractionRange": {
          "customColumns": null,
          "fixedColumns": {
              "durationEnd": "100",
              "durationStart": 1,
              "interactionType": 0,
              "maxNum": "10",
              "qualityCondition": 2,
              "qualityNum": "100",
              "qualityType": 1,
              "staffIds": [],
              "scoreStart": "0",
              "scoreEnd": "100"
          },
          "currentRole": "qualityDirector"
      },
      "appointQuality": {
          "setCounts": [
              {
                  "personID": "1679888547924121791",
                  "count": 0
              }
          ],
          "setCountsType": 0
      },
      "cronStructure": {
          "qiqtCycleType": "1",
          "qiqtStartTime": 1692171720,
          "qiqtEndType": "2",
          "qiqtTotalTimes": 1,
          "qiqtEndTime": 1692258120
      },
      "qiqtName": "changetest082103",
      "currentRole": "qualityDirector",
      "qiqtId": "16925871657096773608"
  }
  ```
  响应头:
  ```
  Content-Type: application/json;charset=UTF-8
  ```
  响应参数:
  ```
  {
  "resultCode": "0408000",
          "objId": "16625163654676154791",
  "resultDesc": "操作成功"
  }
  ```
  
 
