This records the application-dev DDL apply/replay, compile and targeted test evidence, fresh-jar HTTP smoke, DB writeback checks, and cleanup proof for the PRICE_DIFF_ADJUST formal-table batch. Constraint: Evidence must stay aligned with the backend price-diff formal-table implementation and application-dev verification run on 2026-04-17 Rejected: Fold this evidence into unrelated doc drafts in the main docs worktree | would mix scopes and weaken traceability Confidence: high Scope-risk: narrow Reversibility: clean Directive: Append future price-diff reruns as dated subsections or follow-up evidence files instead of overwriting this baseline Tested: Verified against backend compile/test output and direct psql + fresh-jar smoke results on 2026-04-17 Not-tested: No doc export/render pipeline executed for this evidence-only commit
4.5 KiB
4.5 KiB
REV004 price-diff formal-table 已应用到 application-dev 测试库(2026-04-17)
目标库
依据:
sw-business/sw-business-server/src/main/resources/application-dev.yaml
解析结果:
- Host:
192.168.10.130 - Port:
5436 - DB:
sw_system - User:
sw_system
已执行脚本
sql/rev004/REV004_price_diff_formal_tables_deploy.sql
DDL 执行结果
结果:PASS
已确认存在:
biz_price_diff_adjustbiz_price_diff_adjust_detailbiz_price_diff_adjust_seqbiz_price_diff_adjust_detail_seq
已确认幂等重放通过:
- second apply 输出
already exists, skipping - 无重复约束/重复索引异常
代码验证
compile
mvn -pl sw-business/sw-business-server -DskipTests compile
结果:PASS
说明:
- 先顺手修复 develop 基线 compile blocker:
CustApiImpl.java去掉updateCustPriceTemplateCode上多余@OverrideCustServiceImpl.java去掉dept.getCode()调用
- 之后串行重跑 compile 成功
- 曾出现一次
NoSuchFileException ... target/generated-sources/...,确认为 compile 与 test 并行访问同一target/目录导致的竞态,不属于业务代码错误
targeted tests
mvn -pl sw-business/sw-business-server -Dtest=AccountingAdjustActionServiceImplTest,AccountingAdjustProcessServiceImplTest,AccountingAdjustQueryServiceImplTest,PriceDiffFormalizationServiceTest test
结果:PASS
- Tests run: 43
- Failures: 0
- Errors: 0
HTTP smoke(fresh jar, port 48095)
health
GET /actuator/health->{"status":"UP"}
submit
unsold-price-diff-submiton charge992205->REV004-992205-20260417153413unsold-price-diff-submiton charge992206->REV004-992206-20260417153414- 返回统一为:
objectType = PRICE_DIFF_ADJUSTapprovalStatus = PENDING_APPROVALresultStatus = PENDING_APPROVALwriteBackStatus = PENDING
get / page
GET /admin-api/business/accounting-adjust/get?adjustmentNo=REV004-992205-20260417153413- 可返回 formal detail:
priceDiffAmount=15.50billAmountBefore=100.00billAmountAfter=115.50extendedAmountBefore=100.00extendedAmountAfter=115.50
- 可返回 formal detail:
GET /admin-api/business/accounting-adjust/page?...objectType=PRICE_DIFF_ADJUST- 可返回 2 条 fresh smoke formal-first 记录
reasonCodeLabel已能解析为字典文本(如用户协商/定价错误)
approve / reject
- approve:
/admin-api/business/accounting-adjust/approve- 返回
APPROVED / SUCCESS / UPDATED
- 返回
- reject:
/admin-api/business/accounting-adjust/reject- 返回
REJECTED / FAIL / SKIPPED
- 返回
DB 回读
biz_price_diff_adjust:
REV004-992205-20260417153413 -> APPROVED | UPDATED | SUCCESSREV004-992206-20260417153414 -> REJECTED | SKIPPED | FAIL
biz_price_diff_adjust_detail:
- approve 明细:
SUCCESS | APPROVE_EXECUTE | approve price diff smoke - reject 明细:
REJECTED | REJECT | reject price diff smoke - approve 样例金额前后值:
bill_amount_before=100.00 -> bill_amount_after=115.50extended_amount_before=100.00 -> extended_amount_after=115.50
biz_charge:
992205 -> bill_amount=115.5000, extended_amount=115.5000, original_money=115.5000992206 -> bill_amount=80.0000, extended_amount=80.0000, original_money=80.0000
测试数据清理
smoke 完成后已删除:
biz_operat_log / detail(identify_value =992205,992206)biz_price_diff_adjust / detailbiz_charge(992205,992206)biz_cust(REV004_PD_SMOKE_A,REV004_PD_SMOKE_B)
回读结果:
pricediff_main_left=0pricediff_detail_left=0operat_log_left=0charge_left=0cust_left=0
运行态清理
用于 fresh-jar HTTP smoke 的临时实例:
- port
48095
已停止,当前无残留 LISTEN 进程。
当前结论
本轮 price-diff formal-table 已达到:
- DDL 可落库且可幂等重放;
- unsold price-diff submit 能落 pending formal main/detail;
- approve/reject 会同步 formal 状态;
- detail/page 对
PRICE_DIFF_ADJUST已能返回 formal-first 结果; - 账单回写与当前
applyPriceDiffWriteBack(...)口径一致; - fresh smoke / cleanup 证据完整。
当前仍需收口
- 这批尚未提交 commit / PR;
- 如果后续要更贴近原系统
PM_PRICE_RECORDS / DETAILS语义,可继续补:PriceListIdPriceCodeIsLadderNewFeeId- 更细颗粒的 old/new late fee 与账单差额字段来源收口。