PMS门店
1. 创建PMS
- 接口地址
POST /api/v1/pms/create- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| specification | int | Y | 10 | 规格 10基础版 20专业版 |
| name | string | Y | "pms-store名称" | pms-store名称 |
| type | int | Y | 1 | 常量:pms-store类型 |
| city | array | N | [110000] | 城市 |
| address | string | N | "详细地址" | 详细地址 |
| contact_name | string | N | "联系人" | 联系人 |
| invite_user_code | string | N | "邀请码" | 邀请码 |
- 返回示例
json
{
"error_code": 0,
"error_msg": "",
"description": "",
"data": {}
}2. 获取门店列表
- 接口地址
POST /api/v1/pms/list- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| page_no | int | N | 1 | 页码 |
| page_size | int | N | 10 | 每页数量 |
| search_str | string | N | "关键字" | 搜索关键字 |
- 返回结果
| 名称 | 类型 | 描述 |
|---|---|---|
| pms_id | int | pms-store id |
| name | string | pms-store名称 |
| specification | int | 规格 10基础版 20专业版 |
| authorization_end_date | int | 授权结束时间 |
| created_at | string | 创建时间 |
| is_enable | int | 是否启用 1启用 2禁用 |
- 返回示例
json
{
"error_code": 0,
"error_msg": "",
"description": "",
"data": {
"total": 1,
"list": [
{
"pms_id": 1,
"name": "pms-store名称",
"specification": 10,
"authorization_end_date": 1716460800,
"created_at": "2025-02-20 14:00:58",
"is_enable": 1
}
]
}
}3. 获取门店选择列表
- 接口地址
POST /api/v1/pms/select- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| search_str | string | N | "关键字" | 搜索关键字 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": [
{
"pms_id": 7,
"name": "PMS-1",
"specification": 10,
"authorization_end_date": 4102545599,
"created_at": "2025-02-20 14:00:58"
},
{
"pms_id": 2,
"name": "PMS-2",
"specification": 10,
"authorization_end_date": 4102545599,
"created_at": "2025-02-13 16:30:00"
}
]
}4. 获取酒店房间层级关系列表
- 接口地址
POST /api/v1/pms/hierarchy- 请求参数
无
- 返回结果
| 名称 | 类型 | 描述 |
|---|---|---|
| pms_id | int | pms-store id |
| name | string | pms-store名称 |
| areas | array | 分区列表 |
| key_info | object | 锁信息 |
| key_info.card_key_read | array | 读卡秘钥 |
| key_info.card_pms_key | array | 酒店秘钥 |
| key_info.pms_key | array | pms钥匙信息 |
| lock_info | object | 门锁信息 |
| lock_info.device_id | int | 设备id |
| lock_info.lock_id | int | 门锁id |
| lock_info.device_no | string | 设备号 |
| areas.*.area_id | int | 分区id |
| areas.*.area_name | string | 分区名称 |
| areas.*.lock_info | object | 门锁信息 |
| areas.*.lock_info.device_id | int | 设备id |
| areas.*.lock_info.lock_id | int | 门锁id |
| areas.*.lock_info.device_no | string | 设备号 |
| areas.*.buildings | array | 楼栋列表 |
| areas..buildings..building_id | int | 楼栋id |
| areas..buildings..building_name | string | 楼栋名称 |
| areas..buildings..lock_info | object | 门锁信息 |
| areas..buildings..lock_info.device_id | int | 设备id |
| areas..buildings..lock_info.lock_id | int | 门锁id |
| areas..buildings..lock_info.device_no | string | 设备号 |
| areas..buildings..floors | array | 楼层列表 |
| areas..buildings..floors.*.floor_id | int | 楼层id |
| areas..buildings..floors.*.floor_no | string | 楼层号 |
| areas..buildings..floors.*.lock_info | object | 锁信息 |
| areas..buildings..floors.*.lock_info.device_id | int | 设备id |
| areas..buildings..floors.*.lock_info.lock_id | int | 门锁id |
| areas..buildings..floors.*.lock_info.device_no | string | 设备号 |
| areas..buildings..floors.*.room_locations | array | 房间列表 |
| areas..buildings..floors..room_locations..location_id | int | 房间位置id |
| areas..buildings..floors..room_locations..room_id | int | 房间id |
| areas..buildings..floors..room_locations..child_room_no | string | 子房间号 |
| areas..buildings..floors..room_locations..room_name | string | 房间名称 |
| areas..buildings..floors..room_locations..lock_info | object | 锁信息 |
| areas..buildings..floors..room_locations..lock_info.device_id | int | 设备id |
| areas..buildings..floors..room_locations..lock_info.lock_id | int | 门锁id |
| areas..buildings..floors..room_locations..lock_info.device_no | string | 设备号 |
| areas..buildings..floors..room_locations..sub_room_locations | array | 子房间列表 |
| areas..buildings..floors..room_locations..sub_room_locations.*.sub_room_id | int | 子房间id |
| areas..buildings..floors..room_locations..sub_room_locations.*.sub_room_no | string | 子房间号 |
| areas..buildings..floors..room_locations..sub_room_locations.*.lock_info | object | 锁信息 |
| areas..buildings..floors..room_locations..sub_room_locations.*.lock_info.device_id | int | 设备id |
| areas..buildings..floors..room_locations..sub_room_locations.*.lock_info.lock_id | int | 门锁id |
| areas..buildings..floors..room_locations..sub_room_locations.*.lock_info.device_no | string | 设备号 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": [
{
"pms_id": 2,
"name": "PMS-2",
"lock_info": {},
"key_info": {
"card_key_read": [107, 76, 106, 99, 49, 103],
"pms_key": [182, 68, 231, 85, 243, 76, 235, 142, 245, 51, 88, 52, 154, 95, 96, 57]
},
"areas": [
{
"area_id": 1,
"area_name": "宝安区",
"lock_info": {},
"buildings": []
},
{
"area_id": 2,
"area_name": "默认分区",
"lock_info": {},
"buildings": [
{
"building_id": 6,
"building_name": "A栋",
"lock_info": {},
"floors": [
{
"floor_id": 91,
"floor_no": "001",
"lock_info": {},
"room_locations": [
{
"location_id": 3,
"room_id": 20,
"room_name": "102",
"lock_info": {},
"sub_room_locations": [
{
"sub_room_id": 1,
"sub_room_no": "A",
"lock_info": {}
},
{
"sub_room_id": 2,
"sub_room_no": "B",
"lock_info": {}
}
]
}
]
}
]
}
]
}
]
}
]
}5. 获取PMS首页信息
- 接口地址
POST /api/v1/pms/homeInfo- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| pms_id | int | Y | 2 | pms-store id |
- 返回结果
| 名称 | 类型 | 描述 |
|---|---|---|
| pms_id | int | PMS-store id |
| pms_name | string | PMS名称 |
| today_book_count | int | 今日预定数 |
| today_checkout_count | int | 今日预离数 |
| today_new_order_count | int | 今日新增订单数 |
| unarranged_count | int | 未排房数 |
| wait_handle_count | int | 待处理数 |
| abnormal_count | int | 异常数 |
| total_room_count | int | 总房间数 |
| today_occupied_count | int | 今日入住房间数 |
| today_occupancy_rate | float | 今日入住率 |
| yesterday_occupancy_rate | float | 昨日入住率 |
| occupancy_rate_change | float | 日环比变化 |
| next_7_days_occupancy_rate | float | 未来7天入住率 |
| next_7_days_occupancy_rates | array | 未来7天入住率列表 |
| next_7_days_occupancy_rates.*.date | string | 日期 |
| next_7_days_occupancy_rates.*.occupancy_rate | float | 入住率 |
| next_7_days_occupancy_rates.*.occupied_count | int | 入住房间数 |
| next_7_days_occupancy_rates.*.total_rooms | int | 总房间数 |
| past_7_days_occupancy_rate | float | 过去7天入住率 |
| weekly_occupancy_rate_change | float | 周环比变化 |
| today_order_accom | string | 当日营业额 |
| today_income | string | 当日记一笔收入 |
| today_expense | string | 当日记一笔支出 |
| memo_info | object | 备注信息 |
| memo_info.content | string | 备注内容 |
| memo_info.last_update_time | int | 最后更新时间 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {
"pms_id": 2,
"pms_name": "PMS-2",
"today_book_count": 0,
"today_checkout_count": 3,
"today_new_order_count": 9,
"unarranged_count": 0,
"wait_handle_count": 0,
"abnormal_count": 81,
"total_room_count": 15,
"today_occupied_count": 4,
"today_occupancy_rate": 26.67,
"yesterday_occupancy_rate": 6.67,
"occupancy_rate_change": 20,
"next_7_days_occupancy_rate": 6.67,
"next_7_days_occupancy_rates": [
{
"date": "2025-04-24",
"occupancy_rate": 73.33,
"occupied_count": 11,
"total_rooms": 15
},
{
"date": "2025-04-25",
"occupancy_rate": 46.67,
"occupied_count": 7,
"total_rooms": 15
},
{
"date": "2025-04-26",
"occupancy_rate": 13.33,
"occupied_count": 2,
"total_rooms": 15
},
{
"date": "2025-04-27",
"occupancy_rate": 6.67,
"occupied_count": 1,
"total_rooms": 15
},
{
"date": "2025-04-28",
"occupancy_rate": 6.67,
"occupied_count": 1,
"total_rooms": 15
},
{
"date": "2025-04-29",
"occupancy_rate": 6.67,
"occupied_count": 1,
"total_rooms": 15
},
{
"date": "2025-04-30",
"occupancy_rate": 6.67,
"occupied_count": 1,
"total_rooms": 15
}
],
"past_7_days_occupancy_rate": 17.14,
"weekly_occupancy_rate_change": 10.47,
"today_order_accom": "100.00",
"today_income": "0.00",
"today_expense": "0.00",
"memo_info": {
"content": "",
"last_update_time": 1745463635
}
}
}6. 更新备忘录
- 接口地址
POST /api/v1/pms/updateMemo- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| pms_id | int | Y | 2 | pms-store id |
| content | string | Y | "备忘录内容" | 备忘录内容 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {}
}