From f7e6f7f40efa76356c52e0f13f1ea3ec38aa1881 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=96=B9=E6=B5=B7?= Date: Fri, 13 Jun 2025 13:26:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B9=B3=E4=BB=93=EF=BC=8C=E5=A6=82=E6=9E=9C?= =?UTF-8?q?=E5=B9=B3=E4=BB=93=E5=90=8D=E4=B9=89=E6=9C=AC=E9=87=91>?= =?UTF-8?q?=E6=8C=81=E4=BB=93=E5=90=8D=E4=B9=89=E6=9C=AC=E9=87=91=20=3D?= =?UTF-8?q?=E6=8C=81=E4=BB=93=E5=90=8D=E4=B9=89=E6=9C=AC=E9=87=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- YLErpDAL/Modules/SwapModule/SwapDealService.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/YLErpDAL/Modules/SwapModule/SwapDealService.cs b/YLErpDAL/Modules/SwapModule/SwapDealService.cs index d14a007d..2b09bb65 100644 --- a/YLErpDAL/Modules/SwapModule/SwapDealService.cs +++ b/YLErpDAL/Modules/SwapModule/SwapDealService.cs @@ -850,6 +850,7 @@ namespace YLErp.Modules.SwapModule unwindData.CloseMethod = unwindQty == unwindData.PositionQty ? (int)CloseMethodEnum.全部平仓 : (int)CloseMethodEnum.部分平仓; unwindData.ClosePercent = unwindData.PositionQty == 0 ? 0 : unwindPercent; unwindData.CloseNotionalValue = position == null ? 0 : unwindQty * position.PosiGrossPrice * position.ContractSize; + unwindData.CloseNotionalValue = unwindData.CloseNotionalValue > unwindData.PosiNotionalValue? unwindData.PosiNotionalValue: unwindData.CloseNotionalValue; unwindData.CloseQty = unwindQty; if (position != null) { @@ -881,7 +882,7 @@ namespace YLErp.Modules.SwapModule floatEvent.TradingFee = closeFee; floatEvent.MarkClosePnl = (unwindPrice - position.PosiGrossPrice) * unwindQty * floatRatio * longRatio; floatEvent.MarkClosePnl = Math.Round(floatEvent.MarkClosePnl + ((floatEvent.TradingFeePending+ closeFee) * floatRatio * -1), ConsGlobal.MoneyRound, MidpointRounding.AwayFromZero); - floatEvent.TradingAmount = unwindPrice * floatEvent.Quantity * floatEvent.ContractSize; + floatEvent.TradingAmount = unwindData.CloseNotionalValue; floatEvent.OptLog = "流水自动"; floatEvent.ClientId = td.ClientId; floatEvent.SetOpt(UserInfo);