{
  "openapi": "3.0.3",
  "info": {
    "title": "海解货票款：普通产品下单到发货",
    "version": "2026-10-15",
    "description": "现有应用 HTTP 契约，含 DSL 表单接口。不是新增 API 服务，不含 API Key、OAuth、MCP。先读 README.md 和 AGENT.md；示例 ID 必须替换。所有写请求需符合真实业务状态。"
  },
  "servers": [
    {
      "url": "http://localhost:8889",
      "description": "本地示例；远程部署请替换为实际 HTTPS 地址"
    }
  ],
  "security": [
    {
      "sessionCookie": []
    }
  ],
  "components": {
    "securitySchemes": {
      "sessionCookie": {
        "type": "apiKey",
        "in": "cookie",
        "name": "EZ_SID",
        "description": "实际登录签发的会话 Cookie；HTTP 客户端保存完整 cookie jar，包括 JSESSIONID。禁止生成、伪造或公开 Cookie。"
      }
    },
    "schemas": {
      "EzResult": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "data": {
            "description": "形状依接口而异，以当前源码和真实响应为准"
          },
          "count": {
            "type": "integer"
          }
        },
        "required": [
          "success",
          "code"
        ]
      }
    }
  },
  "paths": {
    "/login/currentUser.html": {
      "get": {
        "operationId": "scenario01_01",
        "summary": "检查登录",
        "description": "返回 data.userName。公司由登录账号决定，调用前人工核对登录账套。",
        "responses": {
          "200": {
            "description": "正常登录返回 success=true、data.userName；此接口无 code 字段。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "userName": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        }
      }
    },
    "/saleorder/trader/search": {
      "get": {
        "operationId": "scenario01_02",
        "summary": "查找客户",
        "description": "按名称定位客户；多条匹配必须让用户选择。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "parameters": [
          {
            "name": "keyword",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "客户关键词"
          }
        ]
      }
    },
    "/trader/detail/contacts": {
      "get": {
        "operationId": "scenario01_03",
        "summary": "查询客户联系人",
        "description": "只使用所选客户所属联系人。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "业务单据 ID，取上一步响应；不是单号"
          }
        ]
      }
    },
    "/trader/detail/addresses": {
      "get": {
        "operationId": "scenario01_04",
        "summary": "查询客户地址",
        "description": "核对真实收货地址及联系人。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "业务单据 ID，取上一步响应；不是单号"
          }
        ]
      }
    },
    "/saleorder/warehouse/list": {
      "get": {
        "operationId": "scenario01_05",
        "summary": "查询销售仓库",
        "description": "本场景选择实体仓；不选择供应商直发虚拟仓。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        }
      }
    },
    "/saleorder/product/search": {
      "get": {
        "operationId": "scenario01_06",
        "summary": "查询产品",
        "description": "检查业务类型 GENERAL、普通库存类型 2；不要把 GENERAL 与库存类型混为一谈。搜索结果不足时在商品详情人工核实。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "parameters": [
          {
            "name": "keyword",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "商品编码或名称"
          },
          {
            "name": "pageIndex",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "页码，从 1 开始"
          }
        ]
      }
    },
    "/p/form/submit-saleorder/saleorder-step1": {
      "post": {
        "operationId": "scenario01_07",
        "summary": "创建销售单头",
        "description": "现有 DSL 表单协议。先 GET /p/form/page-saleorder/saleorder-step1 核对当前版本表单；返回 data.ID、data.SALEORDER_NO。不可传入公司、操作人或自定义单号。本请求省略 ID 表示新增。本例客户、收货方、发票抬头相同，显式填写三组 ID；实际收货方不同需逐一查询确认。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "TRADER_ID": {
                    "type": "integer",
                    "description": "客户 ID",
                    "format": "int64"
                  },
                  "TRADER_CONTACT_ID": {
                    "type": "integer",
                    "description": "客户联系人 ID",
                    "format": "int64"
                  },
                  "TRADER_ADDRESS_ID": {
                    "type": "integer",
                    "description": "客户地址 ID",
                    "format": "int64"
                  },
                  "WAREHOUSE_ID": {
                    "type": "integer",
                    "description": "实体仓 ID",
                    "format": "int64"
                  },
                  "TAKE_TRADER_ID": {
                    "type": "integer",
                    "description": "收货客户 ID，本例与客户相同",
                    "format": "int64"
                  },
                  "TAKE_TRADER_CONTACT_ID": {
                    "type": "integer",
                    "description": "收货联系人 ID",
                    "format": "int64"
                  },
                  "TAKE_TRADER_ADDRESS_ID": {
                    "type": "integer",
                    "description": "收货地址 ID",
                    "format": "int64"
                  },
                  "INVOICE_TRADER_ID": {
                    "type": "integer",
                    "description": "发票抬头客户 ID，本例与客户相同",
                    "format": "int64"
                  },
                  "INVOICE_TRADER_CONTACT_ID": {
                    "type": "integer",
                    "description": "发票联系人 ID",
                    "format": "int64"
                  },
                  "INVOICE_TRADER_ADDRESS_ID": {
                    "type": "integer",
                    "description": "发票地址 ID",
                    "format": "int64"
                  }
                },
                "required": [
                  "TRADER_ID",
                  "TRADER_CONTACT_ID",
                  "TRADER_ADDRESS_ID",
                  "WAREHOUSE_ID",
                  "TAKE_TRADER_ID",
                  "TAKE_TRADER_CONTACT_ID",
                  "TAKE_TRADER_ADDRESS_ID",
                  "INVOICE_TRADER_ID",
                  "INVOICE_TRADER_CONTACT_ID",
                  "INVOICE_TRADER_ADDRESS_ID"
                ]
              },
              "example": {
                "TRADER_ID": 10001,
                "TRADER_CONTACT_ID": 10002,
                "TRADER_ADDRESS_ID": 10003,
                "WAREHOUSE_ID": 10004,
                "TAKE_TRADER_ID": 10001,
                "TAKE_TRADER_CONTACT_ID": 10002,
                "TAKE_TRADER_ADDRESS_ID": 10003,
                "INVOICE_TRADER_ID": 10001,
                "INVOICE_TRADER_CONTACT_ID": 10002,
                "INVOICE_TRADER_ADDRESS_ID": 10003
              }
            }
          }
        }
      }
    },
    "/saleorder/detail/item/save": {
      "post": {
        "operationId": "scenario01_08",
        "summary": "添加普通产品",
        "description": "新行不传 ID；既有行修改才传 ID。只在允许编辑、未付款状态下操作。保存后重读明细和总额；普通仓发 DIRECT_TYPE=0。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "SALEORDER_ID": {
                    "type": "integer",
                    "description": "销售单 ID",
                    "format": "int64"
                  },
                  "PROD_ID": {
                    "type": "integer",
                    "description": "产品 ID",
                    "format": "int64"
                  },
                  "PROD_NUM": {
                    "type": "number",
                    "description": "数量，必须大于 0"
                  },
                  "BASE_PRICE": {
                    "type": "number",
                    "description": "经用户确认的销售单价"
                  },
                  "DIRECT_TYPE": {
                    "type": "integer",
                    "description": "本场景固定 0",
                    "format": "int64"
                  },
                  "PROD_COMMENTS": {
                    "type": "string",
                    "description": "明细备注"
                  },
                  "ID": {
                    "type": "integer",
                    "description": "可选：已有销售明细 ID",
                    "format": "int64"
                  }
                },
                "required": [
                  "SALEORDER_ID",
                  "PROD_ID",
                  "PROD_NUM",
                  "BASE_PRICE",
                  "DIRECT_TYPE"
                ]
              },
              "example": {
                "SALEORDER_ID": 10005,
                "PROD_ID": 10006,
                "PROD_NUM": 2,
                "BASE_PRICE": 100,
                "DIRECT_TYPE": 0
              }
            }
          }
        }
      }
    },
    "/saleorder/detail/header": {
      "get": {
        "operationId": "scenario01_09",
        "summary": "销售单头",
        "description": "核对客户、仓库、总额及审核、收款、发货状态。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "业务单据 ID，取上一步响应；不是单号"
          }
        ]
      }
    },
    "/saleorder/detail/items": {
      "get": {
        "operationId": "scenario01_10",
        "summary": "销售明细",
        "description": "记录商品行 ID、数量、单价。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "业务单据 ID，取上一步响应；不是单号"
          }
        ]
      }
    },
    "/saleorder/detail/arap": {
      "get": {
        "operationId": "scenario01_11",
        "summary": "关联应收",
        "description": "返回关联应收单，记录对应 ID、单号、金额，勿取其他订单应收。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "业务单据 ID，取上一步响应；不是单号"
          }
        ]
      }
    },
    "/saleorder/detail/flow": {
      "get": {
        "operationId": "scenario01_12",
        "summary": "销售资金流水",
        "description": "核对已有收款，避免重复登记。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "业务单据 ID，取上一步响应；不是单号"
          }
        ]
      }
    },
    "/saleorder/detail/outbound": {
      "get": {
        "operationId": "scenario01_13",
        "summary": "关联出库",
        "description": "每行 OUTBOUND_ID 是出库单 ID；行 ID 是出库明细 ID。按产品和关联销售行匹配。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "业务单据 ID，取上一步响应；不是单号"
          }
        ]
      }
    },
    "/mycamunda/check/start/Process_order": {
      "post": {
        "operationId": "scenario01_14",
        "summary": "提交销售审核",
        "description": "提交申请；提交不等于审核通过。重读业务状态后再决定下一步。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "业务单据 ID，取上一步响应；不是单号",
                    "format": "int64"
                  }
                },
                "required": [
                  "id"
                ]
              }
            }
          }
        }
      }
    },
    "/mycamunda/check/complete/Process_order": {
      "post": {
        "operationId": "scenario01_15",
        "summary": "完成销售审核",
        "description": "仅在当前账号有审批资格且用户已授权时调用。pass=true 通过；false 驳回时填写 comment。多级流程需按真实待办逐级办理，不能循环自动点通过。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "业务单 ID",
                    "format": "int64"
                  },
                  "pass": {
                    "type": "boolean",
                    "description": "是否通过"
                  },
                  "comment": {
                    "type": "string",
                    "description": "审核意见"
                  }
                },
                "required": [
                  "id",
                  "pass"
                ]
              }
            }
          }
        }
      }
    },
    "/mycamunda/check/historyJson/Process_order": {
      "get": {
        "operationId": "scenario01_16",
        "summary": "销售审核历史",
        "description": "结合对应单头 CHECK_STATUS 核对审批结果；不以单次 HTTP 200 判断审批完成。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "业务单据 ID，取上一步响应；不是单号"
          }
        ]
      }
    },
    "/mycamunda/check/start/Process_purchase": {
      "post": {
        "operationId": "scenario01_17",
        "summary": "提交采购审核",
        "description": "提交申请；提交不等于审核通过。重读业务状态后再决定下一步。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "业务单据 ID，取上一步响应；不是单号",
                    "format": "int64"
                  }
                },
                "required": [
                  "id"
                ]
              }
            }
          }
        }
      }
    },
    "/mycamunda/check/complete/Process_purchase": {
      "post": {
        "operationId": "scenario01_18",
        "summary": "完成采购审核",
        "description": "仅在当前账号有审批资格且用户已授权时调用。pass=true 通过；false 驳回时填写 comment。多级流程需按真实待办逐级办理，不能循环自动点通过。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "业务单 ID",
                    "format": "int64"
                  },
                  "pass": {
                    "type": "boolean",
                    "description": "是否通过"
                  },
                  "comment": {
                    "type": "string",
                    "description": "审核意见"
                  }
                },
                "required": [
                  "id",
                  "pass"
                ]
              }
            }
          }
        }
      }
    },
    "/mycamunda/check/historyJson/Process_purchase": {
      "get": {
        "operationId": "scenario01_19",
        "summary": "采购审核历史",
        "description": "结合对应单头 CHECK_STATUS 核对审批结果；不以单次 HTTP 200 判断审批完成。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "业务单据 ID，取上一步响应；不是单号"
          }
        ]
      }
    },
    "/mycamunda/check/start/Process_finance_arap": {
      "post": {
        "operationId": "scenario01_20",
        "summary": "提交应收应付审核",
        "description": "提交申请；提交不等于审核通过。重读业务状态后再决定下一步。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "业务单据 ID，取上一步响应；不是单号",
                    "format": "int64"
                  }
                },
                "required": [
                  "id"
                ]
              }
            }
          }
        }
      }
    },
    "/mycamunda/check/complete/Process_finance_arap": {
      "post": {
        "operationId": "scenario01_21",
        "summary": "完成应收应付审核",
        "description": "仅在当前账号有审批资格且用户已授权时调用。pass=true 通过；false 驳回时填写 comment。多级流程需按真实待办逐级办理，不能循环自动点通过。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "业务单 ID",
                    "format": "int64"
                  },
                  "pass": {
                    "type": "boolean",
                    "description": "是否通过"
                  },
                  "comment": {
                    "type": "string",
                    "description": "审核意见"
                  }
                },
                "required": [
                  "id",
                  "pass"
                ]
              }
            }
          }
        }
      }
    },
    "/mycamunda/check/historyJson/Process_finance_arap": {
      "get": {
        "operationId": "scenario01_22",
        "summary": "应收应付审核历史",
        "description": "结合对应单头 CHECK_STATUS 核对审批结果；不以单次 HTTP 200 判断审批完成。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "业务单据 ID，取上一步响应；不是单号"
          }
        ]
      }
    },
    "/finance/arap/detail/bill": {
      "get": {
        "operationId": "scenario01_23",
        "summary": "应收应付单头",
        "description": "读取金额及当前状态。收款和付款使用各自关联的应收/应付单 ID。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "业务单据 ID，取上一步响应；不是单号"
          }
        ]
      }
    },
    "/finance/arap/detail/flows": {
      "get": {
        "operationId": "scenario01_24",
        "summary": "已登记资金流水",
        "description": "读取金额及当前状态。收款和付款使用各自关联的应收/应付单 ID。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "业务单据 ID，取上一步响应；不是单号"
          }
        ]
      }
    },
    "/finance/arap/flow/save": {
      "post": {
        "operationId": "scenario01_25",
        "summary": "登记收付款流水",
        "description": "只记录已实际发生的收付款，不会向银行或支付平台转账。新增不传 ID。金额、对象、时间需用户确认；保存后还需审核对应应收应付单。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "FINANCE_BILL_ID": {
                    "type": "integer",
                    "description": "关联应收/应付单 ID",
                    "format": "int64"
                  },
                  "TRADER_TIME": {
                    "type": "string",
                    "description": "本地交易时间，如 2026-10-15 10:00:00"
                  },
                  "AMOUNT": {
                    "type": "number",
                    "description": "实际发生金额，大于 0"
                  },
                  "TRADER_SUBJECT": {
                    "type": "integer",
                    "description": "1 对公，2 对私",
                    "format": "int64"
                  },
                  "TRADER_MODE": {
                    "type": "integer",
                    "description": "1 支付宝，2 银行，3 微信，4 现金",
                    "format": "int64"
                  },
                  "PAYER": {
                    "type": "string",
                    "description": "付款方"
                  },
                  "PAYEE": {
                    "type": "string",
                    "description": "收款方"
                  },
                  "PAYER_BANK_NAME": {
                    "type": "string",
                    "description": "付款银行"
                  },
                  "PAYER_BANK_ACCOUNT": {
                    "type": "string",
                    "description": "付款账号"
                  },
                  "PAYEE_BANK_NAME": {
                    "type": "string",
                    "description": "收款银行"
                  },
                  "PAYEE_BANK_ACCOUNT": {
                    "type": "string",
                    "description": "收款账号"
                  },
                  "FILE_IDS": {
                    "type": "string",
                    "description": "已上传附件 ID，逗号分隔"
                  },
                  "COMMENTS": {
                    "type": "string",
                    "description": "备注"
                  },
                  "ID": {
                    "type": "integer",
                    "description": "可选：编辑的流水 ID",
                    "format": "int64"
                  }
                },
                "required": [
                  "FINANCE_BILL_ID",
                  "TRADER_TIME",
                  "AMOUNT",
                  "TRADER_SUBJECT",
                  "TRADER_MODE",
                  "PAYER",
                  "PAYEE"
                ]
              },
              "example": {
                "FINANCE_BILL_ID": 10007,
                "TRADER_TIME": "2026-10-15 10:00:00",
                "AMOUNT": 200,
                "TRADER_SUBJECT": 1,
                "TRADER_MODE": 2,
                "PAYER": "经确认的客户名称",
                "PAYEE": "经确认的收款方名称",
                "COMMENTS": "按实际到账凭证登记"
              }
            }
          }
        }
      }
    },
    "/p/list/data-purchase/purchase-suggestion-list": {
      "get": {
        "operationId": "scenario01_26",
        "summary": "查询待采购建议",
        "description": "分页返回 data 列表。仅处理 RELATED_TYPE=2、RELATED_ID=本销售单且 SUGGEST_STATUS=WAIT 的行；LOCKED 不可再次生成。分页参数为 currentPage/perPageInt，勿用 page/limit；总数见同筛选 countpage 接口，不将当前页 count 当总数。注意建议 ID 与产品 ID、销售明细 ID 不同。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "parameters": [
          {
            "name": "RELATED_TYPE",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "销售固定 2"
          },
          {
            "name": "RELATED_ID",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "销售单 ID"
          },
          {
            "name": "currentPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "页码，从 1 开始"
          },
          {
            "name": "perPageInt",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "每页条数"
          }
        ]
      }
    },
    "/p/list/countpage-purchase/purchase-suggestion-list": {
      "get": {
        "operationId": "scenario01_27",
        "summary": "待采购总数",
        "description": "与 data 接口使用相同筛选；读取 count 判断总条数。分页未穷尽时不能假定没有待采。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "parameters": [
          {
            "name": "RELATED_TYPE",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "销售固定 2"
          },
          {
            "name": "RELATED_ID",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "销售单 ID"
          }
        ]
      }
    },
    "/purchase/supplierOptions": {
      "get": {
        "operationId": "scenario01_28",
        "summary": "查询采购供应商",
        "description": "候选不等于可下单；生成时仍校验供应商与产品适用规则。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        }
      }
    },
    "/purchase/warehouseOptions": {
      "get": {
        "operationId": "scenario01_29",
        "summary": "查询采购仓库",
        "description": "本场景使用与销售匹配的实体仓。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        }
      }
    },
    "/purchase/generateFromSuggestion": {
      "post": {
        "operationId": "scenario01_30",
        "summary": "从待采购生成采购单",
        "description": "返回 data.purchaseId。锁定建议后进入采购审核，避免重复调用生成多单。履约方式必须与源建议一致。本场景为 SELF_WAREHOUSE。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ids": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "format": "int64"
                    },
                    "description": "本次选中的待采购建议 ID"
                  },
                  "supplierId": {
                    "type": "integer",
                    "description": "供应商 ID",
                    "format": "int64"
                  },
                  "warehouseId": {
                    "type": "integer",
                    "description": "实体仓 ID",
                    "format": "int64"
                  },
                  "fulfillmentType": {
                    "type": "string",
                    "description": "本场景固定 SELF_WAREHOUSE"
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "待采购建议 ID",
                          "format": "int64"
                        },
                        "purchaseNum": {
                          "type": "number",
                          "description": "本次采购数，不能超过剩余待采数量"
                        },
                        "purchasePrice": {
                          "type": "number",
                          "description": "采购单价，不能小于 0"
                        }
                      },
                      "required": [
                        "id",
                        "purchaseNum",
                        "purchasePrice"
                      ]
                    },
                    "description": "逐行填写数量与采购价，id 对应 ids"
                  }
                },
                "required": [
                  "ids",
                  "supplierId",
                  "warehouseId",
                  "fulfillmentType",
                  "items"
                ]
              },
              "example": {
                "ids": [
                  10008
                ],
                "supplierId": 10009,
                "warehouseId": 10004,
                "fulfillmentType": "SELF_WAREHOUSE",
                "items": [
                  {
                    "id": 10008,
                    "purchaseNum": 2,
                    "purchasePrice": 60
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/purchase/detail/header": {
      "get": {
        "operationId": "scenario01_31",
        "summary": "采购单头",
        "description": "核对供应商、仓库、采购金额及审核状态。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "业务单据 ID，取上一步响应；不是单号"
          }
        ]
      }
    },
    "/purchase/detail/items": {
      "get": {
        "operationId": "scenario01_32",
        "summary": "采购明细",
        "description": "核对数量、价格及销售来源。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "业务单据 ID，取上一步响应；不是单号"
          }
        ]
      }
    },
    "/purchase/detail/payables": {
      "get": {
        "operationId": "scenario01_33",
        "summary": "关联应付",
        "description": "记录 ID、EXPECTED_AMOUNT、PAID_AMOUNT、PAYMENT_STATUS。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "业务单据 ID，取上一步响应；不是单号"
          }
        ]
      }
    },
    "/purchase/detail/inbound": {
      "get": {
        "operationId": "scenario01_34",
        "summary": "关联入库",
        "description": "每行 ID 为入库单 ID；不要用采购单 ID 代替。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "业务单据 ID，取上一步响应；不是单号"
          }
        ]
      }
    },
    "/warehouse/inbound/detail": {
      "get": {
        "operationId": "scenario01_35",
        "summary": "入库详情",
        "description": "data.inbound 为单头、items 为业务行（inboundItemId）、labels 为标签（ID、LABEL_CODE、INBOUND_ITEM_ID）。按关联关系取 ID。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "parameters": [
          {
            "name": "inboundId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "入库单 ID"
          }
        ]
      }
    },
    "/warehouse/inbound/review/oneKeyComplete": {
      "post": {
        "operationId": "scenario01_36",
        "summary": "普通库存一键清点",
        "description": "只在真实收货数量已确认、整单剩余数量全部到齐时使用；部分到货用人工清点。普通产品的普通库存为 2。本场景清点后仍需实体仓上架；系统生成标签，不自己编造。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "inboundId": {
                    "type": "integer",
                    "description": "入库单 ID",
                    "format": "int64"
                  }
                },
                "required": [
                  "inboundId"
                ]
              }
            }
          }
        }
      }
    },
    "/warehouse/inbound/location/rooms": {
      "get": {
        "operationId": "scenario01_37",
        "summary": "查询库房",
        "description": "逐级选择真实库位；不可随意取第一条。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "parameters": [
          {
            "name": "warehouseId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "上一级位置 ID"
          }
        ]
      }
    },
    "/warehouse/inbound/location/areas": {
      "get": {
        "operationId": "scenario01_38",
        "summary": "查询货区",
        "description": "逐级选择真实库位；不可随意取第一条。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "parameters": [
          {
            "name": "warehouseRoomId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "上一级位置 ID"
          }
        ]
      }
    },
    "/warehouse/inbound/location/racks": {
      "get": {
        "operationId": "scenario01_39",
        "summary": "查询货架",
        "description": "逐级选择真实库位；不可随意取第一条。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "parameters": [
          {
            "name": "warehouseAreaId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "上一级位置 ID"
          }
        ]
      }
    },
    "/warehouse/inbound/location/locations": {
      "get": {
        "operationId": "scenario01_40",
        "summary": "查询库位",
        "description": "逐级选择真实库位；不可随意取第一条。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "parameters": [
          {
            "name": "warehouseRackId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "上一级位置 ID"
          }
        ]
      }
    },
    "/warehouse/inbound/putaway/scan/confirm": {
      "post": {
        "operationId": "scenario01_41",
        "summary": "按标签确认上架",
        "description": "逐商品分组提交未上架标签，全部位置必须属于所选实体仓。上架影响库存，先核对实物。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "inboundItemId": {
                    "type": "integer",
                    "description": "入库业务行 ID",
                    "format": "int64"
                  },
                  "warehouseId": {
                    "type": "integer",
                    "description": "仓库 ID",
                    "format": "int64"
                  },
                  "labelCodes": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "本次实际上架的标签码，取 labels.LABEL_CODE"
                  },
                  "warehouseRoomId": {
                    "type": "integer",
                    "description": "库房 ID",
                    "format": "int64"
                  },
                  "warehouseAreaId": {
                    "type": "integer",
                    "description": "货区 ID",
                    "format": "int64"
                  },
                  "warehouseRackId": {
                    "type": "integer",
                    "description": "货架 ID",
                    "format": "int64"
                  },
                  "warehouseLocationId": {
                    "type": "integer",
                    "description": "库位 ID",
                    "format": "int64"
                  }
                },
                "required": [
                  "inboundItemId",
                  "warehouseId",
                  "labelCodes",
                  "warehouseRoomId",
                  "warehouseAreaId",
                  "warehouseRackId",
                  "warehouseLocationId"
                ]
              },
              "example": {
                "inboundItemId": 10010,
                "warehouseId": 10004,
                "labelCodes": [
                  "从入库详情读取的真实标签码"
                ],
                "warehouseRoomId": 10011,
                "warehouseAreaId": 10012,
                "warehouseRackId": 10013,
                "warehouseLocationId": 10014
              }
            }
          }
        }
      }
    },
    "/warehouse/outbound/detail": {
      "get": {
        "operationId": "scenario01_42",
        "summary": "出库作业详情",
        "description": "data.outbound、items、candidateLabels、reviewedLabels、packages。items 的 outboundItemId 提交时字段名为 outboundDetailId；packages 的 PACKAGE_ID 用于后续包裹操作。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "parameters": [
          {
            "name": "outboundId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "出库单 ID"
          }
        ]
      }
    },
    "/warehouse/outbound/pick/start": {
      "post": {
        "operationId": "scenario01_43",
        "summary": "记录拣货",
        "description": "operateNum 是累计数；根据最新 pickedNum 计算。实际拣货后才登记。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "outboundDetailId": {
                    "type": "integer",
                    "description": "出库业务行 ID，不是出库单 ID",
                    "format": "int64"
                  },
                  "operateNum": {
                    "type": "number",
                    "description": "本行累计拣货数，不是本次增量"
                  }
                },
                "required": [
                  "outboundDetailId",
                  "operateNum"
                ]
              },
              "example": {
                "outboundDetailId": 10015,
                "operateNum": 2
              }
            }
          }
        }
      }
    },
    "/warehouse/outbound/pick/complete": {
      "post": {
        "operationId": "scenario01_44",
        "summary": "完成拣货",
        "description": "请求根节点是数组。每行传已拣数量；完成后重读出库详情核对待复核状态。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "outboundDetailId": {
                      "type": "integer",
                      "description": "出库业务行 ID，不是出库单 ID",
                      "format": "int64"
                    },
                    "operateNum": {
                      "type": "number",
                      "description": "本行累计拣货数，不是本次增量"
                    }
                  },
                  "required": [
                    "outboundDetailId",
                    "operateNum"
                  ]
                }
              },
              "example": [
                {
                  "outboundDetailId": 10015,
                  "operateNum": 2
                }
              ]
            }
          }
        }
      }
    },
    "/warehouse/outbound/review/scan": {
      "post": {
        "operationId": "scenario01_45",
        "summary": "按标签复核",
        "description": "每次扫描一个真实候选标签，按标签数量累加，不是每扫一次加 1；重复扫码会失败。普通库存内部标签可从候选数据取得，不要求打印。复核完成自动进入待打包。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "outboundId": {
                    "type": "integer",
                    "description": "出库单 ID",
                    "format": "int64"
                  },
                  "outboundDetailId": {
                    "type": "integer",
                    "description": "对应出库业务行 ID",
                    "format": "int64"
                  },
                  "labelCode": {
                    "type": "string",
                    "description": "实际出库标签码"
                  }
                },
                "required": [
                  "outboundId",
                  "outboundDetailId",
                  "labelCode"
                ]
              }
            }
          }
        }
      }
    },
    "/warehouse/outbound/package/create": {
      "post": {
        "operationId": "scenario01_46",
        "summary": "创建包裹",
        "description": "返回 data 为包裹实体（packageId）；随后重读出库详情，从 packages 的 PACKAGE_ID 核对新包裹。只装入已复核商品。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "outboundId": {
                    "type": "integer",
                    "description": "出库单 ID",
                    "format": "int64"
                  },
                  "verifyLocation": {
                    "type": "string",
                    "description": "打包作业位置说明"
                  },
                  "remark": {
                    "type": "string",
                    "description": "包裹备注"
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "outboundItemId": {
                          "type": "integer",
                          "description": "出库业务行 ID",
                          "format": "int64"
                        },
                        "packageQty": {
                          "type": "number",
                          "description": "本包裹数量，不大于 availablePackingQty"
                        },
                        "skuName": {
                          "type": "string",
                          "description": "商品名称"
                        }
                      },
                      "required": [
                        "outboundItemId",
                        "packageQty"
                      ]
                    },
                    "description": "包裹商品行"
                  }
                },
                "required": [
                  "outboundId",
                  "items"
                ]
              },
              "example": {
                "outboundId": 10016,
                "items": [
                  {
                    "outboundItemId": 10015,
                    "packageQty": 2
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/warehouse/outbound/package/complete": {
      "post": {
        "operationId": "scenario01_47",
        "summary": "完成打包",
        "description": "实物已完成打包后登记。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "packageId": {
                    "type": "integer",
                    "description": "包裹 ID",
                    "format": "int64"
                  }
                },
                "required": [
                  "packageId"
                ]
              }
            }
          }
        }
      }
    },
    "/warehouse/outbound/package/weigh": {
      "post": {
        "operationId": "scenario01_48",
        "summary": "登记重量",
        "description": "按实际称重结果填写。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "packageId": {
                    "type": "integer",
                    "description": "包裹 ID",
                    "format": "int64"
                  },
                  "weight": {
                    "type": "number",
                    "description": "实际重量，必须大于 0；与界面重量单位一致"
                  }
                },
                "required": [
                  "packageId",
                  "weight"
                ]
              }
            }
          }
        }
      }
    },
    "/warehouse/outbound/express/generate": {
      "post": {
        "operationId": "scenario01_49",
        "summary": "登记面单",
        "description": "本接口登记承运商和运单号，不保证调用快递公司购单。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "packageId": {
                    "type": "integer",
                    "description": "包裹 ID",
                    "format": "int64"
                  },
                  "expressCompany": {
                    "type": "string",
                    "description": "真实承运商名称"
                  },
                  "expressNo": {
                    "type": "string",
                    "description": "已取得的真实运单号"
                  }
                },
                "required": [
                  "packageId",
                  "expressCompany",
                  "expressNo"
                ]
              }
            }
          }
        }
      }
    },
    "/warehouse/outbound/express/markPrinted": {
      "post": {
        "operationId": "scenario01_50",
        "summary": "标记面单已打印",
        "description": "只在实际完成打印后调用，接口成功不代表打印机执行成功。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "packageId": {
                    "type": "integer",
                    "description": "包裹 ID",
                    "format": "int64"
                  }
                },
                "required": [
                  "packageId"
                ]
              }
            }
          }
        }
      }
    },
    "/warehouse/outbound/shipping/confirmPackage": {
      "post": {
        "operationId": "scenario01_51",
        "summary": "确认包裹发货",
        "description": "人工确认货物已经交运后调用。需打包、称重、面单及打印状态满足要求。登记成功后重读销售及出库状态；不会替用户完成物理交运。",
        "responses": {
          "200": {
            "description": "先判断响应为 JSON、success=true 且 code=\"0\"，再查询业务状态。data 形状见接口说明。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EzResult"
                }
              }
            }
          },
          "302": {
            "description": "重定向可能表示登录失效；停止写入，重新人工登录。"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "packageId": {
                    "type": "integer",
                    "description": "包裹 ID",
                    "format": "int64"
                  }
                },
                "required": [
                  "packageId"
                ]
              }
            }
          }
        }
      }
    }
  }
}
