Merge remote-tracking branch 'origin/test' into test
# Conflicts: # deploy/sql/README.md
This commit is contained in:
@@ -10,6 +10,9 @@ info:
|
||||
每批最多 200 行,总行数上限 200000;车队报价及出车记录保留业务查询的 5000 条限制。
|
||||
snapshotToken 绑定任务、申请人、执行版本和筛选条件,不表示数据库历史快照。
|
||||
TRIP_OPERATIONS_LIST 的 costVisible 仅由 File 根据申请人的 platform:fleet:trip:list 权限写入,不能信任客户端值。
|
||||
SELFOP_INVENTORY_TURNOVER 每批最多100行;parameters 必须提供库存周转列表的 snapshotContext、expectedTotal 和有序 columns(仅列键)。
|
||||
它沿用 inventory-turnover 的筛选、排序、固定版本及30分钟有效期,拒绝 current/size/includeOverview;版本失效或条数变化整任务失败,不切换到最新数据。
|
||||
columns 由服务端白名单解释并追加统计期间、期间出库、平均日末库存、周转率和历史证据;列头与说明由服务端生成。
|
||||
原 Lastleg 业务 /export CSV 公网接口已移除。文件领取、过期、失败重试由 File 下载中心管理。
|
||||
paths:
|
||||
/internal/exports/v1/{exportType}/batches:
|
||||
@@ -25,7 +28,7 @@ paths:
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
enum: [LAST_MILE_ORDER_LIST, OVERSEAS_INVENTORY_BALANCE, OVERSEAS_INVENTORY_LEDGER, OVERSEAS_QUOTE_LIST, MONTHLY_EXCHANGE_RATE_LIST, VEHICLE_LIST, FLEET_QUOTE_LIST, TRIP_OPERATIONS_LIST]
|
||||
enum: [LAST_MILE_ORDER_LIST, OVERSEAS_INVENTORY_BALANCE, OVERSEAS_INVENTORY_LEDGER, OVERSEAS_QUOTE_LIST, MONTHLY_EXCHANGE_RATE_LIST, VEHICLE_LIST, FLEET_QUOTE_LIST, TRIP_OPERATIONS_LIST, SELFOP_INVENTORY_TURNOVER]
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
|
||||
@@ -21,6 +21,34 @@ info:
|
||||
重试沿既有POST sync-tasks,action=RETRY/requestKey/warehouseCode/taskNo/reason,使用独立sync权限并最终复核资格。
|
||||
security: [{bearerAuth: []}]
|
||||
paths:
|
||||
/api/platform/v1/last-leg/self-operated-analytics/inventory-flow-probe:
|
||||
post:
|
||||
summary: TEST单SKU库存流水有界诊断
|
||||
description: >-
|
||||
仅TEST、BUSINESS、执行开启及配置仓库;PLATFORM、tenantId=0、非代登录、独立platform:self-operated-analytics:sync权限。
|
||||
每个requestKey最多一次供应商请求、第一页最多1000条、时间范围最多31天且不得未来。
|
||||
复用现有账号lease/fence、1200ms间隔、permit和消费记录。占用时拒绝,由操作者另行发起,不自动重试。
|
||||
同键成功重放读取保存结果;同键异参拒绝;失败或结果未知不得重发。任务类型INVENTORY_FLOW_PROBE,成功SAMPLE_DONE,失败DEAD。
|
||||
complete仅证明本次分页记录已全部返回,不证明历史流水无缺失或库存可还原。只保存诊断结果,不发布销量、库存或日样本。
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required: [requestKey, warehouseCode, customerCode, sku, startTime, endTime]
|
||||
properties:
|
||||
requestKey: {type: string, minLength: 1, maxLength: 80}
|
||||
warehouseCode: {type: string, minLength: 1, maxLength: 64}
|
||||
customerCode: {type: string, minLength: 1, maxLength: 64}
|
||||
sku: {type: string, minLength: 1, maxLength: 128}
|
||||
startTime: {type: string, description: 北京时间本地日期时间}
|
||||
endTime: {type: string, description: 北京时间本地日期时间}
|
||||
responses:
|
||||
'200':
|
||||
description: ApiResponse;成功data包含taskNo、complete与page(records、total、current、size、pages、observedAt、egress)。流水字段定义见Integration库存流水合同。业务失败保留错误码,不返回伪成功。
|
||||
'403':
|
||||
description: 非平台或缺少采集权限
|
||||
/api/platform/v1/last-leg/self-operated-analytics/owner-directory:
|
||||
get:
|
||||
summary: 完整资料批次中的客户名称与编码
|
||||
|
||||
+11
-10
@@ -6,12 +6,12 @@ info:
|
||||
仅PLATFORM、tenantId=0、非代登录及platform:self-operated-analytics:list权限。
|
||||
仓库由服务端受控配置校验;不触发采集,不读取来源订单,不调用领星。
|
||||
所选窗口为截至endDate的1~366个完整北京时间自然日,并提供7/15/30天辅助对比;当前库存独立固定版本。
|
||||
每次请求使用REPEATABLE_READ。snapshotContext为服务端重建验证的版本与日代表证据,
|
||||
不作为授权凭据;账号、仓库、截止日、基准、queryAsOf、版本对、范围摘要、
|
||||
重建状态及全部max(30,baseWindowDays)日映射(含缺失日期)逐项重建比较;无效或过期要求整体刷新。
|
||||
历史代表须同范围、正式计划采集、已发布且DAILY_SCHEDULED_FIRST_V1合格标记。
|
||||
每次请求使用REPEATABLE_READ,一致性读固定销量、当前库存及历史日版本映射。
|
||||
snapshotContext保存签名压缩的准确版本清单与缺失日期,不作为授权凭据;后续页按准确ID校验
|
||||
账号、仓库、范围及失效标记,不用墙钟时刻重新推导日头。服务重启、校正失效、规则变更要求整体刷新。
|
||||
历史分母只使用FLOW_EOD_V1日末全品质实物库存,以完整流水及独立库存锚点还原;不与旧计划样本混算。
|
||||
上下文有效期最多30分钟;客户端不能直接指定runId。SKU/关注分页不改变概览范围。
|
||||
历史销量完整性不依赖当前库存新鲜度;缺样本不补零、不缩短周转分母。
|
||||
历史销量完整性不依赖当前库存新鲜度;缺日保持未知、不缩短周转分母。sampleReasonCodes包含流水或独立库存对账失败原因。dailySamples.dayVersionId表示历史日版本标识,非原始库存run。
|
||||
security: [{bearerAuth: []}]
|
||||
paths:
|
||||
/api/platform/v1/last-leg/self-operated-analytics/inventory-turnover:
|
||||
@@ -19,7 +19,7 @@ paths:
|
||||
operationId: inventoryTurnover
|
||||
summary: 单仓SKU或货主三窗口库存周转
|
||||
description: >-
|
||||
精确customerCode限定列表与概览;sku、focus及turnoverStatus只筛列表。
|
||||
customerCodes按所选货主集合限定列表、概览及图表,省略或空集合表示全部;sku、focus、turnoverStatus及hideZeroInventory只筛列表。
|
||||
按完整候选计算依赖后排序分页,未知末尾,同值按SKU及货主或货主编码稳定排序。
|
||||
OWNER不计算整体可售天数;销售事实完整即可展示货主实际出库,不受单SKU观察期影响。
|
||||
SKU出库及无出库判断同样不受首次观察时间限制:可信完整覆盖的缺销量行可计零;实际异常单位或未覆盖日期保持未知。
|
||||
@@ -32,8 +32,9 @@ paths:
|
||||
- {name: endDate, in: query, description: '含截止日,默认北京时间昨天,不接受今日或未来', schema: {type: string, format: date}}
|
||||
- {name: baseWindowDays, in: query, schema: {type: integer, minimum: 1, maximum: 366, default: 30}}
|
||||
- {name: groupBy, in: query, schema: {type: string, enum: [SKU, OWNER], default: SKU}}
|
||||
- {name: customerCode, in: query, schema: {type: string, minLength: 1, maxLength: 64}}
|
||||
- {name: customerCodes, in: query, style: form, explode: true, description: '货主编码多选,重复键传输;同一编码不重复计数,最多100个', schema: {type: array, maxItems: 100, items: {type: string, minLength: 1, maxLength: 64}}}
|
||||
- {name: sku, in: query, description: SKU分组的精确查询,OWNER禁止传入, schema: {type: string, minLength: 1, maxLength: 128}}
|
||||
- {name: hideZeroInventory, in: query, description: 默认隐藏当前全品质实物件数明确为0的SKU或货主汇总行,保留未知;全量筛选后分页,不改变概览及图表, schema: {type: boolean, default: true}}
|
||||
- name: focus
|
||||
in: query
|
||||
schema: {type: string, enum: [ALL, NO_OUTBOUND_IN_WINDOW, COVERAGE_GT, COVERAGE_LE, FROZEN, DEFECTIVE, UNASSESSABLE], default: ALL}
|
||||
@@ -142,17 +143,17 @@ components:
|
||||
analyticsContext: {$ref: './self-operated-analytics-v1.yaml#/components/schemas/Context'}
|
||||
inventoryObservedFrom: {type: string, format: date-time, nullable: true}
|
||||
inventoryObservedUntil: {type: string, format: date-time, nullable: true}
|
||||
sampleRuleVersion: {type: string, enum: [DAILY_SCHEDULED_FIRST_V1]}
|
||||
sampleRuleVersion: {type: string, enum: [FLOW_EOD_V1]}
|
||||
dailySamples:
|
||||
type: array
|
||||
minItems: 30
|
||||
maxItems: 366
|
||||
items:
|
||||
type: object
|
||||
required: [date, runId]
|
||||
required: [date, dayVersionId]
|
||||
properties:
|
||||
date: {type: string, format: date}
|
||||
runId: {type: string, nullable: true, description: 内部版本证据,不作为用户可见编号}
|
||||
dayVersionId: {type: string, nullable: true, description: 内部版本证据,不作为用户可见编号}
|
||||
missingSampleDates: {type: array, items: {type: string, format: date}}
|
||||
accumulationStartedOn: {type: string, format: date, nullable: true}
|
||||
Row:
|
||||
|
||||
Reference in New Issue
Block a user