From 1b9ae140cf4f00a8fa695e71b2311d4d003773f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E5=86=B0=E5=86=B0?= <437394478@qq.com> Date: Fri, 28 Aug 2026 13:49:42 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BB=93=E7=AE=97=E5=8D=95=E7=9A=84?= =?UTF-8?q?=E6=9C=9F=E6=9C=AB=E6=9C=9F=E5=88=9D=E6=A0=87=E7=9A=84=E4=BB=B7?= =?UTF-8?q?=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SwapSettlementBillRowBuilder.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/YLErpDAL/Modules/TradeModule/DocGenerateModule/SwapSettlementBillRowBuilder.cs b/YLErpDAL/Modules/TradeModule/DocGenerateModule/SwapSettlementBillRowBuilder.cs index 70e81e8a..d67792bb 100644 --- a/YLErpDAL/Modules/TradeModule/DocGenerateModule/SwapSettlementBillRowBuilder.cs +++ b/YLErpDAL/Modules/TradeModule/DocGenerateModule/SwapSettlementBillRowBuilder.cs @@ -1,6 +1,7 @@ using YLErp.DBModels; using YLErp.DBModels.Consts; using YLErp.DBModels.Enums; +using YLErp.Helpers; using YLErp.Models; using YLErp.Modules.SwapModule; using YLErp.Modules.SwapModule.ReturnLegs; @@ -107,6 +108,13 @@ public static class SwapSettlementBillRowBuilder var isEtf = ConsGlobal.InstrumentType.Fund.Equals( input.UnderlyingInstrumentType, StringComparison.OrdinalIgnoreCase); + var initialPrice = settlementPosition?.PosiGrossPrice ?? 0m; + var closePrice = input.CloseFlow.TradingAmountAvg; + if (isCashBond) + { + initialPrice = BondPriceConverter.ToDisplay(initialPrice); + closePrice = BondPriceConverter.ToDisplay(closePrice); + } return new ExcelReportModel @@ -127,11 +135,11 @@ public static class SwapSettlementBillRowBuilder PeriodDividend = isEtf ? periodAmount.ToString("0.00") : string.Empty, - PosiNetPrice = ((settlementPosition?.PosiGrossPrice ?? 0m) * 100m).ToString("0.00000000"), + PosiNetPrice = initialPrice.ToString("0.00000000"), InitYtm = isCashBond && input.Trade.InitYtm.HasValue ? input.Trade.InitYtm.Value.ToString("0.####%") : string.Empty, - ClosePrice = (input.CloseFlow.TradingAmountAvg * 100m).ToString("0.00000000"), + ClosePrice = closePrice.ToString("0.00000000"), ExitYtm = input.ExitYtm.HasValue ? input.ExitYtm.Value.ToString("0.0000") : string.Empty,