bug修复
This commit is contained in:
@@ -819,7 +819,7 @@ namespace YLErp.Modules.SwapModule
|
||||
/// <param name="td"></param>
|
||||
/// <param name="unwindPrice"></param>
|
||||
/// <param name="unwindPriceFee"></param>
|
||||
public void AuotoSwapUnwind(int tradeid, decimal unwindPrice, decimal unwindPriceFee, decimal unwindNetFee, decimal unwindNet, DateTime valueDate, decimal unwindQty, decimal mergeQty, decimal penddingFee)
|
||||
public void AuotoSwapUnwind(int tradeid, decimal unwindPrice, decimal unwindPriceFee, decimal unwindNetFee, decimal unwindNet, DateTime valueDate, decimal unwindQty)
|
||||
{
|
||||
unwindPriceFee = decimal.Parse(unwindPriceFee.ToString("F10"));
|
||||
var td = DbContext.trade.Find(tradeid);
|
||||
@@ -884,10 +884,10 @@ namespace YLErp.Modules.SwapModule
|
||||
floatEvent.TradingAmountNetFeeAvg = unwindNetFee;
|
||||
floatEvent.TradingAmountNetAvg = unwindNet;
|
||||
floatEvent.TradingFeePending = position.PosiTradingFeePending * unwindData.ClosePercent;
|
||||
var mergeClosePercent = mergeQty == 0 ? 0 : unwindQty / mergeQty;
|
||||
floatEvent.TradingFee = penddingFee * mergeClosePercent;
|
||||
floatEvent.TradingFeePending = Math.Round(floatEvent.TradingFeePending, 2, MidpointRounding.AwayFromZero);
|
||||
floatEvent.TradingFee = floatEvent.TradingFeePending;
|
||||
floatEvent.MarkClosePnl = (unwindPrice - position.PosiGrossPrice) * unwindQty * floatRatio * longRatio;
|
||||
floatEvent.MarkClosePnl = Math.Round(floatEvent.MarkClosePnl + (floatEvent.TradingFee * floatRatio * -1), ConsGlobal.MoneyRound, MidpointRounding.AwayFromZero);
|
||||
floatEvent.MarkClosePnl = Math.Round(floatEvent.MarkClosePnl + (floatEvent.TradingFeePending*2 * floatRatio * -1), ConsGlobal.MoneyRound, MidpointRounding.AwayFromZero);
|
||||
floatEvent.TradingAmount = unwindPrice * floatEvent.Quantity * floatEvent.ContractSize;
|
||||
floatEvent.OptLog = "流水自动";
|
||||
floatEvent.ClientId = td.ClientId;
|
||||
|
||||
Reference in New Issue
Block a user