# 查询预约列表


**应用场景**

1.通过本接口可查询到预约单的预约列表数据

```
POST https://qw-openapi-tx.dustess.com/appointment/order/v1/page-list?accessToken=

Content-Type: application/json
```

**请求参数**

| 参数名       | 类型       | 说明                                                                             | 是否必须 |
| ------------ | ---------- | -------------------------------------------------------------------------------- | -------- |
| page         | `Int`      | 查询页码                                                                         | `true`   |
| page_size    | `Int`      | 查询条数，最大为500                                                              | `true`   |
| start_time   | `String`   | 到店时间，查询起始时间，yyyy-MM-dd,示例："2023-10-01"                            | `false`  |
| end_time     | `String`   | 到店时间，查询结束时间，yyyy-MM-dd,示例："2023-10-30"                            | `false`  |
| creators     | `String[]` | 预约单创建人，员工uid，不传则为全量查询                                          | `false`  |
| order_status | `Int`      | 预约单状态:10 待确认；20 待到店；30 取消；40 已失约；50 已完成。不传则为全量查询 | `false`  |

**请求示例**
`json` - Request-Example:


```json
{
    "pageIndex": 1,
    "pageSize": 10,
    "startTime": "2023-12-18",
    "endTime": "2023-12-24",
    "orderStatus": 50,
}
```

**响应参数**

| 参数名                                       | 类型       | 说明                                                                                                                                                                |
| -------------------------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| success                                      | `Bool`     | 请求成功失败标识                                                                                                                                                    |
| code                                         | `Int`      | 响应码                                                                                                                                                              |
| msg                                          | `String`   | 响应信息                                                                                                                                                            |
| data                                         | `Object`   | 数据信息                                                                                                                                                            |
| data.total                                   | `Int`      | 总条数                                                                                                                                                              |
| data.page                                    | `Int`      | 查询页码                                                                                                                                                            |
| data.pageSize                                | `Int`      | 查询条数                                                                                                                                                            |
| data.list                                    | `Object[]` | 预约单数据                                                                                                                                                          |
| data.list.order_id                           | `String`   | 预约单id                                                                                                                                                            |
| data.list.order_num                          | `String`   | 预约单编号                                                                                                                                                          |
| data.list.order_status                       | `Int`      | 预约单状态码:10 待确认；20 待到店；30 取消；40 已失约；50 已完成                                                                                                    |
| data.list.order_status_value                 | `String`   | 预约单状态名称:10 待确认；20 待到店；30 取消；40 已失约；50 已完成                                                                                                  |
| data.list.order_create_time                  | `String`   | 预约单创建时间                                                                                                                                                      |
| data.list.order_create_user_id               | `String`   | 预约单创建人id，指员工uid                                                                                                                                           |
| data.list.order_create_user_name             | `String`   | 预约单创建人姓名，指员工姓名                                                                                                                                        |
| data.list.network_id                         | `String`   | 网点id                                                                                                                                                              |
| data.list.network_name                       | `String`   | 网点名称                                                                                                                                                            |
| data.list.arrival_time                       | `String`   | 到店时间                                                                                                                                                            |
| data.list.person_id                          | `String`   | 人员id                                                                                                                                                              |
| data.list.person_name                        | `String`   | 人员姓名                                                                                                                                                            |
| data.list.project_id                         | `String`   | 项目id                                                                                                                                                              |
| data.list.project_name                       | `String`   | 项目名称                                                                                                                                                            |
| data.list.service_duration                   | `Int`      | 服务时长，单位：分钟                                                                                                                                                |
| data.list.appointment_user_name              | `String`   | 到店顾客名称                                                                                                                                                        |
| data.list.appointment_user_phone             | `String`   | 到店顾客手机号                                                                                                                                                      |
| data.list.customer_id                        | `String`   | 联系人id                                                                                                                                                            |
| data.list.customer_name                      | `String`   | 联系人名称                                                                                                                                                          |
| data.list.sign_in_status                     | `Int`      | 到店状态码: 10 正常到店 ；20 异常到店                                                                                                                               |
| data.list.sign_in_status_value               | `Int`      | 到店状态名称: 10 正常到店 ；20 异常到店                                                                                                                             |
| data.list.sign_in_distance                   | `Int`      | 到店距门店距离                                                                                                                                                      |
| data.list.sign_in_location                   | `String`   | 到店定位地址                                                                                                                                                        |
| data.list.customer_wx_avatar                 | `String`   | 签到客户微信头像                                                                                                                                                    |
| data.list.customer_wx_nickname               | `String`   | 签到客户微信昵称                                                                                                                                                    |
| data.list.service_person_has_removed         | `Bool`     | true:预约单服务人员已被删除                                                                                                                                         |
| data.list.customer_field_list                | `Object[]` | 预约单自定义字段信息                                                                                                                                                |
| data.list.customer_field_list.field_id       | `String`   | 自定义字段id                                                                                                                                                        |
| data.list.customer_field_list.complete_value | `String`   | 字段枚举结构，如果是多级联选，将会返回完整的选项id和name                                                                                                            |
| data.list.customer_field_list.field_type     | `String`   | 自定义字段类型。字段类型(与自定义字段配置相同)，date日期 datetime日期时间 single单行文本 multi多行文本 number数字 radio单选 checkbox多选 cascade多级下拉框 file附件 |
| data.list.customer_field_list.field_value    | `String`   | 自定义字段值，根据字段类型不同，值内容会不同。                                                                                                                      |
| data.list.customer_field_list.field_name     | `String`   | 自定义字段名称                                                                                                                                                      |
| data.list.remark                             | `String`   | 备注                                                                                                                                                                |
| data.list.service_end_time                   | `String`   | 服务结束时间:仅当预约单选择了服务时长时才会计算结束时间，否则该字段为空                                                                                             |
| trace_id                                     | `String`   | 上下文链路id                                                                                                                                                        |

