From 7efc82a79ffbeab8be8b309e4f23b3dbe0c91dfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=96=B9=E6=B5=B7?= Date: Thu, 24 Apr 2025 17:40:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=8D=95=E7=AC=94=E5=90=8D?= =?UTF-8?q?=E4=B9=89=E6=9C=AC=E9=87=91=E9=A3=8E=E6=8E=A7=E6=8C=87=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/RiskModule/QuotaMonitorService.cs | 40 +++++++------------ .../wwwroot/Scripts/app/risk/quotaMonitor.js | 24 ----------- 2 files changed, 14 insertions(+), 50 deletions(-) diff --git a/YLErpDAL/Modules/RiskModule/QuotaMonitorService.cs b/YLErpDAL/Modules/RiskModule/QuotaMonitorService.cs index dcffef4c..0e905161 100644 --- a/YLErpDAL/Modules/RiskModule/QuotaMonitorService.cs +++ b/YLErpDAL/Modules/RiskModule/QuotaMonitorService.cs @@ -3302,20 +3302,20 @@ namespace YLErp.Modules.RiskModule #endregion #region 单笔交易 - //交易-名义本金 - _quotaSettings.Add(new QuotaSetting() - { - QuotaType = QuotaTypeEnum.TRADE, - QuotaRange = 0, - QuotaIndex = "名义本金", - QuotaLowerLimit = null, - QuotaUpperLimit = null, - WarningLowerLimit = null, - WarningUpperLimit = null, - Percent = false, - IsValid = true, - Status = QuotaSettingApprovalStatus.Valid, - }); + ////交易-名义本金 + //_quotaSettings.Add(new QuotaSetting() + //{ + // QuotaType = QuotaTypeEnum.TRADE, + // QuotaRange = 0, + // QuotaIndex = "名义本金", + // QuotaLowerLimit = null, + // QuotaUpperLimit = null, + // WarningLowerLimit = null, + // WarningUpperLimit = null, + // Percent = false, + // IsValid = true, + // Status = QuotaSettingApprovalStatus.Valid, + //}); //交易-互换价格偏离比例 _quotaSettings.Add(new QuotaSetting() @@ -5186,18 +5186,6 @@ namespace YLErp.Modules.RiskModule var tag = $"{tag_prefix}({checkItem.quotaType})"; switch (checkItem.quotaType) { - case "名义本金": - var clientPv = positionList.Where(s => s.ClientId == current.ClientId && s.UnderlyingCode == current.UnderlyingCode && s.Side != current.Side).Sum(s => s.Pv * (s.Side == 0 ? 1 : -1)); - var currentPv = current.Pv * (current.Side == 0 ? 1 : -1); - currentValue = Convert.ToDouble(Math.Abs(clientPv + currentPv)); - var posiPv = positionList.Where(s => s.ClientId == current.ClientId && s.UnderlyingCode == current.UnderlyingCode && !s.Current).Sum(s => s.Pv); - posiVal = Convert.ToDouble(posiPv); - checkItem.currentValue = Math.Round(currentValue ?? 0, 2); - if (!ValidateQuoteResult(checkItem, currentValue, posiVal)) - { - return checkItem; - } - return null; case "互换价格偏离比例": var sportPrice = Convert.ToDouble(current.Price); var basePrice = Convert.ToDouble(current.LastPrice); diff --git a/YLErpWeb/wwwroot/Scripts/app/risk/quotaMonitor.js b/YLErpWeb/wwwroot/Scripts/app/risk/quotaMonitor.js index 94259ded..58723d1d 100644 --- a/YLErpWeb/wwwroot/Scripts/app/risk/quotaMonitor.js +++ b/YLErpWeb/wwwroot/Scripts/app/risk/quotaMonitor.js @@ -1557,30 +1557,6 @@ var colModel_trade = [ align: 'left', optionHide: true, sortable: false, - }, { - name: 'StockEqvNotional', - label: '名义本金', - index: 'StockEqvNotional', - width: 120, - align: 'right', - sortable: false, - formatter: function (cellvalue, options, rowObject) { - return !cellvalue || cellvalue == "NaN" ? "" : cellvalue.toLocaleString(); - }, - cellattr: function (cellvalue, options, rowObject) { - var style = "style='" + checkQuota(rowObject, 'StockEqvNotional') + "'"; - return style; - } - }, { - name: 'Quota_StockEqvNotional_Upper', - label: '名义本金限额', - index: 'Quota_StockEqvNotional_Upper', - width: 120, - align: 'right', - sortable: false, - formatter: function (cellvalue, options, rowObject) { - return formatQuotaAbs(rowObject, 'StockEqvNotional'); - } }, { name: 'Quota_SwapPercent_Upper', label: '互换价格偏离比例限额',