山证bug修复迁移

This commit is contained in:
吴方海
2024-06-21 13:45:43 +08:00
parent 7fece8679a
commit 1684bae60d
6 changed files with 55 additions and 23 deletions
@@ -903,7 +903,7 @@ namespace YLErp.Modules.EodModule.SettlementModule
WinLoss += Convert.ToDouble(item.TdRealizedPnL) * (-1);
var lastPv = lastEodSwap != null ? Convert.ToDouble(lastEodSwap.PostionValue) * (-1) : 0;
eodPnlSum.LastPvSum = eodPnlSum.LastPvSum.HasValue ? eodPnlSum.LastPvSum + lastPv : lastPv;
var pnl = item.FloatingPnL + item.InterestPnL;
var pnl = item.PostionValue;
eodPnlSum.PvSum = eodPnlSum.PvSum.HasValue ? eodPnlSum.PvSum - Convert.ToDouble(item.PostionValue) : Convert.ToDouble(item.PostionValue) * (-1);
eodPnlSum.SellPvSum = eodPnlSum.SellPvSum.HasValue ? eodPnlSum.SellPvSum - Convert.ToDouble(item.MarketValueShort) : Convert.ToDouble(item.MarketValueShort) * (-1);
eodPnlSum.RoundedPvSum = eodPnlSum.RoundedPvSum.HasValue ? eodPnlSum.RoundedPvSum - Math.Round(Convert.ToDouble(item.PostionValue), 2) : Math.Round(Convert.ToDouble(item.PostionValue), 2) * (-1);
@@ -912,8 +912,8 @@ namespace YLErp.Modules.EodModule.SettlementModule
RoundedPositionPnl += Math.Round(Convert.ToDouble(pnl), 2) * (-1);
TotalPnl += Convert.ToDouble(item.RealizedPnL) * (-1);
ClientSellPositionPnl += Math.Max(-Convert.ToDouble(item.MarketValueShort), 0);
var lastPnl = lastEodSwap != null ? lastEodSwap.FloatingPnL + lastEodSwap.InterestPnL : 0;
DailyPnl += Convert.ToDouble(pnl - lastPnl+item.TdRealizedPnL) * (-1);
var lastPnl = lastEodSwap != null ? lastEodSwap.PostionValue : 0;
DailyPnl += Convert.ToDouble(pnl - lastPnl + item.TdRealizedPnL) * (-1);
//PayableMargin += Convert.ToDouble(item.InitMarginLoss + item.InitMarginGain+ item.PostionMarginLoss + item.PostionMarginGain);
}
var clientmarignQuery = marignQuery.Where(x => x.ClientId == client.id&&x.StructureType!="多空组合");