fix: DV01汇总及合计功能,优化格式化配置

1. YLErpDAL/Modules/RiskModule/QuotaMonitorService.cs
   - 日终版本(QueryEodGlobalFromCalc)恢复互换行DV限额取值

2. YLErpDAL/Modules/SwapModule/SwapEodPositionService.cs
   - SaveEodSwap / UpdateEodSwap 补充 eod_Swap.dv01 汇总
   - SearchEodSwapList 新增DV合计,返回至前端footer

3. YLErpWeb/wwwroot/Scripts/app/swaptrade/EodPositionRisks.js
   - 框架合约tab启用footerrow,展示DV合计
   - 框架合约DV列formatter改为4位小数
This commit is contained in:
tengyufan
2026-06-25 20:00:18 +08:00
parent 0514e34e13
commit 7f6bdde521
3 changed files with 19 additions and 6 deletions
@@ -1747,6 +1747,7 @@ namespace YLErp.Modules.SwapModule
eod_Swap.MarketValueLong = positions.Where(x => x.PositionType == (int)PositionTypeFlag.Long).Sum(s => s.UnderlyingMarketValue);
eod_Swap.MarketValueShort = positions.Where(x => x.PositionType == (int)PositionTypeFlag.Short).Sum(s => s.UnderlyingMarketValue);
eod_Swap.FloatingPnL = positions.Sum(s => s.PosiProfitSum);
eod_Swap.dv01 = positions.Sum(s => s.dv01 ?? 0);
decimal interestPnL = 0;
interestPositions.ForEach(x =>
{
@@ -1811,6 +1812,7 @@ namespace YLErp.Modules.SwapModule
eod_Swap.MarketValueLong = positions.Where(x => x.PositionType == (int)PositionTypeFlag.Long).Sum(s => s.UnderlyingMarketValue);
eod_Swap.MarketValueShort = positions.Where(x => x.PositionType == (int)PositionTypeFlag.Short).Sum(s => s.UnderlyingMarketValue);
eod_Swap.FloatingPnL = positions.Sum(s => s.PosiProfitSum);
eod_Swap.dv01 = positions.Sum(s => s.dv01 ?? 0);
interestPositions.ForEach(x =>
{
decimal ratio = x.InterestDirection == (int)SwapDirectionEnum. ? 1 : -1;//收取为正,支付为负
@@ -1999,6 +2001,9 @@ namespace YLErp.Modules.SwapModule
var client = DataCacheProvider.GetClientDataSource().GetData(item.ClientId);
item.SwapTradeTypeStr = client?.SwapTradeTypeStr;
}
var dv01 = query.Sum(O => O.position.dv01??0);
retListResult.Sum = new {DV = dv01 };
return retListResult;
}