客户端下单风控不需要dv限额风控

This commit is contained in:
吴方海
2026-06-23 16:51:04 +08:00
parent 45173c50c6
commit 2f09bfa8d7
@@ -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;
}