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); }