# 流程列表测算利率展示后端实施记录

## 实施时间
- 2026-03-28

## 修改内容
- 新增流程列表专用返回对象 `LoanPricingWorkflowListVO`
- 将流程列表分页返回从 `LoanPricingWorkflow` 调整为列表专用 VO
- 在 Mapper 中新增联表分页方法 `selectWorkflowPageWithRates`
- 新增 `LoanPricingWorkflowMapper.xml`，通过联表 SQL 一次返回 `calculateRate` 与 `executeRate`
- 保留现有详情页测算利率兼容逻辑，不回退工作区中已有的详情链路调整

## 关键链路
- 主表：`loan_pricing_workflow`
- 个人客户测算利率来源：`model_retail_output_fields.calculate_rate`
- 企业客户测算利率来源：`model_corp_output_fields.calculate_rate`
- 统一返回字段：`calculateRate`

## 修改文件
- `ruoyi-loan-pricing/src/main/java/com/ruoyi/loanpricing/domain/vo/LoanPricingWorkflowListVO.java`
- `ruoyi-loan-pricing/src/main/java/com/ruoyi/loanpricing/mapper/LoanPricingWorkflowMapper.java`
- `ruoyi-loan-pricing/src/main/resources/mapper/loanpricing/LoanPricingWorkflowMapper.xml`
- `ruoyi-loan-pricing/src/main/java/com/ruoyi/loanpricing/service/ILoanPricingWorkflowService.java`
- `ruoyi-loan-pricing/src/main/java/com/ruoyi/loanpricing/controller/LoanPricingWorkflowController.java`
- `ruoyi-loan-pricing/src/main/java/com/ruoyi/loanpricing/service/impl/LoanPricingWorkflowServiceImpl.java`
- `ruoyi-loan-pricing/src/test/java/com/ruoyi/loanpricing/domain/vo/LoanPricingWorkflowListVOTest.java`
- `ruoyi-loan-pricing/src/test/java/com/ruoyi/loanpricing/service/impl/LoanPricingWorkflowServiceImplTest.java`

## 验证结果
- 已执行 `mvn -pl ruoyi-loan-pricing -am -Dsurefire.failIfNoSpecifiedTests=false -Dtest=LoanPricingWorkflowServiceImplTest test`
- 结果为 `Tests run: 3, Failures: 0, Errors: 0, Skipped: 0`
- 已执行 `mvn -pl ruoyi-loan-pricing -am -Dsurefire.failIfNoSpecifiedTests=false test`
- 模块验证结果为 `Tests run: 4, Failures: 0, Errors: 0, Skipped: 0`
- 已确认列表分页链路改为返回 `LoanPricingWorkflowListVO`
- 已确认服务层会透传 `calculateRate`

## 说明
- 本次未修改数据库表结构，也未将测算利率回写到 `loan_pricing_workflow`
- 单独执行 `-pl ruoyi-loan-pricing` 时会命中旧的上游构件，因此测试命令需带 `-am`
- 本次未为验证额外启动新的后端进程
- 本次未执行真实后端启动后的接口联调，请以后端模块测试结果作为本次主要验证依据
