fix: scope smart loading recommendations

This commit is contained in:
2026-09-14 17:22:09 +08:00
parent 8a1e587ee4
commit 64bddb1f81
10 changed files with 199 additions and 44 deletions
@@ -678,6 +678,20 @@ paths:
responses:
'200': {description: 成功、计划不存在或计划已进入预装流程}
'403': {description: 无智能装柜查询权限}
/api/platform/v1/first-leg/smart-loading/plans/{planId}/recommend:
post:
summary: 按当前筛选范围执行智能装柜推荐
description: >-
需要 platform:firstleg:smart-loading:assign 权限。customerId 与 inboundCode 均为可选推荐范围;
传入时只推荐同时命中的候选,避免把同渠道历史候选批量加入当前柜。未传时按柜次渠道推荐全部可用候选。
一件代发仍按每个已封托托盘整体加入,不得按箱拆分;同一次推荐完成后按受影响客户统一重算费用。
parameters:
- {name: planId, in: path, required: true, schema: {type: string, pattern: '^[1-9][0-9]*$'}}
requestBody:
required: true
content: {application/json: {schema: {$ref: '#/components/schemas/SmartLoadingRecommendRequest'}}}
responses:
'200': {description: 成功或业务失败,data 为最新 SmartLoadingPlan}
/api/platform/v1/first-leg/smart-loading/plans/{planId}/assignments:
post:
summary: 向预装计划新增入库单明细
@@ -2304,6 +2318,14 @@ components:
packageCount: {type: integer, minimum: 1, description: 待审核订单本次占用的申报箱数}
expectedVersion: {type: integer, minimum: 0, description: 当前 planVersion}
operationId: {type: string, minLength: 1, maxLength: 128}
SmartLoadingRecommendRequest:
type: object
required: [expectedVersion, operationId]
properties:
expectedVersion: {type: integer, minimum: 0, description: 当前 planVersion}
operationId: {type: string, minLength: 1, maxLength: 128}
customerId: {type: string, pattern: '^[1-9][0-9]*$', nullable: true, description: 当前页面客户筛选;传入时限制推荐范围}
inboundCode: {type: string, minLength: 1, maxLength: 64, nullable: true, description: 当前页面入仓码筛选;传入时限制推荐范围}
SmartLoadingAdjustRequest:
type: object
required: [packageCount, expectedPlanVersion, expectedItemVersion, operationId]