refactor: gate LF candidates with current AR836 response
This commit is contained in:
1 parent
f1099c84dd
commit
127d88e84e
6 files changed
+112
-244
No files matched your search
@@ -48,9 +48,8 @@ Expected:
|
||||
- each future appended candidate row records the same query-completion time in `YYYY-MM-DD HH:mm:ss +0800` form (with the actual local UTC offset), without rewriting or backfilling historical records;
|
||||
- record-table columns follow this order: 序号、记录时间、型号、推荐类型、差异项、API状态、AM516预测交期、可用库存、主导因素;
|
||||
- unavailable candidates remain in their original rule order and are recorded as `❌ 不可用` with unavailable result fields shown as `—`; lack of a result does not itself establish that the model does not exist;
|
||||
- generated LF candidates pass only when `现货数` and matching LF reducer actual availability cover the original demand; an LF candidate with insufficient combined coverage, missing stock fields, no matched reducer or an inconsistent `需排产数` is absent from the report, fastest comparison, candidate counts and `不可用候选`;
|
||||
- retained results display `现货数` and `需排产数`; retained LF candidates needing production also display the matched reducer code and reducer actual available quantity;
|
||||
- overdue unreserved sales orders returned by the API display the sales-order code and a human-review reminder without automatically releasing inventory;
|
||||
- generated LF candidates pass when finished-product available inventory covers demand, or when the readable AR836 shortage list contains no `20.30.*` reducer constraint after AR836's 95% yield, five-unit rounding and BOM calculation;
|
||||
- an LF candidate with insufficient finished-product inventory plus a `20.30.*` shortage, or with an unreadable shortage list, is absent from the report, fastest comparison, candidate counts and `不可用候选`;
|
||||
|
||||
## Sample 1B | API Workdays And Final Delivery Date
|
||||
|
||||
|
||||
@@ -1,59 +1,36 @@
|
||||
# 来福减速器存量清仓候选门禁
|
||||
# 来福减速器存量清仓候选门禁(AR836 当前接口版)
|
||||
|
||||
## 背景
|
||||
|
||||
来福减速器后续不再采购。使用来福减速器的候选整机只能依据当前整机现货和对应来福减速器实际可用库存推荐,不能用采购在途、待检、固定提前期或未来补货能力补足数量。
|
||||
来福减速器后续不再采购。使用来福减速器的生成候选,必须有整机可用库存或 AR836 根据本次排产需求核算后确认减速器不构成供应约束,不能只凭型号相似和预测交期推荐。
|
||||
|
||||
## AR836 接口字段
|
||||
## 当前使用的 AR836 字段
|
||||
|
||||
AM516 从 `data.库存信息` 读取以下精简字段:
|
||||
AM516 仅依赖现有接口已返回的:
|
||||
|
||||
- `现货数`:候选整机实际可用量。它不是 ERP 库存量,也不是未补扣销售订单占用的可用量。
|
||||
- `需排产数`:`max(需求数量 - 现货数, 0)`。
|
||||
- `对应来福减速器编码`:候选型号匹配的来福减速器物料编码。
|
||||
- `减速器实际可用量`:ERP 即时库存口径下可用于本次生产的数量。
|
||||
- `逾期待复核销售订单`:可选列表;订单超过要货日期 30 天但仍有待锁库/待预留数量时,包含销售订单编码、要货日期和逾期天数。
|
||||
- `data.库存信息.可用库存(扣除了待产数量)`:候选整机的当前可用库存口径。
|
||||
- `data.采购信息.缺料明细[]` 及其 `缺料物料`:物料编码以 `20.30.` 开头的记录视为减速器供应约束。
|
||||
|
||||
`现货数`由 AR836/ERP 侧计算:
|
||||
AR836 已在内部按下列口径把订单数量换算为排产和 BOM 需求:
|
||||
|
||||
```text
|
||||
整机实际可用量
|
||||
= max(
|
||||
ERP可用量(主单位)
|
||||
- 有效销售订单待锁库/待预留数量(换算为主单位), 0
|
||||
)
|
||||
成品缺口 = max(订单需求 - 净可用成品库存, 0)
|
||||
本次排产量 = ceil(成品缺口 / 95% / 5) × 5
|
||||
```
|
||||
|
||||
AM516 不要求接口返回、也不在报告展示以下中间字段:
|
||||
|
||||
- `ERP可用量(主单位)`
|
||||
- `待锁库待预留数量(主单位)`
|
||||
- `实际可用量`
|
||||
- `每台减速器用量`
|
||||
- `合计可覆盖整机数量`
|
||||
- `本次需求数量`
|
||||
- `是否满足推荐门槛`
|
||||
AR836 根据该排产量、BOM 用量、存量需求和当前供应判定减速器是否进入缺料明细。AM516 不重复实现 95% 合格率和 5 台取整。
|
||||
|
||||
## 推荐门禁
|
||||
|
||||
当前业务按每台关节模组使用一件对应减速器判断:
|
||||
|
||||
```text
|
||||
现货数 = 整机实际可用量
|
||||
需排产数 = max(需求数量 - 现货数, 0)
|
||||
|
||||
需排产数 = 0
|
||||
-> 整机现货已覆盖,可保留 LF 候选
|
||||
|
||||
需排产数 > 0 且 减速器实际可用量 >= 需排产数
|
||||
-> 整机现货与减速器库存合计覆盖,可保留 LF 候选
|
||||
|
||||
其他情况
|
||||
-> 剔除 LF 候选
|
||||
若 整机可用库存 >= 本次需求数量 -> 保留
|
||||
否则,若 缺料明细缺失或不可读 -> 保守剔除
|
||||
否则,若 缺料明细中存在 20.30.* 物料 -> 剔除
|
||||
否则 -> AR836 未发现减速器供应约束,保留
|
||||
```
|
||||
|
||||
以下情况同样剔除:字段缺失或不可读、`需排产数`与公式不一致、需要排产但无对应减速器编码。
|
||||
|
||||
被剔除的 LF 型号不出现在关节模组交期预估报告、不可用候选、最快交期比较、现货候选或候选统计中。原始输入型号仍作为基准展示,不按“生成候选”处理。
|
||||
|
||||
逾期销售订单只触发人工复核提醒,不自动释放库存;在 ERP 完成释放前,其待锁库/待预留数量仍由 AR836 扣除在`现货数`之外。
|
||||
## 当前接口的边界
|
||||
|
||||
减速器未进入缺料明细时,当前接口不返回匹配减速器编码和确切库存。本版也不具备销售订单待锁库/待预留的二次扣减、逾期 30 天订单提醒能力;这些需要 AR836 后续增加数据后才能严格实现。
|
||||