FormingPaymentInstructionSecurities добавил условие sessionId для сделок по деньгам
This commit is contained in:
parent
582472b951
commit
bdc4f3fb67
1 changed files with 7 additions and 4 deletions
|
|
@ -122,13 +122,16 @@ public class FormingPaymentInstructionSecurities implements ISessionStage {
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
private Collection<Registry> selectMoneyRegistries() {
|
private Collection<Registry> selectMoneyRegistries(Long sessionId) {
|
||||||
ImdgPredicateBuilder rgsPb = registryImdg.predicateBuilder();
|
ImdgPredicateBuilder rgsPb = registryImdg.predicateBuilder();
|
||||||
RegistryCodeSqlBuilder registryCodeSqlBuilder = RegistryCodeSqlBuilder.getInstance(
|
RegistryCodeSqlBuilder registryCodeSqlBuilder = RegistryCodeSqlBuilder.getInstance(
|
||||||
AM_B
|
AM_B
|
||||||
);
|
);
|
||||||
ImdgPredicate rgsCodePrdct = rgsPb.sql(registryCodeSqlBuilder.build());
|
ImdgPredicate prdct = rgsPb.and(
|
||||||
Collection<Registry> registries = registryImdg.getCollectionObjectsByPredicate(rgsCodePrdct);
|
rgsPb.sql(registryCodeSqlBuilder.build()),
|
||||||
|
rgsPb.equals("sessionId", sessionId)
|
||||||
|
);
|
||||||
|
Collection<Registry> registries = registryImdg.getCollectionObjectsByPredicate(prdct);
|
||||||
return registries.stream()
|
return registries.stream()
|
||||||
.filter(rgs -> Objects.equals(rgs.getValueDate(), rgs.getSettlementDate()))
|
.filter(rgs -> Objects.equals(rgs.getValueDate(), rgs.getSettlementDate()))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
@ -227,7 +230,7 @@ public class FormingPaymentInstructionSecurities implements ISessionStage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
Collection<Registry> registries = selectMoneyRegistries();
|
Collection<Registry> registries = selectMoneyRegistries(sessionId);
|
||||||
Account tranAcc = accountImdg.getFirstObjectBySQL("accountType = '%s' and status = '%s' and processingSign = '%s'"
|
Account tranAcc = accountImdg.getFirstObjectBySQL("accountType = '%s' and status = '%s' and processingSign = '%s'"
|
||||||
.formatted(AccountType.Tran.getKey(), AccountStatus.ACTIVE.getKey(), Allowed.ALLOWED.getKey()));
|
.formatted(AccountType.Tran.getKey(), AccountStatus.ACTIVE.getKey(), Allowed.ALLOWED.getKey()));
|
||||||
Account dtrnAcc = accountImdg.getFirstObjectBySQL("accountType = '%s' and status = '%s' and processingSign = '%s'"
|
Account dtrnAcc = accountImdg.getFirstObjectBySQL("accountType = '%s' and status = '%s' and processingSign = '%s'"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue