This records compile/test outputs plus fresh jar smoke proving that prestorage-process and prestorage-attachments now read formal data first while retaining fallback behavior. Constraint: Evidence must stay aligned with the prestorage query-only strict formal-first batch and its application-dev smoke run Rejected: Fold this note into older prestorage evidence files | reduces traceability for the specific process/attachments closure batch Confidence: high Scope-risk: narrow Reversibility: clean Directive: Append future prestorage query verification as follow-up evidence rather than overwriting this closure proof Tested: Cross-checked against backend compile/test output and fresh smoke results on 2026-04-17 Not-tested: No document export/render pipeline executed for this evidence-only commit
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 / 写路径无变更