feat(科目映射): 补映射自动带入同名规则 #1704

Closed
yueyang wants to merge 1 commits from feature/yueyang-account-mapping-autofill into main
Collaborator

做了什么

  • 「补映射」时按同名账单项目查找已有规则,自动带入财务备注、票据、类型、费用备注、科目和方向基准。
  • 名称匹配会忽略大小写、wx 前缀、空格和标点。
  • 只有候选规则模板完全一致时才自动带入;存在科目冲突或字段不完整时提示人工核对,不猜测。
  • 仍保留人工核对后保存,不自动新增或修改规则。

修改文件

  • app/Http/Controllers/Business/AccountMappingActions.php
  • routes/admin.php
  • resources/views/business/pages/financial-rules/account-mapping.blade.php
  • modules/EcommerceFinance/Services/AccountMappingSuggestion.php
  • tests/Feature/Business/AccountMappingPageTest.php
  • tests/Unit/EcommerceFinance/AccountMappingSuggestionTest.php

验证

  • AccountMappingSuggestionTest: 4 项,12 assertions,通过。
  • AccountMappingPageTest: 21 项,154 assertions,通过。
  • 内联 JavaScript 语法检查通过。
  • 无数据库迁移。

影响与风险

  • 不改变金额口径、记账方向或既有规则数据。
  • 自动带入只预填表单,最终仍需人工核对并点击保存。
## 做了什么 - 「补映射」时按同名账单项目查找已有规则,自动带入财务备注、票据、类型、费用备注、科目和方向基准。 - 名称匹配会忽略大小写、`wx` 前缀、空格和标点。 - 只有候选规则模板完全一致时才自动带入;存在科目冲突或字段不完整时提示人工核对,不猜测。 - 仍保留人工核对后保存,不自动新增或修改规则。 ## 修改文件 - `app/Http/Controllers/Business/AccountMappingActions.php` - `routes/admin.php` - `resources/views/business/pages/financial-rules/account-mapping.blade.php` - `modules/EcommerceFinance/Services/AccountMappingSuggestion.php` - `tests/Feature/Business/AccountMappingPageTest.php` - `tests/Unit/EcommerceFinance/AccountMappingSuggestionTest.php` ## 验证 - `AccountMappingSuggestionTest`: 4 项,12 assertions,通过。 - `AccountMappingPageTest`: 21 项,154 assertions,通过。 - 内联 JavaScript 语法检查通过。 - 无数据库迁移。 ## 影响与风险 - 不改变金额口径、记账方向或既有规则数据。 - 自动带入只预填表单,最终仍需人工核对并点击保存。
yueyang added 1 commit 2026-12-03 17:23:07 +08:00
yueyang closed this pull request 2026-12-03 17:24:17 +08:00

Pull request closed

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#1704
No description provided.