#EQD-6947 国联民生-保证金计算整体改造-实现第一版盯市规则(不支持同一客户多部门)(1)保证金规则的设置 阶段3
This commit is contained in:
@@ -1658,6 +1658,19 @@ namespace YLErp.Modules.SwapModule
|
||||
}
|
||||
}
|
||||
}
|
||||
// 合约维度盯市+无预付金腿:重建交易级(positionId=0)初始预付金记录(与 SwapTradeConfirm 一致,回退重补场景)。
|
||||
// 有预付金腿的互换由上面 foreach 按腿重建,不在此重复生成。
|
||||
var resetWatchClient = DataCacheProvider.GetClientDataSource().GetData(td.ClientId);
|
||||
var hasPrepayLeg = swapPositions != null && swapPositions.Any(x => x.InterestMode == (int)InterestModeEnum.初始预付金 || x.InterestMode == (int)InterestModeEnum.追加预付金);
|
||||
if (resetWatchClient != null && resetWatchClient.MarginWatchRule == 0 && !hasPrepayLeg)
|
||||
{
|
||||
var cashSvc = new ClientCashInCashOutService(this);
|
||||
var initMargin = cashSvc.GetInitialMarginAmount(td);
|
||||
if (initMargin > 0)
|
||||
{
|
||||
cashSvc.SaveSwapTradeClientCash(td, initMargin, happenDate, 0, ClientCashInCashOut.系统操作_应付预付金);
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取持仓腿信息
|
||||
|
||||
Reference in New Issue
Block a user