From 2f09bfa8d7b649079095e77935177ad0af0630aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=96=B9=E6=B5=B7?= Date: Tue, 23 Jun 2026 16:51:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=AB=AF=E4=B8=8B=E5=8D=95?= =?UTF-8?q?=E9=A3=8E=E6=8E=A7=E4=B8=8D=E9=9C=80=E8=A6=81dv=E9=99=90?= =?UTF-8?q?=E9=A2=9D=E9=A3=8E=E6=8E=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/RiskModule/QuotaMonitorService.cs | 29 +++++++++---------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/YLErpDAL/Modules/RiskModule/QuotaMonitorService.cs b/YLErpDAL/Modules/RiskModule/QuotaMonitorService.cs index 3247dd67..3c3cece3 100644 --- a/YLErpDAL/Modules/RiskModule/QuotaMonitorService.cs +++ b/YLErpDAL/Modules/RiskModule/QuotaMonitorService.cs @@ -1550,7 +1550,6 @@ namespace YLErp.Modules.RiskModule ObjectHelper.MapValues(obj, item); result.Add(obj); } - DbContext.SaveChanges(); var total = new QuotaMonitor_Trade() { @@ -4529,8 +4528,8 @@ namespace YLErp.Modules.RiskModule var checkPoisiList = BuildCheckQuotaMoitorModels(clientPositions, ums, dealDate); // 仅在限额设置中有DV指标时才计算DV - var (totalDv, currentDv) = precheckQuotaSettingList.Any(s => s.QuotaIndex == "DV") - ? CalcRiskCheckDv(checkPoisiList, dealDate) : (0d, 0d); + //var (totalDv, currentDv) = precheckQuotaSettingList.Any(s => s.QuotaIndex == "DV") + // ? CalcRiskCheckDv(checkPoisiList, dealDate) : (0d, 0d); var underlyingPositions = checkPoisiList.Where(x => x.UnderlyingCode == clientRiskCheckReq.securityId).ToList(); var sameQty = underlyingPositions.Where(x=>x.ClientId== clientRiskCheckReq.clientId && x.Side== clientRiskCheckReq.side).Sum(s => s.Qty); var qty = underlyingPositions.Where(x => x.ClientId == clientRiskCheckReq.clientId && x.Side != clientRiskCheckReq.side).Sum(s => s.Qty); @@ -4558,7 +4557,7 @@ namespace YLErp.Modules.RiskModule { continue; } - clientRiskCheckItem = CheckQuota(checkPoisiList, settingItem.QuotaType, clientRiskCheckItem, settingItem.QuotaRange, allList, totalDv, currentDv); + clientRiskCheckItem = CheckQuota(checkPoisiList, settingItem.QuotaType, clientRiskCheckItem, settingItem.QuotaRange, allList, 0d, 0d); if (clientRiskCheckItem != null) { clientRiskCheckItem.quotaType = $"{EnumHelper.GetDescriptionByName(settingItem.QuotaType)}({settingItem.QuotaIndex})"; @@ -5558,14 +5557,14 @@ namespace YLErp.Modules.RiskModule var positionListAll = positionList; switch (quotaType) { - case QuotaTypeEnum.GLOBAL_ALL: - if (checkItem.quotaType == "DV") - { - checkItem.currentValue = Math.Round(totalDv, 2); - if (!ValidateQuoteResult(checkItem)) return checkItem; - return null; - } - break; + //case QuotaTypeEnum.GLOBAL_ALL: + // if (checkItem.quotaType == "DV") + // { + // checkItem.currentValue = Math.Round(totalDv, 2); + // if (!ValidateQuoteResult(checkItem)) return checkItem; + // return null; + // } + // break; case QuotaTypeEnum.GLOBAL_SWAP: checkItem = checkGlobal(positionList, "场外业务-互换", checkItem, quotaType); break; @@ -5908,9 +5907,9 @@ namespace YLErp.Modules.RiskModule return checkItem; } return null; - case "DV": - currentValue = currentDv; - break; + //case "DV": + // currentValue = currentDv; + // break; default: return null; }