{
  "openapi": "3.0.3",
  "info": {
    "title": "新开普一卡通 Windows 程序对接接口",
    "version": "1.0.0",
    "description": "Windows 一卡通终端程序调用智慧餐厅 Linux 服务端的三个接口。厂商读卡器、Change DLL、PSAM 和校园卡中心扣款接口不在本文档范围内。"
  },
  "servers": [
    {
      "url": "https://xxx.com",
      "description": "实际地址由部署环境提供"
    }
  ],
  "tags": [
    {
      "name": "外部接口/三方调用康比特/新开普一卡通",
      "description": "新开普一卡通 Windows 程序调用智慧餐厅接口"
    }
  ],
  "paths": {
    "/api/oneCardTerminal/syncPersons": {
      "post": {
        "summary": "接口 A：同步人员及卡片",
        "operationId": "oneCardTerminalSyncPersons",
        "tags": [
          "外部接口/三方调用康比特/新开普一卡通"
        ],
        "x-apifox-folder": "外部接口/三方调用康比特/新开普一卡通",
        "x-apifox-status": "developing",
        "description": "# 接口 A：同步人员及卡片\n\n## 1. 接口概述\n\nWindows 程序连接新开普一卡通 WebService，调用人员下载接口取得 `DOWNINFO` 数据并分批推送至智慧餐厅。本接口只接收 `bm、xh、name、sex、customerid、cardno、status、cardsn` 八个中心库字段，单批最多 1000 人，不调用现场读卡接口。\n\n## 2. 接口信息\n\n- **接口地址**：`https://xxx.com/api/oneCardTerminal/syncPersons`\n- **请求方法**：POST\n- **Content-Type**：`application/x-www-form-urlencoded`\n- **接口版本**：v1.0\n\n## 3. 请求头（Header）\n\n## 4. 请求参数（Body）\n\n| 参数名 | 类型 | 是否必填 | 描述 | 示例值 |\n| --- | --- | --- | --- | --- |\n| items | Array(Object) | 是 | 人员及卡片信息集合；单批最多1000条 | 见下方JSON示例 |\n| items[].bm | String | 是 | 部门名称，对应新开普DOWNINFO.bm，最大200字符 | 020101900000 |\n| items[].xh | String | 是 | 学号或人员编号，对应DOWNINFO.xh，最大60字符 | 1skx273 |\n| items[].name | String | 是 | 人员姓名，对应DOWNINFO.name，最大40字符 | 解航 |\n| items[].sex | Integer | 是 | 性别，对应DOWNINFO.sex：1男、0女 | 1 |\n| items[].customerid | Integer | 是 | 一卡通账号，对应DOWNINFO.customerid | 29373 |\n| items[].cardno | Integer | 是 | 一卡通卡号，对应DOWNINFO.cardno | 1705827 |\n| items[].status | Integer | 是 | 客户状态，对应DOWNINFO.status；具体状态含义由新开普确认 | 1 |\n| items[].cardsn | Integer | 是 | 个人持卡序号，对应DOWNINFO.cardsn | 2 |\n\n请求示例：\n\n```json\n{\n  \"items\": [\n    {\n      \"bm\": \"020101900000\",\n      \"xh\": \"1skx273\",\n      \"name\": \"解航\",\n      \"sex\": 1,\n      \"customerid\": 29373,\n      \"cardno\": 1705827,\n      \"status\": 1,\n      \"cardsn\": 2\n    }\n  ]\n}\n```\n\n## 5. 响应格式\n\n**全部同步成功响应示例**\n\n```json\n{\n  \"code\": 0,\n  \"message\": \"success\",\n  \"data\": {\n    \"total\": 1,\n    \"created\": 1,\n    \"updated\": 0,\n    \"failed\": 0\n  },\n  \"trace_id\": \"6a671d7d5539d\"\n}\n```\n\n**部分人员同步失败响应示例**\n\n```json\n{\n  \"code\": 0,\n  \"message\": \"success\",\n  \"data\": {\n    \"total\": 2,\n    \"created\": 1,\n    \"updated\": 0,\n    \"failed\": 1\n  },\n  \"trace_id\": \"6a671d7d5539d\"\n}\n```\n\n**接口处理失败响应示例**\n\n```json\n{\n  \"code\": 1,\n  \"message\": \"items必须为数组且单批不超过1000条\",\n  \"data\": [],\n  \"trace_id\": \"6a671d7d5539d\"\n}\n```\n\n注意：`code=0` 只代表本批请求已处理。Windows 程序应检查 `data.failed`；只有 `failed=0` 才表示本批人员全部同步成功。\n\n## 6. 状态码说明\n\n| code | 描述 | Windows处理方式 |\n| --- | --- | --- |\n| 0 | 本批请求处理完成 | 继续检查data中的成功和失败数量 |\n| 1 | 明确业务失败 | 修正请求或数据后再提交，不盲目重试 |\n\n## 7. 响应字段说明\n\n| 字段名 | 类型 | 描述 |\n| --- | --- | --- |\n| code | Integer | 接口处理结果：0处理完成、1处理失败 |\n| message | String | 接口处理消息或失败原因 |\n| data | Object / Array | 成功时为同步统计对象；失败时可能为空数组 |\n| data.total | Integer | 本批提交的人员总数 |\n| data.created | Integer | 本批新建成功的人员数量 |\n| data.updated | Integer | 本批更新成功的人员数量 |\n| data.failed | Integer | 本批同步失败的人员数量 |\n| trace_id | String | 本次请求链路标识，由系统通用返回方法生成 |\n\n## 8. trace_id 说明\n\n本接口通过系统通用返回方法在响应顶层返回 `trace_id`。问题排查时请优先提供 `trace_id`，并补充接口调用时间、同步批次范围、`customerid`、响应 `code`、`message` 以及 `data.failed`。",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "items"
                ],
                "properties": {
                  "items": {
                    "type": "array",
                    "maxItems": 1000,
                    "description": "人员及卡片列表，单批最多1000条",
                    "items": {
                      "$ref": "#/components/schemas/PersonSyncItem"
                    }
                  }
                }
              },
              "example": {
                "items": [
                  {
                    "bm": "020101900000",
                    "xh": "1skx273",
                    "name": "解航",
                    "sex": 1,
                    "customerid": 29373,
                    "cardno": 1705827,
                    "status": 1,
                    "cardsn": 2
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "接口业务响应，必须检查响应体 code",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SyncPersonsResponse"
                },
                "examples": {
                  "success": {
                    "summary": "同步成功",
                    "value": {
                      "code": 0,
                      "message": "success",
                      "data": {
                        "total": 1,
                        "created": 1,
                        "updated": 0,
                        "failed": 0
                      },
                      "trace_id": "6a671d7d5539d"
                    }
                  },
                  "partialRejected": {
                    "summary": "批次内存在同步失败数据",
                    "value": {
                      "code": 0,
                      "message": "success",
                      "data": {
                        "total": 2,
                        "created": 1,
                        "updated": 0,
                        "failed": 1
                      },
                      "trace_id": "6a671d7d5539d"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/oneCardTerminal/acquire": {
      "post": {
        "summary": "接口 B：获取待结算订单",
        "operationId": "oneCardTerminalAcquire",
        "tags": [
          "外部接口/三方调用康比特/新开普一卡通"
        ],
        "x-apifox-folder": "外部接口/三方调用康比特/新开普一卡通",
        "x-apifox-status": "developing",
        "description": "# 接口 B：获取待结算订单\n\n## 1. 接口概述\n\nWindows 程序先调用一卡通寻卡接口取得有符号32位整数 `uid`，再调用读卡接口取得成功响应中的完整 `data`。本接口将 `uid` 与读卡 `data` 中的全部字段展开后，以顶层平铺参数提交给智慧餐厅，智慧餐厅据此定位人员并查询待刷卡结算订单，返回订单号和订单金额。\n\n读卡接口外层的 `code`、`message` 不需要传入本接口，也不传 `data` 对象本身；只将 `data` 内的全部字段展开到请求体顶层。字段名称、大小写和数值必须保持新开普读卡结果原样，不进行重命名或金额换算。\n\n## 2. 接口信息\n\n- **接口地址**：`https://xxx.com/api/oneCardTerminal/acquire`\n- **请求方法**：POST\n- **Content-Type**：`application/x-www-form-urlencoded`\n- **接口版本**：v1.0\n\n## 3. 请求头（Header）\n\n## 4. 请求参数（Body）\n\n| 参数名 | 类型 | 是否必填 | 描述 | 示例值 |\n| --- | --- | --- | --- | --- |\n| uid | Integer | 是 | 寻卡接口返回的原始 uid，为有符号32位整数；`-1845026871` 按无符号32位解释后对应十六进制 UID `92071FC9` | -1845026871 |\n| cardClass | Integer | 是 | 卡类别，厂商原始字段 | 8 |\n| customerID | Integer | 是 | 一卡通人员账号 | 29373 |\n| cardNO | Integer | 是 | 一卡通业务卡号 | 1705827 |\n| cardSN | Integer | 是 | 持卡序号 | 2 |\n| status | Integer | 是 | 卡状态原始值，状态含义按新开普 SDK 解释 | 241 |\n| subType | Integer | 是 | 补助钱包类型原始值 | 0 |\n| ze | Integer | 是 | 新开普读卡结果中的 ze 原始值，不在 Windows 端换算 | 66464 |\n| ye | Integer | 是 | 主钱包余额原始值，不在 Windows 端换算 | 211 |\n| opCount | Integer | 是 | 主钱包消费计数 | 38 |\n| subYe | Integer | 是 | 补助钱包余额原始值 | 0 |\n| subCount | Integer | 是 | 补助钱包消费计数 | 0 |\n| cardASN | String | 是 | 卡应用序列号 | AA030000026D60992AB9 |\n\n请求示例：\n\n```json\n{\n  \"uid\": -1845026871,\n  \"cardClass\": 8,\n  \"customerID\": 29373,\n  \"cardNO\": 1705827,\n  \"cardSN\": 2,\n  \"status\": 241,\n  \"subType\": 0,\n  \"ze\": 66464,\n  \"ye\": 211,\n  \"opCount\": 38,\n  \"subYe\": 0,\n  \"subCount\": 0,\n  \"cardASN\": \"AA030000026D60992AB9\"\n}\n```\n\n## 5. 响应格式\n\n**获取待结算订单成功响应示例**\n\n```json\n{\n  \"code\": 0,\n  \"message\": \"success\",\n  \"data\": {\n    \"order_no\": \"260815120000001\",\n    \"amount\": 1234\n  },\n  \"trace_id\": \"6a671d7d5539d\"\n}\n```\n\n**未找到待结算订单响应示例**\n\n```json\n{\n  \"code\": 1,\n  \"message\": \"未找到待刷卡结算订单\",\n  \"data\": [],\n  \"trace_id\": \"6a671d7d5539d\"\n}\n```\n\n只有 `code=0` 时才能使用返回的订单号和订单金额继续进行一卡通扣款，扣款金额必须以 `data.amount` 为准。\n\n## 6. 状态码说明\n\n| code | 描述 | Windows处理方式 |\n| --- | --- | --- |\n| 0 | 获取待结算订单成功 | 使用返回的 order_no 和 amount 继续扣款 |\n| 1 | 未找到卡片对应人员或待结算订单 | 不发起扣款，显示 message |\n\n## 7. 响应字段说明\n\n| 字段名 | 类型 | 描述 |\n| --- | --- | --- |\n| code | Integer | 接口处理结果：0成功、1失败 |\n| message | String | 接口处理消息或失败原因 |\n| data | Object / Array | 成功时为订单对象，失败时为空数组 |\n| data.order_no | String | 智慧餐厅待结算订单号 |\n| data.amount | Integer | 待结算订单金额，单位分；由智慧餐厅数据库中的元乘以100转换 |\n| trace_id | String | 本次请求链路标识，由系统通用返回方法生成 |\n\n## 8. trace_id 说明\n\n本接口通过系统通用返回方法在响应顶层返回 `trace_id`。问题排查时请优先提供 `trace_id`，并补充接口调用时间、`uid`、响应 `code`、`message`；完整卡片信息应脱敏后提供。",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/AcquireRequest"
              },
              "example": {
                "uid": -1845026871,
                "cardClass": 8,
                "customerID": 29373,
                "cardNO": 1705827,
                "cardSN": 2,
                "status": 241,
                "subType": 0,
                "ze": 66464,
                "ye": 211,
                "opCount": 38,
                "subYe": 0,
                "subCount": 0,
                "cardASN": "AA030000026D60992AB9"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "接口业务响应，成功时data仅返回订单号和订单金额",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcquireResponse"
                },
                "examples": {
                  "success": {
                    "summary": "获取待结算订单成功",
                    "value": {
                      "code": 0,
                      "message": "success",
                      "data": {
                        "order_no": "260815120000001",
                        "amount": 1234
                      },
                      "trace_id": "6a671d7d5539d"
                    }
                  },
                  "notFound": {
                    "summary": "未找到待结算订单",
                    "value": {
                      "code": 1,
                      "message": "未找到待刷卡结算订单",
                      "data": [],
                      "trace_id": "6a671d7d5539d"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/oneCardTerminal/report": {
      "post": {
        "summary": "接口 C：反馈一卡通扣款结果",
        "operationId": "oneCardTerminalReport",
        "tags": [
          "外部接口/三方调用康比特/新开普一卡通"
        ],
        "x-apifox-folder": "外部接口/三方调用康比特/新开普一卡通",
        "x-apifox-status": "developing",
        "description": "# 接口 C：反馈一卡通扣款结果\n\n## 1. 接口概述\n\nWindows 程序调用一卡通写卡接口后，将获取待结算订单接口返回的 `order_no`，以及一卡通写卡接口外层的 `message` 和写卡接口 `data` 中的 `code、psamID、psamJyNo、tac` 全部字段反馈给智慧餐厅。\n\n智慧餐厅根据写卡结果 `code` 判断扣款是否成功：`code=0` 表示写卡成功，`code≠0` 表示写卡失败。所有写卡结果字段均须按一卡通写卡接口实际返回值原样传输，不得自行生成或修改。\n\n## 2. 接口信息\n\n- **接口地址**：`https://xxx.com/api/oneCardTerminal/report`\n- **请求方法**：POST\n- **Content-Type**：`application/x-www-form-urlencoded`\n- **接口版本**：v1.0\n\n## 3. 请求头（Header）\n\n## 4. 请求参数（Body）\n\n| 参数名 | 类型 | 是否必填 | 描述 | 示例值 |\n| --- | --- | --- | --- | --- |\n| order_no | String | 是 | 来源：获取待结算订单接口成功响应 `data.order_no` | 260815120000001 |\n| code | Integer | 是 | 来源：一卡通写卡接口成功或失败响应 `data.code`；0写卡成功，非0写卡失败，必须原样传入 | 0 |\n| message | String | 是 | 来源：一卡通写卡接口响应外层 `message`；记录写卡结果或具体失败原因，必须原样传入 | 写卡成功 |\n| psamID | Integer(Int64) | 是 | 来源：一卡通写卡接口响应 `data.psamID`；失败时仍传原始返回值，未生成时传0 | 166715196755 |\n| psamJyNo | Integer | 是 | 来源：一卡通写卡接口响应 `data.psamJyNo`；失败时仍传原始返回值，未生成时传0 | 6 |\n| tac | Integer(Int32) | 是 | 来源：一卡通写卡接口响应 `data.tac`；保持原始值，可能为负数，失败时未生成则传0 | -2015100023 |\n\n**扣款成功请求示例**\n\n```json\n{\n  \"order_no\": \"260815120000001\",\n  \"code\": 0,\n  \"message\": \"写卡成功\",\n  \"psamID\": 166715196755,\n  \"psamJyNo\": 6,\n  \"tac\": -2015100023\n}\n```\n\n**扣款失败请求示例**\n\n```json\n{\n  \"order_no\": \"260815120000001\",\n  \"code\": -1,\n  \"message\": \"写卡失败\",\n  \"psamID\": 0,\n  \"psamJyNo\": 0,\n  \"tac\": 0\n}\n```\n\n失败示例中的 `-1` 和三个 `0` 仅表示写卡接口未成功且未生成交易凭证。正式调用时，Windows 程序必须传入一卡通写卡接口实际返回的 `code、message、psamID、psamJyNo、tac`，不能固定写死示例值。\n\n## 5. 响应格式\n\n本接口没有特殊业务返回参数，使用系统通用返回结构。\n\n**反馈成功响应示例**\n\n```json\n{\n  \"code\": 0,\n  \"message\": \"success\",\n  \"data\": [],\n  \"trace_id\": \"6a671d7d5539d\"\n}\n```\n\n**反馈失败响应示例**\n\n```json\n{\n  \"code\": 1,\n  \"message\": \"订单不存在\",\n  \"data\": [],\n  \"trace_id\": \"6a671d7d5539d\"\n}\n```\n\n注意：响应中的 `code` 表示智慧餐厅是否成功接收和处理本次反馈；请求参数中的 `code` 才表示一卡通写卡成功或失败，两者含义不同。\n\n## 6. 状态码说明\n\n| 响应code | 描述 | Windows处理方式 |\n| --- | --- | --- |\n| 0 | 智慧餐厅已成功接收扣款结果 | 本次反馈完成 |\n| 1 | 智慧餐厅未能处理本次反馈 | 根据message核对order_no后处理 |\n\n## 7. 响应字段说明\n\n| 字段名 | 类型 | 描述 |\n| --- | --- | --- |\n| code | Integer | 通用响应处理结果：0成功、1失败 |\n| message | String | 接口处理消息或失败原因 |\n| data | Array | 无特殊业务返回参数，返回空数组 |\n| trace_id | String | 本次请求链路标识，由系统通用返回方法生成 |\n\n## 8. trace_id 说明\n\n本接口通过系统通用返回方法在响应顶层返回 `trace_id`。问题排查时请优先提供 `trace_id`，并补充 `order_no`、写卡结果 `code`、`message` 和接口调用时间。",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ReportRequest"
              },
              "examples": {
                "success": {
                  "summary": "扣款成功结果",
                  "value": {
                    "order_no": "260815120000001",
                    "code": 0,
                    "message": "写卡成功",
                    "psamID": 166715196755,
                    "psamJyNo": 6,
                    "tac": -2015100023
                  }
                },
                "failed": {
                  "summary": "扣款失败结果",
                  "value": {
                    "order_no": "260815120000001",
                    "code": -1,
                    "message": "写卡失败",
                    "psamID": 0,
                    "psamJyNo": 0,
                    "tac": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "系统通用响应，无特殊业务返回参数",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettlementResponse"
                },
                "examples": {
                  "success": {
                    "summary": "反馈成功",
                    "value": {
                      "code": 0,
                      "message": "success",
                      "data": [],
                      "trace_id": "6a671d7d5539d"
                    }
                  },
                  "failed": {
                    "summary": "反馈失败",
                    "value": {
                      "code": 1,
                      "message": "订单不存在",
                      "data": [],
                      "trace_id": "6a671d7d5539d"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "PersonSyncItem": {
        "type": "object",
        "required": [
          "bm",
          "xh",
          "name",
          "sex",
          "customerid",
          "cardno",
          "status",
          "cardsn"
        ],
        "properties": {
          "bm": {
            "type": "string",
            "maxLength": 200,
            "description": "部门名称或部门标识原值，对应DOWNINFO.bm",
            "example": "020101900000"
          },
          "xh": {
            "type": "string",
            "maxLength": 60,
            "description": "学号或人员编号，对应DOWNINFO.xh",
            "example": "1skx273"
          },
          "name": {
            "type": "string",
            "maxLength": 40,
            "description": "人员姓名，对应DOWNINFO.name",
            "example": "解航"
          },
          "sex": {
            "type": "integer",
            "enum": [
              0,
              1
            ],
            "description": "性别，对应DOWNINFO.sex：1男、0女",
            "example": 1
          },
          "customerid": {
            "type": "integer",
            "format": "int32",
            "description": "一卡通账号，对应DOWNINFO.customerid",
            "example": 29373
          },
          "cardno": {
            "type": "integer",
            "format": "int32",
            "description": "一卡通卡号，对应DOWNINFO.cardno",
            "example": 1705827
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "description": "客户状态，对应DOWNINFO.status；具体状态含义由新开普确认",
            "example": 1
          },
          "cardsn": {
            "type": "integer",
            "format": "int32",
            "description": "个人持卡序号，对应DOWNINFO.cardsn",
            "example": 2
          }
        }
      },
      "AcquireRequest": {
        "type": "object",
        "required": [
          "uid",
          "cardClass",
          "customerID",
          "cardNO",
          "cardSN",
          "status",
          "subType",
          "ze",
          "ye",
          "opCount",
          "subYe",
          "subCount",
          "cardASN"
        ],
        "properties": {
          "uid": {
            "type": "integer",
            "format": "int32",
            "description": "寻卡接口返回的原始uid，为有符号32位整数；-1845026871按无符号32位解释后对应十六进制UID 92071FC9",
            "example": -1845026871
          },
          "cardClass": {
            "type": "integer",
            "description": "卡类别，厂商原始字段",
            "example": 8
          },
          "customerID": {
            "type": "integer",
            "description": "一卡通人员账号",
            "example": 29373
          },
          "cardNO": {
            "type": "integer",
            "description": "一卡通业务卡号",
            "example": 1705827
          },
          "cardSN": {
            "type": "integer",
            "description": "持卡序号",
            "example": 2
          },
          "status": {
            "type": "integer",
            "description": "卡状态原始值",
            "example": 241
          },
          "subType": {
            "type": "integer",
            "description": "补助钱包类型原始值",
            "example": 0
          },
          "ze": {
            "type": "integer",
            "description": "新开普读卡结果中的ze原始值",
            "example": 66464
          },
          "ye": {
            "type": "integer",
            "description": "主钱包余额原始值",
            "example": 211
          },
          "opCount": {
            "type": "integer",
            "description": "主钱包消费计数",
            "example": 38
          },
          "subYe": {
            "type": "integer",
            "description": "补助钱包余额原始值",
            "example": 0
          },
          "subCount": {
            "type": "integer",
            "description": "补助钱包消费计数",
            "example": 0
          },
          "cardASN": {
            "type": "string",
            "description": "卡应用序列号",
            "example": "AA030000026D60992AB9"
          }
        },
        "additionalProperties": false
      },
      "ReportRequest": {
        "type": "object",
        "required": [
          "order_no",
          "code",
          "message",
          "psamID",
          "psamJyNo",
          "tac"
        ],
        "additionalProperties": false,
        "properties": {
          "order_no": {
            "type": "string",
            "description": "来源：获取待结算订单接口成功响应data.order_no",
            "example": "260815120000001"
          },
          "code": {
            "type": "integer",
            "format": "int32",
            "description": "来源：一卡通写卡接口响应data.code；0成功，非0失败，必须原样传入",
            "example": 0
          },
          "message": {
            "type": "string",
            "description": "来源：一卡通写卡接口响应外层message；记录写卡结果或具体失败原因，必须原样传入",
            "example": "写卡成功"
          },
          "psamID": {
            "type": "integer",
            "format": "int64",
            "description": "来源：一卡通写卡接口响应data.psamID；失败时未生成则传0",
            "example": 166715196755
          },
          "psamJyNo": {
            "type": "integer",
            "format": "int32",
            "description": "来源：一卡通写卡接口响应data.psamJyNo；失败时未生成则传0",
            "example": 6
          },
          "tac": {
            "type": "integer",
            "format": "int32",
            "description": "来源：一卡通写卡接口响应data.tac；保持原始值，可能为负数，失败时未生成则传0",
            "example": -2015100023
          }
        }
      },
      "SettlementData": {
        "type": "object",
        "properties": {
          "settlement_no": {
            "type": "string",
            "description": "智慧餐厅结算单号"
          },
          "order_no": {
            "type": "string",
            "description": "智慧餐厅就餐订单号"
          },
          "amount": {
            "type": "integer",
            "description": "应扣金额，单位分"
          },
          "status": {
            "type": "string",
            "enum": [
              "locked",
              "card_success",
              "success",
              "failed",
              "unknown",
              "manual"
            ],
            "description": "结算状态"
          },
          "acc_num": {
            "type": "string",
            "description": "一卡通人员账户号"
          },
          "card_acc_num": {
            "type": "string",
            "description": "一卡通卡账户号/cardNO"
          },
          "system_card_id": {
            "type": "string",
            "description": "智慧餐厅十进制卡号"
          },
          "vendor_reader_card_no": {
            "type": "string",
            "description": "厂商读卡器原始UID"
          },
          "lock_expire_time": {
            "type": "string",
            "description": "未扣卡前锁到期时间"
          },
          "lock_token": {
            "type": "string",
            "description": "仅acquire响应返回，report必须原样携带"
          }
        }
      },
      "SyncPersonsResponse": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer"
          },
          "message": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer"
              },
              "created": {
                "type": "integer"
              },
              "updated": {
                "type": "integer"
              },
              "failed": {
                "type": "integer",
                "description": "本批同步失败的人员数量"
              }
            }
          },
          "trace_id": {
            "type": "string",
            "description": "请求链路标识，由系统通用返回方法生成",
            "example": "6a671d7d5539d"
          }
        },
        "required": [
          "code",
          "message",
          "data",
          "trace_id"
        ]
      },
      "AcquireResponse": {
        "type": "object",
        "required": [
          "code",
          "message",
          "data",
          "trace_id"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "description": "0成功、1失败",
            "example": 0
          },
          "message": {
            "type": "string",
            "description": "处理消息",
            "example": "success"
          },
          "data": {
            "type": "object",
            "required": [
              "order_no",
              "amount"
            ],
            "properties": {
              "order_no": {
                "type": "string",
                "description": "智慧餐厅待结算订单号",
                "example": "260815120000001"
              },
              "amount": {
                "type": "integer",
                "description": "待结算订单金额，单位分；由智慧餐厅数据库中的元乘以100转换",
                "example": 1234
              }
            }
          },
          "trace_id": {
            "type": "string",
            "description": "请求链路标识，由系统通用返回方法生成",
            "example": "6a671d7d5539d"
          }
        }
      },
      "SettlementResponse": {
        "type": "object",
        "required": [
          "code",
          "message",
          "data",
          "trace_id"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "description": "通用响应处理结果：0成功、1失败",
            "example": 0
          },
          "message": {
            "type": "string",
            "description": "接口处理消息",
            "example": "success"
          },
          "data": {
            "type": "array",
            "description": "无特殊业务返回参数，返回空数组",
            "items": {}
          },
          "trace_id": {
            "type": "string",
            "description": "请求链路标识，由系统通用返回方法生成",
            "example": "6a671d7d5539d"
          }
        }
      }
    }
  }
}
