平仓资金记录不应该被覆盖
This commit is contained in:
@@ -366,7 +366,7 @@ namespace YLErp.Modules.SwapModule
|
||||
private long SaveAutoSwapDeal(trade td, List<swap_flow_event> flowEvents, UnwindData unwindData)
|
||||
{
|
||||
//td.UnWindDate = unwindData.ValueDate;
|
||||
int clientCashId = CloseTrade_ClientCashInCashOut(td, Convert.ToDouble(-unwindData.SwapCloseAmount), ClientCashInCashOut.系统操作_互换, unwindData.ValueDate);
|
||||
int clientCashId = AddClientCashInCashOut(td, Convert.ToDouble(-unwindData.SwapCloseAmount), ClientCashInCashOut.系统操作_互换, unwindData.ValueDate);
|
||||
string data = JsonConvert.SerializeObject(unwindData);
|
||||
var swapEvent = new SwapEventService(this).AddSwapEventDate(unwindData.ValueDate, unwindData.SwapTradeId, (int)SwapEventTypeEnum.自动互换, data, clientCashId, true, "系统操作-自动互换");//将互换总额存入事件
|
||||
flowEvents.ForEach(x =>
|
||||
@@ -504,7 +504,7 @@ namespace YLErp.Modules.SwapModule
|
||||
//记录资金记录
|
||||
if (amount != 0)
|
||||
{
|
||||
int clientCashId = CloseTrade_ClientCashInCashOut(td, Convert.ToDouble(x.MarkClosePnl), ClientCashInCashOut.系统操作_平仓费, x.UnwindDate.Value);
|
||||
int clientCashId = AddClientCashInCashOut(td, Convert.ToDouble(x.MarkClosePnl), ClientCashInCashOut.系统操作_平仓费, x.UnwindDate.Value);
|
||||
x.ClientCashId = clientCashId;
|
||||
}
|
||||
payQty = payQty - x.Quantity;
|
||||
|
||||
Reference in New Issue
Block a user