This commit is contained in:
parent
8dd82f67a6
commit
5a12278125
1 changed files with 11 additions and 4 deletions
|
|
@ -130,10 +130,17 @@ public abstract class AbstractExporterService {
|
||||||
|
|
||||||
protected boolean checkNotBlockedAndBalanceNonZero(Registry registry) {
|
protected boolean checkNotBlockedAndBalanceNonZero(Registry registry) {
|
||||||
if (!checkNotBlocked(registry)) return false;
|
if (!checkNotBlocked(registry)) return false;
|
||||||
Security security = securitySelector.selectSecurityById(registry.getSecurityId());
|
Security security = null;
|
||||||
return security == null
|
if (registry.getSecurityId() != null) {
|
||||||
|| !WorkflowStatus.Active.equalsByKey(security.getWorkflowStatus())
|
security = securitySelector.selectSecurityById(registry.getSecurityId());
|
||||||
|| !registry.getBalance().equals(BigDecimal.ZERO);
|
}
|
||||||
|
if (security == null) {
|
||||||
|
log.warn("{}.id={}, securityId={} security not found, skipping...",
|
||||||
|
registry.getRegistryCode(), registry.getId(), registry.getSecurityId());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return WorkflowStatus.Active.equalsByKey(security.getWorkflowStatus())
|
||||||
|
&& !registry.getBalance().equals(BigDecimal.ZERO);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected BigDecimal sumNegativeABS(Collection<Registry> registries) {
|
protected BigDecimal sumNegativeABS(Collection<Registry> registries) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue