PMS住宿
日历房态
获取全部房间列表
- 接口地址
POST /api/v1/pmsRoom/getAllRoomList- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| pms_id | int | Y | 2 | pms-storeID |
| room_type_ids | array | N | [1, 2] | 房型ID 数组 |
- 返回结果
| 名称 | 类型 | 描述 |
|---|---|---|
| list | array | 房间列表 |
| list.*.name | string | 房型名称 |
| list.*.short_name | string | 房型简称 |
| list.*.room_type_id | int | 房型ID |
| list.*.rooms | array | 房间列表 |
| list..rooms..room_id | int | 房间ID |
| list..rooms..room_type_id | int | 房型ID |
| list..rooms..room_name | string | 房间名称 |
| list..rooms..room_status | int | 房间状态 |
| list..rooms..is_dirty | int | 是否脏房 1:是 2:否 |
| list..rooms..sort | int | 排序 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {
"list": [
{
"pms_id": 2,
"name": "日式简约双人大床房1",
"short_name": "大床房1",
"room_type_id": 6,
"rooms": [
{
"room_id": 21,
"room_name": "1011",
"room_status": 10,
"is_dirty": 2,
"sort": 0,
"room_type_id": 6
},
{
"room_id": 22,
"room_name": "1022",
"room_status": 10,
"is_dirty": 2,
"sort": 0,
"room_type_id": 6
}
]
}
]
}
}订单管理
创建住宿订单
- 接口地址
POST /api/v1/pmsOrder/create- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| pms_id | int | Y | 2 | pms-storeID |
| name | string | Y/N | "张三" | 姓名 name或phone必须存在一个 |
| phone | string | Y/N | "18000000000" | 手机号 name或phone必须存在一个 |
| remark | string | N | "备注信息" | 备份 |
| images | array | N | [] | 订单图片 |
| color | string | N | "#FF0000" | 订单特殊色 16进字符串 |
| room_list | array | Y | [] | 房间列表 |
| room_list.*.room_id | int | Y | 19 | 房间ID |
| room_list.*.accom_type | int | Y | 10 | 住宿类型 10:正常入住 20:自用房 30:免费房 40:钟点房 |
| room_list.*.checkin_start_time | int | Y | 1709510400 | 入住开始时间戳 |
| room_list.*.checkin_end_time | int | Y | 1709596800 | 入住结束时间戳 |
| room_list.*.amount | string | Y | "100.00" | 房价金额 |
| room_list.*.accom_status | int | Y | 40 | 入住状态 40:预定 70:办理入住 |
| room_list.*.is_custom_price | int | N | 2 | 是否自定义价格 1:是 2:否 默认2 |
| room_list.*.bill_list | array | N | [] | 账单列表 |
| room_list..bill_list..consume_id | int | Y | 1 | 消费ID |
| room_list..bill_list..date | string | Y | "2025-01-01" | 消费日期 |
| room_list..bill_list..price | string | Y | "50.00" | 单价 |
| room_list..bill_list..num | int | Y | 1 | 数量 |
| room_list..bill_list..remark | string | N | "备注" | 备注 |
| room_list.*.tenant_list | array | N | [] | 入住人列表 |
| room_list..tenant_list..name | string | Y/N | "张三" | 姓名 姓名/手机号必填一个 |
| room_list..tenant_list..phone | string | Y/N | "18000000000" | 手机号 姓名/手机号必填一个 |
| room_list..tenant_list..id_type | int | Y | 10 | 证件类型 10:身份证 20:军官证 30:通行证 40:护照 50:其他 0:未知 |
| room_list..tenant_list..id_number | string | Y | "440000000000000000" | 证件号码 |
| room_list..tenant_list..gender | int | N | 10 | 性别 10:男 20:女 0:未知 |
| room_list..tenant_list..birthday | string | N | "1990-01-01" | 生日日期 |
| room_list..tenant_list..car_number | string | N | "粤B12345" | 车牌号 |
| room_list..tenant_list..area | array | N | [440000, 440300, 440306] | 地区 例[440000,440300,440306] |
| room_list..tenant_list..address | string | N | "详细地址" | 详细地址 |
| room_list..tenant_list..email | string | N | "test@example.com" | 邮箱 |
| reminder_list | array | Y | [] | 提醒列表 |
| reminder_list.*.remind_date | int | Y | 1709510400 | 提醒时间戳 |
| reminder_list.*.content | string | Y | "提醒内容" | 提醒内容 |
- 返回示例
json
{
"error_code": 0,
"error_msg": "",
"description": "",
"data": {
"order_id": 1
}
}更新订单信息
- 接口地址
POST /api/v1/pmsOrder/update- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| order_id | int | Y | 1 | 订单ID |
| name | string | Y/N | "张三" | 姓名 name或phone必须存在一个 |
| phone | string | Y/N | "18000000000" | 手机号 name或phone必须存在一个 |
| color | string | N | "#FF0000" | 订单特殊色 16进字符串 |
| remark | string | N | "备注信息" | 备份 |
| room_list | array | N | [] | 房间列表 |
| room_list.*.accom_id | int | Y/N | 1 | 住宿ID 编辑原房间时必填 新增房间可不填 |
| room_list.*.room_id | int | Y | 19 | 房间ID |
| room_list.*.accom_type | int | Y | 10 | 住宿类型 10:正常入住 20:自用房 30:免费房 40:钟点房 |
| room_list.*.checkin_start_time | int | Y | 1709510400 | 入住开始时间戳 |
| room_list.*.checkin_end_time | int | Y | 1709596800 | 入住结束时间戳 |
| room_list.*.amount | string | Y | "100.00" | 房价金额 |
| room_list.*.accom_status | int | Y | 40 | 入住状态 40:预定 70:办理入住 |
| room_list.*.is_custom_price | int | Y | 2 | 是否自定义价格 1:是 2:否 默认2 |
| room_list.*.bill_list | array | N | [] | 账单列表 |
| room_list..bill_list..bill_id | int | Y/N | 1 | 账单ID 不传即添加 传即更新 |
| room_list..bill_list..consume_id | int | Y | 1 | 消费ID |
| room_list..bill_list..date | string | Y | "2025-01-01" | 消费日期 |
| room_list..bill_list..price | string | Y | "50.00" | 单价 |
| room_list..bill_list..num | int | Y | 1 | 数量 |
| room_list..bill_list..remark | string | N | "备注" | 备注 |
| room_list.*.tenant_list | array | N | [] | 入住人列表 |
| room_list..tenant_list..name | string | Y/N | "张三" | 姓名 姓名/手机号必填一个 |
| room_list..tenant_list..phone | string | Y/N | "18000000000" | 手机号 姓名/手机号必填一个 |
| room_list..tenant_list..id_type | int | Y | 10 | 证件类型 10:身份证 20:军官证 30:通行证 40:护照 50:其他 0:未知 |
| room_list..tenant_list..id_number | string | Y | "440000000000000000" | 证件号码 |
| room_list..tenant_list..gender | int | N | 10 | 性别 10:男 20:女 0:未知 |
| room_list..tenant_list..birthday | string | N | "1990-01-01" | 生日日期 |
| room_list..tenant_list..car_number | string | N | "粤B12345" | 车牌号 |
| room_list..tenant_list..area | array | N | [440000, 440300, 440306] | 地区 例[440000,440300,440306] |
| room_list..tenant_list..address | string | N | "详细地址" | 详细地址 |
| room_list..tenant_list..email | string | N | "test@example.com" | 邮箱 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {}
}获取订单住宿列表
- 接口地址
POST /api/v1/pmsOrder/getAccomlist- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| pms_id | int | Y | 2 | pms-storeID |
| start_date | int | Y | 1709510400 | 开始时间戳 |
| end_date | int | Y | 1709596800 | 结束时间戳 |
- 返回结果
| 名称 | 类型 | 描述 |
|---|---|---|
| room_id | int | 房间ID |
| room_name | string | 房间名称 |
| room_full_name | string | 房间全称 |
| order_list | array | 订单列表 |
| order_list.*.order_id | int | 订单ID |
| order_list.*.name | string | 姓名 |
| order_list.*.accom_type | int | 住宿类型 10:正常入住 20:自用房 30:免费房 40:钟点房 |
| order_list.*.is_custom_price | int | 是否自定义价格 1:是 2:否 默认2 |
| order_list.*.phone | string | 手机号 |
| order_list.*.remark | string | 备注 |
| order_list.*.checkin_start_time | int | 入住开始时间戳 |
| order_list.*.checkin_end_time | int | 入住结束时间戳 |
| order_list.*.total_amount | string | 总金额 |
| order_list.*.total_payed_amount | string | 已付金额 |
| order_list.*.accom_status | int | 入住状态 预定=40/取消=50/进行中(已入住)=70/已退房=80 |
| order_list.*.is_arrears | int | 是否欠费 1:是 2:否 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": [
{
"room_id": 19,
"room_name": "101",
"room_full_name": "日式简约双人大床房-101",
"order_list": [
{
"name": "老外",
"phone": "",
"remark": "",
"accom_type": 10,
"is_custom_price": 2,
"checkin_start_time": 1741023476,
"checkin_end_time": 1741109876,
"total_amount": "200.00",
"total_payed_amount": "0.00",
"accom_status": 40,
"is_arrears": 1
}
]
}
]
}获取订单详情
- 接口地址
POST /api/v1/pmsOrder/getAccomDetail- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| order_id | int | Y | 1 | 订单ID |
| accom_ids | int | N | 1 | 住宿ID |
- 返回结果
| 名称 | 类型 | 描述 |
|---|---|---|
| order_id | int | 订单ID |
| order_no | string | 订单号 |
| name | string | 姓名 |
| phone | string | 手机号 |
| remark | string | 备注 |
| total_amount | string | 总金额 |
| total_payed_amount | string | 已付金额 |
| consumed_amount | string | 已结金额 |
| unchecked_amount | string | 未结金额 |
| balance | string | 账号余额 |
| created_date | int | 创建时间戳 |
| created_name | string | 创建人 |
| color | string | 颜色 |
| images | array | 图片列表 |
| order_status | int | 订单状态 已预定=110/已取消=120/进行中=170/已完成=180 |
| accom_list | array | 房间列表 |
| accom_list.*.accom_id | int | 住宿ID |
| accom_list.*.room_id | int | 房间ID |
| accom_list.*.room_type_id | int | 房型ID |
| accom_list.*.room_type_name | string | 房型名称 |
| accom_list.*.room_full_name | string | 房间全称 |
| accom_list.*.checkin_start_time | int | 入住开始时间戳 |
| accom_list.*.checkin_end_time | int | 入住结束时间戳 |
| accom_list.*.amount | string | 房价金额 |
| accom_list.*.accom_type | int | 住宿类型 10:正常入住 20:自用房 30:免费房 40:钟点房 |
| accom_list.*.accom_status | int | 入住状态 预定=40/取消=50/进行中(已入住)=70/已退房=80 |
| accom_list.*.checkout_status | int | 结账状态 未结账=10/已结账=20 |
| accom_list.*.is_custom_price | int | 是否自定义价格 1:是 2:否 默认2 |
| accom_list.*.penalty_amount | string | 违约金金额 |
| accom_list.*.tenant_list | array | 入住人列表 |
| accom_list..tenant_list..tenant_id | int | 入住人ID |
| accom_list..tenant_list..name | string | 姓名 |
| accom_list..tenant_list..phone | string | 手机号 |
| accom_list..tenant_list..id_type | int | 证件类型 10:身份证 20:军官证 30:通行证 40:护照 50:其他 0:未知 |
| accom_list..tenant_list..id_number | string | 证件号码 |
| accom_list..tenant_list..gender | int | 性别 10:男 20:女 0:未知 |
| accom_list..tenant_list..birthday | string | 生日日期 Y-m-d |
| accom_list..tenant_list..car_number | string | 车牌号 |
| accom_list..tenant_list..area | array | 地区 例[440000,440300,440306] [广东省,深圳市,宝安区] |
| accom_list..tenant_list..address | string | 详细地址 |
| accom_list..tenant_list..email | string | 邮箱 |
| accom_list.*.bill_list | array | 消费列表 |
| accom_list..bill_list..bill_id | int | 账单ID |
| accom_list..bill_list..customer_id | int | 消费ID |
| accom_list..bill_list..name | string | 消费名称 |
| accom_list..bill_list..price | string | 单价 |
| accom_list..bill_list..num | int | 数量 |
| accom_list..bill_list..amount | string | 金额 |
| accom_list..bill_list..date | string | 消费日期 |
| accom_list.*.room_location | object | 房间位置信息 |
| accom_list.*.room_location.building_id | int | 楼栋ID |
| accom_list.*.room_location.floor_id | int | 楼层ID |
| accom_list.*.room_location.child_room_no | string | 子房间号 |
| accom_list.*.room_location.area_id | int | 区域ID |
| accom_list.*.device_lock | object | 设备锁信息 |
| accom_list.*.device_lock.lock_type | int | 锁类型 10:密码锁 20:房卡锁 |
| accom_list.*.device_lock.device_no | string | 设备编号 |
| accom_list.*.device_lock.has_gateway | int | 是否有网关 1:有 2:无 |
| reminder_list | array | 提醒列表 |
| reminder_list.*.remind_id | int | 提醒ID |
| reminder_list.*.remind_date | int | 提醒时间戳 |
| reminder_list.*.content | string | 提醒内容 |
| status_control | object | 状态控制 |
| status_control.is_show_checkin | int | 是否显示入住 1:是 2:否 |
| status_control.is_show_extend | int | 是否显示续住 1:是 2:否 |
| status_control.is_show_settle | int | 是否显结算 1:是 2:否 |
| status_control.is_show_cashier | int | 是否显收银 1:是 2:否 |
| status_control.is_show_cancel_book | int | 是否显示取消预定 1:是 2:否 |
| status_control.is_show_status_revoke | int | 是否显示状态撤销 1:是 2:否 |
| status_control.is_show_more_operation | int | 是否显示更多操作 1:是 2:否 |
| status_control.is_show_modify_order | int | 是否显示修改订单 1:是 2:否 |
| status_control.is_show_change_room | int | 是否显示换房 1:是 2:否 |
| status_control.is_show_restore_book | int | 是否显示恢复预定 1:是 2:否 |
| status_control.is_show_cancel_checkin | int | 是否显示取消入住 1:是 2:否 |
| bill_summary | object | 账单汇总 |
| bill_summary.cash_confirmed_amount | string | 收银已结 |
| bill_summary.cash_consumed_amount | string | 收银已付金额 |
| bill_summary.cash_unchecked_amount | string | 收银未结 |
| bill_summary.confirmed_amount | string | 已结金额 |
| bill_summary.need_pay_amount | string | 还需付款 |
| bill_summary.order_amount | string | 订单总金额 |
| bill_summary.unconfirmed_amount | string | 未结金额 |
| bill_summary.balance | string | 账户余额 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {
"order_no": "202503041332075890",
"name": "老外",
"phone": "",
"remark": "",
"total_amount": "200.00",
"total_payed_amount": "0.00",
"consumed_amount": "0.00",
"unchecked_amount": "0.00",
"balance": "0.00",
"created_date": 1741066327,
"created_name": "18000000000",
"color": "#000000",
"images": [],
"room_list": [
{
"room_id": 19,
"room_name": "101",
"room_type_id": 6,
"room_type_name": "日式简约双人大床房1",
"room_full_name": "日式简约双人大床房-101",
"checkin_start_time": 1741023476,
"checkin_end_time": 1741109876,
"amount": "100.00",
"accom_status": 40,
"accom_type": 10,
"checkout_status": 10,
"tenant_list": [
{
"tenant_id": 1,
"name": "老外",
"phone": "",
"id_type": 10,
"id_number": "",
"gender": 0,
"birthday": "",
"car_number": "",
"area": [],
"address": "",
"email": ""
}
],
"bill_list": [
{
"bill_id": 20,
"customer_id": 2,
"name": "酒水",
"price": "300.00",
"num": 2,
"amount": "600.00",
"date": "2021-12-12"
}
]
}
],
"status_control": {
"is_show_checkin": 2,
"is_show_extend": 1,
"is_show_settle": 1,
"is_show_cashier": 1,
"is_show_cancel_book": 2,
"is_show_status_revoke": 2,
"is_show_more_operation": 2,
"is_show_modify_order": 1,
"is_show_change_room": 1,
"is_show_restore_book": 2,
"is_show_cancel_checkin": 1
},
"bill_summary": {
"cash_confirmed_amount": "0.00",
"cash_consumed_amount": "0.00",
"cash_unchecked_amount": "0.00",
"confirmed_amount": "0.00",
"need_pay_amount": "0.00"
}
}
}更新住宿入住人
- 接口地址
POST /api/v1/pmsOrder/updateAccomTenant- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| accom_id | int | Y | 1 | 住宿ID |
| tenant_list | array | Y | [] | 入住人列表 |
| tenant_list.*.tenant_id | int | Y/N | 1 | 入住人ID 有是更新 无是增加 |
| tenant_list.*.name | string | Y/N | "张三" | 姓名 姓名/手机号必填一个 |
| tenant_list.*.phone | string | Y/N | "18000000000" | 手机号 姓名/手机号必填一个 |
| tenant_list.*.id_type | int | Y | 10 | 证件类型 10:身份证 20:军官证 30:通行证 40:护照 50:其他 0:未知 |
| tenant_list.*.id_number | string | Y | "440000000000000000" | 证件号码 |
| tenant_list.*.gender | int | N | 10 | 性别 10:男 20:女 0:未知 |
| tenant_list.*.birthday | string | N | "1990-01-01" | 生日日期 |
| tenant_list.*.car_number | string | N | "粤B12345" | 车牌号 |
| tenant_list.*.area | array | N | [440000, 440300, 440306] | 地区 例[440000,440300,440306] |
| tenant_list.*.address | string | N | "详细地址" | 详细地址 |
| tenant_list.*.email | string | N | "test@example.com" | 邮箱 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {}
}添加住宿消费
- 接口地址
POST /api/v1/pmsOrder/addAccomBill- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| accom_id | int | Y | 1 | 住宿ID |
| bill_list | array | N | [] | 消费列表 |
| bill_list.*.consume_id | int | Y | 1 | 消费ID |
| bill_list.*.date | string | Y | "2025-01-01" | 消费日期 |
| bill_list.*.price | string | Y | "50.00" | 单价 |
| bill_list.*.num | int | Y | 1 | 数量 |
| bill_list.*.remark | string | N | "备注" | 备注 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {}
}获取可办理入住的住宿
- 接口地址
POST /api/v1/pmsOrder/getCheckInAccom- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| order_id | int | Y | 1 | 订单ID |
- 返回结果
| 名称 | 类型 | 描述 |
|---|---|---|
| accom_id | int | 住宿ID |
| room_id | int | 房间ID |
| room_name | string | 房间名称 |
| room_full_name | string | 房间全称 |
| checkin_start_time | int | 入住开始时间戳 |
| checkin_end_time | int | 入住结束时间戳 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": [
{
"accom_id": 2,
"room_id": 19,
"room_name": "101",
"room_full_name": "日式简约双人大床房-101",
"checkin_start_time": 1741140479,
"checkin_end_time": 1741486079
}
]
}办理入住
- 接口地址
POST /api/v1/pmsOrder/checkIn- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| order_id | int | Y | 1 | 订单ID |
| checkin_rooms | array | Y | [] | 入住房间 |
| checkin_rooms.*.accom_id | int | Y | 1 | 住宿ID |
| checkin_rooms.*.room_id | int | Y | 19 | 房间ID |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {}
}取消预定
- 接口地址
POST /api/v1/pmsOrder/cancelBook- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| accom_ids | array | Y | [1, 2] | 住宿ID数组 |
| penalty_amount | string | Y | "0.00" | 违约金 不填写请默认0.00 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {}
}获取账单总结
- 接口地址
POST /api/v1/pmsOrder/getBillSummary- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| order_id | int | Y | 1 | 订单ID |
| accom_ids | array | N | [1, 2] | 住宿ID 可填格式[1,2] |
- 返回结果
| 名称 | 类型 | 描述 |
|---|---|---|
| order_amount | string | 订单总金额 |
| order_consume_num | int | 订单消费数量 |
| confirmed_amount | string | 已确认金额 |
| unconfirmed_amount | string | 未确认金额 |
| consumed_amount | string | 已结帐消费金额 |
| charged_amount | string | 已挂账消费金额 |
| unchecked_amount | string | 未结帐消费金额 |
| balance | string | 账号余额 |
| cash_amount | string | 累计收银 |
| cash_count | int | 收银次数 |
| confirmed_consumed_amount | string | 已结账消费 |
| accom_consume_list | array | 住宿消费列表 |
| accom_consume_list.*.name | string | 住宿名称 |
| accom_consume_list.*.amount | string | 消费金额 |
| accom_consume_list.*.count | int | 数量 |
- 返回示例
json
{
"order_amount": "12700.00",
"order_consume_num": 5,
"confirmed_amount": "0.00",
"unconfirmed_amount": "12700.00",
"consumed_amount": "0.00",
"charged_amount": "0.00",
"unchecked_amount": "12700.00",
"balance": "0.00",
"cash_amount": "0.00",
"cash_count": 0,
"confirmed_consumed_amount": "0.00",
"accom_consume_list": [
{
"name": "日式简约双人大床房-101",
"amount": "12700.00",
"count": 5
}
]
}获取账单列表
- 接口地址
POST /api/v1/pmsOrder/getBillList- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| type | int | Y | 10 | 账单类型 10:消费 20:收银 |
| order_id | int | Y | 1 | 订单ID |
| accom_id | int | N | 1 | 住宿ID 查询单个住宿可填 |
| page_no | int | N | 1 | 页码 |
| page_size | int | N | 25 | 每页数量 |
| start_date | int | N | 1709510400 | 开始时间戳 |
| end_date | int | N | 1709596800 | 结束时间戳 |
| status | int | N | 10 | 状态 10:未结帐 20:已结账 30:已转出 40:已拆账 50:已抛账 60:已调帐 70:已冲减 80:已挂帐 |
- 返回结果
| 名称 | 类型 | 描述 |
|---|---|---|
| list | array | 账单列表 |
| list.*.bill_id | int | 账单ID |
| list.*.order_id | int | 订单ID |
| list.*.accom_id | int | 住宿ID |
| list.*.name | string | 消费名称 |
| list.*.status | int | 状态 10:未结帐 20:已结账 30:已转出 40:已拆账 50:已抛账 60:已调帐 70:已冲减 80:已挂帐 |
| list.*.date | string | 消费日期 |
| list.*.price | string | 单价 |
| list.*.num | int | 数量 |
| list.*.amount | string | 总金额 |
| list.*.remark | string | 备注 |
| list.*.creator_name | string | 创建人 |
| list.*.create_date | string | 创建日期 |
| list.*.pay_id | int | 支付方式ID |
| list.*.pay_name | string | 支付方式名称 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {
"list": [
{
"order_id": 23,
"accom_id": 20,
"name": "酒水",
"status": 10,
"date": "2021-12-12",
"price": "300.00",
"num": 2,
"amount": "600.00",
"remark": "",
"pay_id": 1,
"pay_name": "现金",
"creator_name": "xie",
"bill_id": 1
}
],
"page_no": 1,
"page_size": 10,
"total": 1
}
}更新账单
- 接口地址
POST /api/v1/pmsOrder/updateBill- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| bill_id | int | Y | 1 | 账单ID |
| remark | string | N | "备注" | 备注 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {}
}撤销账单
- 接口地址
POST /api/v1/pmsOrder/cancelBill- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| bill_id | int | Y | 1 | 账单ID |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {}
}取消结算
- 接口地址
POST /api/v1/pmsOrder/cancelSettle- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| order_id | int | Y | 1 | 订单ID |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {}
}收银
- 接口地址
POST /api/v1/pmsOrder/cashier- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| order_id | int | Y | 1 | 订单ID |
| bills | array | Y | [] | 账单列表 |
| bills.*.bill_type | int | Y | 10 | 账单类型 10:收款 20:退款 |
| bills.*.name | string | Y | "收款名称" | 收款名称 |
| bills.*.pay_id | int | N | 1 | 支付方式ID |
| bills.*.amount | string | Y | "100.00" | 金额 |
| bills.*.remark | string | N | "备注" | 备注 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {}
}退房
- 接口地址
POST /api/v1/pmsOrder/checkOut- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| order_id | int | Y | 1 | 订单ID |
| type | int | Y | 1 | 退房类型 1:退房并结算 2:退房不结算 |
| room_list | array | Y | [] | 房间列表 |
| room_list.*.accom_id | int | Y | 1 | 住宿ID |
| room_list.*.type | int | Y | 10 | 退房类型 10:不收取 20:收取半日房费 30:收取全日房费 40:不加收 50:加收半日房费 60:加收全日房费 70:自定义 |
| room_list.*.amount | string | Y | "0.00" | 金额 可填"0.00" |
| bill_list | array | N | [] | 账单列表 |
| bill_list.*.bill_type | int | Y | 10 | 账单类型 10:收款 20:退款 |
| bill_list.*.name | string | Y | "收款名称" | 收款名称 |
| bill_list.*.pay_id | int | N | 1 | 支付方式ID |
| bill_list.*.amount | string | Y | "100.00" | 金额 |
- 返回说明
| 状态码 | 描述 |
|---|---|
| 446 | 存在未结清账单 需要打开收银页面 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {}
}结算
- 接口地址
POST /api/v1/pmsOrder/settle- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| order_id | int | Y | 1 | 订单ID |
| room_list | array | Y/N | [] | 房间列表 如果存在未退房的房间必填 |
| room_list.*.accom_id | int | Y | 1 | 住宿ID |
| room_list.*.type | int | Y | 10 | 退房类型 10:不收取 20:收取半日房费 30:收取全日房费 40:不加收 50:加收半日房费 60:加收全日房费 70:自定义 |
| room_list.*.amount | string | Y | "0.00" | 金额 可填"0.00" |
| bill_list | array | Y/N | [] | 账单列表 如果存在存在未结清账单必填 |
| bill_list.*.bill_type | int | Y | 10 | 账单类型 10:收款 20:退款 |
| bill_list.*.name | string | Y | "收款名称" | 收款名称 |
| bill_list.*.pay_id | int | N | 1 | 支付方式ID |
| bill_list.*.amount | string | Y | "100.00" | 金额 |
- 返回说明
| 状态码 | 描述 |
|---|---|
| 444 | 存在已预定房间 |
| 445 | 存在未退房房间 |
| 446 | 存在未结清账单 |
| 447 | 存在多收金额 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {}
}指定房型房间占用列表API
- 接口地址
POST /api/v1/pmsOrder/listOccupied- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| room_type_id | int | Y | 1 | 房型ID |
| start_date | int | Y | 1709510400 | 开始时间戳 |
| end_date | int | Y | 1709596800 | 结束时间戳 |
- 返回结果
| 名称 | 类型 | 描述 |
|---|---|---|
| occupy_room_ids | array | 占用房间ID |
| dirty_room_ids | array | 脏房间ID |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {
"occupy_room_ids": [19],
"dirty_room_ids": []
}
}检查房间是否可办理入住
- 接口地址
POST /api/v1/pmsOrder/checkRoomAvailability- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| room_id | int | Y | 19 | 房间ID |
| start_date | int | Y | 1709510400 | 开始时间戳 |
| end_date | int | Y | 1709596800 | 结束时间戳 |
- 返回结果
| 名称 | 类型 | 描述 |
|---|---|---|
| is_available | int | 是否可用 1:是 2:否 |
| room_name | string | 房间名称 |
| occupied_end_time | int | 占用结束时间(如果房间不可用时才有值) |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {
"is_available": 2,
"room_name": "101",
"occupied_end_time": 0
}
}批量获取指定住宿是否可续住
- 接口地址
POST /api/v1/pmsOrder/batchGetAccomAvailability- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| accom_list | array | Y | [] | 房间列表 |
| accom_list.*.accom_id | int | Y | 1 | 住宿ID |
| accom_list.*.checkin_end_time | int | Y | 1709596800 | 入住结束时间戳 |
- 返回结果
| 名称 | 类型 | 描述 |
|---|---|---|
| is_available | int | 是否可用 1:是 2:否 |
| room_id | int | 房间ID |
| room_name | string | 房间名称 |
| occupied_end_time | int | 占用结束时间(如果房间不可用时才有值) |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": [
{
"is_available": 2,
"room_id": 1,
"room_name": "有锁单人房-101",
"occupied_end_time": 1744387200
}
]
}获取订单操作日志
- 接口地址
POST /api/v1/pmsOrder/getOrderLogs- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| order_id | int | Y | 1 | 订单ID |
| accom_id | int | N | 1 | 住宿ID |
| log_type | int | N | 10 | 日志类型 10:订单日志 20:账单日志 |
- 返回结果
| 名称 | 类型 | 描述 |
|---|---|---|
| log_id | int | 日志ID |
| log_type | int | 日志类型 10:订单日志 20:账单日志 |
| log_type_text | string | 日志类型文本 |
| event_type | int | 事件类型 看上方常量 event_type常量 |
| event_type_text | string | 事件类型文本 |
| created_date | string | 创建时间 |
| creator_name | string | 创建人 |
| event_data | object | 事件数据 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {
"list": [
{
"log_id": 1,
"log_type": 10,
"log_type_text": "订单日志",
"event_type": 10,
"event_type_text": "新增预定订单",
"created_date": "2025-03-11 10:10:37",
"creator_name": "创建人角色名",
"event_data": {
"name": "老大",
"phone": "",
"total_amount": "100",
"accommodations": [
{
"amount": "100",
"room_name": "日式简约双人大床房-101",
"consumption": "0.00",
"checkin_end_time": 1757552212,
"checkin_type_name": "正常入住",
"checkin_start_time": 1754873812
}
]
}
}
]
}
}- 各事件结构
| 变量 | 名称 |
|---|---|
| 10 | 新增预定订单 |
| 20 | 新增直接入住 |
| 30 | 办理入住 |
| 40 | 办理退房 |
| 50 | 取消预定 |
| 60 | 消费项 |
| 70 | 收银事件 |
| 80 | 修改租客信息 |
| 90 | 修改订单住宿信息 |
| 100 | 取消结算 |
| 110 | 结算 |
| 120 | 住宿服务续住 |
| 130 | 修改订单基本信息 |
| 140 | 新增补录订单 |
| 150 | 编辑订单提醒 |
获取退房列表
- 接口地址
POST /api/v1/pmsOrder/listCheckout- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| order_id | int | Y | 1 | 订单ID |
| accom_status | array | Y | [70, 80] | 筛选状态 70:入住中 80:已退房 |
- 返回结果
| 名称 | 类型 | 描述 |
|---|---|---|
| accom_id | int | 住宿ID |
| room_id | int | 房间ID |
| room_name | string | 房间名称 |
| room_full_name | string | 房间全名 |
| checkin_start_time | int | 入住开始时间戳 |
| checkin_end_time | int | 入住结束时间戳 |
| checkout_type | int | 退房类型 1:正常退房 2:逾期退房 3:提前退房 |
| total_days | int | 总天数 |
| amount | string | 房费金额 |
| accom_status | int | 住宿状态 70:入住中 80:已退房 |
| current_room_amount | string | 当天房间金额 |
| has_future_bill | int | 是否存在未来消费/支出账单 1是 2否 |
| total_room_fee | string | 总房费金额 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": [
{
"accom_id": 73,
"room_id": 42,
"room_name": "104",
"room_full_name": "有锁单人房-104",
"checkin_start_time": 1744178400,
"checkin_end_time": 1744261200,
"checkout_type": 2,
"total_days": 1,
"amount": "500.00",
"accom_status": 70,
"current_room_amount": "500.00",
"has_future_bill": 1,
"total_room_fee": "500.00"
}
]
}获取可办理入住的房间列表
- 接口地址
POST /api/v1/pmsOrder/listCheckInRoom- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| order_id | int | Y | 1 | 订单ID |
| arrange_status | int | Y | 0 | 安排状态 0:全部 10:未排房 20:已排房 |
- 返回结果
| 名称 | 类型 | 描述 |
|---|---|---|
| accom_id | int | 住宿ID |
| room_id | int | 房间ID |
| room_name | string | 房间名称 |
| room_full_name | string | 房间全名 |
| checkin_start_time | int | 入住开始时间戳 |
| checkin_end_time | int | 入住结束时间戳 |
| amount | string | 房费金额 |
| total_days | int | 总天数 |
| is_available | int | 是否可入住 1是 2否 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": [
{
"accom_id": 72,
"room_id": 21,
"room_name": "1011",
"room_full_name": "日式简约双人大床房1-1011",
"checkin_start_time": 1744178400,
"checkin_end_time": 1744261200,
"amount": "100.00",
"total_days": 1,
"is_available": 1
}
]
}获取指定房型所有房间状态
- 接口地址
POST /api/v1/pmsOrder/getRoomStatus- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| accom_id | int | Y | 1 | 住宿ID |
| room_type_id | int | Y | 1 | 房型ID |
| start_date | int | Y | 1709510400 | 开始时间戳 |
| end_date | int | Y | 1709596800 | 结束时间戳 |
- 返回结果
| 名称 | 类型 | 描述 |
|---|---|---|
| room_id | int | 房间ID |
| room_name | string | 房间名称 |
| is_dirty | int | 是否脏房 1是 2否 |
| is_occupied | int | 是否占用 1是 2否 |
| is_pre_checkout | int | 是否预离 1是 2否 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": [
{
"room_id": 21,
"room_name": "1011",
"is_dirty": 2,
"is_occupied": 2,
"is_pre_checkout": 2
},
{
"room_id": 22,
"room_name": "1022",
"is_dirty": 2,
"is_occupied": 2,
"is_pre_checkout": 1
}
]
}计算退房金额
- 接口地址
POST /api/v1/pmsOrder/calculateCheckoutAmount- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| order_id | int | Y | 1 | 订单ID |
| room_list | array | Y | [] | 房间列表 |
| room_list.*.accom_id | int | Y | 1 | 住宿ID |
| room_list.*.type | int | Y | 10 | 退房类型 10:不收取 20:收取半日房费 30:收取全日房费 40:不加收 50:加收半日房费 60:加收全日房费 70:自定义 |
| room_list.*.amount | string | Y | "0.00" | 金额 |
- 返回结果
| 名称 | 类型 | 描述 |
|---|---|---|
| order_amount | string | 订单金额 |
| checked_amount | string | 订单金额-已结算金额 |
| unchecked_amount | string | 订单金额-未结算金额 |
| paid_amount | string | 已付金额 |
| balance | string | 已付金额-余额 |
| confirmed_checked_amount | string | 已付金额-已结算金额 |
| need_paid_amount | string | 需付金额 |
| consume_amount | string | 消费/支出金额 |
| accom_list | array | 房间列表 |
| accom_list.*.accom_id | int | 住宿ID |
| accom_list.*.room_id | int | 房间ID |
| accom_list.*.room_name | string | 房间名称 |
| accom_list.*.room_full_name | string | 房间全名 |
| accom_list.*.checkin_start_time | int | 入住开始时间戳 |
| accom_list.*.checkin_end_time | int | 入住结束时间戳 |
| accom_list.*.current_room_amount | string | 当天房费金额 全天/半价已计算好 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {
"order_amount": "0.00",
"checked_amount": "0.00",
"unchecked_amount": "0.00",
"paid_amount": "0.00",
"balance": "0.00",
"confirmed_checked_amount": "0.00",
"need_paid_amount": "0.00",
"consume_amount": "0.00",
"accom_list": [
{
"accom_id": 103,
"room_id": 42,
"room_name": "104",
"room_full_name": "有锁单人房-104",
"checkin_start_time": 1744696800,
"checkin_end_time": 1744779600,
"currentRoomAmount": "0.00"
}
]
}
}订单提醒
创建订单提醒
- 接口地址
POST /api/v1/pmsOrder/createReminder- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| order_id | int | Y | 1 | 订单ID |
| remind_date | int | Y | 1711123200 | 提醒时间戳 |
| content | string | Y | "提醒内容" | 提醒内容 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {
"remind_id": 4
}
}更新订单提醒
- 接口地址
POST /api/v1/pmsOrder/updateReminder- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| remind_id | int | Y | 1 | 提醒ID |
| remind_date | int | Y | 1711123200 | 提醒时间戳 |
| content | string | Y | "提醒内容" | 提醒内容 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {}
}删除订单提醒
- 接口地址
POST /api/v1/pmsOrder/deleteReminder- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| remind_id | int | Y | 1 | 提醒ID |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {}
}续住
- 接口地址
POST /api/v1/pmsOrder/extendCheckIn- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| extends | array | Y | [] | 续住列表 |
| extends.*.accom_id | int | Y | 1 | 住宿ID |
| extends.*.checkin_end_time | int | Y | 1709596800 | 入住结束时间戳 |
| extends.*.amount | string | Y | "100.00" | 金额 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {}
}获取当前订单所有入住中的住宿的最大可续住天数
- 接口地址
POST /api/v1/pmsOrder/getOrderMaxRenewDays- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| order_id | int | Y | 1 | 订单ID |
- 返回结果
| 名称 | 类型 | 描述 |
|---|---|---|
| maxCount | int | 最大可续住天数 |
| serviceCount | object | 住宿天数列表 |
| serviceCount.*.accom_id | int | 住宿ID |
| serviceCount.*.count | int | 可续住天数 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {
"maxCount": 21,
"serviceCount": {
"113": 21
}
}
}撤销住宿状态
- 接口地址
POST /api/v1/pmsOrder/cancelAccomStatus- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| accom_id | int | Y | 1 | 住宿ID |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {}
}开门相关
生成IC卡数据
- 接口地址
POST /api/v1/pmsOrder/generateRoomCard- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| accom_id | int | Y | 1 | 住宿ID |
- 返回结果
| 名称 | 类型 | 描述 |
|---|---|---|
| ic_card_string | string | IC卡数据 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {
"ic_card_string": "7b22726f6f6d5f6964223a33322c22636865636b5f696e5f74696d65223a313734333438373230302c22636865636b5f6f75745f74696d65223a313734333537303030307d"
}
}远程开锁(网关模式)
- 接口地址
POST /api/v1/pmsDevice/remoteUnlock- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| accom_id | int | Y | 1 | 住宿ID |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {}
}发送密码(离线)
- 接口地址
POST /api/v1/pmsDevice/sendOfflinePassword- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| accom_id | int | Y | 1 | 住宿ID |
| start_time | int | Y | 1709510400 | 开始时间戳 |
| end_time | int | Y | 1709596800 | 结束时间戳 |
| phone_list | array | Y | [] | 手机号列表 |
| phone_list.*.country_code | string | Y | "+86" | 国家区号 |
| phone_list.*.phone | string | Y | "18000000000" | 手机号 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {}
}获取所有住宿锁密码列表
- 接口地址
POST /api/v1/pmsOrder/getAccomAllLockPassword- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| order_id | int | Y | 1 | 订单ID |
- 返回结果
| 名称 | 类型 | 描述 |
|---|---|---|
| accom_id | int | 住宿ID |
| room_id | int | 房间ID |
| room_name | string | 房间名称 |
| room_full_name | string | 房间全称 |
| checkin_start_time | int | 入住开始时间戳 |
| checkin_end_time | int | 入住结束时间戳 |
| device_lock | object | 锁信息 |
| device_lock.lock_type | int | 锁类型 |
| device_lock.device_no | string | 设备编号 |
| device_lock.has_gateway | int | 是否有网关 |
| password_list | array | 密码列表 |
| password_list.*.pwd_id | int | 密码ID |
| password_list.*.keyboard_pwd | string | 密码 |
| password_list.*.start_date | int | 开始时间戳 |
| password_list.*.end_date | int | 结束时间戳 |
| password_list.*.creator_name | string | 创建人 |
| password_list.*.phone_list | array | 手机号列表 |
| password_list..phone_list..country_code | string | 国家区号 |
| password_list..phone_list..phone | string | 手机号 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": [
{
"accom_id": 43,
"room_id": 39,
"room_name": "101",
"room_full_name": "有锁单人房-101",
"checkin_start_time": 1743487200,
"checkin_end_time": 1743570000,
"device_lock": {
"lock_type": 10,
"device_no": "101房",
"has_gateway": 1
},
"password_list": [
{
"pwd_id": 1,
"keyboard_pwd": "5560945371",
"start_date": 1743868800,
"end_date": 1745078400,
"creator_name": "18000000000",
"phone_list": [
{
"country_code": "+86",
"phone": "18000000000"
}
]
}
]
}
]
}删除密码
- 接口地址
POST /api/v1/pmsDevice/deleteOfflinePassword- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| accom_id | int | Y | 1 | 住宿ID |
| pwd_id | int | Y | 1 | 密码ID |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {}
}获取所有住宿锁电子钥匙列表
- 接口地址
POST /api/v1/pmsOrder/getAccomAllAccessKeys- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| order_id | int | Y | 1 | 订单ID |
- 返回结果
| 名称 | 类型 | 描述 |
|---|---|---|
| accom_id | int | 住宿ID |
| room_id | int | 房间ID |
| room_name | string | 房间名称 |
| room_full_name | string | 房间全称 |
| checkin_start_time | int | 入住开始时间戳 |
| checkin_end_time | int | 入住结束时间戳 |
| device_lock | object | 锁信息 |
| device_lock.lock_type | int | 锁类型 |
| device_lock.device_no | string | 设备编号 |
| device_lock.has_gateway | int | 是否有网关 |
| key_list | array | 密码列表 |
| key_list.*.key_id | int | 密码ID |
| key_list.*.receiver_account | string | 接收人账号 |
| key_list.*.start_date | int | 开始时间戳 |
| key_list.*.end_date | int | 结束时间戳 |
| key_list.*.creator_name | string | 创建人 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": [
{
"accom_id": 43,
"room_id": 39,
"room_name": "101",
"room_full_name": "有锁单人房-101",
"checkin_start_time": 1743487200,
"checkin_end_time": 1743570000,
"device_lock": {
"lock_type": 10,
"device_no": "101房",
"has_gateway": 1
},
"key_list": [
{
"key_id": 1,
"receiver_account": "18000000000",
"start_date": 1743868800,
"end_date": 1745078400,
"creator_name": "18000000000"
}
]
}
]
}发送电子钥匙
- 接口地址
POST /api/v1/pmsDevice/sendAccessLockKey- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| accom_id | int | Y | 1 | 住宿ID |
| start_time | int | Y | 1709510400 | 开始时间戳 |
| end_time | int | Y | 1709596800 | 结束时间戳 |
| receiver_name | string | Y | "张三" | 接收人姓名 |
| receiver_account | string | Y | "18000000000" | 接收人手机号 |
| country_code | string | Y | "+86" | 国家区号 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {}
}删除电子钥匙
- 接口地址
POST /api/v1/pmsDevice/deleteAccessKey- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| accom_id | int | Y | 1 | 住宿ID |
| id | int | Y | 1 | 钥匙ID |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {}
}添加住宿卡片记录
- 接口地址
POST /api/v1/pmsOrder/addAccomCard- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| accom_id | int | Y | 1 | 住宿ID |
| card_uid | string | Y | "99EED5C1" | 卡片UID |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {}
}获取住宿全部卡片记录
- 接口地址
POST /api/v1/pmsOrder/getAllAccomCard- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| accom_id | int | Y | 1 | 住宿ID |
- 返回结果
| 名称 | 类型 | 描述 |
|---|---|---|
| card_uid | string | 卡片UID |
| card_name | string | 卡片名称 |
| card_type | int | 卡片类型 |
| card_type_name | string | 卡片类型名称 |
| start_date | int | 开始时间戳 |
| end_date | int | 结束时间戳 |
| create_time | string | 创建时间 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": [
{
"card_uid": "99EED5C1",
"card_name": "有锁单人房-101",
"card_type": 4,
"card_type_name": "房卡",
"start_date": 1746338400,
"end_date": 1746507600,
"create_time": "2025-05-07 14:13:34"
}
]
}