bug修复

This commit is contained in:
吴方海
2025-05-30 14:59:28 +08:00
parent 829334a4fd
commit 4e5d09d0f2
4 changed files with 5 additions and 3 deletions
@@ -698,6 +698,7 @@ namespace YLErp.Modules.SwapModule
}
flowMergeClone.TradingAmount = Math.Abs(amount);
flowMergeClone.TradingFeePending = flowMergeClone.TradingFeePending * qtyAbs / flowMergeClone.TradingQty;//剩余后付费用
flowMergeClone.TradingFeePending = Math.Round(flowMergeClone.TradingFeePending, 4, MidpointRounding.AwayFromZero);
flowMergeClone.TradingQty = qtyAbs;
if (qty > 0)//交易有剩余新开仓
{
@@ -1333,6 +1334,7 @@ namespace YLErp.Modules.SwapModule
var newQtyAbs = Math.Abs(newQty);
flowMerge.SwapTradeNo = td.TradeNumber;
var unwindFee= newQty>0? flowMerge.TradingFeePending: flowMerge.TradingFeePending* floatPosition.PosiQuantity / flowMerge.TradingQty;
unwindFee = Math.Round(unwindFee, 4, MidpointRounding.AwayFromZero);
// 全平
new SwapDealService(UserInfo).AuotoSwapUnwind(td.id,
flowMerge.TradingAmountAvg,