Record bad-debt formal-table rollout evidence for REV004
This adds the rollout evidence for REV004 bad-debt formal-table work, covering DDL application, targeted verification, fresh-jar HTTP smoke, and cleanup proof on the application-dev database. Constraint: Evidence scope stays limited to bad-debt formal-table rollout and should not absorb unrelated REV004 docs backlog Rejected: Wait to document until writtenoff/price-diff formalization lands | delays a completed bad-debt evidence slice Confidence: high Scope-risk: narrow Reversibility: clean Directive: If later bad-debt semantics expand beyond payState write-back, append a new evidence note instead of rewriting this rollout record Tested: Evidence content cross-checked against compile/test/DDL/HTTP smoke outputs captured in this session Not-tested: No doc export/render verification performed
This commit is contained in:
parent
ee78477e8f
commit
cbecb60aed
@ -0,0 +1,109 @@
|
|||||||
|
# REV004 bad-debt 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_bad_debt_formal_tables_deploy.sql`
|
||||||
|
|
||||||
|
## DDL 执行结果
|
||||||
|
结果:**PASS**
|
||||||
|
|
||||||
|
已确认存在:
|
||||||
|
- `biz_bad_debt_adjust`
|
||||||
|
- `biz_bad_debt_adjust_detail`
|
||||||
|
- `biz_bad_debt_adjust_seq`
|
||||||
|
- `biz_bad_debt_adjust_detail_seq`
|
||||||
|
|
||||||
|
已确认幂等重放通过:
|
||||||
|
- second apply 输出 `already exists, skipping`
|
||||||
|
- 无重复约束/重复索引异常
|
||||||
|
|
||||||
|
## 代码验证
|
||||||
|
### compile
|
||||||
|
```bash
|
||||||
|
mvn -pl sw-business/sw-business-server -DskipTests compile
|
||||||
|
```
|
||||||
|
结果:**PASS**
|
||||||
|
|
||||||
|
### targeted tests
|
||||||
|
```bash
|
||||||
|
mvn -pl sw-business/sw-business-server \
|
||||||
|
-Dtest=ChargeServiceAccountingAdjustTest,AccountingAdjustActionServiceImplTest,AccountingAdjustProcessServiceImplTest,AccountingAdjustQueryServiceImplTest,BadDebtFormalizationServiceTest test
|
||||||
|
```
|
||||||
|
结果:**PASS**
|
||||||
|
- Tests run: 55
|
||||||
|
- Failures: 0
|
||||||
|
- Errors: 0
|
||||||
|
|
||||||
|
## HTTP smoke(fresh jar, port 48092)
|
||||||
|
### submit
|
||||||
|
- `unsold-bad-debt-submit` on charge `991005` → `REV004-991005-20260417121621`
|
||||||
|
- `unsold-bad-debt-submit` on charge `991006` → `REV004-991006-20260417121622`
|
||||||
|
- 返回统一为:
|
||||||
|
- `objectType = BAD_DEBT_RECORD`
|
||||||
|
- `approvalStatus = PENDING_APPROVAL`
|
||||||
|
- `resultStatus = PENDING_APPROVAL`
|
||||||
|
- `writeBackStatus = PENDING`
|
||||||
|
|
||||||
|
### DB 回读
|
||||||
|
`biz_bad_debt_adjust`:
|
||||||
|
- approve 样例:`APPROVED|UPDATED|SUCCESS|approve smoke`
|
||||||
|
- reject 样例:`REJECTED|SKIPPED|FAIL|reject smoke`
|
||||||
|
|
||||||
|
`biz_bad_debt_adjust_detail`:
|
||||||
|
- submit 后 detail 进入 `PENDING_APPROVAL`
|
||||||
|
- 审批通过后 detail 进入 `SUCCESS`
|
||||||
|
- 审批驳回后 detail 进入 `REJECTED`
|
||||||
|
|
||||||
|
### query
|
||||||
|
- `GET /admin-api/business/accounting-adjust/get?adjustmentNo=...` 对 bad debt 已返回 formal detail
|
||||||
|
- `GET /admin-api/business/accounting-adjust/page?...objectType=BAD_DEBT_RECORD` 已返回 formal-first 列表
|
||||||
|
- `GET /admin-api/business/accounting-adjust/logs?adjustmentNo=...` 仍通过 legacy operat_log 返回完整轨迹
|
||||||
|
|
||||||
|
### approve / reject
|
||||||
|
- approve:`/admin-api/business/accounting-adjust/approve`
|
||||||
|
- 返回 `APPROVED/SUCCESS/UPDATED`
|
||||||
|
- 账单 `pay_state` 被回写为 `UNCOLLECTIBLE(-2)`
|
||||||
|
- reject:`/admin-api/business/accounting-adjust/reject`
|
||||||
|
- 返回 `REJECTED/FAIL/SKIPPED`
|
||||||
|
- 账单状态保持原值,不执行坏账回写
|
||||||
|
|
||||||
|
## 当前结论
|
||||||
|
本轮坏账 formal-table 已达到:
|
||||||
|
1. DDL 可落库且可幂等重放;
|
||||||
|
2. submit pending formal record 可落表;
|
||||||
|
3. approve/reject 会同步 formal main/detail 状态;
|
||||||
|
4. detail/page 对 `BAD_DEBT_RECORD` 已能返回 formal-first 结果;
|
||||||
|
5. 日志链路继续保留兼容查询。
|
||||||
|
|
||||||
|
## 当前未完成
|
||||||
|
- `AccountingAdjustQueryServiceImpl` 目前对坏账 formal-first 仅覆盖 detail/page 主路径,后续仍可继续补 stats/更细颗粒 read-model 一致性;
|
||||||
|
- 本轮 smoke 数据尚未清理,需要在最终收口时删除临时 `991005/991006` 相关客户、账单、formal 记录与日志。
|
||||||
|
|
||||||
|
|
||||||
|
## 测试数据清理
|
||||||
|
HTTP smoke 完成后,已删除临时 bad-debt smoke 数据:
|
||||||
|
- `biz_operat_log / detail`(identify_value = `991005`, `991006`)
|
||||||
|
- `biz_bad_debt_adjust / detail`
|
||||||
|
- `biz_charge`(`991005`, `991006`)
|
||||||
|
- `biz_cust`(`REV004_BD_SMOKE_A`, `REV004_BD_SMOKE_B`)
|
||||||
|
|
||||||
|
回读结果:
|
||||||
|
- `baddebt_main_left=0`
|
||||||
|
- `operat_log_left=0`
|
||||||
|
- `charge_left=0`
|
||||||
|
- `cust_left=0`
|
||||||
|
|
||||||
|
## 运行态清理
|
||||||
|
用于 fresh-jar HTTP smoke 的临时实例:
|
||||||
|
- port `48092`
|
||||||
|
|
||||||
|
已停止,当前无残留 LISTEN 进程。
|
||||||
Loading…
x
Reference in New Issue
Block a user