From 5c2ca835f1d0193e67b96a1f0c07d2f39333a8cb Mon Sep 17 00:00:00 2001 From: tengyufan <1532636164@qq.com> Date: Thu, 25 Jun 2026 13:55:01 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E7=A7=BB=E9=99=A4=E6=95=B4=E4=BD=93?= =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E6=B1=87=E6=80=BB-=E4=BA=92=E6=8D=A2?= =?UTF-8?q?=E7=BB=B4=E5=BA=A6=E7=9A=84DV=E9=99=90=E9=A2=9D=E5=8F=96?= =?UTF-8?q?=E5=80=BC=EF=BC=8C=E9=81=BF=E5=85=8D=E7=94=A8=E5=8D=95=E7=AC=94?= =?UTF-8?q?=E7=BB=B4=E5=BA=A6=E9=99=90=E9=A2=9D=E5=AF=BC=E8=87=B4=E8=B6=85?= =?UTF-8?q?=E9=99=90=E8=AF=AF=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/RiskModule/QuotaMonitorService.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/YLErpDAL/Modules/RiskModule/QuotaMonitorService.cs b/YLErpDAL/Modules/RiskModule/QuotaMonitorService.cs index 3c3cece3..be5b8e2e 100644 --- a/YLErpDAL/Modules/RiskModule/QuotaMonitorService.cs +++ b/YLErpDAL/Modules/RiskModule/QuotaMonitorService.cs @@ -932,10 +932,10 @@ namespace YLErp.Modules.RiskModule }; setValue(swap, swapSetting); swap.DV = swapDV; - swap.Quota_DV_Upper = tradeDvSetting?.QuotaUpperLimit ?? double.NaN; - swap.Quota_DV_Lower = tradeDvSetting?.QuotaLowerLimit ?? double.NaN; - swap.Quota_DV_wUpper = tradeDvSetting?.WarningUpperLimit ?? double.NaN; - swap.Quota_DV_wLower = tradeDvSetting?.WarningLowerLimit ?? double.NaN; + //swap.Quota_DV_Upper = tradeDvSetting?.QuotaUpperLimit ?? double.NaN; + //swap.Quota_DV_Lower = tradeDvSetting?.QuotaLowerLimit ?? double.NaN; + //swap.Quota_DV_wUpper = tradeDvSetting?.WarningUpperLimit ?? double.NaN; + //swap.Quota_DV_wLower = tradeDvSetting?.WarningLowerLimit ?? double.NaN; var positionList = new List>(); var underly = GetTradePositionPnl(); @@ -1047,10 +1047,10 @@ namespace YLErp.Modules.RiskModule }; setValue(swap, swapSetting); swap.DV = eodSwapDV; - swap.Quota_DV_Upper = tradeDvSetting?.QuotaUpperLimit ?? double.NaN; - swap.Quota_DV_Lower = tradeDvSetting?.QuotaLowerLimit ?? double.NaN; - swap.Quota_DV_wUpper = tradeDvSetting?.WarningUpperLimit ?? double.NaN; - swap.Quota_DV_wLower = tradeDvSetting?.WarningLowerLimit ?? double.NaN; + //swap.Quota_DV_Upper = tradeDvSetting?.QuotaUpperLimit ?? double.NaN; + //swap.Quota_DV_Lower = tradeDvSetting?.QuotaLowerLimit ?? double.NaN; + //swap.Quota_DV_wUpper = tradeDvSetting?.WarningUpperLimit ?? double.NaN; + //swap.Quota_DV_wLower = tradeDvSetting?.WarningLowerLimit ?? double.NaN; var underly = GetEodTradePositionPnl(req.ValueDate); var unTrade = new QuotaMonitor_Global() { From 20ea93d89ce231a336f44c73b601c282f61640d3 Mon Sep 17 00:00:00 2001 From: hjhan Date: Thu, 25 Jun 2026 13:57:42 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=92=E6=8D=A2?= =?UTF-8?q?=E6=94=B6=E7=9B=8A=E7=BB=93=E7=AE=97=E6=9C=9F=E6=9C=AB=E4=BB=B7?= =?UTF-8?q?=E8=A2=AB=E9=94=99=E8=AF=AF=E7=BC=A9=E6=94=BE=E5=8F=8A=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit a00fe3cc合并etf分支时,误把initDeal中TradingAmountAvg的×100缩放去掉, 导致期末标的价格停留在相对价态(1.02),提交时又被getPriceScale()÷100, 最终swap_flow_event.TradingAmountAvg入库为0.0102,且盈亏计算错误。 对齐平仓页(unwindSwapTrade.js)的正确实现: - initDeal: TradingAmountAvg = initPosiNetPrice × multiplier 转为界面百分比态 - SwapIncome表格期末价列: 不再经过priceFormat(避免二次×100),直接显示界面态值 --- YLErpWeb/Views/SwapTrade2/SwapIncome.cshtml | 2 +- YLErpWeb/wwwroot/Scripts/app/swaptrade/incomeSwapTrade.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/YLErpWeb/Views/SwapTrade2/SwapIncome.cshtml b/YLErpWeb/Views/SwapTrade2/SwapIncome.cshtml index 7ff430fd..d86d8631 100644 --- a/YLErpWeb/Views/SwapTrade2/SwapIncome.cshtml +++ b/YLErpWeb/Views/SwapTrade2/SwapIncome.cshtml @@ -154,7 +154,7 @@ {{priceFormat(floatPosition.PosiGrossPrice)}} {{priceFormat(floatPosition.TradingAmountNetAvg)}} - {{priceFormat(floatPosition.TradingAmountAvg)}} + {{floatPosition.TradingAmountAvg}} {{floatPosition.Quantity}} diff --git a/YLErpWeb/wwwroot/Scripts/app/swaptrade/incomeSwapTrade.js b/YLErpWeb/wwwroot/Scripts/app/swaptrade/incomeSwapTrade.js index 9cdd68fa..2293b45b 100644 --- a/YLErpWeb/wwwroot/Scripts/app/swaptrade/incomeSwapTrade.js +++ b/YLErpWeb/wwwroot/Scripts/app/swaptrade/incomeSwapTrade.js @@ -43,7 +43,8 @@ const vue = new Vue({ this.floatPosition = positions[0]; this.initPosiNetPrice = this.floatPosition.PosiNetPrice; // 互换标的价格固定为期初净价,与平仓不同不需要用户填写 - this.floatPosition.TradingAmountAvg = this.initPosiNetPrice; + // 期初净价入库为相对价(如1.02),需转换为界面百分比形态(102),与平仓页保持一致 + this.floatPosition.TradingAmountAvg = this.initPosiNetPrice * this.multiplier; this.interestList = model.FlowEvents.filter((item) => { return item.InterestMode == 1 || item.InterestMode == 2 || item.InterestMode == 7 || item.InterestMode == 8 || item.InterestMode == 9; });