feat: 完善WCS调度、库存追溯和出库分配
This commit is contained in:
109
apifox-wcs-allocation.openapi.json
Normal file
109
apifox-wcs-allocation.openapi.json
Normal file
@@ -0,0 +1,109 @@
|
||||
{
|
||||
"openapi": "3.0.3",
|
||||
"info": {
|
||||
"title": "WCS 入库作业与货位分配测试",
|
||||
"version": "1.0.0"
|
||||
},
|
||||
"servers": [
|
||||
{ "url": "http://localhost:8080" }
|
||||
],
|
||||
"tags": [
|
||||
{ "name": "WCS入库货位分配" }
|
||||
],
|
||||
"paths": {
|
||||
"/api/external/wcs/inbound/job": {
|
||||
"post": {
|
||||
"tags": ["WCS入库货位分配"],
|
||||
"summary": "1-WCS获取入库作业",
|
||||
"operationId": "claimDenseInboundJob",
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": { "$ref": "#/components/schemas/WcsDenseInboundJobRequest" },
|
||||
"example": { "trayCode": "TEST-TRAY-001", "entranceId": "IN-01", "height": 1 }
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "业务结果,code=0成功,code=1失败",
|
||||
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/WcsResponse" } } }
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/external/wcs/inbound/location/plan": {
|
||||
"post": {
|
||||
"tags": ["WCS入库货位分配"],
|
||||
"summary": "2-WCS选择入库层(Apifox测试请求)",
|
||||
"description": "实际请求地址为 /api/external/wcs/inbound/location。此处使用独立文档路径,方便在 Apifox 中保存第一阶段请求。",
|
||||
"operationId": "planDenseInboundLayer",
|
||||
"servers": [{ "url": "http://localhost:8080" }],
|
||||
"x-apifox-folder": "WCS入库货位分配",
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": { "$ref": "#/components/schemas/WcsInboundLocationRequest" },
|
||||
"example": { "jobId": "替换为获取作业返回的jobId", "height": 1, "availableLayers": [1, 2, 3, 4, 5], "currentLayers": [2], "allocationStage": 1 }
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": { "200": { "description": "成功时data.roadwayId为选中层", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WcsResponse" } } } } },
|
||||
"x-apifox-url": "/api/external/wcs/inbound/location"
|
||||
}
|
||||
},
|
||||
"/api/external/wcs/inbound/location/allocate": {
|
||||
"post": {
|
||||
"tags": ["WCS入库货位分配"],
|
||||
"summary": "3-WCS分配具体货位(Apifox测试请求)",
|
||||
"description": "实际请求地址为 /api/external/wcs/inbound/location。此处使用独立文档路径,方便在 Apifox 中保存第二阶段请求。",
|
||||
"operationId": "allocateDenseInboundLocation",
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": { "$ref": "#/components/schemas/WcsInboundLocationRequest" },
|
||||
"example": { "jobId": "替换为同一个jobId", "height": 1, "availableLayers": [1, 2, 3, 4, 5], "currentLayers": [2], "allocationStage": 2 }
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": { "200": { "description": "成功时返回cargoSpaceId和cargoSpaceName", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WcsResponse" } } } } },
|
||||
"x-apifox-url": "/api/external/wcs/inbound/location"
|
||||
}
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"WcsDenseInboundJobRequest": {
|
||||
"type": "object",
|
||||
"required": ["trayCode", "entranceId", "height"],
|
||||
"properties": {
|
||||
"trayCode": { "type": "string", "description": "03仓已有待领取入库作业的托盘号" },
|
||||
"entranceId": { "type": "string", "description": "WCS入口号" },
|
||||
"height": { "type": "integer", "enum": [1, 2], "description": "货物高度层级" }
|
||||
}
|
||||
},
|
||||
"WcsInboundLocationRequest": {
|
||||
"type": "object",
|
||||
"required": ["jobId", "height", "availableLayers", "currentLayers", "allocationStage"],
|
||||
"properties": {
|
||||
"jobId": { "type": "string" },
|
||||
"height": { "type": "integer", "enum": [1, 2] },
|
||||
"availableLayers": { "type": "array", "minItems": 1, "items": { "type": "integer", "minimum": 1, "maximum": 5 } },
|
||||
"currentLayers": { "type": "array", "items": { "type": "integer", "minimum": 1, "maximum": 5 } },
|
||||
"allocationStage": { "type": "integer", "enum": [1, 2] }
|
||||
}
|
||||
},
|
||||
"WcsResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": { "type": "integer", "enum": [0, 1] },
|
||||
"msg": { "type": "string" },
|
||||
"data": { "type": "object", "nullable": true, "additionalProperties": true }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user