fix: 厂家对账优先按快递单号和条码匹配 #995

Merged
sumu merged 1 commits from fix/supplier-express-barcode-primary-match into main 2026-11-07 22:34:38 +08:00
Collaborator

实际改动

  • 双方都有快递单号时,第一层按「快递单号 + 商品编码」汇总双方数量和金额。
  • 第一层已匹配的记录不再进入采购单号、日期或其他兜底规则,避免同一业务行被重复解释。
  • 快递单号统一清理空白、前导 @、Excel 文本前缀并按不区分大小写匹配。
  • 没有快递单号或第一层无法关联的记录继续使用原采购单号/日期/条码规则。
  • 页面比对口径同步展示新的第一层规则。

修改文件:

  • modules/EcommerceFinance/Services/SupplierStatementMatcher.php
  • resources/views/business/pages/supplier-reconciliation/finance-data.blade.php
  • tests/Feature/Business/SupplierReconciliationTest.php
  • tests/Unit/EcommerceFinance/SupplierStatementMatcherTest.php

无路由、权限、数据库迁移或配置变更。

验证证据

  • php artisan test tests/Unit/EcommerceFinance/SupplierStatementMatcherTest.php --do-not-cache-result:8 项通过,55 个断言。
  • php artisan test tests/Feature/Business/SupplierReconciliationTest.php --do-not-cache-result:43 项通过,412 个断言。
  • php artisan test tests/Feature/Business/SupplierReconciliationDingTalkTest.php --do-not-cache-result:19 项通过,147 个断言。
  • 覆盖采购单号和日期均不一致时仍按快递单号+条码匹配、同快递单号多行汇总、金额数量差异、旧规则回归。

风险检查

  • 涉及金额匹配逻辑,已增加第一层优先级、聚合和差异结算测试。
  • 不涉及数据库迁移;回滚可使用上一版镜像。
  • 未提交凭据、真实业务明细、日志或构建产物。
  • 前端仅调整同一页面的规则说明文案,沿用现有黑金设计。

合并前复查

  • 完整 diff 仅包含匹配器、规则说明和对应测试。
  • 合并后部署最新 main,复核生产供应商对账差异。
## 实际改动 - 双方都有快递单号时,第一层按「快递单号 + 商品编码」汇总双方数量和金额。 - 第一层已匹配的记录不再进入采购单号、日期或其他兜底规则,避免同一业务行被重复解释。 - 快递单号统一清理空白、前导 `@`、Excel 文本前缀并按不区分大小写匹配。 - 没有快递单号或第一层无法关联的记录继续使用原采购单号/日期/条码规则。 - 页面比对口径同步展示新的第一层规则。 修改文件: - `modules/EcommerceFinance/Services/SupplierStatementMatcher.php` - `resources/views/business/pages/supplier-reconciliation/finance-data.blade.php` - `tests/Feature/Business/SupplierReconciliationTest.php` - `tests/Unit/EcommerceFinance/SupplierStatementMatcherTest.php` 无路由、权限、数据库迁移或配置变更。 ## 验证证据 - `php artisan test tests/Unit/EcommerceFinance/SupplierStatementMatcherTest.php --do-not-cache-result`:8 项通过,55 个断言。 - `php artisan test tests/Feature/Business/SupplierReconciliationTest.php --do-not-cache-result`:43 项通过,412 个断言。 - `php artisan test tests/Feature/Business/SupplierReconciliationDingTalkTest.php --do-not-cache-result`:19 项通过,147 个断言。 - 覆盖采购单号和日期均不一致时仍按快递单号+条码匹配、同快递单号多行汇总、金额数量差异、旧规则回归。 ## 风险检查 - 涉及金额匹配逻辑,已增加第一层优先级、聚合和差异结算测试。 - 不涉及数据库迁移;回滚可使用上一版镜像。 - 未提交凭据、真实业务明细、日志或构建产物。 - 前端仅调整同一页面的规则说明文案,沿用现有黑金设计。 ## 合并前复查 - 完整 diff 仅包含匹配器、规则说明和对应测试。 - 合并后部署最新 `main`,复核生产供应商对账差异。
sumu added 1 commit 2026-11-07 22:34:22 +08:00
sumu merged commit 1cdc6dc85a into main 2026-11-07 22:34:38 +08:00
sumu deleted branch fix/supplier-express-barcode-primary-match 2026-11-07 22:34:38 +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#995
No description provided.