山证bug修复迁移
This commit is contained in:
@@ -157,7 +157,7 @@ namespace YLErp.Modules.CalculationModule
|
||||
eodSwap.NotionalValueLong = positions.Where(x => x.PositionType == (int)PositionTypeFlag.Long).Sum(s => s.PosiNotionalValue);
|
||||
eodSwap.NotionalValueShort = positions.Where(x => x.PositionType == (int)PositionTypeFlag.Short).Sum(s => s.PosiNotionalValue);
|
||||
eodSwap.NotionalValue = eodSwap.NotionalValueLong + eodSwap.NotionalValueShort;
|
||||
var lastEod = db.eod_swap.Where(x => x.SwapTradeId == trade.id).OrderByDescending(o => o.ValueDate).FirstOrDefault();
|
||||
var lastEod = db.eod_swap.Where(x => x.SwapTradeId == trade.id && x.ValueDate <= valuedateBLL.ValueDate).OrderByDescending(o => o.ValueDate).FirstOrDefault();
|
||||
eodSwap.RealizedPnL = lastEod?.RealizedPnL ?? 0;
|
||||
eodSwap.InterestPnL = lastEod?.InterestPnL ?? 0;
|
||||
foreach (var item in positions)
|
||||
@@ -186,7 +186,7 @@ namespace YLErp.Modules.CalculationModule
|
||||
}
|
||||
eodSwap.NotionalValue += pvNoPrice;
|
||||
}
|
||||
eodSwap.PostionValue = eodSwap.InterestPnL + eodSwap.FloatingPnL;
|
||||
eodSwap.PostionValue = lastEod?.PostionValue ?? 0;
|
||||
return eodSwap;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user