fix: stabilize API routing and simplify delivery reports

This commit is contained in:
zeroerr.th51
2026-10-16 11:02:03 +08:00
parent bc3dda55ff
commit d5eef9de57
9 changed files with 215 additions and 14 deletions

View File

@@ -47,7 +47,7 @@ Stop if:
- Inventory accounting and delivery calculation belong to the upstream API. Do not calculate a local production quantity, send a reduced or inflated quantity, or issue a second production query.
- Display each model's own returned inventory coverage against original demand. A displayed inventory gap is informational and must not become a new API quantity. Missing or invalid stock means unknown coverage, never zero; do not discard valid API workdays/date solely because inventory display is unavailable.
- Remove the obsolete partial-stock/production-quantity shortcut rejection. API failures and missing or invalid workdays/date retain existing error handling.
- Replies show original demand and actual API query quantity per model, without local net-demand or production-quantity fields. New records preserve the same actual API quantities; leave historical records unchanged.
- Replies show original demand per model. Hide the technical explanation lines `数量传递规则`, `库存覆盖口径` and `API查询数量` in both initial and continuation replies, along with the obsolete local net-demand or production-quantity fields. New internal records preserve the actual API quantities and quantity rules for traceability; leave historical records unchanged.
## Feishu Message Trigger Gate
@@ -179,8 +179,6 @@ Use this field order for a successful Feishu report:
关节模组交期预估报告 | {generation time}
输入需求:{input model},{input quantity}台
数量传递规则:原始需求原样传入API,库存及交期测算由API处理
库存覆盖口径:按原始需求数量展示API返回的库存覆盖情况
数据时间戳:{API data timestamp or generation time}
状态:试运行版输出 / 内部候选
判断等级:AM516算法预测参考,需人工复核
@@ -195,7 +193,6 @@ Use this field order for a successful Feishu report:
1. {model}({candidate type and reducer brand})
- 需求数量:{input quantity}台
- API查询数量:{original demand}台
- AM516预测交期:{API workdays}个工作日,最终交货日期:{API final delivery date}
- 可用库存/覆盖情况:{summary-level inventory and coverage only}
- 主导因素:{main factor}
@@ -219,6 +216,12 @@ Use Feishu rich-text `post` output. Bold only:
- each numbered candidate heading;
- `不可用候选:`.
Also bold the `X个工作日` value and the final delivery date (`YYYY-MM-DD`)
in `最快候选交期` and each model's `AM516预测交期`, for both initial and
continuation replies. Use native Feishu text-element `style: ["bold"]`, keeping
the field labels and separating punctuation in normal weight. Dates in the
report title or data timestamp are not included in this emphasis.
Do not repeat a separate human-review line under each candidate. The global judgment level and fixed disclaimer carry the human-review boundary.
If the current candidate-batch report exceeds the Feishu rich-text size limit, split it into multiple ordered `post` replies without dropping any candidate queried in that batch. Use the original report title on the first part and append `(续)` to continuation titles.