保证金算法&资金计算
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace YLErp.Modules.EodModule.SettlementModule
|
||||
{
|
||||
/// <summary>
|
||||
/// 检查日终流水
|
||||
/// </summary>
|
||||
public class EodCheckSwapFlow : EodSettleServiceBaseV2
|
||||
{
|
||||
public const string Step = "检查流水";
|
||||
|
||||
public EodCheckSwapFlow(EodSettlementContextV2 context) : base(context)
|
||||
{
|
||||
ResetDbContext();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 检查结算汇率
|
||||
/// </summary>
|
||||
public void Execute()
|
||||
{
|
||||
var settleDate = _context.SettleDate;
|
||||
var swapFlowList = DbContext.swap_flow.Where(x=>x.OccurTime==settleDate&&x.DataState==(int)SwapFlowDateStateEnum.等待完成);
|
||||
|
||||
if (swapFlowList.Any())
|
||||
{
|
||||
_context.RaiseError(Step, $"{settleDate:yyyy-MM-dd}有未簿记的流水未处理");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user