This commit is contained in:
2026-08-07 17:36:02 +08:00
parent 91f31d9567
commit 98ac9840c2
10 changed files with 172 additions and 5 deletions
@@ -395,8 +395,12 @@ public class PlatformPriceBookService {
issues.add(issue("BLOCKING", "SOURCE_LOCATION_MISSING", "价格行缺少Excel来源位置", rate.sourceSheetName(), rate.sourceRowNumber(), null));
validateOrigin(rate, warehouseCache, issues);
validateDestination(rate, warehouseCache, issues);
String key = String.join("|", code, text(rate.originWarehouseId()), enumText(rate.destinationType()),
text(rate.destinationWarehouseId()), nullToEmpty(upper(rate.destinationCode())),
String originIdentity = rate.originWarehouseId() == null
? "CODE:" + mappingKey(rate.originWarehouseCode()) : "ID:" + rate.originWarehouseId();
String destinationIdentity = rate.destinationWarehouseId() == null
? "NAME:" + mappingKey(rate.destinationName()) : "ID:" + rate.destinationWarehouseId();
String key = String.join("|", code, originIdentity, enumText(rate.destinationType()),
destinationIdentity, nullToEmpty(upper(rate.destinationCode())),
rate.regionCode() == null ? "" : rate.regionCode().name(), rate.pricingTaxMode() == null ? "" : rate.pricingTaxMode().name(),
rate.chargeUnit(), text(rate.weightFromKg()));
if (!unique.add(key)) issues.add(issue("BLOCKING", "DUPLICATE_RATE", "存在重复价格组合", rate.sourceSheetName(), rate.sourceRowNumber(), null));
@@ -368,7 +368,7 @@ CREATE TABLE IF NOT EXISTS fl_carrier_fba_rate (
source_destination_text VARCHAR(1000) NULL COMMENT '原始组合仓库或区域文本',
effective_from DATETIME(3) NOT NULL COMMENT '生效开始时间',
effective_to DATETIME(3) NULL COMMENT '生效结束时间',
status VARCHAR(16) NOT NULL DEFAULT 'ACTIVE' COMMENT '价格状态',
status VARCHAR(24) NOT NULL DEFAULT 'ACTIVE' COMMENT '价格状态:PENDING_CONFIRMATION、ACTIVE或SUPERSEDED',
remark VARCHAR(500) NULL COMMENT '价格备注',
created_by BIGINT UNSIGNED NOT NULL COMMENT '创建人ID',
created_at DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '创建时间',
@@ -163,6 +163,35 @@ paths:
responses:
'200': {description: 成功或业务失败,按响应体 code 判断}
'403': {description: 无查看权限}
/api/platform/inbounds/{inboundId}/carton-label-pdf:
post:
summary: 生成或补打入仓箱唛 PDF
description: 需要 platform:firstleg:inbound:view 权限;首次打印冻结整单箱号,重复打印和部分补打复用原映射。
parameters:
- {name: tenantId, in: query, required: true, schema: {type: string, pattern: '^[1-9][0-9]*$'}}
- {name: inboundId, in: path, required: true, schema: {type: string, pattern: '^[1-9][0-9]*$'}}
- name: cartonIndex
in: query
required: false
style: form
explode: true
schema: {type: array, items: {type: integer, minimum: 1}}
description: 不传时打印整单;可重复传入以部分补打指定箱下标。
responses:
'200':
description: 成功返回 PDF;业务失败返回统一 JSON 响应,调用方必须按 Content-Type 区分。
content:
application/pdf: {schema: {type: string, format: binary}}
application/json:
schema:
type: object
required: [code, message]
properties:
code: {type: string}
message: {type: string}
requestId: {type: string, nullable: true}
traceId: {type: string, nullable: true}
'403': {description: 无查看权限}
/api/platform/v1/inbounds/{inboundId}/measurements/approve:
post:
summary: 审核通过测量