diff --git a/Framework/YLErp.Core/DBModels/Clientbalancedaily.cs b/Framework/YLErp.Core/DBModels/Clientbalancedaily.cs index 6cb7fb61..e7150856 100644 --- a/Framework/YLErp.Core/DBModels/Clientbalancedaily.cs +++ b/Framework/YLErp.Core/DBModels/Clientbalancedaily.cs @@ -546,6 +546,16 @@ namespace YLErp.DBModels /// 追保 出金累计 /// public double? vm_out_fund_sum { get; set; } + /// + /// 交易费用 + /// + public double? trade_fee { get; set; } + public double? trade_fee_sum { get; set; } + /// + /// 利息盈亏 + /// + public double? interest_pnl { get; set; } + public double? interest_pnl_sum { get; set; } [NotMapped] public FundObject FundObject { get; set; } diff --git a/Framework/YLErp.Core/Models/ClientSettleBalance.cs b/Framework/YLErp.Core/Models/ClientSettleBalance.cs index ec41df43..3945bafe 100644 --- a/Framework/YLErp.Core/Models/ClientSettleBalance.cs +++ b/Framework/YLErp.Core/Models/ClientSettleBalance.cs @@ -1077,5 +1077,13 @@ namespace YLErp.Models /// 是否需要追保 /// public bool NeedAddMargin { get; set; } + /// + /// 交易费用 + /// + public double TradeFee { get; set; } + /// + /// 利息盈亏 + /// + public double InterestPnl { get; set; } } } diff --git a/YLErpDAL/BLL/EodSettlement/ClientBalanceUtility.cs b/YLErpDAL/BLL/EodSettlement/ClientBalanceUtility.cs index ae83d671..2f14ab3f 100644 --- a/YLErpDAL/BLL/EodSettlement/ClientBalanceUtility.cs +++ b/YLErpDAL/BLL/EodSettlement/ClientBalanceUtility.cs @@ -1,6 +1,9 @@ using BaseOUDAL; +using NPOI.SS.UserModel; using YLErp.BLL.Eod; +using YLErp.DBModels; using YLErp.DBModels.Enums; +using YLErp.Helpers; using YLErp.Model; using YLErp.Models; using YLErp.Modules; @@ -146,7 +149,9 @@ namespace YLErp.BLL.EodSettlement FundJson = t.FundJson, PFE = t.PFE, EAD = t.EAD, - LastSettlemetTime=t.OptDate + LastSettlemetTime=t.OptDate, + TradeFee=t.trade_fee_sum??0, + InterestPnl=t.interest_pnl_sum??0 }; var sumDatas = sumQuery.ToArray(); @@ -171,6 +176,8 @@ namespace YLErp.BLL.EodSettlement balance.Coupon = data.Coupon; balance.CashInCashOutProductChange = data.CashInCashOutProductChange; balance.WinLoss = data.WinLoss; + balance.TradeFee=data.TradeFee; + balance.InterestPnl = data.InterestPnl; //起始时间 有值 和 WinLoss 区分 -- 国投不含当天 balance.WinLossSum = data.WinLoss; balance.FundJson = data.FundJson; @@ -210,6 +217,8 @@ namespace YLErp.BLL.EodSettlement data.Coupon += balance.Coupon; data.CashInCashOutProductChange += balance.CashInCashOutProductChange; data.WinLoss += balance.WinLoss; + data.TradeFee += balance.TradeFee; + data.InterestPnl += balance.InterestPnl; //data.AvailableStockEqvNotional = balance.AvailableStockEqvNotional; data.LastSettlemetTime = balance.LastSettlemetTime; data.LastHTSettlemetTime = balance.LastHTSettlemetTime; @@ -1390,6 +1399,68 @@ namespace YLErp.BLL.EodSettlement } return lastClientBalances; } + + public static void FillClientBalanceHisTradeFee() + { + List marginTypes = new List() { (int)InterestModeEnum.追加预付金, (int)InterestModeEnum.初始预付金 }; + var clients= DataCacheProvider.GetClientDataSource().AsQueryable().Where(x=>x.ProcessStatus=="已开户").ToList(); + using var db = new YLContext(); + var firstEodStatusDate = db.eodStatus.OrderBy(o=>o.ValueDate).FirstOrDefault(); + if (firstEodStatusDate!=null) + { + var firstDate=firstEodStatusDate.ValueDate; + var preBalanceDate = valuedateBLL.GetNonHolidayDefore(valuedateBLL.ValueDate.AddDays(-1)); + while (firstDate < valuedateBLL.ValueDate) + { + foreach (var client in clients) + { + var interestPnl = 0d; + var tradeFee = 0d; + var clientBalance=db.ClientBalanceDaily.FirstOrDefault(x => x.ClientId == client.id && x.BalanceDate == firstDate); + var clientBalancePre = db.ClientBalanceDaily.FirstOrDefault(x => x.ClientId == client.id && x.BalanceDate == preBalanceDate); + if (clientBalance != null) + { + // 互换平仓信息 + var clientEventFlowQuery = from eod in db.swap_flow_event.Where(x => x.EventDate <= firstDate && x.EventDate > preBalanceDate &&x.ClientId== client.id &&x.DataState==(int)SwapFlowDateStateEnum.完成&&x.EventType==(int)SwapFlowEventTypeEnum.平仓) + join t in db.trade.Where(x => x.TradeType == "收益互换" && x.ValidState != ConsGlobal.InValid ) on eod.SwapTradeId equals t.id + select eod; + var clientEodSwaps = clientEventFlowQuery.ToList(); + foreach (var item in clientEodSwaps.GroupBy(x => x.SwapTradeId)) + { + + var eventPosi = item.FirstOrDefault(t => t.PayDirection > 0); + + var eventInterests = item.Where(t => t.PayDirection == 0).ToList(); + + foreach (var interest in eventInterests) + { + double ratio = interest.InterestDirection == (int)SwapDirectionEnum.收取 ? 1 : -1;//收取为正,支付为负 + if (marginTypes.Contains(interest.InterestMode)) + { + ratio = -ratio; + } + interestPnl += Convert.ToDouble(interest.InterestClosePnL) * (-1); + } + + tradeFee += Convert.ToDouble(eventPosi.TradingFee+ eventPosi.TradingFeePending) * (-1); + } + clientBalance.trade_fee = tradeFee; + clientBalance.interest_pnl = interestPnl; + clientBalance.trade_fee_sum = clientBalance.trade_fee; + clientBalance.interest_pnl_sum = clientBalance.interest_pnl; + if (clientBalancePre!=null) + { + clientBalance.trade_fee_sum += clientBalancePre.trade_fee_sum; + clientBalance.interest_pnl_sum += clientBalancePre.interest_pnl_sum; + } + db.SaveChanges(); + } + } + preBalanceDate= firstDate; + firstDate = valuedateBLL.GetNonHoliday(firstDate.AddDays(1)); + } + } + } /// /// 获取预付金率设置 /// @@ -1413,6 +1484,7 @@ namespace YLErp.BLL.EodSettlement } return marinRate; } + class ClientBalanceEx : ClientSettleBalance { public string UnderlyingCode { get; set; } diff --git a/YLErpDAL/BLL/EodSettlement/RealTimeClientBanlanceService.cs b/YLErpDAL/BLL/EodSettlement/RealTimeClientBanlanceService.cs index 2218da49..276ac848 100644 --- a/YLErpDAL/BLL/EodSettlement/RealTimeClientBanlanceService.cs +++ b/YLErpDAL/BLL/EodSettlement/RealTimeClientBanlanceService.cs @@ -1297,7 +1297,10 @@ namespace YLErp.BLL.Eod unwindPercent = posiQty == 0 ? 0 : unwindQty / posiQty; } var tdRealizedPnL = flowEvents.Where(x => x.EventDate > lastSettletDate).ToList().Sum(s => s.InterestClosePnL + s.MarkClosePnl); - var tdRealizedInterestPnL = flowEvents.Where(x => x.EventDate > lastSettletDate).ToList().Sum(s => s.InterestClosePnL * unwindPercent); + var tdRealizedInterestPnL = flowEvents.Where(x => x.EventDate > lastSettletDate).ToList().Sum(s => s.InterestClosePnL); + var tradeFee= flowEvents.Where(x => x.EventDate > lastSettletDate).ToList().Sum(s => s.TradingFee+s.TradingFeePending); + balance.InterestPnl += Convert.ToDouble(tdRealizedInterestPnL)*-1; + balance.TradeFee += Convert.ToDouble(tradeFee) *-1; var currentEvents = flowEvents.Where(x => x.EventDate == startDate).ToList(); var currentRealizedPnl = currentEvents.Sum(s => s.InterestClosePnL + s.MarkClosePnl); //潜在行权收益等于实值额 diff --git a/YLErpDAL/Model/clientLinq.cs b/YLErpDAL/Model/clientLinq.cs index 0f00b7da..7c5809ce 100644 --- a/YLErpDAL/Model/clientLinq.cs +++ b/YLErpDAL/Model/clientLinq.cs @@ -597,5 +597,13 @@ namespace YLErp.Model /// 交易类型 /// public string TypeStr { get { return this.Type == "1" ? "量化高频" : "普通"; } } + /// + /// 交易费用 + /// + public double TradeFee { get; set; } + /// + /// 利息盈亏 + /// + public double InterestPnl { get; set; } } } diff --git a/YLErpDAL/Modules/EodModule/SettlementModule/EodClientBalanceCalc.cs b/YLErpDAL/Modules/EodModule/SettlementModule/EodClientBalanceCalc.cs index f79bd70e..b7968f1a 100644 --- a/YLErpDAL/Modules/EodModule/SettlementModule/EodClientBalanceCalc.cs +++ b/YLErpDAL/Modules/EodModule/SettlementModule/EodClientBalanceCalc.cs @@ -1,10 +1,12 @@ using Newtonsoft.Json; using NPOI.SS.Formula.Functions; +using NPOI.SS.UserModel; using Org.BouncyCastle.Asn1.Ocsp; using YieldChain.Helpers; using YLErp.BLL; using YLErp.BLL.MarginCalculation; using YLErp.Configuration; +using YLErp.DBModels; using YLErp.DBModels.Enums; using YLErp.Helpers; using YLErp.Model; @@ -37,7 +39,7 @@ namespace YLErp.Modules.EodModule.SettlementModule var currencyCodes = _context.CurrencyCodes; var currencyProvider = _context.EodCurrencyProvider; - + List marginTypes = new List() { (int)InterestModeEnum.追加预付金, (int)InterestModeEnum.初始预付金 }; //预付金可取上浮比率 var marginRatio = _context.SystemValue.MarginRatio ?? 0.15; var marginMaxRatio = marginRatio + 0.02; @@ -123,7 +125,7 @@ namespace YLErp.Modules.EodModule.SettlementModule join t in DbContext.trade.Where(x => x.TradeType == "收益互换" && x.ValidState != ConsGlobal.InValid && ConsTrade.TradeStatusAfterConfirmed.Contains(x.TradeStatus) && x.StartDate <= balanceDate) on eod.SwapTradeId equals t.id select eod; // 互换合约估值持仓信息 - var eodSwapPosiQuery = from eod in DbContext.eod_swap_position.Where(x => x.ValueDate <= balanceDate && x.ValueDate >= preBalanceDate&&x.PosiDirection>0) + var eodSwapPosiQuery = from eod in DbContext.eod_swap_position.Where(x => x.ValueDate <= balanceDate && x.ValueDate >= preBalanceDate) join t in DbContext.trade.Where(x => x.TradeType == "收益互换" && x.ValidState != ConsGlobal.InValid && ConsTrade.TradeStatusAfterConfirmed.Contains(x.TradeStatus) && x.StartDate <= balanceDate) on eod.SwapTradeId equals t.id select eod; var positionList = DbContext.trade.Where(t => (ConsTrade.TradeStatusAfterConfirmed.Contains(t.TradeStatus)||t.UnWindDate> balanceDate) && t.ValidState != "InValid"&&t.TradeType=="收益互换"); @@ -136,7 +138,11 @@ namespace YLErp.Modules.EodModule.SettlementModule StructureType = t.StructureType, marin = s.InterestPrincipalFix * (s.InterestDirection == 1 ? -1m : 1m) }; - + // 互换平仓信息 + var clientEventFlowQuery = from eod in DbContext.swap_flow_event.Where(x => x.EventDate <= balanceDate && x.EventDate > preBalanceDate && x.DataState == (int)SwapFlowDateStateEnum.完成 && x.EventType == (int)SwapFlowEventTypeEnum.平仓) + join t in DbContext.trade.Where(x => x.TradeType == "收益互换" && x.ValidState != ConsGlobal.InValid && ConsTrade.TradeStatusAfterConfirmed.Contains(x.TradeStatus) && x.TradeDate <= balanceDate) on eod.SwapTradeId equals t.id + select eod; + var clientEventFlows = clientEventFlowQuery.ToList(); var eodSwaps = eodSwapQuery.ToList(); var eodSwapPosis = eodSwapPosiQuery.ToList(); if (reqClientIds != null && reqClientIds.Any()) @@ -144,6 +150,7 @@ namespace YLErp.Modules.EodModule.SettlementModule eodSwaps = eodSwaps.Where(t => reqClientIds.Contains(t.ClientId)).ToList(); eodSwapPosis= eodSwapPosis.Where(t => reqClientIds.Contains(t.ClientId)).ToList(); marignQuery = marignQuery.Where(t => reqClientIds.Contains(t.ClientId)); + clientEventFlows.Where(t => reqClientIds.Contains(t.ClientId??0)); } var swapIds = eodSwaps.Select(s => s.SwapTradeId); var todaySwapTrades = DbContext.trade.Where(t => swapIds.Contains(t.id)).ToList(); @@ -297,6 +304,10 @@ namespace YLErp.Modules.EodModule.SettlementModule var PFE = 0d; //互换存续预付金 var SwapMarinAmount = 0d; + //交易费用 + var tradeFee= 0d; + //利息盈亏 + var interestPnl= 0d; // ClientBalanceDaily clientbalancedaily = null; #endregion @@ -807,11 +818,9 @@ namespace YLErp.Modules.EodModule.SettlementModule foreach (var item in clientEodSwapsLast) { var lastEodSwap = eodSwaps.FirstOrDefault(t => t.SwapTradeId == item.SwapTradeId && t.ValueDate == preBalanceDate); - var lastEodSwapPosition = eodSwapPosis.FirstOrDefault(t => t.SwapTradeId == item.SwapTradeId && t.ValueDate == preBalanceDate&&t.PosiStartDate<= preBalanceDate); - var eodSwapPosition = clientEodSwapPositionLast.FirstOrDefault(t => t.SwapTradeId == item.SwapTradeId && t.ValueDate == balanceDate && t.PosiStartDate <= balanceDate); item.PostionValue=Math.Round(item.PostionValue, ConsGlobal.MoneyRound,MidpointRounding.AwayFromZero); PotentialSurpluses += Convert.ToDouble(item.PostionValue) * (-1); - // WinLoss += Convert.ToDouble(item.TdRealizedPnL) * (-1); + // 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.PostionValue; @@ -827,6 +836,17 @@ namespace YLErp.Modules.EodModule.SettlementModule DailyPnl += Convert.ToDouble(pnl - lastPnl + item.TdRealizedPnL) * (-1); //PayableMargin += Convert.ToDouble(item.InitMarginLoss + item.InitMarginGain+ item.PostionMarginLoss + item.PostionMarginGain); } + var clientEventFlowList = clientEventFlows.Where(x=>x.ClientId== client.id); + foreach (var item in clientEventFlowList.GroupBy(x => x.SwapTradeId)) + { + var eventPosi = item.FirstOrDefault(t => t.PayDirection > 0); + + var eventInterests = item.Where(t => t.PayDirection == 0).ToList(); + + interestPnl += Convert.ToDouble(eventInterests.Sum(x=>x.InterestClosePnL)) * (-1); + + tradeFee += Convert.ToDouble(eventPosi.TradingFee + eventPosi.TradingFeePending) * (-1); + } var clientmarignQuery = marignQuery.Where(x => x.ClientId == client.id&&x.StructureType!="多空组合"); SwapMarinAmount = Convert.ToDouble(clientmarignQuery.Sum(s => s.marin)); #endregion @@ -963,6 +983,8 @@ namespace YLErp.Modules.EodModule.SettlementModule clientbalancedaily.ExerciseBalance = ExerciseBalance; clientbalancedaily.AdvisableMargin = AdvisableMargin; clientbalancedaily.TotalNominal = TotalNominal; + clientbalancedaily.trade_fee = tradeFee; + clientbalancedaily.interest_pnl = interestPnl; clientbalancedaily.Pv = clientPv ?? 0; clientbalancedaily.RoundedPv = roundedClientPv ?? 0; clientbalancedaily.SellPv = clientSellPv ?? 0; @@ -1067,6 +1089,8 @@ namespace YLErp.Modules.EodModule.SettlementModule clientbalancedaily.CouponSum = clientbalancedaily.Coupon; clientbalancedaily.SwapBalanceSum = clientbalancedaily.SwapBalance; clientbalancedaily.WinLossSum = clientbalancedaily.WinLoss; + clientbalancedaily.trade_fee_sum = clientbalancedaily.trade_fee; + clientbalancedaily.interest_pnl_sum = clientbalancedaily.interest_pnl; clientbalancedaily.EndPremiumSum = clientbalancedaily.EndPremium; clientbalancedaily.CashInCashOutProductChangeSum = clientbalancedaily.CashInCashOutProductChange; @@ -1134,6 +1158,8 @@ namespace YLErp.Modules.EodModule.SettlementModule clientbalancedaily.CouponSum += clientbalancedailyPre.CouponSum; clientbalancedaily.SwapBalanceSum += clientbalancedailyPre.SwapBalanceSum; clientbalancedaily.WinLossSum += clientbalancedailyPre.WinLossSum; + clientbalancedaily.trade_fee_sum += clientbalancedailyPre.trade_fee_sum??0; + clientbalancedaily.interest_pnl_sum += clientbalancedailyPre.interest_pnl_sum??0; clientbalancedaily.EndPremiumSum += (clientbalancedailyPre.EndPremiumSum ?? 0); clientbalancedaily.CashInCashOutProductChangeSum += clientbalancedailyPre.CashInCashOutProductChangeSum; } diff --git a/YLErpDAL/Modules/ReportModule/SettlementReportModule/SettlementReportFotShanXiService.cs b/YLErpDAL/Modules/ReportModule/SettlementReportModule/SettlementReportFotShanXiService.cs index 35430716..5517fc74 100644 --- a/YLErpDAL/Modules/ReportModule/SettlementReportModule/SettlementReportFotShanXiService.cs +++ b/YLErpDAL/Modules/ReportModule/SettlementReportModule/SettlementReportFotShanXiService.cs @@ -258,7 +258,7 @@ namespace YLErp.Modules.ReportModule.SettlementReportModule TradingFeeSum= report.clientSwapPositions.Sum(x => x.TradingFee), PosiPnlSum = report.clientSwapPositions.Sum(x => x.PosiPnl), DividendInSum= report.clientSwapPositions.Sum(x => x.FlowEvent.DividendIn), - InterestAmountSum= report.clientSwapPositions.Sum(x => x.FlowEvent.InterestAmount), + InterestAmountSum= report.clientSwapPositions.Sum(x => x.FlowEvent.InterestClosePnL), InterestFeeSum= report.clientSwapPositions.Sum(x => x.FlowEvent.InterestFee), NetSettmentAmountSum = report.clientSwapPositions.Sum(x => x.NetSettmentAmount), }); diff --git a/YLErpDAL/Modules/SwapModule/SwapEodPositionService.cs b/YLErpDAL/Modules/SwapModule/SwapEodPositionService.cs index bb65c7be..20d6c497 100644 --- a/YLErpDAL/Modules/SwapModule/SwapEodPositionService.cs +++ b/YLErpDAL/Modules/SwapModule/SwapEodPositionService.cs @@ -1297,7 +1297,7 @@ namespace YLErp.Modules.SwapModule curretEod.PosiNotionalValue = curretEod.PosiGrossPrice * curretEod.PosiQuantity * curretEod.ContractSize; curretEod.PosiNotionalValue= Math.Round(curretEod.PosiNotionalValue, ConsGlobal.MoneyRound, MidpointRounding.AwayFromZero); curretEod.TdPosiDividend = unwindEvents.Sum(x => x.DividendIn) * directionRatio; - curretEod.TdCloseFee = unwindEvents.Sum(x => x.TradingFee); + curretEod.TdCloseFee = unwindFlowEvents.Sum(x => x.TradingFee+x.TradingFeePending); curretEod.TdCloseQty = unwindQty; curretEod.TdCloseMtmPnl = unwindEvents.Sum(x => x.MarkClosePnl); } diff --git a/YLErpWeb/App_Docs/导出模板/结算报告模板.xlsx b/YLErpWeb/App_Docs/导出模板/结算报告模板.xlsx index 46178bc5..94662a2f 100644 Binary files a/YLErpWeb/App_Docs/导出模板/结算报告模板.xlsx and b/YLErpWeb/App_Docs/导出模板/结算报告模板.xlsx differ diff --git a/YLErpWeb/App_Docs/导出模板/资金监控模板1.xlsx b/YLErpWeb/App_Docs/导出模板/资金监控模板1.xlsx index 939e31c3..3accbae3 100644 Binary files a/YLErpWeb/App_Docs/导出模板/资金监控模板1.xlsx and b/YLErpWeb/App_Docs/导出模板/资金监控模板1.xlsx differ diff --git a/YLErpWeb/Controllers/clientController.cs b/YLErpWeb/Controllers/clientController.cs index fa8739f6..bfa0da81 100644 --- a/YLErpWeb/Controllers/clientController.cs +++ b/YLErpWeb/Controllers/clientController.cs @@ -1,5 +1,6 @@ using Dapper; using DocumentFormat.OpenXml.Drawing.Charts; +using Microsoft.AspNetCore.Authorization; using OfficeOpenXml; using OfficeOpenXml.FormulaParsing.Excel.Functions.DateTime; using Org.BouncyCastle.Crypto.Tls; @@ -726,6 +727,8 @@ namespace YLErp.Web.Controllers x.LastHTSettlemetTime = clientBalance.LastHTSettlemetTime; x.LastSettlemetTime = clientBalance.LastSettlemetTime; + x.InterestPnl = clientBalance.InterestPnl; + x.TradeFee = clientBalance.TradeFee; //拼装标签值 if (clientTagList.ContainsKey(x.id)) @@ -3433,5 +3436,19 @@ namespace YLErp.Web.Controllers new ClientProcessLogService(CurUser).revertBankDutyFile(clientId); return JsonSuccess(); } + + /// + /// 填充客户收盘的历史交易费用、利息金额 + /// + /// + [AllowAnonymous] + public JsonResult FillClientBalanceHisData() + { + Task.Run(() => + { + ClientBalanceUtility.FillClientBalanceHisTradeFee(); + }); + return JsonSuccess(); + } } } \ No newline at end of file diff --git a/YLErpWeb/wwwroot/Scripts/app/client/clientRiskMonitor.js b/YLErpWeb/wwwroot/Scripts/app/client/clientRiskMonitor.js index e437b0ec..b57963d6 100644 --- a/YLErpWeb/wwwroot/Scripts/app/client/clientRiskMonitor.js +++ b/YLErpWeb/wwwroot/Scripts/app/client/clientRiskMonitor.js @@ -166,6 +166,10 @@ function getColModelGrid() { name: 'CurrentHoldingPenNumber', label: '持仓笔数', index: 'CurrentHoldingPenNumber', width: 80, align: 'center', formatter: main.toInt, sorttype: 'number' }, { name: 'WinLoss', label: '实现盈亏', index: 'WinLoss', width: 120, align: 'right', value: '0', formatter: 'number', sorttype: 'number' + }, { + name: 'InterestPnl', label: '利息', index: 'InterestPnl', width: 120, align: 'right', value: '0', formatter: 'number', sorttype: 'number' + }, { + name: 'TradeFee', label: '费用', index: 'TradeFee', width: 120, align: 'right', value: '0', formatter: 'number', sorttype: 'number' }, { name: 'PositionPnl', label: '持仓盈亏', index: 'PositionPnl', width: 120, align: 'right', value: '0', formatter: 'number', optionHide: page.isPvRounded, hidden: page.isPvRounded, sorttype: 'number' }, { @@ -263,7 +267,7 @@ function gridComplete() { Number: "合计", TotalTradeCount: sum.TotalTradeCountSum, TotalNotionalPrincipal: sum.TotalNotionalPrincipalSum, TransactionPenNumber: sum.TransactionPenNumberSum, TodayNotionalPrincipal: sum.TodayNotionalPrincipalSum, PositionNotionalPrincipal: sum.PositionNotionalPrincipalSum, CurrentHoldingPenNumber: sum.CurrentHoldingPenNumberSum, - WinLoss: sum.WinLossSum, PositionPv: sum.PositionPvSum, PositionPnl: sum.PositionPnlSum, RoundedPositionPnl: sum.RoundedPositionPnlSum, + WinLoss: sum.WinLossSum, InterestPnl: sum.InterestPnlSum, TradeFee: sum.TradeFeeSum, PositionPv: sum.PositionPvSum, PositionPnl: sum.PositionPnlSum, RoundedPositionPnl: sum.RoundedPositionPnlSum, NetFund: sum.NetFundSum, OtherFund: sum.OtherFundSum, AmountFund: sum.AmountFundSum, TotalAmount: sum.TotalAmountSum, RoundedTotalAmount: sum.RoundedTotalAmountSum, AvailableAmount: sum.AvailableAmountSum, InsuredAmount: sum.InsuredAmountSum, @@ -314,7 +318,7 @@ function LoadGrid() { useColSpanStyle: true, groupHeaders: [ { startColumnName: 'Number', numberOfColumns: 2, titleText: '客户信息' }, - { startColumnName: 'TotalTradeCount', numberOfColumns: 9, titleText: '交易信息 ' }, + { startColumnName: 'TotalTradeCount', numberOfColumns: 11, titleText: '交易信息 ' }, { startColumnName: 'LastDayRemainFund', numberOfColumns: 13, titleText: '账户状况' } ] }); diff --git a/YLErpWeb/wwwroot/Scripts/app/swaptrade/TradeMarketReport_HistoricalPositionSwapFlow.js b/YLErpWeb/wwwroot/Scripts/app/swaptrade/TradeMarketReport_HistoricalPositionSwapFlow.js index 548b7656..2bf64007 100644 --- a/YLErpWeb/wwwroot/Scripts/app/swaptrade/TradeMarketReport_HistoricalPositionSwapFlow.js +++ b/YLErpWeb/wwwroot/Scripts/app/swaptrade/TradeMarketReport_HistoricalPositionSwapFlow.js @@ -307,9 +307,9 @@ var colModelGrid = [ width: 140, align: 'center' }, { - name: 'FlowEvent.InterestAmount', + name: 'FlowEvent.InterestClosePnL', label: '利息端平仓盈亏·利息', - index: 'FlowEvent.InterestAmount', + index: 'FlowEvent.InterestClosePnL', width: 220, align: 'center', formatter: StockEqvNotionalFormat