Revert ruisu合并进来的代码

This commit is contained in:
锦麟 王
2026-07-03 17:41:42 +08:00
parent cf15877bfd
commit f0ad4406c9
9 changed files with 171 additions and 296 deletions
@@ -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)
{
if (tradeids is null || !tradeids.Any(n => n > 0))
{
@@ -76,7 +76,6 @@ namespace YLErp.Modules.TradeModule.DealModule
var hasTradeProcess = HasTradeProcess();
var sbError = new StringBuilder();
var sbTip = new StringBuilder();
var result = new TradeConfirmResultModel
{
confirmedTradeIds = new List<int>(),
@@ -100,8 +99,7 @@ namespace YLErp.Modules.TradeModule.DealModule
isSkipApproval: isSkipApproval,
confirmedTradeIds: result.confirmedTradeIds,
changeConfirmPaths: result.changeConfirmPaths,
continueQuotaCheck: idCache.Contains(pid),
ignoreRiskWarning: ignoreRiskWarning);
continueQuotaCheck: idCache.Contains(pid));
if (pid > 0)
{
idCache.Add(pid);
@@ -116,8 +114,7 @@ namespace YLErp.Modules.TradeModule.DealModule
result.LackOfMoney = true;
break;
}
//此处LackOfMoney仅仅代表需要前端二次处理,不代表资金缺乏,延用老逻辑
if (temp.RetCode == TradeOpenRetCode.QuotaTrialError || temp.RetCode == TradeOpenRetCode.FundStatus || temp.RetCode == TradeOpenRetCode.RiskWarning)
if (temp.RetCode == TradeOpenRetCode.QuotaTrialError || temp.RetCode == TradeOpenRetCode.FundStatus)
{
result.LackOfMoney = true;
result.TrialDataId = temp.TrialDataId;
@@ -131,12 +128,6 @@ namespace YLErp.Modules.TradeModule.DealModule
sbError.AppendLine(temp.ErrorMsg);
}
if (!string.IsNullOrEmpty(temp.TipMsg))
{
result.TrialDataId = temp.TrialDataId;
sbTip.AppendLine(temp.TipMsg);
}
Helpers.LockHelper.Release(lockKeyId);
}
}
@@ -144,7 +135,6 @@ namespace YLErp.Modules.TradeModule.DealModule
DbContext.SaveChanges();
result.errorMsg = sbError.ToString();
result.tipMsg = sbTip.ToString();
return result;
}
@@ -162,7 +152,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)
{
var td = DbContext.trade.FirstOrDefault(t => t.id == tid);
var result = new TradeOpenResult(td ?? new trade());
@@ -217,7 +207,7 @@ namespace YLErp.Modules.TradeModule.DealModule
}
var trialService = new QuotaMonitorService(this);
if (!trialService.QuotaCheck(ref result, ignoreRiskWarning))
if (!trialService.QuotaCheck(ref result))
{
return result;
}
@@ -233,10 +223,6 @@ namespace YLErp.Modules.TradeModule.DealModule
history = "特权账户批量确认自动" + history;
}
}
else if (ignoreRiskWarning)
{
history = "风控预警确认-" + history;
}
//进入交易审批流程
if (hasTradeProcess && !isSkipApproval)
{
@@ -623,7 +609,6 @@ namespace YLErp.Modules.TradeModule.DealModule
public List<int> confirmedTradeIds;
public List<string> changeConfirmPaths;
public string errorMsg;
public string tipMsg;
public string type;
}
}
@@ -792,10 +792,6 @@ namespace YLErp.Modules.TradeModule.DealModule
/// 错误信息
/// </summary>
public string ErrorMsg;
/// <summary>
/// 提示信息
/// </summary>
public string TipMsg;
/// <summary>
/// 变更确认书路径
@@ -835,10 +831,6 @@ namespace YLErp.Modules.TradeModule.DealModule
/// </summary>
FundStatus,
/// <summary>
/// 风控预警二次确认
/// </summary>
RiskWarning,
/// <summary>
/// 无审核权限
/// </summary>
NoRight