**成功响应示例**

`json` - Response-Example:

```json
{
    "code": 0,
    "data": {
        "empty": false,
        "list": [
            {
                "appointment_user_name": "a",
                "appointment_user_phone": "1300010232",
                "arrival_time": "2023-12-19 15:00",
                "customer_field_list": [
                    {
                        "complete_value": "{\"id\": \"459059364006051840\", \"aryVal\": [], \"numVal\": 0, \"strVal\": \"2023-12-19 02:00:00\", \"valType\": \"dateTime\", \"cascadingValue\": null}",
                        "field_id": 459059364006051840,
                        "field_name": "自定义日期时间",
                        "field_type": "dateTime",
                        "field_value": "\"2023-12-19 02:00:00\""
                    },
                    {
                        "complete_value": "{\"id\": \"459060304764129280\", \"aryVal\": [], \"numVal\": 0, \"strVal\": \"\", \"valType\": \"cascade\", \"cascadingValue\": {\"key\": \"31b6e3c1-be5f-4627-8811-8650c6bd8642/3b7c1747-2852-4ec9-9b7e-b5604811c019\", \"value\": \"选项B/B1\"}}",
                        "field_id": 459060304764129280,
                        "field_name": "自定义多选下拉框",
                        "field_type": "cascade",
                        "field_value": "[\"31b6e3c1-be5f-4627-8811-8650c6bd8642\",\"3b7c1747-2852-4ec9-9b7e-b5604811c019\"]"
                    },
                    {
                        "complete_value": "{\"id\": \"459059922862170112\", \"aryVal\": [\"[{\\\"name\\\":\\\"3711676395412_.pic.jpg\\\",\\\"thumbUrl\\\":\\\"https://cdn-member-test.dustess.com/W00000000516/static/i/e/h/8/ieh8f9s8k991702968652130.jpg\\\",\\\"status\\\":\\\"done\\\"}]\"], \"numVal\": 0, \"strVal\": \"\", \"valType\": \"file\", \"cascadingValue\": null}",
                        "field_id": 459059922862170112,
                        "field_name": "自定义附件",
                        "field_type": "file",
                        "field_value": "[{\"name\":\"3711676395412_.pic.jpg\",\"thumbUrl\":\"https://cdn-member-test.dustess.com/W00000000516/static/i/e/h/8/ieh8f9s8k991702968652130.jpg\",\"status\":\"done\"}]"
                    },
                    {
                        "complete_value": "{\"id\": \"510449227470262272\", \"aryVal\": [], \"numVal\": 1, \"strVal\": \"\", \"valType\": \"number\", \"cascadingValue\": null}",
                        "field_id": 510449227470262272,
                        "field_name": "1",
                        "field_type": "number",
                        "field_value": "1"
                    },
                    {
                        "complete_value": "{\"id\": \"459059290187141120\", \"aryVal\": [], \"numVal\": 0, \"strVal\": \"2023-12-01\", \"valType\": \"date\", \"cascadingValue\": null}",
                        "field_id": 459059290187141120,
                        "field_name": "自定义日期",
                        "field_type": "date",
                        "field_value": "\"2023-12-01\""
                    },
                    {
                        "complete_value": "{\"id\": \"505407370701762560\", \"aryVal\": [], \"numVal\": 0, \"strVal\": \"1\", \"valType\": \"single\", \"cascadingValue\": null}",
                        "field_id": 505407370701762560,
                        "field_name": "测试111",
                        "field_type": "single",
                        "field_value": "\"1\""
                    },
                    {
                        "complete_value": "{\"id\": \"509421603771396096\", \"aryVal\": [], \"numVal\": 0, \"strVal\": \"1\", \"valType\": \"radio\", \"cascadingValue\": null}",
                        "field_id": 509421603771396096,
                        "field_name": "是否",
                        "field_type": "radio",
                        "field_value": "\"1\""
                    }
                ],
                "customer_id": "",
                "customer_name": null,
                "customer_wx_avatar": null,
                "customer_wx_nickname": null,
                "network_id": "ece05cd4-80bf-4360-abf2-bb5e68248c6c",
                "network_name": "维修点",
                "order_create_time": "2023-12-19 14:50:59",
                "order_create_user_id": "375",
                "order_create_user_name": "ces",
                "order_id": 524961851198681088,
                "order_num": "Y524961851201306625",
                "order_status": 10,
                "order_status_value": "待确认",
                "person_head_image": null,
                "person_id": 0,
                "person_name": "到店分配",
                "project_id": 524955570422575104,
                "project_name": "维修服务",
                "remark": "123123",
                "service_duration": 30,
                "service_end_time": "2023-12-19 15:30",
                "service_person_has_removed": null,
                "sign_in_distance": 0,
                "sign_in_location": "",
                "sign_in_status": 0,
                "sign_in_status_value": null,
                "union_id": ""
            },
            {
                "appointment_user_name": "ces",
                "appointment_user_phone": "13000010002",
                "arrival_time": "2023-12-19 15:00",
                "customer_field_list": [
                    {
                        "complete_value": "{\"id\": \"509421603771396096\", \"aryVal\": [], \"numVal\": 0, \"strVal\": \"1\", \"valType\": \"radio\", \"cascadingValue\": null}",
                        "field_id": 509421603771396096,
                        "field_name": "是否",
                        "field_type": "radio",
                        "field_value": "\"1\""
                    },
                    {
                        "complete_value": "{\"id\": \"459059364006051840\", \"aryVal\": [], \"numVal\": 0, \"strVal\": \"2023-12-20 14:49:58\", \"valType\": \"dateTime\", \"cascadingValue\": null}",
                        "field_id": 459059364006051840,
                        "field_name": "自定义日期时间",
                        "field_type": "dateTime",
                        "field_value": "\"2023-12-20 14:49:58\""
                    },
                    {
                        "complete_value": "{\"id\": \"505407370701762560\", \"aryVal\": [], \"numVal\": 0, \"strVal\": \"1\", \"valType\": \"single\", \"cascadingValue\": null}",
                        "field_id": 505407370701762560,
                        "field_name": "测试111",
                        "field_type": "single",
                        "field_value": "\"1\""
                    },
                    {
                        "complete_value": "{\"id\": \"510449227470262272\", \"aryVal\": [], \"numVal\": 1, \"strVal\": \"\", \"valType\": \"number\", \"cascadingValue\": null}",
                        "field_id": 510449227470262272,
                        "field_name": "1",
                        "field_type": "number",
                        "field_value": "1"
                    },
                    {
                        "complete_value": "{\"id\": \"459059290187141120\", \"aryVal\": [], \"numVal\": 0, \"strVal\": \"2023-12-19\", \"valType\": \"date\", \"cascadingValue\": null}",
                        "field_id": 459059290187141120,
                        "field_name": "自定义日期",
                        "field_type": "date",
                        "field_value": "\"2023-12-19\""
                    },
                    {
                        "complete_value": "{\"id\": \"459060304764129280\", \"aryVal\": [], \"numVal\": 0, \"strVal\": \"\", \"valType\": \"cascade\", \"cascadingValue\": {\"key\": \"5e9c70ce-51dc-4f7e-9af1-34aecb292e89/7edc0ddf-6194-4b70-9427-f350fd5781e3\", \"value\": \"选项A/A2\"}}",
                        "field_id": 459060304764129280,
                        "field_name": "自定义多选下拉框",
                        "field_type": "cascade",
                        "field_value": "[\"5e9c70ce-51dc-4f7e-9af1-34aecb292e89\",\"7edc0ddf-6194-4b70-9427-f350fd5781e3\"]"
                    },
                    {
                        "complete_value": "{\"id\": \"459059922862170112\", \"aryVal\": [\"[{\\\"name\\\":\\\"333.png\\\",\\\"thumbUrl\\\":\\\"https://cdn-member-test.dustess.com/W00000000516/static/l/h/t/m/lhtmahgv8u1702968612898.png\\\",\\\"status\\\":\\\"done\\\"}]\"], \"numVal\": 0, \"strVal\": \"\", \"valType\": \"file\", \"cascadingValue\": null}",
                        "field_id": 459059922862170112,
                        "field_name": "自定义附件",
                        "field_type": "file",
                        "field_value": "[{\"name\":\"333.png\",\"thumbUrl\":\"https://cdn-member-test.dustess.com/W00000000516/static/l/h/t/m/lhtmahgv8u1702968612898.png\",\"status\":\"done\"}]"
                    }
                ],
                "customer_id": "dd8a5e50-9e37-11ee-aa9a-028e98b07927",
                "customer_name": null,
                "customer_wx_avatar": null,
                "customer_wx_nickname": null,
                "network_id": "ece05cd4-80bf-4360-abf2-bb5e68248c6c",
                "network_name": "维修点",
                "order_create_time": "2023-12-19 14:50:23",
                "order_create_user_id": "375",
                "order_create_user_name": "ces",
                "order_id": 524961703222300672,
                "order_num": "Y524961703221813249",
                "order_status": 10,
                "order_status_value": "待确认",
                "person_head_image": null,
                "person_id": 0,
                "person_name": "到店分配",
                "project_id": 524955570422575104,
                "project_name": "维修服务",
                "remark": "备注内容",
                "service_duration": 30,
                "service_end_time": "2023-12-19 15:30",
                "service_person_has_removed": null,
                "sign_in_distance": 0,
                "sign_in_location": "",
                "sign_in_status": 0,
                "sign_in_status_value": null,
                "union_id": ""
            }
        ],
        "page": 1,
        "pageSize": 10,
        "total": 5
    },
    "msg": "OK",
    "success": true,
    "traceId": "d4b54ff2-7192-9cf4-904b-c7b5b2951004"
}
```

**失败响应示例**

`json` - Response-Example:

```json
{
    "code": 444,
    "data": null,
    "msg": "参数格式错误",
    "success": true,
    "traceId": "7fc29715-b368-9875-ae9d-b940e10a0249"
}
```

