Merge remote-tracking branch 'origin/dev' into dev
# Conflicts: # deploy/sql/海外区域统一增量-MySQL8.sql # lastleg-service/src/main/java/com/baiyue/lastleg/relabel/service/RelabelApplicationService.java # lastleg-service/src/main/resources/db/lastleg.sql # lastleg-service/src/main/resources/openapi/overseas-business-v1.yaml # lastleg-service/src/test/java/com/baiyue/lastleg/relabel/service/RelabelApplicationServiceTest.java # scripts/README.md
This commit is contained in:
@@ -29,8 +29,8 @@ paths:
|
||||
'409': { description: 入仓码跨客户或快照关系不一致 }
|
||||
/api/pda/v1/last-leg/receiving-containers/candidates:
|
||||
get:
|
||||
summary: 查询当前客户待签收柜号
|
||||
description: 权限 lastleg:pda:operate;仅 PLATFORM OVERSEAS_WAREHOUSE_PDA_OPERATOR 可用;仅返回已单调消费 PICKUP_READY(80) 或更高实际船节点、状态为 RECEIVING_AVAILABLE 的柜,不接收 customerId。
|
||||
summary: 查询当前仓待签收柜号
|
||||
description: 权限 lastleg:pda:operate;仅 PLATFORM OVERSEAS_WAREHOUSE_PDA_OPERATOR 可用;按来源柜跨客户聚合,仅返回已单调消费 PICKUP_READY(80) 或更高实际船节点、状态为 RECEIVING_AVAILABLE 的柜,不接收 customerId。
|
||||
security: [{ bearerAuth: [] }]
|
||||
responses: { '200': { description: 柜号候选及箱数进度, content: { application/json: { schema: { $ref: '#/components/schemas/ReceivingCandidateListApiResponse' } } } }, '403': { description: 缺少 PDA 操作权限 } }
|
||||
/api/pda/v1/last-leg/receiving-containers/warehouse-profile:
|
||||
@@ -42,7 +42,7 @@ paths:
|
||||
/api/pda/v1/last-leg/receiving-containers/{containerNo}:
|
||||
get:
|
||||
summary: 查询待签收柜号详情
|
||||
description: 权限 lastleg:pda:operate;按柜号唯一解析客户并返回柜内全部入仓码、目的类型、目的仓、托数和实收进度。
|
||||
description: 权限 lastleg:pda:operate;按来源柜返回跨客户的全部入仓码、目的类型、目的仓、托数和实收进度;每个入仓码仍按自身客户隔离。
|
||||
security: [{ bearerAuth: [] }]
|
||||
parameters: [{ name: containerNo, in: path, required: true, schema: { type: string } }]
|
||||
responses: { '200': { description: 柜号详情, content: { application/json: { schema: { $ref: '#/components/schemas/ReceivingSessionApiResponse' } } } }, '409': { description: 当前账号已锁定其他柜号 } }
|
||||
@@ -121,6 +121,13 @@ paths:
|
||||
security: [{ bearerAuth: [] }]
|
||||
requestBody: { required: true, content: { application/json: { schema: { $ref: '#/components/schemas/ReceivingCarton' } } } }
|
||||
responses: { '200': { description: 本次与累计实收进度, content: { application/json: { schema: { $ref: '#/components/schemas/ReceivingReceiptApiResponse' } } } }, '409': { description: FBA逐箱、跨柜、重复箱或托盘不匹配 } }
|
||||
/api/pda/v1/last-leg/receiving-containers/current/receipts/pallet:
|
||||
post:
|
||||
summary: 一件代发按完整来源托盘收货
|
||||
description: 权限 lastleg:pda:operate;只允许 ONE_CLICK_DROPSHIP,扫描国内封托后冻结的来源托盘号,一次接收该托全部箱和 SKU 快照;不允许逐箱或拆分接收。
|
||||
security: [{ bearerAuth: [] }]
|
||||
requestBody: { required: true, content: { application/json: { schema: { $ref: '#/components/schemas/ReceivingWholePallet' } } } }
|
||||
responses: { '200': { description: 本次与累计实收进度, content: { application/json: { schema: { $ref: '#/components/schemas/ReceivingReceiptApiResponse' } } } }, '404': { description: 来源托盘不属于当前柜 }, '409': { description: 非一件代发、来源托盘重复或已操作 } }
|
||||
/api/pda/v1/last-leg/receiving-containers/current/complete:
|
||||
post:
|
||||
summary: 完成当前柜收货并入库存
|
||||
@@ -194,11 +201,12 @@ paths:
|
||||
/api/platform/v1/last-leg/orders/{id}/fees:
|
||||
post:
|
||||
summary: 新增尾程订单费用
|
||||
description: 权限 platform:overseas-warehouse:last-mile-order:edit;在订单客户范围内新增费用并记录操作人和处理结果。
|
||||
description: 权限 platform:overseas-warehouse:last-mile-order:edit;在订单客户范围内创建统一费用来源并提交财务审核。
|
||||
security: [{ bearerAuth: [] }]
|
||||
parameters:
|
||||
- { name: id, in: path, required: true, schema: { type: integer, format: int64 } }
|
||||
- { name: customerId, in: query, required: false, schema: { type: string, pattern: '^[1-9][0-9]*$' } }
|
||||
- { name: Idempotency-Key, in: header, required: true, schema: { type: string, minLength: 1, maxLength: 128 } }
|
||||
requestBody:
|
||||
required: true
|
||||
content: { application/json: { schema: { $ref: '#/components/schemas/LastMileFeeCreate' } } }
|
||||
@@ -346,7 +354,15 @@ paths:
|
||||
application/json:
|
||||
schema: { $ref: '#/components/schemas/ChangeReceivingWarehouseRequest' }
|
||||
responses:
|
||||
'200': { description: 更新后的柜级摘要, content: { application/json: { schema: { type: object, properties: { code: { type: string, enum: ['200'] }, data: { $ref: '#/components/schemas/ContainerPlanProgressSummary' } } } } } }
|
||||
'200':
|
||||
description: 更新后的柜级摘要
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
code: { type: string, enum: ['200'] }
|
||||
data: { $ref: '#/components/schemas/ContainerPlanProgressSummary' }
|
||||
'400': { description: 请求无效或目标不是有效 OVERSEAS 仓 }
|
||||
'409': { description: 版本冲突、幂等键冲突或PDA接柜会话已建立 }
|
||||
/api/platform/v1/last-leg/orders/{id}/destination:
|
||||
@@ -624,7 +640,7 @@ paths:
|
||||
description: 权限 platform:overseas-warehouse:outbound:list;只按全局唯一 outboundNo 定位并从记录解析客户范围,不接收 customerId。
|
||||
security: [{ bearerAuth: [] }]
|
||||
parameters: [{ name: outboundNo, in: path, required: true, schema: { type: string } }]
|
||||
responses: { '200': { description: "出库单、出库托盘及关联派送单详情;pallets[].palletNo 为 Warehouse 权威实物托盘码" }, '404': { description: 出库单不存在 } }
|
||||
responses: { '200': { description: '出库单、出库托盘及关联派送单详情;pallets[].palletNo 为 Warehouse 权威实物托盘码' }, '404': { description: 出库单不存在 } }
|
||||
/api/platform/v1/last-leg/outbound-orders/{outboundNo}/cancel:
|
||||
post:
|
||||
summary: 取消未执行出库单
|
||||
@@ -1620,28 +1636,44 @@ components:
|
||||
plannedArrivalAt: { type: string, format: date-time, nullable: true, description: ll_order.estimated_warehouse_at }
|
||||
LastMileFeeCreate:
|
||||
type: object
|
||||
required: [feeItem, currency, amount, status]
|
||||
required: [feeItemCode, feeItemName, direction, currency, amount, businessDate]
|
||||
properties:
|
||||
feeItem: { type: string, minLength: 1, maxLength: 128 }
|
||||
currency: { type: string, pattern: '^[A-Z]{3}$', example: USD }
|
||||
feeItemCode: { type: string, minLength: 1, maxLength: 64 }
|
||||
feeItemName: { type: string, minLength: 1, maxLength: 128 }
|
||||
direction: { type: string, enum: [RECEIVABLE, PAYABLE] }
|
||||
currency: { type: string, enum: [CNY, USD] }
|
||||
amount: { type: number, format: decimal, minimum: 0.01 }
|
||||
status: { type: string, enum: [PENDING_REVIEW, APPROVED, REJECTED] }
|
||||
supplierDescription: { type: string, maxLength: 500 }
|
||||
businessDate: { type: string, format: date }
|
||||
supplierId: { type: string, pattern: '^[1-9][0-9]*$' }
|
||||
supplierName: { type: string, maxLength: 200 }
|
||||
supplierCategory: { type: string, maxLength: 32 }
|
||||
settlementMode: { type: string, enum: [ON_ACCOUNT, DIRECT_PAID] }
|
||||
chargeableQuantity: { type: number, minimum: 0, exclusiveMinimum: true }
|
||||
quantityUnit: { type: string, maxLength: 32 }
|
||||
unitPrice: { type: number, minimum: 0, exclusiveMinimum: true }
|
||||
periodStart: { type: string, format: date }
|
||||
periodEnd: { type: string, format: date }
|
||||
LastMileFee:
|
||||
type: object
|
||||
required: [id, customerId, orderId, feeItem, currency, amount, status, createdBy, createdAt, updatedAt]
|
||||
required: [id, sourceFeeId, sourceVersion, customerId, feeItemCode, feeItemName, direction, currency, amount, originalCurrency, originalAmount, reviewStatus, publicationStatus, sourceStatus]
|
||||
properties:
|
||||
id: { type: integer, format: int64 }
|
||||
id: { type: string, pattern: '^[1-9][0-9]*$' }
|
||||
sourceFeeId: { type: string, pattern: '^[1-9][0-9]*$' }
|
||||
sourceVersion: { type: integer, minimum: 1 }
|
||||
customerId: { type: string }
|
||||
orderId: { type: integer, format: int64 }
|
||||
feeItem: { type: string }
|
||||
currency: { type: string }
|
||||
orderId: { type: string, pattern: '^[1-9][0-9]*$' }
|
||||
feeItemCode: { type: string }
|
||||
feeItemName: { type: string }
|
||||
direction: { type: string, enum: [RECEIVABLE, PAYABLE] }
|
||||
currency: { type: string, enum: [CNY] }
|
||||
amount: { type: number, format: decimal }
|
||||
status: { type: string }
|
||||
supplierDescription: { type: string, nullable: true }
|
||||
createdBy: { type: string }
|
||||
createdAt: { type: string, format: date-time }
|
||||
updatedAt: { type: string, format: date-time }
|
||||
originalCurrency: { type: string, enum: [CNY, USD] }
|
||||
originalAmount: { type: number, format: decimal }
|
||||
exchangeRate: { type: number, format: decimal }
|
||||
exchangeRateMonth: { type: string, pattern: '^\\d{4}-\\d{2}$' }
|
||||
reviewStatus: { type: string, enum: [DRAFT, PENDING, APPROVED, REJECTED] }
|
||||
publicationStatus: { type: string }
|
||||
sourceStatus: { type: string }
|
||||
LastMileFeeApiResponse:
|
||||
type: object
|
||||
required: [code, message, data]
|
||||
@@ -1782,6 +1814,12 @@ components:
|
||||
cartonMark: { type: string, minLength: 1 }
|
||||
palletCode: { type: string, minLength: 1 }
|
||||
idempotencyKey: { type: string, minLength: 1, maxLength: 255 }
|
||||
ReceivingWholePallet:
|
||||
type: object
|
||||
required: [sourcePalletNo, idempotencyKey]
|
||||
properties:
|
||||
sourcePalletNo: { type: string, minLength: 1 }
|
||||
idempotencyKey: { type: string, minLength: 1, maxLength: 255 }
|
||||
ReceivingApiResponseBase:
|
||||
type: object
|
||||
required: [code, message, timestamp]
|
||||
@@ -1793,7 +1831,7 @@ components:
|
||||
timestamp: { type: string, format: date-time }
|
||||
ReceivingInbound:
|
||||
type: object
|
||||
required: [inboundCode, destinationType, plannedPalletCount, totalPackages, receivedPackages, pendingPackages, assigned, mergeAllowed, urgent]
|
||||
required: [inboundCode, destinationType, plannedPalletCount, totalPackages, receivedPackages, pendingPackages, assigned, mergeAllowed, urgent, wholePalletInbound]
|
||||
properties:
|
||||
inboundCode: { type: string }
|
||||
destinationType: { type: string, enum: [FBA, OVERSEAS] }
|
||||
@@ -1905,6 +1943,8 @@ components:
|
||||
mergeAllowed: { type: boolean, description: 现场可选择合托,不作为实收或完成门禁 }
|
||||
urgent: { type: boolean }
|
||||
mergeHint: { type: string, nullable: true }
|
||||
orderType: { type: string, nullable: true }
|
||||
wholePalletInbound: { type: boolean, description: 一件代发必须按完整来源托盘扫描收货 }
|
||||
ReceivingCandidateListApiResponse:
|
||||
allOf:
|
||||
- { $ref: '#/components/schemas/ReceivingApiResponseBase' }
|
||||
@@ -2131,11 +2171,22 @@ components:
|
||||
enum: [START_PROCESSING, COMPLETE_EXCEPTION, CANCEL_EXCEPTION]
|
||||
DeliveryFeeInput:
|
||||
type: object
|
||||
required: [feeType, currency, amount]
|
||||
required: [feeType, feeName, direction, currency, amount]
|
||||
properties:
|
||||
feeType: { type: string, maxLength: 64 }
|
||||
currency: { type: string, maxLength: 8 }
|
||||
amount: { type: number, minimum: 0 }
|
||||
feeName: { type: string, maxLength: 128 }
|
||||
direction: { type: string, enum: [RECEIVABLE, PAYABLE] }
|
||||
currency: { type: string, enum: [CNY, USD] }
|
||||
amount: { type: number, minimum: 0, exclusiveMinimum: true }
|
||||
supplierId: { type: string, pattern: '^[1-9][0-9]*$' }
|
||||
supplierName: { type: string, maxLength: 200 }
|
||||
supplierCategory: { type: string, maxLength: 32 }
|
||||
settlementMode: { type: string, enum: [ON_ACCOUNT, DIRECT_PAID] }
|
||||
chargeableQuantity: { type: number, minimum: 0, exclusiveMinimum: true }
|
||||
quantityUnit: { type: string, maxLength: 32 }
|
||||
unitPrice: { type: number, minimum: 0, exclusiveMinimum: true }
|
||||
periodStart: { type: string, format: date }
|
||||
periodEnd: { type: string, format: date }
|
||||
remark: { type: string, nullable: true, maxLength: 500 }
|
||||
OneClickOutboundCreate:
|
||||
type: object
|
||||
@@ -2317,7 +2368,7 @@ components:
|
||||
required: [customerOrderNo, labelDeadline, contactName, contactPhone, chargeAmount, idempotencyKey, items]
|
||||
properties:
|
||||
customerOrderNo: { type: string, maxLength: 128 }
|
||||
operationWarehouseId: { type: string, maxLength: 128, description: 换标操作所在海外中转仓,和FBA目的仓分离 }
|
||||
overseasWarehouseId: { type: string, nullable: true, maxLength: 128, description: 统一目的海外仓;明细未填写目的仓时使用 }
|
||||
labelDeadline: { type: string, format: date-time }
|
||||
contactName: { type: string, maxLength: 128 }
|
||||
contactPhone: { type: string, maxLength: 64 }
|
||||
@@ -2329,11 +2380,8 @@ components:
|
||||
items: { type: array, minItems: 1, maxItems: 500, items: { $ref: '#/components/schemas/RelabelItem' } }
|
||||
RelabelItem:
|
||||
type: object
|
||||
required: [sourceInventoryBalanceId, sourceInventoryPositionId, sourceInboundOrderId, productNameZh, totalPackageCount, notifiedPackageCount, shipmentNo, cartonMark]
|
||||
required: [productNameZh, totalPackageCount, notifiedPackageCount, shipmentNo, newSkuCode, cartonMark, fbaCartonMark]
|
||||
properties:
|
||||
sourceInventoryBalanceId: { type: string, pattern: '^[0-9]+$', description: 来源库存余额ID }
|
||||
sourceInventoryPositionId: { type: string, pattern: '^[0-9]+$', description: 来源库存仓位ID;同箱任务唯一冻结依据 }
|
||||
sourceInboundOrderId: { type: string, pattern: '^[0-9]+$', description: 来源历史入仓单ID }
|
||||
skuCode: { type: string, nullable: true, maxLength: 128, description: 商品 SKU(选填) }
|
||||
productImageFileId: { type: string, nullable: true, maxLength: 128 }
|
||||
productImageFileName: { type: string, nullable: true, maxLength: 255 }
|
||||
@@ -2343,24 +2391,14 @@ components:
|
||||
notifiedPackageCount: { type: integer, minimum: 1 }
|
||||
shipmentNo: { type: string, maxLength: 128 }
|
||||
trackingCode: { type: string, nullable: true, maxLength: 255 }
|
||||
newSkuCode: { type: string, nullable: true, maxLength: 128, description: 箱唛换标时的单个新SKU兼容字段 }
|
||||
newSkuCode: { type: string, maxLength: 128 }
|
||||
labelRequirement: { type: string, nullable: true, maxLength: 1000 }
|
||||
relabelFileId: { type: string, nullable: true, maxLength: 128 }
|
||||
relabelFileName: { type: string, nullable: true, maxLength: 255 }
|
||||
relabelFileUrl: { type: string, nullable: true, maxLength: 1000 }
|
||||
cartonMark: { type: string, maxLength: 255, description: 我方箱唛;同一申请内不可重复,整箱库存只冻结一次 }
|
||||
fbaCartonMark: { type: string, nullable: true, maxLength: 255, description: 新FBA箱唛;箱唛或组合换标必填 }
|
||||
destinationFbaWarehouseCode: { type: string, nullable: true, maxLength: 128, description: FBA目的仓编码;箱唛或组合换标必填 }
|
||||
operationType: { type: string, enum: [CARTON_LABEL, SKU_LABEL, CARTON_AND_SKU], description: 箱唛换标、SKU换标或组合换标 }
|
||||
skuItems: { type: array, maxItems: 100, description: 同一箱唛内SKU换标子明细,数量按件;SKU或组合换标必填, items: { $ref: '#/components/schemas/RelabelSkuItem' } }
|
||||
RelabelSkuItem:
|
||||
type: object
|
||||
required: [skuCode, newSkuCode, quantity]
|
||||
properties:
|
||||
skuCode: { type: string, maxLength: 128, description: 原SKU }
|
||||
newSkuCode: { type: string, maxLength: 128, description: 换标后SKU }
|
||||
quantity: { type: integer, minimum: 1, description: 换标件数 }
|
||||
remark: { type: string, nullable: true, maxLength: 1000 }
|
||||
cartonMark: { type: string, maxLength: 255, description: 客户自有箱唛(不在编辑列表展示) }
|
||||
fbaCartonMark: { type: string, maxLength: 255, description: 关联 FBA 箱唛 }
|
||||
destinationWarehouseId: { type: string, nullable: true, maxLength: 128, description: 该箱目的海外仓;为空时使用申请统一目的仓 }
|
||||
RelabelStatusChange:
|
||||
type: object
|
||||
required: [status]
|
||||
|
||||
@@ -42,7 +42,7 @@ paths:
|
||||
responses: { '200': { description: 当前费用来源版本 }, '409': { description: 状态、版本或幂等冲突 } }
|
||||
components:
|
||||
schemas:
|
||||
BusinessType: { type: string, enum: [OVERSEAS_INBOUND, OVERSEAS_PROCUREMENT, US_TRUCK, LOCAL_LOOSEBOARD, WAREHOUSE_SERVICE, OVERSEAS_CONTAINER] }
|
||||
BusinessType: { type: string, enum: [OVERSEAS_INBOUND, OVERSEAS_PROCUREMENT, PROCUREMENT_FEE, US_TRUCK, LOCAL_LOOSEBOARD, WAREHOUSE_SERVICE, OVERSEAS_CONTAINER, LASTLEG_ORDER, DELIVERY_ORDER, RELABEL_ORDER] }
|
||||
OverseasContainerFeeItem:
|
||||
type: string
|
||||
description: 海外阶段柜级费用项目:港口费、堆存费、修箱费、吊机费、码头拖车费、其他。
|
||||
@@ -70,7 +70,7 @@ components:
|
||||
required: [customerId, sourceType, businessType, businessNo, feeItemCode, feeItemName, direction, businessDate, currency, amount]
|
||||
properties:
|
||||
customerId: { type: string }
|
||||
sourceType: { type: string, enum: [OVERSEAS_INBOUND_FEE, OVERSEAS_PROCUREMENT_FEE, OVERSEAS_TRUCK_FEE, OVERSEAS_LOOSEBOARD_FEE, OVERSEAS_WAREHOUSE_FEE, OVERSEAS_CONTAINER_FEE] }
|
||||
sourceType: { type: string, enum: [OVERSEAS_INBOUND_FEE, OVERSEAS_PROCUREMENT_FEE, OVERSEAS_TRUCK_FEE, OVERSEAS_LOOSEBOARD_FEE, OVERSEAS_WAREHOUSE_FEE, OVERSEAS_CONTAINER_FEE, OVERSEAS_ORDER_FEE, OVERSEAS_DELIVERY_FEE, OVERSEAS_RELABEL_FEE] }
|
||||
businessType: { $ref: '#/components/schemas/BusinessType' }
|
||||
businessId: { type: string, pattern: '^[1-9][0-9]*$', nullable: true }
|
||||
businessNo: { type: string, maxLength: 128 }
|
||||
@@ -85,6 +85,11 @@ components:
|
||||
feeItemName: { type: string }
|
||||
direction: { type: string, enum: [RECEIVABLE, PAYABLE] }
|
||||
businessDate: { type: string, format: date }
|
||||
currency: { type: string, enum: [CNY] }
|
||||
amount: { type: number, format: decimal, minimum: 0, exclusiveMinimum: true }
|
||||
currency: { type: string, enum: [CNY, USD], description: 业务原币;USD由服务端按业务月份有效汇率折算为CNY入池 }
|
||||
amount: { type: number, format: decimal, minimum: 0, exclusiveMinimum: true, description: 业务原币金额 }
|
||||
chargeableQuantity: { type: number, format: decimal, minimum: 0, exclusiveMinimum: true, nullable: true }
|
||||
quantityUnit: { type: string, maxLength: 32, nullable: true }
|
||||
unitPrice: { type: number, format: decimal, minimum: 0, exclusiveMinimum: true, nullable: true }
|
||||
periodStart: { type: string, format: date, nullable: true }
|
||||
periodEnd: { type: string, format: date, nullable: true }
|
||||
securitySchemes: { bearerAuth: { type: http, scheme: bearer, bearerFormat: JWT } }
|
||||
|
||||
Reference in New Issue
Block a user