#EQD-6948 国联民生-实现保证金规则(2)追保金额的产生与收盘计算 收盘计算和授信占用
This commit is contained in:
@@ -227,10 +227,12 @@ namespace YLErp.Modules.TradeModule
|
||||
|
||||
/// <summary>
|
||||
/// 新版互换 期权费
|
||||
/// matchDate=true 时 upsert 键追加 HappenDate(按结算日幂等):用于追加保证金等逐日增量记录,
|
||||
/// 每个结算日一条独立记录,避免单条累计值覆盖 + HappenDate 前移导致跨日差分窗口全额重复计入(BUG-03)。
|
||||
/// </summary>
|
||||
/// <param name="swapTrade"></param>
|
||||
/// <exception cref="ArgumentNullException"></exception>
|
||||
public void SaveSwapTradeClientCash(trade swapTrade,double money, DateTime HappenDate,long positionId,string action= ClientCashInCashOut.系统操作_期权费)
|
||||
public void SaveSwapTradeClientCash(trade swapTrade,double money, DateTime HappenDate,long positionId,string action= ClientCashInCashOut.系统操作_期权费, bool matchDate = false)
|
||||
{
|
||||
if (swapTrade is null)
|
||||
{
|
||||
@@ -242,7 +244,8 @@ namespace YLErp.Modules.TradeModule
|
||||
}
|
||||
var valueDate = valuedateBLL.ValueDate;
|
||||
var client = DataCacheProvider.GetClientDataSource().GetData(swapTrade.ClientId);
|
||||
var cic = DbContext.ClientCashInCashOut.FirstOrDefault(t => t.TradeId == swapTrade.id && t.ValidState != ConsGlobal.InValid && t.Action == action &&t.Deal==positionId);
|
||||
var cic = DbContext.ClientCashInCashOut.FirstOrDefault(t => t.TradeId == swapTrade.id && t.ValidState != ConsGlobal.InValid && t.Action == action &&t.Deal==positionId
|
||||
&& (!matchDate || t.HappenDate == HappenDate));
|
||||
bool addClientCash = false;
|
||||
if (cic == null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user