From cb5e691c9c36886a560bf873b7c376b25bbeb808 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=96=B9=E6=B5=B7?= Date: Fri, 7 Jun 2024 14:58:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=88=E8=BF=9B=E5=85=88=E5=87=BAbug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- YLErpDAL/Modules/SwapModule/SwapDealService.cs | 2 +- YLErpDAL/Modules/SwapModule/SwapTradeAutoService.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/YLErpDAL/Modules/SwapModule/SwapDealService.cs b/YLErpDAL/Modules/SwapModule/SwapDealService.cs index ab6589a1..544f2716 100644 --- a/YLErpDAL/Modules/SwapModule/SwapDealService.cs +++ b/YLErpDAL/Modules/SwapModule/SwapDealService.cs @@ -815,7 +815,7 @@ namespace YLErp.Modules.SwapModule unwindData.NotionalValue = Convert.ToDecimal(td.OriginalStockEqvNotional ?? 0); unwindData.NotionalQty = positions.Where(x => x.IsInitial).Sum(s => s.PosiQuantity); unwindData.PosiNotionalValue = position != null ? position.PosiNotionalValue : Convert.ToDecimal(td.StockEqvNotional); - unwindData.PositionQty = position != null ? position.PosiQuantity : Convert.ToDecimal(td.TradeAmount); + unwindData.PositionQty = Convert.ToDecimal(td.TradeAmount); var unwindPercent = unwindData.PositionQty == 0 ? 0 : unwindQty / unwindData.PositionQty; unwindData.AnnualDays = tradeExtend == null ? 365 : tradeExtend.ExtendObj.AnnualDays; unwindData.CloseMethod = unwindQty == unwindData.PositionQty ? (int)CloseMethodEnum.全部平仓 : (int)CloseMethodEnum.部分平仓; diff --git a/YLErpDAL/Modules/SwapModule/SwapTradeAutoService.cs b/YLErpDAL/Modules/SwapModule/SwapTradeAutoService.cs index 95a6d9fb..49689822 100644 --- a/YLErpDAL/Modules/SwapModule/SwapTradeAutoService.cs +++ b/YLErpDAL/Modules/SwapModule/SwapTradeAutoService.cs @@ -1101,7 +1101,7 @@ namespace YLErp.Modules.SwapModule flowSameClone.TradingAmountNetFeeAvg ?? 0, flowSameClone.TradingAmountNetAvg ?? 0, flowSameClone.OccurTime, - flowSameClone.TradingQty, + unwindQty, unwindQty, unwindFee); if (flowQty>0) @@ -1167,7 +1167,7 @@ namespace YLErp.Modules.SwapModule swapFlow.TradingAmountNetFeeAvg ?? 0, swapFlow.TradingAmountNetAvg ?? 0, swapFlow.OccurTime, - swapFlow.TradingQty, + unwindQty, unwindQty, unwindFee); }