修改 删除 导入 流水 更新风控缓存
This commit is contained in:
@@ -79,6 +79,7 @@ namespace YLErp.Modules.SwapModule
|
||||
var reader = new DataRowReaderHelper(table);
|
||||
rowIndex = 1;
|
||||
totalNum = table.Rows.Count - rowIndex;
|
||||
Dictionary<long, List<string>> clientUmsDic = new Dictionary<long, List<string>>();
|
||||
foreach (var row in table.Rows.Cast<DataRow>().Skip(rowIndex))
|
||||
{
|
||||
rowIndex++;
|
||||
@@ -134,6 +135,17 @@ namespace YLErp.Modules.SwapModule
|
||||
swap_flow.OptName = UserName;
|
||||
swap_flow.OptTime = DateTime.Now;
|
||||
DbContext.swap_flow.Add(swap_flow);
|
||||
if (!clientUmsDic.ContainsKey(swap_flow.ClientId ?? 0))
|
||||
{
|
||||
clientUmsDic.Add(swap_flow.ClientId ?? 0, new List<string> { swap_flow.UnderlyingCode });
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!clientUmsDic[swap_flow.ClientId ?? 0].Contains(swap_flow.UnderlyingCode))
|
||||
{
|
||||
clientUmsDic[swap_flow.ClientId ?? 0].Add(swap_flow.UnderlyingCode);
|
||||
}
|
||||
}
|
||||
successNum++;
|
||||
}
|
||||
DbContext.SaveChanges();
|
||||
@@ -141,6 +153,7 @@ namespace YLErp.Modules.SwapModule
|
||||
{
|
||||
RealtimePnlCalc.RealtimeSwapPosition(new OptUserInfo(0, "互换实时持仓服务", OptUserFrom.Service));
|
||||
});
|
||||
new RiskCacheService().refreshRiskCache(clientUmsDic);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user