PMS订单
订单列表
- 接口地址
POST /api/v1/pmsOrder/list- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| pms_id | int | Y | 2 | PMS门店ID |
| order_status | int | N | 110 | 订单状态(110:已预定 120:已取消 130:待确认 140:已关闭 170:进行中 180:已完成) |
| search_type | int | N | 1 | 搜索类型(1:订单号 2:姓名 3:手机号 4:备注) |
| search_str | string | N | "关键词" | 搜索关键词 |
| date_search_type | int | N | 1 | 日期搜索类型(1:创建日期 2:服务日期) |
| start_date | int | Y/N | 1709510400 | 开始日期(时间戳) date_search_type非0后必填写 |
| end_date | int | Y/N | 1709596800 | 结束日期(时间戳) date_search_type非0后必填写 |
| cashier_status | int | N | 100 | 收银状态(100:未付齐 110:已付清 120:多付) |
| creator_ids | array | N | [1, 2] | 创建人ID数组 |
| page | int | N | 1 | 页码,默认1 |
| page_size | int | N | 15 | 每页数量,默认15 |
- 注意事项
- 当指定
date_search_type时,start_date和end_date为必填 end_date必须大于或等于start_date- 日期格式必须为
Y-m-d - 当
search_str不为空时,search_type为必填
- 返回结果
| 名称 | 类型 | 描述 |
|---|---|---|
| list | array | 订单列表 |
| list.*.order_id | int | 订单ID |
| list.*.pms_id | int | 酒店ID |
| list.*.order_no | string | 订单号 |
| list.*.name | string | 客人姓名 |
| list.*.phone | string | 联系电话 |
| list.*.total_amount | decimal | 订单总金额 |
| list.*.total_payed_amount | decimal | 已支付金额 |
| list.*.remark | string | 备注信息 |
| list.*.images | array | 图片URL数组 |
| list.*.color | string | 订单颜色标记 |
| list.*.order_status | int | 订单状态 |
| list.*.creator_id | int | 创建人ID |
| list.*.creator_name | string | 创建人姓名 |
| list.*.service_date | int | 服务日期 |
| list.*.created_at | datetime | 创建时间 |
| list.*.updated_at | datetime | 更新时间 |
| total | int | 总记录数 |
| page_no | int | 当前页码 |
| page_size | int | 每页数量 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {
"list": [
{
"order_id": 32,
"pms_id": 2,
"order_no": "202503111505427305",
"name": "老大",
"phone": "",
"total_amount": "3700.00",
"total_payed_amount": "100.00",
"remark": "",
"images": [],
"color": "#000000",
"creator_id": "1",
"creator_name": "xie",
"order_status": 120,
"service_date": 1741659037,
"created_at": "2025-03-11T07:05:42.000000Z",
"updated_at": "2025-03-11T08:49:28.000000Z"
},
{
"order_id": 31,
"pms_id": 2,
"order_no": "202503111010375651",
"name": "老大",
"phone": "",
"total_amount": "700.00",
"total_payed_amount": "600.00",
"remark": "",
"images": [],
"color": "#000000",
"creator_id": "1",
"creator_name": "xie",
"order_status": 180,
"service_date": 1741659037,
"created_at": "2025-03-11T02:10:37.000000Z",
"updated_at": "2025-03-11T06:11:22.000000Z"
}
],
"total": 2,
"page_no": 1,
"page_size": 15
}
}住宿订单列表
- 接口地址
POST /api/v1/pmsOrder/getAccomOrderList- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| pms_id | int | Y | 2 | PMS门店ID |
| date_search_type | int | N | 1 | 日期类型(1:入住时间 2:离店时间 3:创建时间 4:在住时间) |
| start_date | int | Y/N | 1709510400 | 开始日期(时间戳) date_type非0后必填写 |
| end_date | int | Y/N | 1709596800 | 结束日期(时间戳) date_type非0后必填写 |
| search_type | int | N | 1 | 搜索类型(1:订单号 2:姓名 3:手机号 4:备注 5:房间号) |
| search_str | string | N | "关键词" | 搜索关键词 |
| room_ids | array | N | [19, 20] | 房间ID数组 |
| accom_types | array | N | [10, 20] | 入住类型数组 |
| accom_status | array | N | [40, 70] | 入住状态数组 看常量 |
| checkout_status | int | N | 10 | 结账状态 未结账=10/已结账=20 |
| creator_ids | array | N | [1, 2] | 创建人ID数组 |
- accomStatus常量
| 常量名 | 值 |
|---|---|
| 已预定 | 40 |
| 已取消 | 50 |
| 已入住 | 70 |
| 已退房 | 80 |
| 待付款 | 90 |
| 已拒绝 | 100 |
| 已关闭 | 110 |
- 注意事项
- 当指定
date_search_type时,start_date和end_date为必填 end_date必须大于或等于start_date- 日期格式必须为
Y-m-d - 当
search_str不为空时,search_type为必填
- 返回结果
| 名称 | 类型 | 描述 |
|---|---|---|
| list | array | 订单列表 |
| list.*.order_id | int | 订单ID |
| list.*.name | string | 客人姓名 |
| list.*.phone | string | 联系电话 |
| list.*.accoms | array | 住宿信息 |
| list..accoms..accom_id | int | 住宿ID |
| list..accoms..room_id | int | 房间ID |
| list..accoms..room_type_name | string | 房型名称 |
| list..accoms..room_name | string | 房间号名称 |
| list..accoms..checkin_start_time | int | 入住时间 |
| list..accoms..checkin_end_time | int | 离店时间 |
| list..accoms..total_amount | string | 住宿金额+消费金额 |
| list..accoms..amount | string | 住宿金额 |
| list..accoms..accom_status | int | 住宿状态 常量accomStatus常量 |
| list..accoms..checkout_status | int | 结账状态 未结账=10/已结账=20 |
| list..accoms..creator_name | string | 创建人姓名 |
| list..accoms..created_date | int | 创建时间 |
| total | int | 总记录数 |
| page_no | int | 当前页码 |
| page_size | int | 每页数量 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {
"list": [
{
"order_id": 32,
"name": "老大",
"phone": "",
"accoms": [
{
"accom_id": 26,
"room_id": 19,
"room_type_name": "日式简约双人大床房",
"room_name": "101",
"checkin_start_time": 1754873812,
"checkin_end_time": 1757552212,
"total_amount": "3600.00",
"amount": "100.00",
"accom_status": 50,
"checkout_status": 10,
"creator_name": "xie",
"created_date": 1741676742
}
]
}
],
"total": 1,
"page_no": 1,
"page_size": 15
}
}