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
88 lines
3.8 KiB
Markdown
88 lines
3.8 KiB
Markdown
# REV004 late-fee formal-table 真实库阻塞说明(2026-04-15)
|
||
|
||
> 状态更新:**该阻塞已于 2026-04-15 当天解除,本文保留为阻塞发生记录。**
|
||
|
||
## 结论
|
||
当前 late-fee reduce 代码侧与定向单测已通过,但真实数据库集成验证被环境缺表阻塞,阻塞点不是代码逻辑,而是目标库未部署 formal-table。
|
||
|
||
## 已通过的验证
|
||
### 编译
|
||
```bash
|
||
rm -rf sw-business/sw-business-server/target/generated-sources \
|
||
sw-business/sw-business-server/target/generated-test-sources
|
||
mkdir -p sw-business/sw-business-server/target/generated-sources/annotations
|
||
mvn -pl sw-business/sw-business-server -DskipTests compile
|
||
```
|
||
结果:**PASS**
|
||
|
||
### 定向测试
|
||
```bash
|
||
mvn -pl sw-business/sw-business-server \
|
||
-Dtest=AccountingAdjustActionServiceImplTest#approve_lateFeeReduceShouldOnlyUpdateLateFee+approve_lateFeeReduceDateModeShouldReduceCurrentLateFeeAndUpdateFormalTable,LateFeeReduceFormalizationServiceTest,AccountingAdjustQueryServiceImplTest,AccountingAdjustLogProcessServiceImplTest,AccountingAdjustProcessServiceImplTest#createUnsoldLateFeeReduce_shouldPassDateModeFieldsToUnifiedChargeService+createUnsoldLateFeeReduce_shouldRejectMixedAmountAndDateMode+batchCreateUnsoldLateFeeReduce_shouldMergeBatchOuterFieldsIntoItems+getProcess_shouldExposeLateFeeDisplayFieldsFromUnifiedChargeService,AccountingAdjustSemanticMapperTest,AccountingAdjustDictResolverTest,AccountingAdjustStatusResolverTest \
|
||
test
|
||
```
|
||
结果:**PASS(24 tests, 0 fail, 0 error)**
|
||
|
||
## 真实 DB 阻塞验证
|
||
### 执行命令
|
||
```bash
|
||
REV004_IT_DB_URL=jdbc:postgresql://192.168.10.130:5436/sw_system \
|
||
REV004_IT_DB_USERNAME=sw_system \
|
||
REV004_IT_DB_PASSWORD='Em@123456' \
|
||
mvn -pl sw-business/sw-business-server \
|
||
-Dtest=Rev004AccountProcessCanaryQueryIntegrationTest#unsoldLateFeeReduceDateModeApprove_shouldPersistFormalTableSummary \
|
||
test
|
||
```
|
||
|
||
### 失败原因
|
||
报错核心:
|
||
- `relation "biz_latefee_reduce_detail" does not exist`
|
||
|
||
在测试前置 / 后置 SQL `sql/rev004/accountprocess/00_reset.sql` 中,已经尝试执行:
|
||
- `DELETE FROM biz_latefee_reduce_detail ...`
|
||
- `DELETE FROM biz_latefee_reduce ...`
|
||
|
||
这说明:
|
||
- 代码侧已经按 formal-table 路径推进
|
||
- 测试脚本也已经按 formal-table 假设编写
|
||
- 但真实库中尚未存在这些表
|
||
|
||
## 当前判断
|
||
1. 代码逻辑不是当前 blocker。
|
||
2. 真实 DB 环境未部署 `biz_latefee_reduce` / `biz_latefee_reduce_detail` 是当前 canary 唯一主要阻塞。
|
||
3. 在部署 formal-table 之前,真实库层面的 late-fee canary 无法拉绿。
|
||
|
||
## 建议下一步
|
||
1. 先确认真实库是否允许部署:
|
||
- `biz_latefee_reduce`
|
||
- `biz_latefee_reduce_detail`
|
||
2. 若允许部署,再重跑 canary。
|
||
3. 若暂不允许部署,则当前阶段只能以 compile + unit/integration mock/local 证据为主,明确标注“真实库阻塞未消除”。
|
||
|
||
---
|
||
|
||
## 后续结果回写(阻塞已解除)
|
||
### 已完成动作
|
||
1. 补充并执行 `sql/rev004/REV004_latefee_formal_tables_deploy.sql`
|
||
2. 修复测试 SQL fixture:
|
||
- `00_reset.sql`
|
||
- `02_latefee_formal_tables.sql`
|
||
- `03_latefee_formal_reset.sql`
|
||
3. 补充 late-fee formal-table 查询兜底与 request log `adjustmentNo` 明细一致性
|
||
|
||
### 解除阻塞后的真实库验证
|
||
```bash
|
||
REV004_IT_DB_URL=jdbc:postgresql://192.168.10.130:5436/sw_system \
|
||
REV004_IT_DB_USERNAME=sw_system \
|
||
REV004_IT_DB_PASSWORD='Em@123456' \
|
||
mvn -pl sw-business/sw-business-server clean \
|
||
-Dtest=Rev004AccountProcessCanaryQueryIntegrationTest#unsoldLateFeeReduceDateModeApprove_shouldPersistFormalTableSummary \
|
||
test
|
||
```
|
||
结果:**PASS**
|
||
|
||
### 更新后的结论
|
||
- `biz_latefee_reduce` / `biz_latefee_reduce_detail` 缺表阻塞已消除
|
||
- REV004 late-fee date-mode 最小真实库闭环已验证通过
|
||
- 本文档现仅作为“阻塞曾发生过”的历史记录,不再代表当前状态
|