Merge branch 'refs/heads/master' into dev
# Conflicts: # clearing-parent/db-scripts/src/main/resources/db/DDL_3.18.sql
This commit is contained in:
commit
018d573590
9 changed files with 5563 additions and 5543 deletions
|
|
@ -3,13 +3,13 @@ package ru.spcex.clearing.service.execution;
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
import ru.clearing.classes.statics.data.execution.ExecutionCommon;
|
import ru.clearing.classes.statics.data.execution.ExecutionCommon;
|
||||||
|
|
||||||
public record ExecUploadCashInfo(Long id, Instant createDt) {
|
public record ExecUploadCashInfo(Long id, Instant createDt, Long sessionId, String coverageStatus) {
|
||||||
|
|
||||||
public static ExecUploadCashInfo cash(Long id, Instant createDt) {
|
public static ExecUploadCashInfo cash(Long id, Instant createDt, Long sessionId, String coverageStatus) {
|
||||||
return new ExecUploadCashInfo(id, createDt);
|
return new ExecUploadCashInfo(id, createDt, sessionId, coverageStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ExecUploadCashInfo cash(ExecutionCommon exec) {
|
public static ExecUploadCashInfo cash(ExecutionCommon exec) {
|
||||||
return new ExecUploadCashInfo(exec.getId(), exec.getCreated());
|
return new ExecUploadCashInfo(exec.getId(), exec.getCreated(), exec.getSessionId(), exec.getCoverageStatus());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -207,6 +207,8 @@ public class ExecutionCurrencyComponent implements IExecutionUploadComponent {
|
||||||
newEC.setId(storedId.id());
|
newEC.setId(storedId.id());
|
||||||
newEC.setUpdated(newEC.getCreated());
|
newEC.setUpdated(newEC.getCreated());
|
||||||
newEC.setCreated(storedId.createDt());
|
newEC.setCreated(storedId.createDt());
|
||||||
|
newEC.setSessionId(storedId.sessionId());
|
||||||
|
newEC.setCoverageStatus(storedId.coverageStatus());
|
||||||
log.debug("executionCurrency.id={} was updated.", newEC.getId());
|
log.debug("executionCurrency.id={} was updated.", newEC.getId());
|
||||||
}
|
}
|
||||||
execsToInsert.put(newEC.getId(), newEC);
|
execsToInsert.put(newEC.getId(), newEC);
|
||||||
|
|
|
||||||
|
|
@ -202,6 +202,8 @@ public class ExecutionDepositComponent implements IExecutionUploadComponent {
|
||||||
newED.setId(storedId.id());
|
newED.setId(storedId.id());
|
||||||
newED.setUpdated(newED.getCreated());
|
newED.setUpdated(newED.getCreated());
|
||||||
newED.setCreated(storedId.createDt());
|
newED.setCreated(storedId.createDt());
|
||||||
|
newED.setSessionId(storedId.sessionId());
|
||||||
|
newED.setCoverageStatus(storedId.coverageStatus());
|
||||||
log.debug("executionDeposit.id={} was updated.", newED.getId());
|
log.debug("executionDeposit.id={} was updated.", newED.getId());
|
||||||
}
|
}
|
||||||
execsToInsert.put(newED.getId(), newED);
|
execsToInsert.put(newED.getId(), newED);
|
||||||
|
|
|
||||||
|
|
@ -226,6 +226,8 @@ public class ExecutionFondComponent implements IExecutionUploadComponent {
|
||||||
newED.setId(storedId.id());
|
newED.setId(storedId.id());
|
||||||
newED.setUpdated(newED.getCreated());
|
newED.setUpdated(newED.getCreated());
|
||||||
newED.setCreated(storedId.createDt());
|
newED.setCreated(storedId.createDt());
|
||||||
|
newED.setSessionId(storedId.sessionId());
|
||||||
|
newED.setCoverageStatus(storedId.coverageStatus());
|
||||||
log.debug("executionFond.id={} was updated.", newED.getId());
|
log.debug("executionFond.id={} was updated.", newED.getId());
|
||||||
}
|
}
|
||||||
execsToInsert.put(newED.getId(), newED);
|
execsToInsert.put(newED.getId(), newED);
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -175,7 +175,7 @@ public class KSCommissionTradesReportBuilder extends CSVReportBuilder<EmptyParam
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
if (!executionDeposits.isEmpty()) {
|
if (!executionDeposits.isEmpty()) {
|
||||||
if (executionDeposits.size() > 1) log.warn("ExecutionDeposit[exchangeExecutionId = {}].size > 1, use first", registry.getGroupId());
|
if (executionDeposits.size() > 1) log.warn("ExecutionDeposit[exchangeExecutionId = {}, market = {}].size > 1, use first", registry.getGroupId(), registry.getMarket());
|
||||||
ExecutionDeposit executionDeposit = executionDeposits.iterator().next();
|
ExecutionDeposit executionDeposit = executionDeposits.iterator().next();
|
||||||
classCode = executionDeposit.getMarket();
|
classCode = executionDeposit.getMarket();
|
||||||
}
|
}
|
||||||
|
|
@ -201,7 +201,10 @@ public class KSCommissionTradesReportBuilder extends CSVReportBuilder<EmptyParam
|
||||||
Registry tmtRegistry = registryImdg.getFirstObjectByPredicate(
|
Registry tmtRegistry = registryImdg.getFirstObjectByPredicate(
|
||||||
pb.and(
|
pb.and(
|
||||||
pb.equals("counterPartyId", registry.getCompanyId()),
|
pb.equals("counterPartyId", registry.getCompanyId()),
|
||||||
pb.equals("groupId", registry.getGroupId()),
|
pb.and(
|
||||||
|
pb.equals("groupId", registry.getGroupId()),
|
||||||
|
pb.equals("market", registry.getMarket())
|
||||||
|
),
|
||||||
tmtPredicate
|
tmtPredicate
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -135,6 +135,16 @@ public class DBPredicateBuilder extends ImdgPredicateBuilderHazelcast {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ImdgPredicate alwaysTrue() {
|
||||||
|
return new DBPredicate(" (true) ");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ImdgPredicate alwaysFalse() {
|
||||||
|
return new DBPredicate(" (false) ");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ImdgPredicate sql(String sql) {
|
public ImdgPredicate sql(String sql) {
|
||||||
return new DBPredicate(sql);
|
return new DBPredicate(sql);
|
||||||
|
|
|
||||||
|
|
@ -204,6 +204,7 @@ public class DBProvider implements ImdgProvider {
|
||||||
registryMatcher.put("sessionId", "session_id");
|
registryMatcher.put("sessionId", "session_id");
|
||||||
registryMatcher.put("sessionType", "session_type");
|
registryMatcher.put("sessionType", "session_type");
|
||||||
registryMatcher.put("paymentId", "payment_id");
|
registryMatcher.put("paymentId", "payment_id");
|
||||||
|
registryMatcher.put("market", "market");
|
||||||
this.fieldsMatcherForTable.put(Registry.class, registryMatcher);
|
this.fieldsMatcherForTable.put(Registry.class, registryMatcher);
|
||||||
|
|
||||||
Map<String, String> sessionMatcher = new HashMap<>();
|
Map<String, String> sessionMatcher = new HashMap<>();
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
"FIRMID","ACCOUNT","TKR","DATE","REGISTER_CODE","REGISTER_NAME","OPEN_BALANCE","CHANGE_BALANCE","ADD_WITHDRAW","CLOSE_BALANCE","REMARKS","TRADE_NUM","CURRENCY"
|
"FIRMID","ACCOUNT","TKR","DATE","REGISTER_CODE","REGISTER_NAME","OPEN_BALANCE","CHANGE_BALANCE","ADD_WITHDRAW","CLOSE_BALANCE","REMARKS","TRADE_NUM","CURRENCY"
|
||||||
"TRADING_CODE","ACCOUNT_FROM_ACCOUNT","TRADING_CLEARING_REGISTRY","09.09.2024","AM_T","AM_T_NAME","77.78","-211.00","111.00","-22.22",,,
|
"TRADING_CODE","ACCOUNT_FROM_ACCOUNT","TRADING_CLEARING_REGISTRY","01.07.2025","AM_T","AM_T_NAME","77.78","-200.00","111.00","-11.22",,,
|
||||||
"TRADING_CODE","ACCOUNT","TRADING_CLEARING_REGISTRY","09.09.2024","AM_T","AM_T_NAME","77.78","-211.00","111.00","-22.22",,,
|
"TRADING_CODE","ACCOUNT","TRADING_CLEARING_REGISTRY","01.07.2025","AM_T","AM_T_NAME","77.78","-200.00","111.00","-11.22",,,
|
||||||
|
|
|
||||||
|
Loading…
Add table
Reference in a new issue