identification funds ANLT search by DMAU

This commit is contained in:
ialbert 2024-10-12 10:08:11 +03:00
parent d9c46c3ec5
commit 1814f212eb

View file

@ -144,8 +144,9 @@ public enum IdentificationFundsValidationRule implements IValidationRule<ImdgVal
public Optional<EnumMessage> validate(ImdgValidationContext<IdentificationFundsRequest> context) {
Imdg<Account> accImdg = context.obtainMap(IMDGDistributedNames.Map_Account, Account.class);
ImdgPredicateBuilder pb = accImdg.predicateBuilder();
Registry rgs = context.getStoredObject(Stored.PresentById);
ImdgPredicate prdct = pb.and(
pb.equals("companyId", 1L),
pb.equals("id", rgs.getAccountId()),
pb.equals("accountType", AccountType.Anlt.getKey())
);
Account anltAcc = accImdg.getSingleObjectByPredicate(prdct);