feat:老风控特批使用单独bool量识别,新风控需审批采用新状态RiskWarning,风控流程状态优先级Error>Warning(老风控特批,给前端CODE为ERROR)>RiskWarning>Success(可能带有ShowTIip)。新风控特批时,识别RULEID,不再采用BOOL统一通过
This commit is contained in:
@@ -46,7 +46,7 @@ namespace YLErp.Modules.TradeModule.DealModule
|
||||
/// <summary>
|
||||
/// 2021-02-04改造:批量确认因为耗时太长,用户多页面(交易列表,今日交易)并发确认导致生成多条期权费资金记录
|
||||
/// </summary>
|
||||
public TradeConfirmResultModel tradeConfirm(IEnumerable<int> tradeids, bool ignoreMoneyCheck = false, bool isSkipApproval = false, bool ignoreRiskWarning = false)
|
||||
public TradeConfirmResultModel tradeConfirm(IEnumerable<int> tradeids, bool ignoreMoneyCheck = false, bool isSkipApproval = false, bool ignoreRiskWarning = false, IEnumerable<string> ignoreRiskRuleIds = null)
|
||||
{
|
||||
if (tradeids is null || !tradeids.Any(n => n > 0))
|
||||
{
|
||||
@@ -101,7 +101,8 @@ namespace YLErp.Modules.TradeModule.DealModule
|
||||
confirmedTradeIds: result.confirmedTradeIds,
|
||||
changeConfirmPaths: result.changeConfirmPaths,
|
||||
continueQuotaCheck: idCache.Contains(pid),
|
||||
ignoreRiskWarning: ignoreRiskWarning);
|
||||
ignoreRiskWarning: ignoreRiskWarning,
|
||||
ignoreRiskRuleIds: ignoreRiskRuleIds);
|
||||
if (pid > 0)
|
||||
{
|
||||
idCache.Add(pid);
|
||||
@@ -120,8 +121,10 @@ namespace YLErp.Modules.TradeModule.DealModule
|
||||
if (temp.RetCode == TradeOpenRetCode.QuotaTrialError || temp.RetCode == TradeOpenRetCode.FundStatus || temp.RetCode == TradeOpenRetCode.RiskWarning)
|
||||
{
|
||||
result.LackOfMoney = true;
|
||||
result.OldRiskNeedSpecialApproval = temp.OldRiskNeedSpecialApproval;
|
||||
result.TrialDataId = temp.TrialDataId;
|
||||
result.TradeId = temp.Trade.id;
|
||||
result.ignoreRiskRuleIds = temp.IgnoredRiskRuleIds;
|
||||
sbError.AppendLine(temp.ErrorMsg);
|
||||
break;
|
||||
}
|
||||
@@ -162,7 +165,7 @@ namespace YLErp.Modules.TradeModule.DealModule
|
||||
/// <param name="continueQuotaCheck"></param>
|
||||
/// <returns></returns>
|
||||
private TradeOpenResult ConfirmTrade(int tid, bool isBatch, bool hasTradeProcess,
|
||||
bool ignoreMoneyCheck, bool isSkipApproval, List<int> confirmedTradeIds, List<string> changeConfirmPaths, bool continueQuotaCheck = false, bool ignoreRiskWarning = false)
|
||||
bool ignoreMoneyCheck, bool isSkipApproval, List<int> confirmedTradeIds, List<string> changeConfirmPaths, bool continueQuotaCheck = false, bool ignoreRiskWarning = false, IEnumerable<string> ignoreRiskRuleIds = null)
|
||||
{
|
||||
var td = DbContext.trade.FirstOrDefault(t => t.id == tid);
|
||||
var result = new TradeOpenResult(td ?? new trade());
|
||||
@@ -217,7 +220,7 @@ namespace YLErp.Modules.TradeModule.DealModule
|
||||
}
|
||||
|
||||
var trialService = new QuotaMonitorService(this);
|
||||
if (!trialService.QuotaCheck(ref result, ignoreRiskWarning))
|
||||
if (!trialService.QuotaCheck(ref result, ignoreRiskWarning, ignoreRiskRuleIds))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
@@ -618,6 +621,7 @@ namespace YLErp.Modules.TradeModule.DealModule
|
||||
public class TradeConfirmResultModel
|
||||
{
|
||||
public bool LackOfMoney;
|
||||
public bool OldRiskNeedSpecialApproval;
|
||||
public int TrialDataId;
|
||||
public int TradeId;
|
||||
public List<int> confirmedTradeIds;
|
||||
@@ -625,5 +629,6 @@ namespace YLErp.Modules.TradeModule.DealModule
|
||||
public string errorMsg;
|
||||
public string tipMsg;
|
||||
public string type;
|
||||
public List<string> ignoreRiskRuleIds;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user