This commit is contained in:
parent
89c11c4305
commit
951a35baae
1 changed files with 9 additions and 6 deletions
|
|
@ -68,12 +68,12 @@ public class MoneyExporterService extends AbstractExporterService {
|
|||
pb.equals("securityId", registry.getSecurityId()),
|
||||
stlmntDtPrdct
|
||||
);
|
||||
BiFunction<Registry, LocalDate, ImdgPredicate> prdctTM_T = (registry, date) -> pb.and(
|
||||
BiFunction<Registry, ImdgPredicate, ImdgPredicate> prdctTM_T = (registry, stlmntDtPrdct) -> pb.and(
|
||||
pb.sql(RegistryCodeSqlBuilder.getInstance(TM_T).build()),
|
||||
pb.in("registryStatus", RegistryStatus.PROC.getKey(), RegistryStatus.MNG.getKey()),
|
||||
pb.equals("tradingClearingRegistry", registry.getTradingClearingRegistry()),
|
||||
pb.equals("securityId", registry.getSecurityId()),
|
||||
pb.equals("settlementDate", date)
|
||||
stlmntDtPrdct
|
||||
);
|
||||
for (Registry registry : registriesA) {
|
||||
if (checkNotBlocked(registry)) {
|
||||
|
|
@ -89,22 +89,25 @@ public class MoneyExporterService extends AbstractExporterService {
|
|||
dmtSumElement = dmtSumElement.add(sum(regsDMT)).negate();
|
||||
|
||||
if (includeCK) {
|
||||
ImdgPredicate queryOM_T_today = prdctOM_T.apply(registry, pb.equals("settlementDate", LocalDate.now()));
|
||||
ImdgPredicate settlementDateToday = pb.equals("settlementDate", LocalDate.now());
|
||||
ImdgPredicate settlementDateAfterToday = pb.greatEqual("settlementDate", LocalDate.now().plusDays(1));
|
||||
|
||||
ImdgPredicate queryOM_T_today = prdctOM_T.apply(registry, settlementDateToday);
|
||||
Collection<Registry> regsOMT_today = registryImdg.getCollectionObjectsByPredicate(queryOM_T_today);
|
||||
log.trace("Found {} OM_T today registries for registry AM_F {}", regsOMT_today.size(), queryOM_T_today);
|
||||
omtSumElementToday = omtSumElementToday.add(sum(regsOMT_today)).negate();
|
||||
|
||||
ImdgPredicate queryTM_T_today = prdctTM_T.apply(registry, LocalDate.now());
|
||||
ImdgPredicate queryTM_T_today = prdctTM_T.apply(registry, settlementDateToday);
|
||||
Collection<Registry> regsTMT_today = registryImdg.getCollectionObjectsByPredicate(queryTM_T_today);
|
||||
log.trace("Found {} TM_T today registries for registry AM_F {}", regsTMT_today.size(), queryTM_T_today);
|
||||
tmtSumElementToday = tmtSumElementToday.add(sum(regsTMT_today));
|
||||
|
||||
ImdgPredicate queryOM_T_tomorrow = prdctOM_T.apply(registry, pb.greatEqual("settlementDate", LocalDate.now().plusDays(1)));
|
||||
ImdgPredicate queryOM_T_tomorrow = prdctOM_T.apply(registry, settlementDateAfterToday);
|
||||
Collection<Registry> regsOMT_tomorrow = registryImdg.getCollectionObjectsByPredicate(queryOM_T_tomorrow);
|
||||
log.trace("Found {} OM_T tomorrow registries for registry AM_F {}", regsOMT_tomorrow.size(), queryOM_T_tomorrow);
|
||||
omtSumElementTomorrow = omtSumElementTomorrow.add(sum(regsOMT_tomorrow)).negate();
|
||||
|
||||
ImdgPredicate queryTM_T_tomorrow = prdctTM_T.apply(registry, LocalDate.now().plusDays(1));
|
||||
ImdgPredicate queryTM_T_tomorrow = prdctTM_T.apply(registry, settlementDateAfterToday);
|
||||
Collection<Registry> regsTMT_tomorrow = registryImdg.getCollectionObjectsByPredicate(queryTM_T_tomorrow);
|
||||
log.trace("Found {} TM_T tomorrow registries for registry AM_F {}", regsTMT_tomorrow.size(), queryTM_T_tomorrow);
|
||||
tmtSumElementTomorrow = tmtSumElementTomorrow.add(sum(regsTMT_tomorrow));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue