fix: 浮动端待实现收益分红

This commit is contained in:
gongpei
2025-10-23 17:30:50 +08:00
parent f5463e4a57
commit 8b8eb19ddc
@@ -913,7 +913,7 @@ namespace YLErp.Modules.SwapModule
// 平仓数量/平仓前的数量*平仓对象的待实现分红收益,保留2位小数
var yest = QdpCalendarHelper.GetNonHolidayDefore(flowEvent.EventDate.AddDays(-1));
var eod = DbContext.eod_swap_position.Where(e => e.SwapTradeId == flowEvent.SwapTradeId && !e.Invalid && e.PosiQuantity > 0 && e.ValueDate == yest).FirstOrDefault();
var dividendIn = eod.PosiProfitSum * unwindQty / eod.PosiQuantity;
var dividendIn = eod.PosiDividendSum * unwindQty / eod.PosiQuantity;
flowEvent.DividendIn = Math.Round(dividendIn, 2, MidpointRounding.AwayFromZero);
}