reports-service http://jira.mfd.msk:8088/browse/CLS-497 ksCommisonTrades, ещё логов trace
This commit is contained in:
parent
0db32aac36
commit
bef57e096b
8 changed files with 19 additions and 4 deletions
|
|
@ -77,16 +77,23 @@ public class KSCommissionTradesReportBuilder extends CSVReportBuilder<EmptyParam
|
|||
LocalDate nowDate = LocalDate.now();
|
||||
|
||||
ImdgPredicateBuilder pb = registryImdg.predicateBuilder();
|
||||
String sql = RegistryCodeSqlBuilder.getInstance(RegistryTradingParams.DM_T, RegistryTradingParams.DM_X).build();
|
||||
String sql = RegistryCodeSqlBuilder.getInstance(RegistryTradingParams.TS_T).build();
|
||||
ImdgPredicate finalPredicate = pb.and(
|
||||
pb.sql(sql),
|
||||
pb.equals("refundDate", nowDate),
|
||||
pb.equals("registryStatus", RegistryStatus.OK.getKey()),
|
||||
pb.notNull("tradingDate")
|
||||
pb.less("valueDate", nowDate),
|
||||
pb.or(pb.equals("registryStatus", RegistryStatus.OK.getKey()), pb.equals("registryStatus", RegistryStatus.CLRD.getKey())),
|
||||
pb.or(pb.equals("sessionType", SessionType.XDEP.getKey()), pb.equals("sessionType", SessionType.FINL.getKey()))
|
||||
);
|
||||
Collection<Registry> registries = registryImdg.getCollectionObjectsByPredicate(finalPredicate);
|
||||
log.trace("Found {} Registry by query: {}", registries.size(), finalPredicate);
|
||||
rows = new ArrayList<>(registries.size());
|
||||
for (Registry registry : registries) {
|
||||
if (registry.getTradingDate() == null) {
|
||||
log.warn("For registry id = {} field TradingDate was null, registry was skipped",
|
||||
registry.getId());
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
RegistryUnit registryUnit = IEnumKey.getEnumByKey(RegistryUnit.class, registry.getRegistryUnit());
|
||||
Company company = companyImdg.getSingleObjectByID(registry.getCompanyId());
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@ public class KSRepCashNettoReportBuilder extends CSVReportBuilder<SessionIdParam
|
|||
pb.notNull("account")
|
||||
);
|
||||
Collection<Registry> registries = registryImdg.getCollectionObjectsByPredicate(finalPredicate);
|
||||
log.trace("Found {} Registry by query: {}", registries.size(), finalPredicate);
|
||||
Map<PairRegistryId, List<Registry>> registryMap = registries.stream().collect(Collectors.groupingBy(PairRegistryId::new));
|
||||
|
||||
rows = new ArrayList<>(registryMap.size());
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@ public class KSRepCashRegisterSumsReportBuilder extends CSVReportBuilder<EmptyPa
|
|||
pb.equals("operationStatus", OperationStatus.Executed.getKey())
|
||||
);
|
||||
Collection<Statement> statements = statementImdg.getCollectionObjectsByPredicate(finalPredicate);
|
||||
log.trace("Found {} Statements by query: {}", statements.size(), finalPredicate);
|
||||
rows = new ArrayList<>(statements.size());
|
||||
for (Statement statement : statements) {
|
||||
if (statement.getAmount() == null) {
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ public class KSRepDepoNettoReportBuilder extends CSVReportBuilder<SessionIdParam
|
|||
pb.notNull("account")
|
||||
);
|
||||
Collection<Registry> registries = registryImdg.getCollectionObjectsByPredicate(finalPredicate);
|
||||
log.trace("Found {} Registry by query: {}", registries.size(), finalPredicate);
|
||||
|
||||
Map<PairRegistryId, List<Registry>> registryMap = registries.stream().collect(Collectors.groupingBy(PairRegistryId::new));
|
||||
rows = new ArrayList<>(registries.size());
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@ public class KSRepDepoRegisterQuantitiesReportBuilder extends CSVReportBuilder<E
|
|||
pb.notNull("amount")
|
||||
);
|
||||
Collection<Statement> statements = statementImdg.getCollectionObjectsByPredicate(finalPredicate);
|
||||
log.trace("Found {} Statement by query: {}", statements.size(), finalPredicate);
|
||||
|
||||
rows = new ArrayList<>(statements.size());
|
||||
for (Statement statement : statements) {
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@ public class KSRepDepoRegistersReportBuilder extends CSVReportBuilder<EmptyParam
|
|||
pb.notNull("tradingClearingRegistry")
|
||||
);
|
||||
Collection<Registry> registries = registryImdg.getCollectionObjectsByPredicate(finalPredicate);
|
||||
log.trace("Found {} Registry by query: {}", registries.size(), finalPredicate);
|
||||
|
||||
rows = new ArrayList<>(registries.size());
|
||||
for (Registry registry : registries) {
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ public class KSRepFirmDetailsReportBuilder extends CSVReportBuilder<EmptyParams,
|
|||
@Override
|
||||
protected void collect(EmptyParams params) {
|
||||
Collection<Company> companies = companyImdg.getCollectionObjectsByFieldValues(Map.of("workflowStatus", WorkflowStatus.Active.getKey()));
|
||||
log.trace("Found {} Company", companies.size());
|
||||
|
||||
rows = new ArrayList<>(companies.size());
|
||||
for (Company company : companies) {
|
||||
|
|
|
|||
|
|
@ -55,7 +55,9 @@ public class KSSessionListReportBuilder extends CSVReportBuilder<EmptyParams, KS
|
|||
|
||||
@Override
|
||||
protected void collect(EmptyParams params) {
|
||||
Collection<Session> sessions = sessionImdg.getCollectionObjectsByFieldValues(Map.of("clearingDate", LocalDate.now()));
|
||||
Map<String, LocalDate> query = Map.of("clearingDate", LocalDate.now());
|
||||
Collection<Session> sessions = sessionImdg.getCollectionObjectsByFieldValues(query);
|
||||
log.trace("Found {} Session by query: {}", sessions.size(), query);
|
||||
rows = new ArrayList<>(sessions.size());
|
||||
for (Session session : sessions) {
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue