fix: deduct available stock before production yield adjustment

This commit is contained in:
ar51
2026-10-12 11:57:24 +08:00
parent de6656dfe0
commit edefe52082
6 changed files with 246 additions and 80 deletions

View File

@@ -9,7 +9,7 @@
5. If that domain-and-permission record is absent, stop before any outbound request; a general functional-test approval is insufficient by itself.
6. Use model recommendation rules to generate the complete ordered internal candidate pool.
7. Immediately add the Feishu `OnIt` (typing) reaction to the original message to acknowledge the valid request.
8. Run the controlled script for the original model baseline and only the first four candidate models.
8. For the baseline and first four candidate models, follow [stock-first quantity rules](production_quantity.md): read each model's own stock with original demand, deduct it, then divide the net gap by 95% yield and round up to five. Query production quantity when required; do not send zero, mix changed stock snapshots or accept a false stock shortcut.
9. Read `data.交期汇总.AM516工作日交期` and `data.交期汇总.AM516最终交货日期` directly. Require a nonnegative whole-number workday count and a valid `YYYY-MM-DD` date; missing or invalid fields make the result unavailable. Do not convert natural days or recalculate dates locally.
10. Summarize the current batch with the API workdays and final delivery date, for example `AM516预测交期:8个工作日,最终交货日期:2026-10-08`; state how many candidates remain and invite the same sender to ask naturally for more when candidates remain. Newly appended records use the same form; historical records are unchanged.
11. Append a non-secret record.