Wms API接口
可以基于该接口访问 智慧物流系统 WMS 模块中的库存、库位与仓库任务数据。库存、库位、仓库任务提供分页列表(PageList)查询,仓库任务另外提供创建与取消接口。
基础信息
Base URL: http://logimaster-api-base-url:port/api/wms
通用约定
分页参数
三个接口均支持标准分页参数:
| 参数 | 类型 | 说明 |
|---|---|---|
SkipCount | int | 跳过的记录数,默认 0 |
MaxResultCount | int | 每页返回的最大记录数,默认 10 |
Sorting | string | 排序字段,如 creationTime desc |
分页响应格式
所有列表接口统一返回如下结构:
{
"totalCount": 100,
"items": [ ]
}
API 端点
1. 获取库存列表
GET /stocks
分页查询库存记录。
查询参数
| 参数 | 类型 | 说明 |
|---|---|---|
MaterialCode | string | 物料编码 |
ContainerCode | string | 容器编码 |
StorageBinCode | string | 库位编码 |
StorageBinName | string | 库位名称 |
Code | string | 库存编码 |
Batch | string | 批次 |
Filter | string | 关键字过滤 |
Statuses | array | 库存状态(可多选),见下方枚举 |
IsLocked | boolean | 是否被锁定 |
HasStorageBin | boolean | 是否已绑定库位 |
StockStatus 枚举
| 值 | 名称 | 说明 |
|---|---|---|
| 0 | WaitingForInspection | 等待质检 |
| 1 | Normal | 正常库存 |
| 2 | Blocked | 冻结库存 |
响应
-
200 OK: 返回库存分页列表
{"totalCount": 1,"items": [{"id": "123e4567-e89b-12d3-a456-426614174000","code": "S20260828001","batch": "B20260828","status": 1,"blockReason": null,"quantity": 100,"availableQuantity": 80,"weight": 25.5,"receivingTime": "2026-08-28T08:30:00Z","lastMovementTime": "2026-08-28T10:30:00Z","materialId": "223e4567-e89b-12d3-a456-426614174000","materialCode": "M0001","materialDescription": "白色纱锭","containerId": "323e4567-e89b-12d3-a456-426614174000","containerCode": "C0001","storageBinId": "423e4567-e89b-12d3-a456-426614174000","storageBinCode": "A-01-01","storageBinName": "A区1排1列","resourceLocks": [],"creationTime": "2026-08-28T08:30:00Z"}]}
示例
GET /api/wms/stocks?MaterialCode=M0001&Statuses=1&SkipCount=0&MaxResultCount=10