refactor(swap): 债券价格÷100转换收敛到BondPriceConverter统一入口

消除9处价格转换字面量(*0.01m/*100),统一走BondPriceConverter.ToStorage/ToDisplay。
- 新增YLErpDAL/Helpers/BondPriceConverter.cs(含可空重载)
- 批次1(危险字面量): BondPaymentService/RealtimePnlCalc/RealTimeClientBanlanceService/SwapTradeAutoService
- 批次2-4(调用收敛): SwapFlowService/SwapFlowImportService/SwapEndConfirmService/EodPriceProvider/EodPriceQueryService
- RealtimePnlCalc:601/602价格×数量维度交织处加注释,不机械合并

不改bondPriceMultiple常量值,纯调用方式收敛。SwapModule 155测试全绿,行为不变。
This commit is contained in:
hjhan
2026-07-03 08:22:27 +08:00
parent de0e7f791b
commit 782e1f6a7a
10 changed files with 128 additions and 51 deletions
@@ -1,5 +1,6 @@
using DocumentFormat.OpenXml.Drawing.Charts;
using System.Linq.Expressions;
using YLErp.Helpers;
using YLErp.Models;
using YLErp.QdpModule;
@@ -228,9 +229,9 @@ namespace YLErp.Modules.DataProviderModule
Vobp = bondPrice.vobp,
ValueDate = valueDate,
UnderlyingCode = underlyingCode,
ClosePrice = Convert.ToDouble(bondPrice.dirty_price_close * ConsGlobal.bondPriceMultiple),
SettlePrice = Convert.ToDouble(bondPrice.net_price * ConsGlobal.bondPriceMultiple),
ReferencePrice = Convert.ToDouble(bondPrice.yield * ConsGlobal.bondPriceMultiple)
ClosePrice = Convert.ToDouble(BondPriceConverter.ToStorage(bondPrice.dirty_price_close)),
SettlePrice = Convert.ToDouble(BondPriceConverter.ToStorage(bondPrice.net_price)),
ReferencePrice = Convert.ToDouble(BondPriceConverter.ToStorage(bondPrice.yield))
};
}
/// <summary>