This commit is contained in:
parent
c6b644d118
commit
7ba559ad40
2 changed files with 5 additions and 4 deletions
|
|
@ -357,12 +357,14 @@ public class InspectionObligationsV2 implements ISessionStage {
|
|||
return Collections.emptyList();
|
||||
}
|
||||
ImdgPredicateBuilder pb = registryImdg.predicateBuilder();
|
||||
String groupMarket = groupIdAndSettleDate.get().getFirst().market();
|
||||
ImdgPredicate marketCondition = StringUtils.hasText(groupMarket) ?
|
||||
pb.or(pb.equals("market", groupMarket), pb.isNull("market")) : pb.alwaysTrue();
|
||||
return registryImdg.getCollectionObjectsByPredicate(
|
||||
pb.and(
|
||||
pb.and(
|
||||
pb.equals("groupId", groupIdAndSettleDate.get().getFirst().groupId()),
|
||||
StringUtils.hasText(groupIdAndSettleDate.get().getFirst().market()) ?
|
||||
pb.equals("market", groupIdAndSettleDate.get().getFirst().market()) : pb.alwaysTrue()
|
||||
marketCondition
|
||||
),
|
||||
pb.not(pb.equals("settlementDate", groupIdAndSettleDate.get().getSecond()))
|
||||
)
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.StringUtils;
|
||||
import ru.clearing.classes.statics.data.account.Account;
|
||||
import ru.clearing.classes.statics.data.account.ClearingAccount;
|
||||
import ru.clearing.classes.statics.data.account.DepoAccount;
|
||||
|
|
@ -412,7 +411,7 @@ public class RequirementsAndObligationCreation implements ISessionStage {
|
|||
pb.equals("settlementDate", settlementDt),
|
||||
pb.equals("sessionId", sessionId),
|
||||
pb.equals("groupId", exchangeExecutionId),
|
||||
StringUtils.hasText(market) ? pb.equals("market", market) : pb.alwaysTrue()
|
||||
pb.or(pb.equals("market", market), pb.isNull("market"))
|
||||
);
|
||||
Registry rgs = registryImdg.getSingleObjectByPredicate(rgstrPredicate);
|
||||
log.trace("rgs.id={} found by: {}", rgs == null ? "'not found'" : rgs.getId(), rgstrPredicate.toString());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue