fujian_water_biz_doc/docs/evidence/rev004-latefee-formal-table-dev-db-apply-2026-04-15.md
tangweijie 35f2f9b76c Record REV004 late-fee formal-table deployment and canary evidence
This documents that the formal-table deploy SQL has been applied to the
application-dev database, that the previous real-db blocker is resolved,
and that the date-mode late-fee reduce canary now passes against the
test database.

Constraint: Evidence must match the verified dev database and latest canary output
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep evidence updates aligned with the exact environment and command outputs used for verification
Tested: Evidence cross-checked against psql deployment output and fresh canary pass
Not-tested: No additional business flow beyond the documented late-fee date-mode canary
2026-04-15 16:14:03 +08:00

74 lines
2.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# REV004 late-fee formal table 已应用到 application-dev 测试库2026-04-15
## 目标库
依据:
- `sw-business/sw-business-server/src/main/resources/application-dev.yaml`
解析结果:
- Host`192.168.10.130`
- Port`5436`
- DB`sw_system`
- User`sw_system`
即当前 `application-dev` 指向的测试数据库为:
`jdbc:postgresql://192.168.10.130:5436/sw_system`
## 已执行脚本
- `sql/rev004/REV004_latefee_formal_tables_deploy.sql`
执行命令:
```bash
PGPASSWORD='Em@123456' \
psql -h 192.168.10.130 -p 5436 -U sw_system -d sw_system \
-v ON_ERROR_STOP=1 \
-f sql/rev004/REV004_latefee_formal_tables_deploy.sql
```
## 执行结果
结果:**PASS**
执行输出显示:
- sequence 已存在时跳过
- table 已存在时跳过
- 索引继续补齐/确认
- 外键创建逻辑执行成功
说明该脚本已成功应用到测试库,且具备幂等重放能力。
## 回读校验
### 表
已确认存在:
- `biz_latefee_reduce`
- `biz_latefee_reduce_detail`
### 序列
已确认存在:
- `biz_latefee_reduce_seq`
- `biz_latefee_reduce_detail_seq`
### 索引
已确认存在:
- `uk_biz_latefee_reduce_no`
- `idx_biz_latefee_reduce_case`
- `idx_biz_latefee_reduce_status`
- `idx_biz_latefee_reduce_type`
- `idx_biz_latefee_reduce_detail_main`
- `idx_biz_latefee_reduce_detail_charge`
- `idx_biz_latefee_reduce_detail_cust`
- `idx_biz_latefee_reduce_detail_bill_month`
### 外键
已确认存在:
- `fk_biz_latefee_reduce_detail_main`
- `biz_latefee_reduce_detail(latefee_reduce_id) -> biz_latefee_reduce(id)`
## 当前结论
`application-dev` 指向的测试数据库现在已经具备 REV004 late-fee formal-table 结构,可直接用于:
1. 未销违约金减免申请态落单
2. 审批态 formal-table 更新
3. accountProcess 真实库 canary / 联调验证
## 建议后续
1. 继续保留 `REV004_latefee_formal_tables_deploy.sql` 作为测试库 / 联调库初始化脚本
2. 若后续坏账 / 核销 / 价差也迁移 formal-table应沿用相同“独立 deploy SQL + 回读校验”的方式推进