dy-dashboard/vault/知识库/工作指南/训练记录/2026-08-14-AI分析库存排行修复.md
2026-10-28 11:14:17 +08:00

14 lines
1.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 2026-08-14 AI分析库存排行修复
**旭东 → OpenClaw:**
> AI分析这里还是有问题,我询问当前库存最多的 10 个 SKU 是哪些?,返回结果是 product_code 库存 云仓库存 外仓库存 加工厂库存 生产在途 采购在途 POZ-BSPW-4985 2 2 0 0 0 0 ... 这明显不对,有0库存,还有包材
**OpenClaw 响应:**
已修复 AI 分析库存排行问题,原因有两处:
1. AI 传了英文字段名(available_stock)做排序,但数据源字段是中文(库存),匹配不上导致排序完全没生效,返回的是随机前 10 行
2. 数据源未过滤包材、内料和虚拟货品(邮费链接/晒单专享礼/服务包等)
修复内容:排序字段支持中英文别名映射;数据源剔除包材(产品类型)、内料(编码含 -NL 或名称含「内料」)、无产品资料的虚拟货品;降序排行自动排除排序字段为 0 的行。现在查询「库存最多的 10 个 SKU」返回按库存降序的真实成品,无 0 库存、无包材内料。
**已记录**