This commit is contained in:
parent
7acc0e81da
commit
bcf3e3e3ff
1 changed files with 10 additions and 5 deletions
|
|
@ -213,10 +213,6 @@ public class Sdf57Executor extends AbstractExecutor<SDf57> {
|
|||
)) != null;
|
||||
sdf = sdf.stream().sorted(Comparator.comparing(SpcexObjectBase::getId)).toList();
|
||||
final Set<Long> gvtfIds = new HashSet<>();
|
||||
Consumer<Registry> acceptAMAT_Gvtf = (amat) -> {
|
||||
boolean isAmat = RegistryManager.equalsByCode(RegistryTradingParams.AMAT, amat);
|
||||
if (isAmat) gvtfIds.add(amat.getId());
|
||||
};
|
||||
for (SDf57 sdf57 : sdf) {
|
||||
IValidator validator = sDf57Validator.apply(sdf57);
|
||||
Optional<EnumMessage> error = validator.tillFirstError();
|
||||
|
|
@ -318,7 +314,11 @@ public class Sdf57Executor extends AbstractExecutor<SDf57> {
|
|||
registryB.getId());
|
||||
return new AssetTrio(registryF, registryB, registry);
|
||||
});
|
||||
acceptAMAT_Gvtf.accept(asts.a__t());
|
||||
{
|
||||
boolean isAmat = RegistryManager.equalsByCode(RegistryTradingParams.AMAT, asts.a__t());
|
||||
boolean isInfo = accountIsInfo(account);
|
||||
if (isAmat && isInfo) gvtfIds.add(asts.a__t().getId());
|
||||
}
|
||||
InOutDirection direction = IEnumKey.getEnumByKey(InOutDirection.class, stmt.getInOutDirection());
|
||||
boolean dm_tWasCreated = false;
|
||||
if (!StringUtils.isEmpty(stmt.getContract()) && InOutDirection.in.equals(direction)) {
|
||||
|
|
@ -562,6 +562,11 @@ public class Sdf57Executor extends AbstractExecutor<SDf57> {
|
|||
return anlt;
|
||||
}
|
||||
|
||||
private boolean accountIsInfo(Account account) {
|
||||
if (account == null) return false;
|
||||
return AccountType.Info.getKey().equals(account.getAccountType());
|
||||
}
|
||||
|
||||
private Registry copyRegB(Registry rgs) {
|
||||
Registry rgsB = rgs.clone();
|
||||
RegistryManager.zeroState(rgsB);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue