diff --git a/YLErpDAL/BLL/EodSettlement/RealTimeClientBanlanceService.cs b/YLErpDAL/BLL/EodSettlement/RealTimeClientBanlanceService.cs index dcead87e..2d16d4dd 100644 --- a/YLErpDAL/BLL/EodSettlement/RealTimeClientBanlanceService.cs +++ b/YLErpDAL/BLL/EodSettlement/RealTimeClientBanlanceService.cs @@ -12,6 +12,7 @@ using YLErp.Commons; using YLErp.DataBase; using YLErp.DBModels; using YLErp.DBModels.Enums; +using YLErp.Helpers; using YLErp.Model; using YLErp.Model.Enum; using YLErp.Models; @@ -1385,8 +1386,8 @@ namespace YLErp.BLL.Eod ClientId = item.client_id ?? 0, ClientName = item.client_name, TradingQty = (item.order_qty ?? 0) - (item.last_shares ?? 0), - TradingAmountAvg = (item.full_price ?? 0)*0.01m, - TradingAmountFeeAvg = (item.full_price ?? 0) * 0.01m, + TradingAmountAvg = BondPriceConverter.ToStorage(item.full_price ?? 0), + TradingAmountFeeAvg = BondPriceConverter.ToStorage(item.full_price ?? 0), TradingFee = 0 }; // clientOrder中数量单位为万 diff --git a/YLErpDAL/BLL/EodSettlement/RealtimePnlCalc.cs b/YLErpDAL/BLL/EodSettlement/RealtimePnlCalc.cs index 862b0e49..54e9a178 100644 --- a/YLErpDAL/BLL/EodSettlement/RealtimePnlCalc.cs +++ b/YLErpDAL/BLL/EodSettlement/RealtimePnlCalc.cs @@ -598,8 +598,10 @@ namespace YLErp.BLL.Eod } clientPosition.update_user = 0; SetClientPositionPrice(clientPosition); - clientPosition.swap_market_value = clientPosition.full_price_now * clientPosition.position_qty * (clientPosition.side == 0 ? 1 : -1) * 100; - clientPosition.position_profit_loss = (clientPosition.full_price_now - clientPosition.deal_full_price_avg) * 0.01m * (clientPosition.position_qty * 10000) * (clientPosition.side == 0 ? 1 : -1) - clientPosition.commission; + // full_price_now 为债券报价(面值百分比,×100形式);×100 还原市值数量级 + clientPosition.swap_market_value = clientPosition.full_price_now * clientPosition.position_qty * (clientPosition.side == 0 ? 1 : -1) * ConsGlobal.bondShowPriceMultiple; + // 盈亏 = (现价−成本) × 价差系数(÷100,bondPriceMultiple) × 数量(万手×10000) × 方向。此处 0.01m 与 10000 分属价格/数量两个维度,不宜合并为 BondPriceConverter + clientPosition.position_profit_loss = (clientPosition.full_price_now - clientPosition.deal_full_price_avg) * ConsGlobal.bondPriceMultiple * (clientPosition.position_qty * 10000) * (clientPosition.side == 0 ? 1 : -1) - clientPosition.commission; clientPosition.position_profit_loss = Math.Round(clientPosition.position_profit_loss ?? 0, 2, MidpointRounding.AwayFromZero); clientPosition.today_profit_loss = clientPosition.swap_market_value - lastPv; if (clientPosition.deal_full_price_avg > 0 && enableCalcBongd)//发kafka 获取成交收益率 diff --git a/YLErpDAL/Helpers/BondPriceConverter.cs b/YLErpDAL/Helpers/BondPriceConverter.cs new file mode 100644 index 00000000..2e113748 --- /dev/null +++ b/YLErpDAL/Helpers/BondPriceConverter.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace YLErp.Helpers +{ + /// + /// 债券价格展示态 ↔ 入库态 统一转换入口。 + /// ============================================================================ + /// 背景:债券价格习惯用"面值的百分比"报价(如全价 99.50 = 面值 100 的 99.5%)。 + /// 入库时统一存为小数形式(0.995),展示时再 ×100 还原为 99.5。 + /// + /// 过去这组转换散落在 11+ 个文件、87 处,多数用 ConsGlobal.bondPriceMultiple/ + /// bondShowPriceMultiple,但有 4 处用字面量 *0.01m / *100 绕过常量(改常量值时不会跟随, + /// 极易引入 Bug)。本类收敛所有调用入口,杜绝散落。 + /// + /// 命名口径(见《互换价格字段命名规范决策文档》): + /// ToStorage = 展示态(99.5) → 入库态(0.995) 即 × bondPriceMultiple(0.01) + /// ToDisplay = 入库态(0.995) → 展示态(99.5) 即 × bondShowPriceMultiple(100) + /// ============================================================================ + /// + public static class BondPriceConverter + { + /// + /// 展示态 → 入库态。债券报价(如 99.5)转为库内小数(0.995)。 + /// 用于:成交流水导入、EOD 价格缓存、债券付息计算等入库/计算场景。 + /// + /// 展示态价格(面值百分比形式,如 99.5) + /// 入库态价格(小数形式,如 0.995) + public static decimal ToStorage(decimal displayPrice) + { + return displayPrice * ConsGlobal.bondPriceMultiple; + } + + /// + /// 入库态 → 展示态。库内小数(0.995)转为债券报价(99.5)。 + /// 用于:列表查询、详情展示、报表导出等展示场景。 + /// + /// 入库态价格(小数形式,如 0.995) + /// 展示态价格(面值百分比形式,如 99.5) + public static decimal ToDisplay(decimal storagePrice) + { + return storagePrice * ConsGlobal.bondShowPriceMultiple; + } + + /// 可空重载:null 保持 null 语义(与原 *= ConsGlobal.bondPriceMultiple 行为一致) + public static decimal? ToStorage(decimal? displayPrice) + { + return displayPrice.HasValue ? displayPrice.Value * ConsGlobal.bondPriceMultiple : displayPrice; + } + + /// 可空重载:null 保持 null 语义(与原 *= ConsGlobal.bondShowPriceMultiple 行为一致) + public static decimal? ToDisplay(decimal? storagePrice) + { + return storagePrice.HasValue ? storagePrice.Value * ConsGlobal.bondShowPriceMultiple : storagePrice; + } + } +} diff --git a/YLErpDAL/Modules/DataProviderModule/EodPriceProvider.cs b/YLErpDAL/Modules/DataProviderModule/EodPriceProvider.cs index 9ed78cef..18b31de5 100644 --- a/YLErpDAL/Modules/DataProviderModule/EodPriceProvider.cs +++ b/YLErpDAL/Modules/DataProviderModule/EodPriceProvider.cs @@ -1,4 +1,5 @@ using YLErp.Abstract.DataProviders; +using YLErp.Helpers; using YLErp.Models; using YLErp.Modules.TradeModule.DealModule; using YLErp.QdpModule; @@ -139,9 +140,9 @@ namespace YLErp.Modules.DataProviderModule { if (item.UnderlyingInstrumentType == "Bonds") { - item.SettlePrice = Convert.ToDouble(item.DeciSettlePrice * ConsGlobal.bondPriceMultiple); - item.ClosePrice = Convert.ToDouble(item.DeciClosePrice * ConsGlobal.bondPriceMultiple); - item.ReferencePrice = Convert.ToDouble(item.DeciReferencePrice * ConsGlobal.bondPriceMultiple); + item.SettlePrice = Convert.ToDouble(BondPriceConverter.ToStorage(item.DeciSettlePrice)); + item.ClosePrice = Convert.ToDouble(BondPriceConverter.ToStorage(item.DeciClosePrice)); + item.ReferencePrice = Convert.ToDouble(BondPriceConverter.ToStorage(item.DeciReferencePrice)); } _priceDic[item.UnderlyingCode] = item; } diff --git a/YLErpDAL/Modules/DataProviderModule/EodPriceQueryService.cs b/YLErpDAL/Modules/DataProviderModule/EodPriceQueryService.cs index 5c9f6b6f..02e7787b 100644 --- a/YLErpDAL/Modules/DataProviderModule/EodPriceQueryService.cs +++ b/YLErpDAL/Modules/DataProviderModule/EodPriceQueryService.cs @@ -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)) }; } /// diff --git a/YLErpDAL/Modules/EodModule/BondPaymentService.cs b/YLErpDAL/Modules/EodModule/BondPaymentService.cs index eda780f8..a10caab3 100644 --- a/YLErpDAL/Modules/EodModule/BondPaymentService.cs +++ b/YLErpDAL/Modules/EodModule/BondPaymentService.cs @@ -135,7 +135,8 @@ namespace YLErp.Modules.EodModule public decimal CalcPayment(List payments, decimal qty, decimal longRatio, decimal payDirection) { var interest = payments.Sum(s => s.payment_interest ?? 0); - return interest * qty * 0.01m * longRatio * payDirection; + // interest 为每 100 元面值的票息,×qty 后需 ÷100 转为实际金额(与入库价格 bondPriceMultiple 同口径) + return BondPriceConverter.ToStorage(interest * qty) * longRatio * payDirection; } } diff --git a/YLErpDAL/Modules/SwapModule/SwapEndConfirmService.cs b/YLErpDAL/Modules/SwapModule/SwapEndConfirmService.cs index 39595512..c8786ab1 100644 --- a/YLErpDAL/Modules/SwapModule/SwapEndConfirmService.cs +++ b/YLErpDAL/Modules/SwapModule/SwapEndConfirmService.cs @@ -78,10 +78,10 @@ namespace YLErp.Modules.SwapModule var um = underlyings.FirstOrDefault(x => x.UnderlyingCode == swapEventFlow.UnderlyingCode); if (um != null && um.IsBond()) { - x.swap_flow_event.TradingAmountAvg *= ConsGlobal.bondShowPriceMultiple; - x.swap_flow_event.TradingAmountFeeAvg *= ConsGlobal.bondShowPriceMultiple; - x.swap_flow_event.TradingAmountNetAvg *= ConsGlobal.bondShowPriceMultiple; - x.swap_flow_event.TradingAmountNetFeeAvg *= ConsGlobal.bondShowPriceMultiple; + x.swap_flow_event.TradingAmountAvg = BondPriceConverter.ToDisplay(x.swap_flow_event.TradingAmountAvg); + x.swap_flow_event.TradingAmountFeeAvg = BondPriceConverter.ToDisplay(x.swap_flow_event.TradingAmountFeeAvg); + x.swap_flow_event.TradingAmountNetAvg = x.swap_flow_event.TradingAmountNetAvg.HasValue ? BondPriceConverter.ToDisplay(x.swap_flow_event.TradingAmountNetAvg.Value) : x.swap_flow_event.TradingAmountNetAvg; + x.swap_flow_event.TradingAmountNetFeeAvg = x.swap_flow_event.TradingAmountNetFeeAvg.HasValue ? BondPriceConverter.ToDisplay(x.swap_flow_event.TradingAmountNetFeeAvg.Value) : x.swap_flow_event.TradingAmountNetFeeAvg; } if (x.trade_contract_r != null) { diff --git a/YLErpDAL/Modules/SwapModule/SwapFlowImportService.cs b/YLErpDAL/Modules/SwapModule/SwapFlowImportService.cs index 3246277b..fb65eff8 100644 --- a/YLErpDAL/Modules/SwapModule/SwapFlowImportService.cs +++ b/YLErpDAL/Modules/SwapModule/SwapFlowImportService.cs @@ -120,10 +120,14 @@ namespace YLErp.Modules.SwapModule swap_flow.TradingAmountNetFee = TradeFeeHelper.CalcPriceWithFee(swap_flow.TradingFee, swap_flow.TradingAmountNet??0, swap_flow.TradingQty, swap_flow.BsType); if (underlying != null && underlying.IsBond()) { - swap_flow.TradingAmountAvg *= ConsGlobal.bondPriceMultiple; - swap_flow.TradingAmountFeeAvg *= ConsGlobal.bondPriceMultiple; - swap_flow.TradingAmountNet *= ConsGlobal.bondPriceMultiple; - swap_flow.TradingAmountNetFee *= ConsGlobal.bondPriceMultiple; + // 成交流水债券报价(×100形式)转入库小数(×0.01),统一走 BondPriceConverter + swap_flow.TradingAmountAvg = BondPriceConverter.ToStorage(swap_flow.TradingAmountAvg); + swap_flow.TradingAmountFeeAvg = BondPriceConverter.ToStorage(swap_flow.TradingAmountFeeAvg); + // TradingAmountNet/NetFee 可空,null 时保持 null 语义(与原 *= 一致) + if (swap_flow.TradingAmountNet.HasValue) + swap_flow.TradingAmountNet = BondPriceConverter.ToStorage(swap_flow.TradingAmountNet.Value); + if (swap_flow.TradingAmountNetFee.HasValue) + swap_flow.TradingAmountNetFee = BondPriceConverter.ToStorage(swap_flow.TradingAmountNetFee.Value); } if (!string.IsNullOrEmpty(clientName)) { diff --git a/YLErpDAL/Modules/SwapModule/SwapFlowService.cs b/YLErpDAL/Modules/SwapModule/SwapFlowService.cs index 089a79fc..2641648a 100644 --- a/YLErpDAL/Modules/SwapModule/SwapFlowService.cs +++ b/YLErpDAL/Modules/SwapModule/SwapFlowService.cs @@ -167,10 +167,12 @@ namespace YLErp.Modules.SwapModule var um = underlyings.FirstOrDefault(x=>x.UnderlyingCode==item.UnderlyingCode); if (um!=null&&um.IsBond()) { - item.TradingAmountAvg *= ConsGlobal.bondShowPriceMultiple; - item.TradingAmountFeeAvg *= ConsGlobal.bondShowPriceMultiple; - item.TradingAmountNet *= ConsGlobal.bondShowPriceMultiple; - item.TradingAmountNetFee *= ConsGlobal.bondShowPriceMultiple; + // 入库小数(0.995)→展示报价(99.5),价格字段统一走 BondPriceConverter + item.TradingAmountAvg = BondPriceConverter.ToDisplay(item.TradingAmountAvg); + item.TradingAmountFeeAvg = BondPriceConverter.ToDisplay(item.TradingAmountFeeAvg); + item.TradingAmountNet = item.TradingAmountNet.HasValue ? BondPriceConverter.ToDisplay(item.TradingAmountNet.Value) : item.TradingAmountNet; + item.TradingAmountNetFee = item.TradingAmountNetFee.HasValue ? BondPriceConverter.ToDisplay(item.TradingAmountNetFee.Value) : item.TradingAmountNetFee; + // 数量÷100(手→万手展示),与价格维度无关,保留常量 item.TradingQty /= ConsGlobal.bondShowPriceMultiple; } } @@ -228,9 +230,9 @@ namespace YLErp.Modules.SwapModule var um = underlyings.FirstOrDefault(x => x.UnderlyingCode == item.UnderlyingCode); if (um != null && um.IsBond()) { - item.TradingAmountAvg *= ConsGlobal.bondShowPriceMultiple; - item.TradingAmountFeeAvg *= ConsGlobal.bondShowPriceMultiple; - item.TradingAmountNet *= ConsGlobal.bondShowPriceMultiple; + item.TradingAmountAvg = BondPriceConverter.ToDisplay(item.TradingAmountAvg); + item.TradingAmountFeeAvg = BondPriceConverter.ToDisplay(item.TradingAmountFeeAvg); + item.TradingAmountNet = BondPriceConverter.ToDisplay(item.TradingAmountNet); item.TradingQty /= ConsGlobal.bondShowPriceMultiple; } } @@ -304,10 +306,10 @@ namespace YLErp.Modules.SwapModule item.InitYtm = ytmMap.GetValueOrDefault(item.SwapTradeId); if (ConsGlobal.InstrumentType.IsBond(item.UnderlyingInstrumentType)) { - item.TradingAmountAvg *= ConsGlobal.bondShowPriceMultiple; - item.TradingAmountFeeAvg *= ConsGlobal.bondShowPriceMultiple; - item.TradingAmountNetFeeAvg *= ConsGlobal.bondShowPriceMultiple; - item.TradingAmountNetAvg *= ConsGlobal.bondShowPriceMultiple; + item.TradingAmountAvg = BondPriceConverter.ToDisplay(item.TradingAmountAvg); + item.TradingAmountFeeAvg = BondPriceConverter.ToDisplay(item.TradingAmountFeeAvg); + item.TradingAmountNetFeeAvg = item.TradingAmountNetFeeAvg.HasValue ? BondPriceConverter.ToDisplay(item.TradingAmountNetFeeAvg.Value) : item.TradingAmountNetFeeAvg; + item.TradingAmountNetAvg = item.TradingAmountNetAvg.HasValue ? BondPriceConverter.ToDisplay(item.TradingAmountNetAvg.Value) : item.TradingAmountNetAvg; item.Quantity /= ConsGlobal.bondShowPriceMultiple; } if (item.PayDate == null || item.EventType != (int)SwapEventTypeEnum.平仓) @@ -440,10 +442,10 @@ namespace YLErp.Modules.SwapModule { if (ConsGlobal.InstrumentType.IsBond(item.position.UnderlyingInstrumentType)) { - item.position.PosiNetPrice *= ConsGlobal.bondShowPriceMultiple; - item.position.PosiGrossPrice *= ConsGlobal.bondShowPriceMultiple; - item.position.PosiNetNoFeePrice *= ConsGlobal.bondShowPriceMultiple; - item.position.PosiNetFeePrice *= ConsGlobal.bondShowPriceMultiple; + item.position.PosiNetPrice = BondPriceConverter.ToDisplay(item.position.PosiNetPrice); + item.position.PosiGrossPrice = BondPriceConverter.ToDisplay(item.position.PosiGrossPrice); + item.position.PosiNetNoFeePrice = item.position.PosiNetNoFeePrice.HasValue ? BondPriceConverter.ToDisplay(item.position.PosiNetNoFeePrice.Value) : item.position.PosiNetNoFeePrice; + item.position.PosiNetFeePrice = item.position.PosiNetFeePrice.HasValue ? BondPriceConverter.ToDisplay(item.position.PosiNetFeePrice.Value) : item.position.PosiNetFeePrice; item.position.PosiQuantity /= ConsGlobal.bondShowPriceMultiple; } } @@ -599,10 +601,10 @@ namespace YLErp.Modules.SwapModule var um = DataCacheProvider.GetUnderlyingDataSource().GetData(swapFlow.UnderlyingCode); if (um != null && um.IsBond()) { - swapFlow.TradingAmountAvg *= ConsGlobal.bondShowPriceMultiple; - swapFlow.TradingAmountFeeAvg *= ConsGlobal.bondShowPriceMultiple; - swapFlow.TradingAmountNet *= ConsGlobal.bondShowPriceMultiple; - swapFlow.TradingAmountNetFee *= ConsGlobal.bondShowPriceMultiple; + swapFlow.TradingAmountAvg = BondPriceConverter.ToDisplay(swapFlow.TradingAmountAvg); + swapFlow.TradingAmountFeeAvg = BondPriceConverter.ToDisplay(swapFlow.TradingAmountFeeAvg); + swapFlow.TradingAmountNet = swapFlow.TradingAmountNet.HasValue ? BondPriceConverter.ToDisplay(swapFlow.TradingAmountNet.Value) : swapFlow.TradingAmountNet; + swapFlow.TradingAmountNetFee = swapFlow.TradingAmountNetFee.HasValue ? BondPriceConverter.ToDisplay(swapFlow.TradingAmountNetFee.Value) : swapFlow.TradingAmountNetFee; swapFlow.TradingQty /= ConsGlobal.bondShowPriceMultiple; } return swapFlow; @@ -617,10 +619,10 @@ namespace YLErp.Modules.SwapModule var um = DataCacheProvider.GetUnderlyingDataSource().GetData(swapFlow.UnderlyingCode); if (um != null && um.IsBond()) { - swapFlow.TradingAmountAvg *= ConsGlobal.bondShowPriceMultiple; - swapFlow.TradingAmountFeeAvg *= ConsGlobal.bondShowPriceMultiple; - swapFlow.TradingAmountNetAvg *= ConsGlobal.bondShowPriceMultiple; - swapFlow.TradingAmountNetFeeAvg *= ConsGlobal.bondShowPriceMultiple; + swapFlow.TradingAmountAvg = BondPriceConverter.ToDisplay(swapFlow.TradingAmountAvg); + swapFlow.TradingAmountFeeAvg = BondPriceConverter.ToDisplay(swapFlow.TradingAmountFeeAvg); + swapFlow.TradingAmountNetAvg = swapFlow.TradingAmountNetAvg.HasValue ? BondPriceConverter.ToDisplay(swapFlow.TradingAmountNetAvg.Value) : swapFlow.TradingAmountNetAvg; + swapFlow.TradingAmountNetFeeAvg = swapFlow.TradingAmountNetFeeAvg.HasValue ? BondPriceConverter.ToDisplay(swapFlow.TradingAmountNetFeeAvg.Value) : swapFlow.TradingAmountNetFeeAvg; swapFlow.TradingQty /= ConsGlobal.bondShowPriceMultiple; } return swapFlow; @@ -752,10 +754,14 @@ namespace YLErp.Modules.SwapModule } if (underlying != null && underlying.IsBond()) { - req.TradingAmountAvg *= ConsGlobal.bondPriceMultiple; - req.TradingAmountFeeAvg *= ConsGlobal.bondPriceMultiple; - req.TradingAmountNet *= ConsGlobal.bondPriceMultiple; - req.TradingAmountNetFee *= ConsGlobal.bondPriceMultiple; + // 债券报价(×100)转入库小数(×0.01),价格字段统一走 BondPriceConverter + req.TradingAmountAvg = BondPriceConverter.ToStorage(req.TradingAmountAvg); + req.TradingAmountFeeAvg = BondPriceConverter.ToStorage(req.TradingAmountFeeAvg); + if (req.TradingAmountNet.HasValue) + req.TradingAmountNet = BondPriceConverter.ToStorage(req.TradingAmountNet.Value); + if (req.TradingAmountNetFee.HasValue) + req.TradingAmountNetFee = BondPriceConverter.ToStorage(req.TradingAmountNetFee.Value); + // 数量×100(万手→手),与价格维度无关,保留常量 req.TradingQty *= ConsGlobal.bondShowPriceMultiple; } } diff --git a/YLErpDAL/Modules/SwapModule/SwapTradeAutoService.cs b/YLErpDAL/Modules/SwapModule/SwapTradeAutoService.cs index f3c1a530..abaf1859 100644 --- a/YLErpDAL/Modules/SwapModule/SwapTradeAutoService.cs +++ b/YLErpDAL/Modules/SwapModule/SwapTradeAutoService.cs @@ -85,13 +85,14 @@ namespace YLErp.Modules.SwapModule swapFlow.SwapTradeNo = null; swapFlow.DataState = (int)SwapFlowDateStateEnum.等待完成; } - swapFlow.TradingAmountAvg = (item.deal_full_price ?? 0) * 0.01m; - swapFlow.TradingAmountFeeAvg = (item.deal_full_price_include_fee ?? 0) * 0.01m; + // 债券报价(×100)转入库小数(×0.01),统一走 BondPriceConverter + swapFlow.TradingAmountAvg = BondPriceConverter.ToStorage(item.deal_full_price ?? 0); + swapFlow.TradingAmountFeeAvg = BondPriceConverter.ToStorage(item.deal_full_price_include_fee ?? 0); swapFlow.TradingAmount = swapFlow.TradingQty * swapFlow.ContractSize * swapFlow.TradingAmountAvg; swapFlow.ClientId = Convert.ToInt32(item.client_id ?? 0); - swapFlow.ytm = (item.ytm ?? 0) * 0.01m; - swapFlow.TradingAmountNet = (item.deal_price ?? 0) * 0.01m; - swapFlow.TradingAmountNetFee = (item.deal_price_include_fee ?? 0) * 0.01m; + swapFlow.ytm = BondPriceConverter.ToStorage(item.ytm ?? 0); + swapFlow.TradingAmountNet = BondPriceConverter.ToStorage(item.deal_price ?? 0); + swapFlow.TradingAmountNetFee = BondPriceConverter.ToStorage(item.deal_price_include_fee ?? 0); swapFlow.ClientName = item.client_name; swapFlow.SetOpt(UserInfo); swapFlow.OptTime = item.create_time.HasValue ? item.create_time.Value : DateTime.Now;