1. AGENTS.md 更新 - water-docs: 新增 specs/ 与 docs/design/ 生命周期规则章节 - water-backend: 更新协作引用(建设期/建成后、evidence 模块化) 2. specs/ 重复合并 - 006-reminder-event-design 合并入 003-rev006-reminder-event-design - 001-rev004-accounting 删除冗余 data-model.md + contracts/ - 002-rev005-invoice-flow 删除冗余 data-model.md + contracts/ 3. evidence 按模块归档 - 35 个 REV-004 文件归入 evidence/rev004-accounting/ - 7 个通用 bugfix 文件归入 evidence/bugfix/ 和 bugfix/frontend/ - 新建 rev005-invoice/、rev006-reminder/、rev007-statistics/ 目录 4. guides/ 清理 - 14 个 REV004_*.md 移入 evidence/rev004-accounting/ 5. 遗留文件处理 - docs/research/ 归档到 Archive/06_Migration_Plans/ - backend-check detached worktrees 清理 6. 交叉引用修复 - 006-reminder-event-design → 003-rev006-reminder-event-design - docs/guides/REV004_ → docs/evidence/rev004-accounting/REV004_ 7. DB 设计文档修正(01_Database_Design.md) - biz_invoice 明确为开票配置表,非发票记录表 - 新增 biz_invoice_record 为发票申请/结果主表 - 新增 biz_charge_invoice_rel 账单-发票关联说明 - REV-005 承接口径表名全部修正 8. 发票审计证据 - 新增 evidence/rev005-invoice/2026-06-16-invoice-document-audit.md
2.9 KiB
2.9 KiB
REV004 prestorage process/attachments strict formal-first(2026-04-17)
目标
收口:
GET /admin-api/business/accounting-adjust/prestorage-processGET /admin-api/business/accounting-adjust/prestorage-attachments
使其优先读取 prestorage formal-table,而不是继续主要依赖 legacy/unified fallback。
代码变更
核心变更位于:
AccountingAdjustProcessServiceImplAccountingAdjustProcessServiceImplTest
策略:
getProcess(adjustmentNo)先尝试PrestorageFormalizationService.getView(adjustmentNo)- 命中 formal view 时,直接组装
AccountingAdjustProcessRespVO getAttachments(adjustmentNo)先尝试读取 formalattachmentRefs- 仅在 formal 不存在时才回退到 synthetic / unified 口径
验证
compile
mvn -pl sw-business/sw-business-server -DskipTests compile
结果:PASS
targeted tests
mvn -pl sw-business/sw-business-server -Dtest=AccountingAdjustProcessServiceImplTest,AccountingAdjustPrestorageProcessServiceImplTest test
结果:PASS
- Tests run: 23
- Failures: 0
- Errors: 0
fresh jar smoke(port 48098)
health
GET /actuator/health->{"status":"UP"}
smoke 数据
手工 seed:
adjustmentNo = REV004-PTR-993001-SEED- formal main:
biz_prestorage_adjust - formal detail:
biz_prestorage_adjust_detail - attachment refs:
101,proof-raw
process
调用:
GET /admin-api/business/accounting-adjust/prestorage-process?adjustmentNo=REV004-PTR-993001-SEED
结果:PASS 返回关键字段:
objectType = LEGACY_PRESTORAGE_TRANSFERadjustType = TRANSFERactionAmount = 20.0resultStatus = SUCCESSapprovalStatus = NOT_REQUIREDwriteBackStatus = UPDATEDattachmentRefs = ["101", "proof-raw"]applicant = 王五contactMobile = 13700000000latestMessage = 预存转账成功,目标户号=C-993002
说明:process 已命中 formal main,而不是再走 unified detail 兜底。
attachments
调用:
GET /admin-api/business/accounting-adjust/prestorage-attachments?adjustmentNo=REV004-PTR-993001-SEED
结果:PASS 返回:
- ref=
101-> 数值 ID 解析,当前附件实体不存在,返回resolved=false, message=附件不存在 - ref=
proof-raw-> 非数值引用,返回resolved=false, message=附件引用不是数值ID,保留原始引用
说明:attachments 已优先读取 formal attachmentRefs,并保留现有解析策略。
清理
已删除:
biz_prestorage_adjust / detailseed 数据
回读结果:
prestorage_main_left=0prestorage_detail_left=0
运行态:
48098已停止
当前结论
本轮 prestorage 剩余查询缺口已完成 strict formal-first 收口:
prestorage-process优先命中 formalprestorage-attachments优先命中 formal attachment refs- formal 缺失时仍可继续 fallback
- 主链路 schema / 写路径无变更