#TRS-ZS-58 收盘操作:删除从衡泰获取数据等等功能

This commit is contained in:
汤旺
2024-05-22 17:59:07 +08:00
parent a8c2c0685a
commit 43629190e1
47 changed files with 71 additions and 5265 deletions
+1 -51
View File
@@ -757,21 +757,6 @@ namespace YLErp.Modules.SwapModule
td.StockEqvNotional -= Convert.ToDouble(unwindData.CloseNotionalValue);
td.TradeAmount -= Convert.ToDouble(unwindData.CloseQty);
DbContext.SaveChanges();
new PushLogService(UserInfo).AddLog(eventId, SwapPushDataEnum., td.TradeNumber);
var positions = DbContext.swap_position.Where(x => x.IsInitial && x.SwapTradeId == unwindData.SwapTradeId && !x.Invalid);
foreach (var f in flowList)
{
var position = positions.FirstOrDefault(x => x.id == f.PositionId);
if (f.PositionType > 0)
{
new PushLogService(UserInfo).AddLog(f.id, SwapPushDataEnum., position.PosiNumber);
}
else if (f.InterestMode == (int)InterestModeEnum. || f.InterestMode == (int)InterestModeEnum.)
{
new PushLogService(UserInfo).AddLog(f.id, SwapPushDataEnum., position.PosiNumber);
}
}
trans.Commit();
cofirm = true;
}
@@ -1058,27 +1043,6 @@ namespace YLErp.Modules.SwapModule
td.TradeAmount -= Convert.ToDouble(unwindData.CloseQty);
td.Notional = td.TradeAmount;
DbContext.SaveChanges();
if (addLog)
{
new PushLogService(UserInfo).AddLog(eventId, SwapPushDataEnum., td.TradeNumber);
var positions = DbContext.swap_position.Where(x => x.IsInitial && x.SwapTradeId == unwindData.SwapTradeId && !x.Invalid);
foreach (var f in flowList)
{
var position = positions.FirstOrDefault(x => x.id == f.PositionId);
if (position != null)
{
if (f.PositionType > 0)
{
new PushLogService(UserInfo).AddLog(f.id, SwapPushDataEnum., position.PosiNumber);
}
else if (f.InterestMode == (int)InterestModeEnum. || f.InterestMode == (int)InterestModeEnum.)
{
new PushLogService(UserInfo).AddLog(f.id, SwapPushDataEnum., position.PosiNumber);
}
}
}
}
}
/// <summary>
/// 计算平仓总额
@@ -1281,21 +1245,7 @@ namespace YLErp.Modules.SwapModule
td.TradeAmount -= Convert.ToDouble(swapEvent.unwindData.CloseQty);
}
td.StockEqvNotional -= Convert.ToDouble(swapEvent.unwindData.CloseNotionalValue);
new PushLogService(UserInfo).AddLog(swapEvent.id, SwapPushDataEnum., td.TradeNumber);
var positions = DbContext.swap_position.Where(x => x.IsInitial && x.SwapTradeId == td.id && !x.Invalid);
foreach (var f in flowList)
{
var position = positions.FirstOrDefault(x => x.id == f.PositionId);
if (f.PositionType > 0)
{
new PushLogService(UserInfo).AddLog(f.id, SwapPushDataEnum., position.PosiNumber);
}
else if (f.InterestMode == (int)InterestModeEnum. || f.InterestMode == (int)InterestModeEnum.)
{
new PushLogService(UserInfo).AddLog(f.id, SwapPushDataEnum., position.PosiNumber);
}
}
}
td.UnWindDate = swapEvent.unwindData.UnwindDate;
UpdateInitalPosition(flowList, swapEvent.unwindData, eventType);