reports-service http://jira.mfd.msk:8088/browse/CLS-497 улучшил логирование
This commit is contained in:
parent
bef57e096b
commit
57bbce07da
10 changed files with 11 additions and 9 deletions
|
|
@ -86,7 +86,7 @@ public class KSCommissionTradesReportBuilder extends CSVReportBuilder<EmptyParam
|
||||||
pb.or(pb.equals("sessionType", SessionType.XDEP.getKey()), pb.equals("sessionType", SessionType.FINL.getKey()))
|
pb.or(pb.equals("sessionType", SessionType.XDEP.getKey()), pb.equals("sessionType", SessionType.FINL.getKey()))
|
||||||
);
|
);
|
||||||
Collection<Registry> registries = registryImdg.getCollectionObjectsByPredicate(finalPredicate);
|
Collection<Registry> registries = registryImdg.getCollectionObjectsByPredicate(finalPredicate);
|
||||||
log.trace("Found {} Registry by query: {}", registries.size(), finalPredicate);
|
log.debug("Found {} Registry by query: {}", registries.size(), finalPredicate);
|
||||||
rows = new ArrayList<>(registries.size());
|
rows = new ArrayList<>(registries.size());
|
||||||
for (Registry registry : registries) {
|
for (Registry registry : registries) {
|
||||||
if (registry.getTradingDate() == null) {
|
if (registry.getTradingDate() == null) {
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ public class KSRepCashNettoReportBuilder extends CSVReportBuilder<SessionIdParam
|
||||||
pb.notNull("account")
|
pb.notNull("account")
|
||||||
);
|
);
|
||||||
Collection<Registry> registries = registryImdg.getCollectionObjectsByPredicate(finalPredicate);
|
Collection<Registry> registries = registryImdg.getCollectionObjectsByPredicate(finalPredicate);
|
||||||
log.trace("Found {} Registry by query: {}", registries.size(), finalPredicate);
|
log.debug("Found {} Registry by query: {}", registries.size(), finalPredicate);
|
||||||
Map<PairRegistryId, List<Registry>> registryMap = registries.stream().collect(Collectors.groupingBy(PairRegistryId::new));
|
Map<PairRegistryId, List<Registry>> registryMap = registries.stream().collect(Collectors.groupingBy(PairRegistryId::new));
|
||||||
|
|
||||||
rows = new ArrayList<>(registryMap.size());
|
rows = new ArrayList<>(registryMap.size());
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ public class KSRepCashRegisterSumsReportBuilder extends CSVReportBuilder<EmptyPa
|
||||||
pb.equals("operationStatus", OperationStatus.Executed.getKey())
|
pb.equals("operationStatus", OperationStatus.Executed.getKey())
|
||||||
);
|
);
|
||||||
Collection<Statement> statements = statementImdg.getCollectionObjectsByPredicate(finalPredicate);
|
Collection<Statement> statements = statementImdg.getCollectionObjectsByPredicate(finalPredicate);
|
||||||
log.trace("Found {} Statements by query: {}", statements.size(), finalPredicate);
|
log.debug("Found {} Statements by query: {}", statements.size(), finalPredicate);
|
||||||
rows = new ArrayList<>(statements.size());
|
rows = new ArrayList<>(statements.size());
|
||||||
for (Statement statement : statements) {
|
for (Statement statement : statements) {
|
||||||
if (statement.getAmount() == null) {
|
if (statement.getAmount() == null) {
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ public class KSRepCashRegistersReportBuilder extends CSVReportBuilder<EmptyParam
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
Collection<Registry> registries = registryImdg.getCollectionObjectsByPredicate(finalPredicate);
|
Collection<Registry> registries = registryImdg.getCollectionObjectsByPredicate(finalPredicate);
|
||||||
log.trace("Found {} Registry by query: {}", registries.size(), finalPredicate);
|
log.debug("Found {} Registry by query: {}", registries.size(), finalPredicate);
|
||||||
rows = new ArrayList<>(registries.size());
|
rows = new ArrayList<>(registries.size());
|
||||||
for (Registry registry : registries) {
|
for (Registry registry : registries) {
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ public class KSRepDepoNettoReportBuilder extends CSVReportBuilder<SessionIdParam
|
||||||
pb.notNull("account")
|
pb.notNull("account")
|
||||||
);
|
);
|
||||||
Collection<Registry> registries = registryImdg.getCollectionObjectsByPredicate(finalPredicate);
|
Collection<Registry> registries = registryImdg.getCollectionObjectsByPredicate(finalPredicate);
|
||||||
log.trace("Found {} Registry by query: {}", registries.size(), finalPredicate);
|
log.debug("Found {} Registry by query: {}", registries.size(), finalPredicate);
|
||||||
|
|
||||||
Map<PairRegistryId, List<Registry>> registryMap = registries.stream().collect(Collectors.groupingBy(PairRegistryId::new));
|
Map<PairRegistryId, List<Registry>> registryMap = registries.stream().collect(Collectors.groupingBy(PairRegistryId::new));
|
||||||
rows = new ArrayList<>(registries.size());
|
rows = new ArrayList<>(registries.size());
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ public class KSRepDepoRegisterQuantitiesReportBuilder extends CSVReportBuilder<E
|
||||||
pb.notNull("amount")
|
pb.notNull("amount")
|
||||||
);
|
);
|
||||||
Collection<Statement> statements = statementImdg.getCollectionObjectsByPredicate(finalPredicate);
|
Collection<Statement> statements = statementImdg.getCollectionObjectsByPredicate(finalPredicate);
|
||||||
log.trace("Found {} Statement by query: {}", statements.size(), finalPredicate);
|
log.debug("Found {} Statement by query: {}", statements.size(), finalPredicate);
|
||||||
|
|
||||||
rows = new ArrayList<>(statements.size());
|
rows = new ArrayList<>(statements.size());
|
||||||
for (Statement statement : statements) {
|
for (Statement statement : statements) {
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ public class KSRepDepoRegistersReportBuilder extends CSVReportBuilder<EmptyParam
|
||||||
pb.notNull("tradingClearingRegistry")
|
pb.notNull("tradingClearingRegistry")
|
||||||
);
|
);
|
||||||
Collection<Registry> registries = registryImdg.getCollectionObjectsByPredicate(finalPredicate);
|
Collection<Registry> registries = registryImdg.getCollectionObjectsByPredicate(finalPredicate);
|
||||||
log.trace("Found {} Registry by query: {}", registries.size(), finalPredicate);
|
log.debug("Found {} Registry by query: {}", registries.size(), finalPredicate);
|
||||||
|
|
||||||
rows = new ArrayList<>(registries.size());
|
rows = new ArrayList<>(registries.size());
|
||||||
for (Registry registry : registries) {
|
for (Registry registry : registries) {
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ public class KSRepFirmDetailsReportBuilder extends CSVReportBuilder<EmptyParams,
|
||||||
@Override
|
@Override
|
||||||
protected void collect(EmptyParams params) {
|
protected void collect(EmptyParams params) {
|
||||||
Collection<Company> companies = companyImdg.getCollectionObjectsByFieldValues(Map.of("workflowStatus", WorkflowStatus.Active.getKey()));
|
Collection<Company> companies = companyImdg.getCollectionObjectsByFieldValues(Map.of("workflowStatus", WorkflowStatus.Active.getKey()));
|
||||||
log.trace("Found {} Company", companies.size());
|
log.debug("Found {} Company", companies.size());
|
||||||
|
|
||||||
rows = new ArrayList<>(companies.size());
|
rows = new ArrayList<>(companies.size());
|
||||||
for (Company company : companies) {
|
for (Company company : companies) {
|
||||||
|
|
|
||||||
|
|
@ -83,10 +83,12 @@ public class KSRepTradesReportBuilder extends CSVReportBuilder<EmptyParams, KSRe
|
||||||
Collection<ExecutionDeposit> executionDeposits = executionDepositImdg.getCollectionObjectsByPredicate(
|
Collection<ExecutionDeposit> executionDeposits = executionDepositImdg.getCollectionObjectsByPredicate(
|
||||||
pbExecutionDeposit.equals("tradingDate", nowDate)
|
pbExecutionDeposit.equals("tradingDate", nowDate)
|
||||||
);
|
);
|
||||||
|
log.debug("Found {} ExecutionDeposit by tradingDate={}", executionDeposits.size(), nowDate);
|
||||||
ImdgPredicateBuilder pbExecutionFond = executionFondImdg.predicateBuilder();
|
ImdgPredicateBuilder pbExecutionFond = executionFondImdg.predicateBuilder();
|
||||||
Collection<ExecutionFond> executionFonds = executionFondImdg.getCollectionObjectsByPredicate(
|
Collection<ExecutionFond> executionFonds = executionFondImdg.getCollectionObjectsByPredicate(
|
||||||
pbExecutionFond.equals("tradingDate", nowDate)
|
pbExecutionFond.equals("tradingDate", nowDate)
|
||||||
);
|
);
|
||||||
|
log.debug("Found {} ExecutionFond by tradingDate={}", executionFonds.size(), nowDate);
|
||||||
List<ExecutionCommon> executions = new ArrayList<>();
|
List<ExecutionCommon> executions = new ArrayList<>();
|
||||||
executions.addAll(executionDeposits);
|
executions.addAll(executionDeposits);
|
||||||
executions.addAll(executionFonds);
|
executions.addAll(executionFonds);
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ public class KSSessionListReportBuilder extends CSVReportBuilder<EmptyParams, KS
|
||||||
protected void collect(EmptyParams params) {
|
protected void collect(EmptyParams params) {
|
||||||
Map<String, LocalDate> query = Map.of("clearingDate", LocalDate.now());
|
Map<String, LocalDate> query = Map.of("clearingDate", LocalDate.now());
|
||||||
Collection<Session> sessions = sessionImdg.getCollectionObjectsByFieldValues(query);
|
Collection<Session> sessions = sessionImdg.getCollectionObjectsByFieldValues(query);
|
||||||
log.trace("Found {} Session by query: {}", sessions.size(), query);
|
log.debug("Found {} Session by query: {}", sessions.size(), query);
|
||||||
rows = new ArrayList<>(sessions.size());
|
rows = new ArrayList<>(sessions.size());
|
||||||
for (Session session : sessions) {
|
for (Session session : sessions) {
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue