fujian_water_biz_doc/docs/evidence/rev004-prestorage-bpm-deployed-integration-check-2026-04-24.md

71 lines
2.8 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 prestorage BPM 部署后集成检查2026-04-24
## 环境
- 主机:`root@192.168.10.130`
- 数据库:`jdbc:postgresql://192.168.10.130:5436/sw_system`
- 参考配置:
- `sw-business/sw-business-server/src/main/resources/application-dev.yaml`
- `sw-gateway/src/main/resources/application-dev.yaml`
## 检查目标
验证部署后的 REV004 预存调整 BPM 接口是否可通过网关/业务服务完成真实 HTTP 集成测试。
## 运行态探测
### 容器状态
- `sw-gateway`: Up
- `sw-module-bpm`: Up
- `sw-business-server`: `Up (health: starting)`,且 `RestartCount=7`
### 端口
- 网关:`48080`
- 业务服务映射:`48081 -> container 48090`
## HTTP 实测
### 1. 网关健康
`GET http://127.0.0.1:48080/actuator/health`
- 返回:`{"status":"UP"}`
- 结果PASS
### 2. 网关预存接口
`GET /admin-api/business/accounting-adjust/prestorage-page`
- 未登录:`401 账号未登录`
- 使用 `Authorization: emsoft1` 仍返回 `401`
- 结论:网关侧不支持直接使用 business 服务的 mock token 调测
### 3. 业务服务预存接口
`GET http://127.0.0.1:48081/admin-api/business/accounting-adjust/prestorage-page?pageNo=1&pageSize=1`
- `Authorization: emsoft1, tenant-id:0`:返回 `500 系统异常`
- `Authorization: emsoft1, tenant-id:1`:返回 `404 请求地址不存在`
## 日志根因
`docker logs sw-business-server` 明确显示:
- Spring 启动失败点:`Error creating bean with name 'accountingAdjustActionController': Injection of resource dependencies failed`
- 最终失败原因:
- `A component required a bean of type 'cn.com.emsoft.sw.module.bpm.api.task.BpmProcessInstanceApi' that could not be found.`
## 结论
当前 **不是接口联调数据问题**,而是 **部署后的 business 服务启动失败 / controller 未成功装配**,因此无法继续完成真实接口集成测试。
## 影响判断
本次预存 BPM 变更不仅修改了 business 模块,也修改了 BPM 相关模块:
- `sw-module-bpm-api/.../BpmProcessInstanceApi.java`
- `sw-module-bpm-api/.../dto/BpmProcessInstanceCancelReqDTO.java`
- `sw-module-bpm-server/.../BpmProcessInstanceApiImpl.java`
- `sw-module-bpm-server/.../RpcConfiguration.java`
- `sw-module-bpm-server/.../BpmPrestorageAdjustStatusListener.java`
因此若仅更新 `sw-business-server`,或 `sw-module-bpm` 未按同版本一并部署,就会出现当前缺少 `BpmProcessInstanceApi` Bean 的启动失败。
## 建议下一步
1. 同版本重新部署:
- `sw-business-server`
- `sw-module-bpm`
2. 部署后先验证:
- `sw-business-server` 健康状态变为 healthy / restart count 停止增长
- 业务服务日志不再出现 `BpmProcessInstanceApi` 缺失
3. 然后再执行预存 BPM 真实 HTTP 集成测试:
- save 即提审
- page/detail/process 查询
- revoke
- BPM 审批回写链路