Merge branch 'refs/heads/dev' into spring-state-machine-template-v2

This commit is contained in:
ialbert 2025-07-02 13:46:59 +03:00
commit a1b6cab301
9 changed files with 5563 additions and 5543 deletions

View file

@ -3,13 +3,13 @@ package ru.spcex.clearing.service.execution;
import java.time.Instant;
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) {
return new ExecUploadCashInfo(id, createDt);
public static ExecUploadCashInfo cash(Long id, Instant createDt, Long sessionId, String coverageStatus) {
return new ExecUploadCashInfo(id, createDt, sessionId, coverageStatus);
}
public static ExecUploadCashInfo cash(ExecutionCommon exec) {
return new ExecUploadCashInfo(exec.getId(), exec.getCreated());
return new ExecUploadCashInfo(exec.getId(), exec.getCreated(), exec.getSessionId(), exec.getCoverageStatus());
}
}

View file

@ -207,6 +207,8 @@ public class ExecutionCurrencyComponent implements IExecutionUploadComponent {
newEC.setId(storedId.id());
newEC.setUpdated(newEC.getCreated());
newEC.setCreated(storedId.createDt());
newEC.setSessionId(storedId.sessionId());
newEC.setCoverageStatus(storedId.coverageStatus());
log.debug("executionCurrency.id={} was updated.", newEC.getId());
}
execsToInsert.put(newEC.getId(), newEC);

View file

@ -202,6 +202,8 @@ public class ExecutionDepositComponent implements IExecutionUploadComponent {
newED.setId(storedId.id());
newED.setUpdated(newED.getCreated());
newED.setCreated(storedId.createDt());
newED.setSessionId(storedId.sessionId());
newED.setCoverageStatus(storedId.coverageStatus());
log.debug("executionDeposit.id={} was updated.", newED.getId());
}
execsToInsert.put(newED.getId(), newED);

View file

@ -226,6 +226,8 @@ public class ExecutionFondComponent implements IExecutionUploadComponent {
newED.setId(storedId.id());
newED.setUpdated(newED.getCreated());
newED.setCreated(storedId.createDt());
newED.setSessionId(storedId.sessionId());
newED.setCoverageStatus(storedId.coverageStatus());
log.debug("executionFond.id={} was updated.", newED.getId());
}
execsToInsert.put(newED.getId(), newED);

File diff suppressed because it is too large Load diff

View file

@ -175,7 +175,7 @@ public class KSCommissionTradesReportBuilder extends CSVReportBuilder<EmptyParam
)
);
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();
classCode = executionDeposit.getMarket();
}
@ -201,7 +201,10 @@ public class KSCommissionTradesReportBuilder extends CSVReportBuilder<EmptyParam
Registry tmtRegistry = registryImdg.getFirstObjectByPredicate(
pb.and(
pb.equals("counterPartyId", registry.getCompanyId()),
pb.equals("groupId", registry.getGroupId()),
pb.and(
pb.equals("groupId", registry.getGroupId()),
pb.equals("market", registry.getMarket())
),
tmtPredicate
)
);

View file

@ -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
public ImdgPredicate sql(String sql) {
return new DBPredicate(sql);

View file

@ -204,6 +204,7 @@ public class DBProvider implements ImdgProvider {
registryMatcher.put("sessionId", "session_id");
registryMatcher.put("sessionType", "session_type");
registryMatcher.put("paymentId", "payment_id");
registryMatcher.put("market", "market");
this.fieldsMatcherForTable.put(Registry.class, registryMatcher);
Map<String, String> sessionMatcher = new HashMap<>();

View file

@ -1,3 +1,3 @@
"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","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","01.07.2025","AM_T","AM_T_NAME","77.78","-200.00","111.00","-11.22",,,

1 FIRMID ACCOUNT TKR DATE REGISTER_CODE REGISTER_NAME OPEN_BALANCE CHANGE_BALANCE ADD_WITHDRAW CLOSE_BALANCE REMARKS TRADE_NUM CURRENCY
2 TRADING_CODE ACCOUNT_FROM_ACCOUNT TRADING_CLEARING_REGISTRY 09.09.2024 01.07.2025 AM_T AM_T_NAME 77.78 -211.00 -200.00 111.00 -22.22 -11.22
3 TRADING_CODE ACCOUNT TRADING_CLEARING_REGISTRY 09.09.2024 01.07.2025 AM_T AM_T_NAME 77.78 -211.00 -200.00 111.00 -22.22 -11.22