商品成本拆分组件改为流式处理 #673

Merged
chenxi merged 2 commits from fix/chenxi-product-cost-split-memory into main 2026-10-27 11:01:40 +08:00
Collaborator

改动

  • 商品利润组件由一次性数组改为 500 个订单号一批流式读取
  • 商品成本命令收到组件后立即按“订单键 + 商品编码”聚合,不再保留全部原始行
  • 保留原 positiveComponentRowsForOrders() 返回数组接口,兼容其他调用

原因

7 月重跑约 38 万候选订单时,在批处理容器 2GB 内存上限处 OOM。

验证

  • GoodsProfitAfsRepositoryTest
  • StoreReceiptProductCostLineTest
  • ProductMaterialBarcodeMappingRepositoryTest
  • 56 passed / 205 assertions

风险

  • 只改内存读取方式,不改变组合装对账、价格或 91 料号映射口径
## 改动 - 商品利润组件由一次性数组改为 500 个订单号一批流式读取 - 商品成本命令收到组件后立即按“订单键 + 商品编码”聚合,不再保留全部原始行 - 保留原 `positiveComponentRowsForOrders()` 返回数组接口,兼容其他调用 ## 原因 7 月重跑约 38 万候选订单时,在批处理容器 2GB 内存上限处 OOM。 ## 验证 - GoodsProfitAfsRepositoryTest - StoreReceiptProductCostLineTest - ProductMaterialBarcodeMappingRepositoryTest - 56 passed / 205 assertions ## 风险 - 只改内存读取方式,不改变组合装对账、价格或 91 料号映射口径
chenxi added 1 commit 2026-10-27 11:01:09 +08:00
chenxi added 1 commit 2026-10-27 11:01:33 +08:00
chenxi merged commit fa8ec043a5 into main 2026-10-27 11:01:40 +08:00
chenxi deleted branch fix/chenxi-product-cost-split-memory 2026-10-27 11:01:41 +08:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: WuYongJie/CaiWuXiTong#673
No description provided.