override sessionId and status when recreating execution
This commit is contained in:
parent
1226c73821
commit
fc9be7068d
4 changed files with 10 additions and 4 deletions
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -191,6 +191,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);
|
||||
|
|
|
|||
|
|
@ -220,6 +220,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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue