IMDG рефакторинг, чтобы компилировалось.
This commit is contained in:
parent
08c45b90d6
commit
c4a8db1cd8
37 changed files with 188 additions and 169 deletions
|
|
@ -6,9 +6,9 @@ import java.io.Serial;
|
|||
/**
|
||||
* Изменение состояния объекта Счета
|
||||
*
|
||||
* DB table: ACCOUNT_UPDATE
|
||||
* DB table: ACCOUNT_HISTORY
|
||||
**/
|
||||
public class AccountUpdate extends BusinessEvent<Account> {
|
||||
public class AccountHistory extends BusinessEvent<Account> {
|
||||
@Serial
|
||||
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||
|
||||
|
|
@ -3,8 +3,11 @@ package ru.clearing.classes.StaticData.Account;
|
|||
import ru.clearing.classes.ConstSerializable;
|
||||
import ru.spcex.platform.classes.base.SpcexObjectBase;
|
||||
|
||||
import ru.clearing.classes.ConstSerializable;
|
||||
import ru.spcex.platform.classes.base.SpcexObjectBase;
|
||||
|
||||
/**
|
||||
* Банковские счета
|
||||
* Банковские реквизиты для перечисления денежных средств
|
||||
* <p>
|
||||
* DB table: BANK_ACCOUNT
|
||||
**/
|
||||
|
|
@ -14,6 +17,7 @@ public class BankAccount extends SpcexObjectBase {
|
|||
private Long accountId;
|
||||
private String bankIdentificationCode;
|
||||
private String bankName;
|
||||
private String correspondentAccount;
|
||||
private String correspondentAccountName;
|
||||
private String currency;
|
||||
private String destination;
|
||||
|
|
@ -48,6 +52,14 @@ public class BankAccount extends SpcexObjectBase {
|
|||
this.bankName = value;
|
||||
}
|
||||
|
||||
public String getCorrespondentAccount() {
|
||||
return correspondentAccount;
|
||||
}
|
||||
|
||||
public void setCorrespondentAccount(String value) {
|
||||
this.correspondentAccount = value;
|
||||
}
|
||||
|
||||
public String getCorrespondentAccountName() {
|
||||
return correspondentAccountName;
|
||||
}
|
||||
|
|
@ -116,7 +128,8 @@ public class BankAccount extends SpcexObjectBase {
|
|||
return account;
|
||||
}
|
||||
|
||||
public void setAccount(String account) {
|
||||
this.account = account;
|
||||
public void setAccount(String value) {
|
||||
this.account = value;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -6,9 +6,9 @@ import java.io.Serial;
|
|||
/**
|
||||
* ИЗменение состояния объекта Договорные отношения
|
||||
*
|
||||
* DB table: RELATION_UPDATE
|
||||
* DB table: RELATION_HISTORY
|
||||
**/
|
||||
public class RelationUpdate extends BusinessEvent<Relation> {
|
||||
public class RelationHistory extends BusinessEvent<Relation> {
|
||||
@Serial
|
||||
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||
|
||||
|
|
@ -7,7 +7,7 @@ import java.time.Instant;
|
|||
/**
|
||||
* Журнал изменения таблиц с BusinessObject
|
||||
*/
|
||||
public abstract class BusinessEvent<T extends BusinessObject> extends SpcexObjectBase {
|
||||
public abstract class BusinessEvent<T extends SpcexObjectBase /*BusinessObject*/> extends SpcexObjectBase {
|
||||
|
||||
private Instant eventTime;
|
||||
private Long userId;
|
||||
|
|
|
|||
|
|
@ -27,9 +27,10 @@ public class Company extends BusinessObject {
|
|||
return "Company{" +
|
||||
"id=" + id +
|
||||
", clearingCode='" + clearingCode + '\'' +
|
||||
", exchangeCode='" + exchangeCode + '\'' +
|
||||
", tradingCode='" + tradingCode + '\'' +
|
||||
", profile=" + profile +
|
||||
", statusId=" + statusId +
|
||||
", fullName=" + fullName +
|
||||
", workflowStatus=" + workflowStatus +
|
||||
'}';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import java.io.Serial;
|
|||
/**
|
||||
* DB: COMPANY_UPDATE
|
||||
*/
|
||||
public class CompanyUpdate extends BusinessEvent<Company> {
|
||||
public class CompanyHistory extends BusinessEvent<Company> {
|
||||
@Serial
|
||||
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package ru.clearing.classes.statics.data.messages;
|
||||
|
||||
import ru.clearing.classes.ConstSerializable;
|
||||
import ru.spcex.platform.classes.base.SpcexObjectBase;
|
||||
import ru.clearing.classes.objects.BusinessObject;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
|
|
@ -10,7 +10,7 @@ import java.time.Instant;
|
|||
* <p>
|
||||
* DB table: ERROR_TEXT
|
||||
**/
|
||||
public class ErrorText extends BusinessBase {
|
||||
public class ErrorText extends BusinessObject {
|
||||
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||
|
||||
private String errorCode;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package ru.clearing.classes.statics.data.sdf;
|
|||
import ru.clearing.classes.ConstSerializable;
|
||||
import ru.spcex.platform.classes.base.SpcexObjectBase;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.Instant;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
package ru.clearing.classes.statics.data.security;
|
||||
|
||||
import ru.clearing.classes.ConstSerializable;
|
||||
import ru.clearing.classes.objects.BusinessObject;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
/**
|
||||
|
|
@ -19,22 +22,6 @@ public class Security extends BusinessObject {
|
|||
private String securitySymbol;
|
||||
private String workflowStatus;
|
||||
|
||||
public Instant getCreatedAt() {
|
||||
return createdAt;
|
||||
}
|
||||
|
||||
public void setCreatedAt(Instant value) {
|
||||
this.createdAt = value;
|
||||
}
|
||||
|
||||
public Instant getUpdatedAt() {
|
||||
return updatedAt;
|
||||
}
|
||||
|
||||
public void setUpdatedAt(Instant value) {
|
||||
this.updatedAt = value;
|
||||
}
|
||||
|
||||
public String getInstrumentType() {
|
||||
return instrumentType;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ import java.io.Serial;
|
|||
/**
|
||||
* Изменение состояния объекта Инструменты
|
||||
*
|
||||
* DB table: SECURITY_UPDATE
|
||||
* DB table: SECURITY_HISTORY
|
||||
**/
|
||||
public class SecurityUpdate extends BusinessEvent<Security> {
|
||||
public class SecurityHistory extends BusinessEvent<Security> {
|
||||
@Serial
|
||||
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package ru.clearing.classes.statics.data.statement;
|
||||
|
||||
import ru.clearing.classes.ConstSerializable;
|
||||
import ru.spcex.platform.classes.base.BusinessObject;
|
||||
import ru.clearing.classes.objects.BusinessObject;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.Instant;
|
||||
|
|
|
|||
|
|
@ -4,10 +4,11 @@ import org.springframework.jdbc.core.JdbcTemplate;
|
|||
import ru.clearing.classes.objects.BusinessEvent;
|
||||
import ru.clearing.classes.objects.BusinessObject;
|
||||
import ru.spcex.clearing.imdg.utils.DbUtilsHelper;
|
||||
import ru.spcex.platform.classes.base.SpcexObjectBase;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public abstract class TemplateEventMapStore<T extends BusinessEvent<? extends BusinessObject>>
|
||||
public abstract class TemplateEventMapStore<T extends BusinessEvent<? extends SpcexObjectBase>>
|
||||
extends ObjectBaseMapStore<T>
|
||||
implements AutoconfiguredMap<T> {
|
||||
|
||||
|
|
|
|||
|
|
@ -11,19 +11,20 @@ import java.util.Arrays;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
//fixme duplicate с TemplateEventMapStore???
|
||||
//@Component
|
||||
public abstract class TemplateUpdateMapStore<T extends BusinessObject, TU extends BusinessEvent<T>> extends BusinessEventMapStore<TU> {
|
||||
public abstract class TemplateHistoryMapStore<T extends BusinessObject, TU extends BusinessEvent<T>> extends BusinessEventMapStore<TU> {
|
||||
|
||||
protected final int validateSize = getFields().length;
|
||||
protected final String insertStatement = DbUtilsHelper.createUpdateOrInsert(getTableName(), getFields(), "id");
|
||||
|
||||
public TemplateUpdateMapStore(JdbcTemplate jdbcTemplate) {
|
||||
public TemplateHistoryMapStore(JdbcTemplate jdbcTemplate) {
|
||||
super(jdbcTemplate);
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public String getTableName() {
|
||||
// return "COMPANY_UPDATE";
|
||||
// return "COMPANY_HSTORY";
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
|
|
@ -2,31 +2,28 @@ package ru.spcex.clearing.imdg.businessevent;
|
|||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.clearing.classes.StaticData.Account.Account;
|
||||
import ru.clearing.classes.StaticData.Account.AccountHistory;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import com.spicex.Static.Account.CurrentBankAccountUpdate;
|
||||
import ru.spcex.clearing.imdg.base.TemplateEventMapStore;
|
||||
import ru.spcex.clearing.imdg.utils.DbUtilsHelper;
|
||||
import ru.spcex.clearing.imdg.utils.TimeUtil;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
|
||||
@Component
|
||||
public class AccountUpdateMapStore extends TemplateEventMapStore<AccountUpdate> {
|
||||
public class AccountHistoryMapStore extends TemplateEventMapStore<AccountHistory> {
|
||||
|
||||
public AccountUpdateMapStore(JdbcTemplate jdbcTemplate) {
|
||||
public AccountHistoryMapStore(JdbcTemplate jdbcTemplate) {
|
||||
super(jdbcTemplate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMapName() {
|
||||
return IMDGDistributedNames.Map_AccountUpdate;
|
||||
return IMDGDistributedNames.Map_AccountHistory;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTableName() {
|
||||
return "ACCOUNT_UPDATE";
|
||||
return "ACCOUNT_HISTORY";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -37,16 +34,16 @@ public class AccountUpdateMapStore extends TemplateEventMapStore<AccountUpdate>
|
|||
}
|
||||
|
||||
@Override
|
||||
public Object[] objectToField(Account updateLog) {
|
||||
public Object[] objectToField(AccountHistory updateLog) {
|
||||
Account object=updateLog.getObject();
|
||||
Object[] args = new Object[]{
|
||||
updateLog.getId(),
|
||||
updateLog.getEventTime(),
|
||||
updateLog.getEventUserId(),
|
||||
updateLog.getUserId(),
|
||||
|
||||
object.getId(),
|
||||
TimeUtil.fromInstant(object.getCreatedAt()),
|
||||
TimeUtil.fromInstant(object.getUpdatedAt()),
|
||||
TimeUtil.fromInstant(object.getCreated()),
|
||||
TimeUtil.fromInstant(object.getUpdated()),
|
||||
object.getAccount(),
|
||||
object.getAccountType(),
|
||||
object.getRelationId(),
|
||||
|
|
@ -2,9 +2,9 @@ package ru.spcex.clearing.imdg.businessevent;
|
|||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.clearing.classes.StaticData.Account.AccountRouting;
|
||||
import ru.clearing.classes.StaticData.Account.AccountRoutingHistory;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import com.spicex.Static.Account.AccountRouting;
|
||||
import com.spicex.Static.Account.AccountRoutingUpdate;
|
||||
import ru.spcex.clearing.imdg.base.TemplateEventMapStore;
|
||||
import ru.spcex.clearing.imdg.utils.DbUtilsHelper;
|
||||
import ru.spcex.clearing.imdg.utils.TimeUtil;
|
||||
|
|
@ -14,20 +14,20 @@ import java.sql.SQLException;
|
|||
import java.util.*;
|
||||
|
||||
@Component
|
||||
public class AccountRoutingUpdateMapStore extends TemplateEventMapStore<AccountRoutingUpdate> {
|
||||
public class AccountRoutingHistoryMapStore extends TemplateEventMapStore<AccountRoutingHistory> {
|
||||
|
||||
public AccountRoutingUpdateMapStore(JdbcTemplate jdbcTemplate) {
|
||||
public AccountRoutingHistoryMapStore(JdbcTemplate jdbcTemplate) {
|
||||
super(jdbcTemplate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMapName() {
|
||||
return IMDGDistributedNames.Map_AccountRoutingUpdate;
|
||||
return IMDGDistributedNames.Map_AccountRoutingHistory;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTableName() {
|
||||
return "ACCOUNT_ROUTING_UPDATE";
|
||||
return "ACCOUNT_ROUTING_HISTORY";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -38,12 +38,12 @@ public class AccountRoutingUpdateMapStore extends TemplateEventMapStore<AccountR
|
|||
}
|
||||
|
||||
@Override
|
||||
public Object[] objectToField(AccountRouting updateLog) {
|
||||
public Object[] objectToField(AccountRoutingHistory updateLog) {
|
||||
AccountRouting object=updateLog.getObject();
|
||||
Object[] args = new Object[]{
|
||||
updateLog.getId(),
|
||||
updateLog.getEventTime(),
|
||||
updateLog.getEventUserId(),
|
||||
updateLog.getUserId(),
|
||||
|
||||
object.getId(),
|
||||
object.getDestinationId(),
|
||||
|
|
@ -2,48 +2,44 @@ package ru.spcex.clearing.imdg.businessevent;
|
|||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.clearing.classes.StaticData.Account.BankAccount;
|
||||
import ru.clearing.classes.StaticData.Account.BankAccountHistory;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import com.spicex.Static.Account.BankAccount;
|
||||
import com.spicex.Static.Account.BankAccountUpdate;
|
||||
import ru.spcex.clearing.imdg.base.TemplateEventMapStore;
|
||||
import ru.spcex.clearing.imdg.utils.DbUtilsHelper;
|
||||
import ru.spcex.clearing.imdg.utils.TimeUtil;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
|
||||
@Component
|
||||
public class BankAccountUpdateMapStore extends TemplateEventMapStore<BankAccountUpdate> {
|
||||
public class BankAccountHistoryMapStore extends TemplateEventMapStore<BankAccountHistory> {
|
||||
|
||||
public BankAccountUpdateMapStore(JdbcTemplate jdbcTemplate) {
|
||||
public BankAccountHistoryMapStore(JdbcTemplate jdbcTemplate) {
|
||||
super(jdbcTemplate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMapName() {
|
||||
return IMDGDistributedNames.Map_BankAccountUpdate;
|
||||
return IMDGDistributedNames.Map_BankAccountHistory;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTableName() {
|
||||
return "BANK_ACCOUNT_UPDATE";
|
||||
return "BANK_ACCOUNT_HISTORY";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getFields() {
|
||||
return new String[]{"ID","EVENT_TIME", "EVENT_USER_ID",
|
||||
"BANK_ACCOUNT_ID", "ACCOUNT_ID", "BANK_IDENTIFICATION_CODE", "BANK_NAME", "CORRESPONDENT_ACCOUNT", "CORRESPONDENT_ACCOUNT_NAME", "CURRENCY", "DESTINATION", "IBAN", "INTERNATIONAL_TRANSFER_SIGN", "SWIFT_CODE", "TAXPAYER_IDENTIFICATION_NUMBER", "TAX_REGISTRATION_REASON_CODE", "ACCOUNT", "ACTIONS"
|
||||
return new String[]{"ID", "EVENT_TIME", "EVENT_USER_ID",
|
||||
"BANK_ACCOUNT_ID", "ACCOUNT_ID", "BANK_IDENTIFICATION_CODE", "BANK_NAME", "CORRESPONDENT_ACCOUNT", "CORRESPONDENT_ACCOUNT_NAME", "CURRENCY", "DESTINATION", "IBAN", "INTERNATIONAL_TRANSFER_SIGN", "SWIFT_CODE", "TAXPAYER_IDENTIFICATION_NUMBER", "TAX_REGISTRATION_REASON_CODE", "ACCOUNT"
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] objectToField(BankAccount updateLog) {
|
||||
BankAccount object=updateLog.getObject();
|
||||
public Object[] objectToField(BankAccountHistory historyLog) {
|
||||
BankAccount object = historyLog.getObject();
|
||||
Object[] args = new Object[]{
|
||||
updateLog.getId(),
|
||||
updateLog.getEventTime(),
|
||||
updateLog.getEventUserId(),
|
||||
historyLog.getId(),
|
||||
historyLog.getEventTime(),
|
||||
historyLog.getUserId(),
|
||||
|
||||
object.getId(),
|
||||
object.getAccountId(),
|
||||
|
|
@ -58,8 +54,7 @@ public class BankAccountUpdateMapStore extends TemplateEventMapStore<BankAccount
|
|||
object.getSwiftCode(),
|
||||
object.getTaxpayerIdentificationNumber(),
|
||||
object.getTaxRegistrationReasonCode(),
|
||||
object.getAccount(),
|
||||
object.getActions()
|
||||
object.getAccount()
|
||||
};
|
||||
return args;
|
||||
}
|
||||
|
|
@ -2,9 +2,9 @@ package ru.spcex.clearing.imdg.businessevent;
|
|||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.clearing.classes.StaticData.Account.ClearingAccount;
|
||||
import ru.clearing.classes.StaticData.Account.ClearingAccountHistory;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import com.spicex.Static.Account.ClearingAccount;
|
||||
import com.spicex.Static.Account.ClearingAccountUpdate;
|
||||
import ru.spcex.clearing.imdg.base.TemplateEventMapStore;
|
||||
import ru.spcex.clearing.imdg.utils.DbUtilsHelper;
|
||||
import ru.spcex.clearing.imdg.utils.TimeUtil;
|
||||
|
|
@ -14,20 +14,20 @@ import java.sql.SQLException;
|
|||
import java.util.*;
|
||||
|
||||
@Component
|
||||
public class ClearingAccountUpdateMapStore extends TemplateEventMapStore<ClearingAccountUpdate> {
|
||||
public class ClearingAccountHistoryMapStore extends TemplateEventMapStore<ClearingAccountHistory> {
|
||||
|
||||
public ClearingAccountUpdateMapStore(JdbcTemplate jdbcTemplate) {
|
||||
public ClearingAccountHistoryMapStore(JdbcTemplate jdbcTemplate) {
|
||||
super(jdbcTemplate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMapName() {
|
||||
return IMDGDistributedNames.Map_ClearingAccountUpdate;
|
||||
return IMDGDistributedNames.Map_ClearingAccountHistory;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTableName() {
|
||||
return "CLEARING_ACCOUNT_UPDATE";
|
||||
return "CLEARING_ACCOUNT_HISTORY";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -38,12 +38,12 @@ public class ClearingAccountUpdateMapStore extends TemplateEventMapStore<Clearin
|
|||
}
|
||||
|
||||
@Override
|
||||
public Object[] objectToField(ClearingAccount updateLog) {
|
||||
public Object[] objectToField(ClearingAccountHistory updateLog) {
|
||||
ClearingAccount object=updateLog.getObject();
|
||||
Object[] args = new Object[]{
|
||||
updateLog.getId(),
|
||||
updateLog.getEventTime(),
|
||||
updateLog.getEventUserId(),
|
||||
updateLog.getUserId(),
|
||||
|
||||
object.getId(),
|
||||
object.getAccountId(),
|
||||
|
|
@ -3,7 +3,7 @@ package ru.spcex.clearing.imdg.businessevent;
|
|||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.lang.NonNull;
|
||||
import ru.clearing.classes.statics.data.company.Company;
|
||||
import ru.clearing.classes.statics.data.company.CompanyUpdate;
|
||||
import ru.clearing.classes.statics.data.company.CompanyHistory;
|
||||
import ru.clearing.classes.statics.data.profile.CompanyInfo;
|
||||
import ru.spcex.clearing.imdg.base.BusinessEventMapStore;
|
||||
import ru.spcex.clearing.imdg.utils.DbUtilsHelper;
|
||||
|
|
@ -15,15 +15,15 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
//@Component
|
||||
public class CompanyUpdateMapStore extends BusinessEventMapStore<CompanyUpdate> {
|
||||
public class CompanyHistoryMapStore extends BusinessEventMapStore<CompanyHistory> {
|
||||
|
||||
public CompanyUpdateMapStore(JdbcTemplate jdbcTemplate) {
|
||||
public CompanyHistoryMapStore(JdbcTemplate jdbcTemplate) {
|
||||
super(jdbcTemplate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTableName() {
|
||||
return "COMPANY_UPDATE";
|
||||
return "COMPANY_HISTORY";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -47,18 +47,18 @@ public class CompanyUpdateMapStore extends BusinessEventMapStore<CompanyUpdate>
|
|||
protected final String insertCompanyInfoStatement = DbUtilsHelper.createUpdateOrInsert("COMPANY_INFO", getFieldsForCompanyInfo(), "id");
|
||||
|
||||
@Override
|
||||
public void store(Map<Long, CompanyUpdate> map) {
|
||||
public void store(Map<Long, CompanyHistory> map) {
|
||||
List<Object[]> batchArgs = new ArrayList<>();
|
||||
List<Object[]> batchCompanyInfoArgs = new ArrayList<>();
|
||||
|
||||
for (Map.Entry<Long, CompanyUpdate> entry : map.entrySet()) {
|
||||
CompanyUpdate companyUpdate = entry.getValue();
|
||||
Company company = companyUpdate.getObject();
|
||||
for (Map.Entry<Long, CompanyHistory> entry : map.entrySet()) {
|
||||
CompanyHistory companyHistory = entry.getValue();
|
||||
Company company = companyHistory.getObject();
|
||||
|
||||
Object[] args = new Object[]{
|
||||
companyUpdate.getId(),
|
||||
TimeUtil.fromInstant(companyUpdate.getEventTime()),
|
||||
companyUpdate.getUserId(),
|
||||
companyHistory.getId(),
|
||||
TimeUtil.fromInstant(companyHistory.getEventTime()),
|
||||
companyHistory.getUserId(),
|
||||
|
||||
company.getId(), // company_id
|
||||
TimeUtil.fromInstant(company.getCreated()),
|
||||
|
|
@ -74,7 +74,7 @@ public class CompanyUpdateMapStore extends BusinessEventMapStore<CompanyUpdate>
|
|||
if (company.getProfile() != null) {
|
||||
company.getProfile().setId(company.getId());
|
||||
company.getProfile().setCompanyId(company.getId());
|
||||
List<Object> companyInfoArgs = new ArrayList<>(companyInfoToSQLArgs(company.getProfile(), companyUpdate));
|
||||
List<Object> companyInfoArgs = new ArrayList<>(companyInfoToSQLArgs(company.getProfile(), companyHistory));
|
||||
|
||||
batchCompanyInfoArgs.add(companyInfoArgs.toArray());
|
||||
}
|
||||
|
|
@ -90,7 +90,7 @@ public class CompanyUpdateMapStore extends BusinessEventMapStore<CompanyUpdate>
|
|||
* @param companyInfo должен быть заполнен id, company_id = company.id
|
||||
* @return
|
||||
*/
|
||||
protected List<Object> companyInfoToSQLArgs(@NonNull CompanyInfo companyInfo, CompanyUpdate rootUpdate) {
|
||||
protected List<Object> companyInfoToSQLArgs(@NonNull CompanyInfo companyInfo, CompanyHistory rootUpdate) {
|
||||
return new ArrayList<>(Arrays.asList(
|
||||
rootUpdate.getId(),
|
||||
TimeUtil.fromInstant(rootUpdate.getEventTime()),
|
||||
|
|
@ -2,9 +2,9 @@ package ru.spcex.clearing.imdg.businessevent;
|
|||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.clearing.classes.StaticData.Account.InformationAccount;
|
||||
import ru.clearing.classes.StaticData.Account.InformationAccountHistory;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import com.spicex.Static.Account.InformationAccount;
|
||||
import com.spicex.Static.Account.InformationAccountUpdate;
|
||||
import ru.spcex.clearing.imdg.base.TemplateEventMapStore;
|
||||
import ru.spcex.clearing.imdg.utils.DbUtilsHelper;
|
||||
import ru.spcex.clearing.imdg.utils.TimeUtil;
|
||||
|
|
@ -14,7 +14,7 @@ import java.sql.SQLException;
|
|||
import java.util.*;
|
||||
|
||||
@Component
|
||||
public class InformationAccountUpdateMapStore extends TemplateEventMapStore<InformationAccountUpdate> {
|
||||
public class InformationAccountUpdateMapStore extends TemplateEventMapStore<InformationAccountHistory> {
|
||||
|
||||
public InformationAccountUpdateMapStore(JdbcTemplate jdbcTemplate) {
|
||||
super(jdbcTemplate);
|
||||
|
|
@ -22,28 +22,28 @@ public class InformationAccountUpdateMapStore extends TemplateEventMapStore<Info
|
|||
|
||||
@Override
|
||||
public String getMapName() {
|
||||
return IMDGDistributedNames.Map_InformationAccountUpdate;
|
||||
return IMDGDistributedNames.Map_InformationAccountHistory;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTableName() {
|
||||
return "INFORMATION_ACCOUNT_UPDATE";
|
||||
return "INFORMATION_ACCOUNT_HISTORY";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getFields() {
|
||||
return new String[]{"ID","EVENT_TIME", "EVENT_USER_ID",
|
||||
INFORMATION_ACCOUNT_ "ID", "ACCOUNT_ID", "ACCOUNT", "CLEARING_ACCOUNT_ID"
|
||||
"INFORMATION_ACCOUNT_ID", "ACCOUNT_ID", "ACCOUNT", "CLEARING_ACCOUNT_ID"
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] objectToField(InformationAccount updateLog) {
|
||||
public Object[] objectToField(InformationAccountHistory updateLog) {
|
||||
InformationAccount object=updateLog.getObject();
|
||||
Object[] args = new Object[]{
|
||||
updateLog.getId(),
|
||||
updateLog.getEventTime(),
|
||||
updateLog.getEventUserId(),
|
||||
updateLog.getUserId(),
|
||||
|
||||
object.getId(),
|
||||
object.getAccountId(),
|
||||
|
|
|
|||
|
|
@ -2,32 +2,29 @@ package ru.spcex.clearing.imdg.businessevent;
|
|||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.clearing.classes.StaticData.Company.Relation.Relation;
|
||||
import ru.clearing.classes.StaticData.Company.Relation.RelationHistory;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import com.spicex.Static.company.Relation.Relation;
|
||||
import com.spicex.Static.company.Relation.RelationUpdate;
|
||||
import ru.spcex.clearing.imdg.base.TemplateEventMapStore;
|
||||
import ru.spcex.clearing.imdg.utils.DbUtilsHelper;
|
||||
import ru.spcex.clearing.imdg.utils.TimeUtil;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
|
||||
@Component
|
||||
public class RelationUpdateMapStore extends TemplateEventMapStore<RelationUpdate> {
|
||||
public class RelationHistoryMapStore extends TemplateEventMapStore<RelationHistory> {
|
||||
|
||||
public RelationUpdateMapStore(JdbcTemplate jdbcTemplate) {
|
||||
public RelationHistoryMapStore(JdbcTemplate jdbcTemplate) {
|
||||
super(jdbcTemplate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMapName() {
|
||||
return IMDGDistributedNames.Map_RelationUpdate;
|
||||
return IMDGDistributedNames.Map_RelationHistory;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTableName() {
|
||||
return "RELATION_UPDATE";
|
||||
return "RELATION_HISTORY";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -38,16 +35,16 @@ public class RelationUpdateMapStore extends TemplateEventMapStore<RelationUpdate
|
|||
}
|
||||
|
||||
@Override
|
||||
public Object[] objectToField(Relation updateLog) {
|
||||
public Object[] objectToField(RelationHistory updateLog) {
|
||||
Relation object=updateLog.getObject();
|
||||
Object[] args = new Object[]{
|
||||
updateLog.getId(),
|
||||
updateLog.getEventTime(),
|
||||
updateLog.getEventUserId(),
|
||||
updateLog.getUserId(),
|
||||
|
||||
object.getId(),
|
||||
TimeUtil.fromInstant(object.getCreatedAt()),
|
||||
TimeUtil.fromInstant(object.getUpdatedAt()),
|
||||
TimeUtil.fromInstant(object.getCreated()),
|
||||
TimeUtil.fromInstant(object.getUpdated()),
|
||||
object.getConsumerId(),
|
||||
object.getSupplierId(),
|
||||
object.getServiceStatus(),
|
||||
|
|
@ -2,9 +2,9 @@ package ru.spcex.clearing.imdg.businessevent;
|
|||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.clearing.classes.statics.data.security.Security;
|
||||
import ru.clearing.classes.statics.data.security.SecurityHistory;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import com.spicex.Static.company.Relation.Service;
|
||||
import com.spicex.Static.company.Relation.ServiceUpdate;
|
||||
import ru.spcex.clearing.imdg.base.TemplateEventMapStore;
|
||||
import ru.spcex.clearing.imdg.utils.DbUtilsHelper;
|
||||
import ru.spcex.clearing.imdg.utils.TimeUtil;
|
||||
|
|
@ -14,40 +14,40 @@ import java.sql.SQLException;
|
|||
import java.util.*;
|
||||
|
||||
@Component
|
||||
public class SecurityUpdateMapStore extends TemplateEventMapStore<SecurityUpdate> {
|
||||
public class SecurityHistoryMapStore extends TemplateEventMapStore<SecurityHistory> {
|
||||
|
||||
public SecurityUpdateMapStore(JdbcTemplate jdbcTemplate) {
|
||||
public SecurityHistoryMapStore(JdbcTemplate jdbcTemplate) {
|
||||
super(jdbcTemplate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMapName() {
|
||||
return IMDGDistributedNames.Map_SecurityUpdate;
|
||||
return IMDGDistributedNames.Map_SecurityHistory;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTableName() {
|
||||
return "SECURITY_UPDATE";
|
||||
return "SECURITY_HISTORY";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getFields() {
|
||||
return new String[]{"ID","EVENT_TIME", "EVENT_USER_ID",
|
||||
SECURITY_ "ID", "CREATED_AT", "UPDATED_AT", "INSTRUMENT_TYPE", "ISSUER_ID", "SHORT_NAME", "FULL_NAME", "SHORT_NAME_ENG", "FULL_NAME_ENG", "SECURITY_SYMBOL", "WORKFLOW_STATUS"
|
||||
"SECURITY_ID", "CREATED_AT", "UPDATED_AT", "INSTRUMENT_TYPE", "ISSUER_ID", "SHORT_NAME", "FULL_NAME", "SHORT_NAME_ENG", "FULL_NAME_ENG", "SECURITY_SYMBOL", "WORKFLOW_STATUS"
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] objectToField(Security updateLog) {
|
||||
public Object[] objectToField(SecurityHistory updateLog) {
|
||||
Security object=updateLog.getObject();
|
||||
Object[] args = new Object[]{
|
||||
updateLog.getId(),
|
||||
updateLog.getEventTime(),
|
||||
updateLog.getEventUserId(),
|
||||
updateLog.getUserId(),
|
||||
|
||||
object.getId(),
|
||||
TimeUtil.fromInstant(object.getCreatedAt()),
|
||||
TimeUtil.fromInstant(object.getUpdatedAt()),
|
||||
TimeUtil.fromInstant(object.getCreated()),
|
||||
TimeUtil.fromInstant(object.getUpdated()),
|
||||
object.getInstrumentType(),
|
||||
object.getIssuerId(),
|
||||
object.getShortName(),
|
||||
|
|
@ -115,9 +115,9 @@ public class CompanyMapStore extends BusinessObjectMapStore<Company> {
|
|||
companyInfo.setFullName(rs.getString("FullName"));
|
||||
companyInfo.setShortNameEng(rs.getString("ShortNameEng"));
|
||||
companyInfo.setFullNameEng(rs.getString("FullNameEng"));
|
||||
companyInfo.setTradingCode(resultSet.getObject("TRADING_CODE", String.class));
|
||||
companyInfo.setClearingCode(resultSet.getObject("CLEARING_CODE", String.class));
|
||||
companyInfo.setRegistrationCode(resultSet.getObject("REGISTRATION_CODE", String.class));
|
||||
companyInfo.setTradingCode(rs.getObject("TRADING_CODE", String.class));
|
||||
companyInfo.setClearingCode(rs.getObject("CLEARING_CODE", String.class));
|
||||
companyInfo.setRegistrationCode(rs.getObject("REGISTRATION_CODE", String.class));
|
||||
return companyInfo;
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -2,15 +2,13 @@ package ru.spcex.clearing.imdg.businessobject;
|
|||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.clearing.classes.statics.data.messages.ErrorText;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import com.moex.spicex.Static.ErrorText;
|
||||
import ru.spcex.clearing.imdg.base.TemplateMapStore;
|
||||
import ru.spcex.clearing.imdg.utils.DbUtilsHelper;
|
||||
import ru.spcex.clearing.imdg.utils.TimeUtil;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
|
||||
@Component
|
||||
public class ErrorTextMapStore extends TemplateMapStore<ErrorText> {
|
||||
|
|
@ -40,8 +38,8 @@ public class ErrorTextMapStore extends TemplateMapStore<ErrorText> {
|
|||
public ErrorText objectReader(ResultSet resultSet) throws SQLException {
|
||||
ErrorText object = new ErrorText();
|
||||
object.setId(resultSet.getObject("ID", Long.class));
|
||||
object.setCreatedAt(getInstantFromTimestamp(resultSet, "CREATED_AT"));
|
||||
object.setUpdatedAt(getInstantFromTimestamp(resultSet, "UPDATED_AT"));
|
||||
object.setCreated(getInstantFromTimestamp(resultSet, "CREATED_AT"));
|
||||
object.setUpdated(getInstantFromTimestamp(resultSet, "UPDATED_AT"));
|
||||
object.setErrorCode(resultSet.getObject("ERROR_CODE", String.class));
|
||||
object.setText(resultSet.getObject("TEXT", String.class));
|
||||
object.setUserId(resultSet.getObject("USER_ID", Long.class));
|
||||
|
|
@ -53,8 +51,8 @@ public class ErrorTextMapStore extends TemplateMapStore<ErrorText> {
|
|||
public Object[] objectToField(ErrorText object) {
|
||||
Object[] args = new Object[]{
|
||||
object.getId(),
|
||||
TimeUtil.fromInstant(object.getCreatedAt()),
|
||||
TimeUtil.fromInstant(object.getUpdatedAt()),
|
||||
TimeUtil.fromInstant(object.getCreated()),
|
||||
TimeUtil.fromInstant(object.getUpdated()),
|
||||
object.getErrorCode(),
|
||||
object.getText(),
|
||||
object.getUserId(),
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ package ru.spcex.clearing.imdg.businessobject;
|
|||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.clearing.classes.statics.data.security.Security;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import com.spicex.Static.company.Relation.Service;
|
||||
import ru.spcex.clearing.imdg.base.TemplateMapStore;
|
||||
import ru.spcex.clearing.imdg.utils.DbUtilsHelper;
|
||||
import ru.spcex.clearing.imdg.utils.TimeUtil;
|
||||
|
|
@ -40,8 +40,8 @@ public class SecurityMapStore extends TemplateMapStore<Security> {
|
|||
public Security objectReader(ResultSet resultSet) throws SQLException {
|
||||
Security object = new Security();
|
||||
object.setId(resultSet.getObject("ID", Long.class));
|
||||
object.setCreatedAt(getInstantFromTimestamp(resultSet, "CREATED_AT"));
|
||||
object.setUpdatedAt(getInstantFromTimestamp(resultSet, "UPDATED_AT"));
|
||||
object.setCreated(getInstantFromTimestamp(resultSet, "CREATED_AT"));
|
||||
object.setUpdated(getInstantFromTimestamp(resultSet, "UPDATED_AT"));
|
||||
object.setInstrumentType(resultSet.getObject("INSTRUMENT_TYPE", String.class));
|
||||
object.setIssuerId(resultSet.getObject("ISSUER_ID", Long.class));
|
||||
object.setShortName(resultSet.getObject("SHORT_NAME", String.class));
|
||||
|
|
@ -57,8 +57,8 @@ public class SecurityMapStore extends TemplateMapStore<Security> {
|
|||
public Object[] objectToField(Security object) {
|
||||
Object[] args = new Object[]{
|
||||
object.getId(),
|
||||
TimeUtil.fromInstant(object.getCreatedAt()),
|
||||
TimeUtil.fromInstant(object.getUpdatedAt()),
|
||||
TimeUtil.fromInstant(object.getCreated()),
|
||||
TimeUtil.fromInstant(object.getUpdated()),
|
||||
object.getInstrumentType(),
|
||||
object.getIssuerId(),
|
||||
object.getShortName(),
|
||||
|
|
|
|||
|
|
@ -2,12 +2,13 @@ package ru.spcex.clearing.imdg.businessobject;
|
|||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.clearing.classes.statics.data.statement.Statement;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import com.moex.platform.classes.TransactionData.Execution.LiabilitiesClaimsAssets;
|
||||
import ru.spcex.clearing.imdg.base.TemplateMapStore;
|
||||
import ru.spcex.clearing.imdg.utils.DbUtilsHelper;
|
||||
import ru.spcex.clearing.imdg.utils.TimeUtil;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
|
|
@ -42,8 +43,8 @@ public class StatementMapStore extends TemplateMapStore<Statement> {
|
|||
object.setId(resultSet.getObject("ID", Long.class));
|
||||
object.setAddresseeId(resultSet.getObject("ADDRESSEE_ID", Long.class));
|
||||
object.setSenderId(resultSet.getObject("SENDER_ID", Long.class));
|
||||
object.setCreatedAt(getInstantFromTimestamp(resultSet, "CREATED_AT"));
|
||||
object.setUpdatedAt(getInstantFromTimestamp(resultSet, "UPDATED_AT"));
|
||||
object.setCreated(getInstantFromTimestamp(resultSet, "CREATED_AT"));
|
||||
object.setUpdated(getInstantFromTimestamp(resultSet, "UPDATED_AT"));
|
||||
object.setClearingDate(getInstantFromTimestamp(resultSet, "CLEARING_DATE"));
|
||||
object.setStatementTypeId(resultSet.getObject("STATEMENT_TYPE_ID", Long.class));
|
||||
object.setComment(resultSet.getObject("COMMENT", String.class));
|
||||
|
|
@ -67,8 +68,8 @@ public class StatementMapStore extends TemplateMapStore<Statement> {
|
|||
object.getId(),
|
||||
object.getAddresseeId(),
|
||||
object.getSenderId(),
|
||||
TimeUtil.fromInstant(object.getCreatedAt()),
|
||||
TimeUtil.fromInstant(object.getUpdatedAt()),
|
||||
TimeUtil.fromInstant(object.getCreated()),
|
||||
TimeUtil.fromInstant(object.getUpdated()),
|
||||
TimeUtil.fromInstant(object.getClearingDate()),
|
||||
object.getStatementTypeId(),
|
||||
object.getComment(),
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.context.annotation.Configuration;
|
||||
import ru.spcex.clearing.imdg.base.AutoconfiguredMap;
|
||||
import ru.spcex.clearing.imdg.base.DictionaryTMapStore;
|
||||
import ru.spcex.clearing.imdg.businessevent.CompanyUpdateMapStore;
|
||||
import ru.spcex.clearing.imdg.businessevent.CompanyHistoryMapStore;
|
||||
import ru.spcex.clearing.imdg.businessobject.CompanyMapStore;
|
||||
import ru.spcex.clearing.imdg.dictionary.*;
|
||||
import ru.spcex.clearing.imdg.object.CompanySymbolsMapStore;
|
||||
|
|
@ -221,9 +221,9 @@ public class PoolMapConfigs {
|
|||
}
|
||||
|
||||
// @Autowired
|
||||
private CompanyUpdateMapStore companyUpdateMapStore;
|
||||
private CompanyHistoryMapStore companyHistoryMapStore;
|
||||
|
||||
public MapConfig map_CompanyUpdate() {
|
||||
return makeDefaultMapConfig(IMDGDistributedNames.Map_CompanyUpdate, companyUpdateMapStore);
|
||||
return makeDefaultMapConfig(IMDGDistributedNames.Map_CompanyHistory, companyHistoryMapStore);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public class BankAccountMapStore extends TemplateMapStore<BankAccount> {
|
|||
@Override
|
||||
public String[] getFields() {
|
||||
return new String[]{
|
||||
"ID", "ACCOUNT_ID", "BANK_IDENTIFICATION_CODE", "BANK_NAME", "CORRESPONDENT_ACCOUNT_NAME", "CURRENCY", "DESTINATION", "IBAN", "INTERNATIONAL_TRANSFER_SIGN", "SWIFT_CODE", "TAXPAYER_IDENTIFICATION_NUMBER", "TAX_REGISTRATION_REASON_CODE", "ACCOUNT"
|
||||
"ID", "ACCOUNT_ID", "BANK_IDENTIFICATION_CODE", "BANK_NAME", "CORRESPONDENT_ACCOUNT", "CORRESPONDENT_ACCOUNT_NAME", "CURRENCY", "DESTINATION", "IBAN", "INTERNATIONAL_TRANSFER_SIGN", "SWIFT_CODE", "TAXPAYER_IDENTIFICATION_NUMBER", "TAX_REGISTRATION_REASON_CODE", "ACCOUNT"
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -43,6 +43,7 @@ public class BankAccountMapStore extends TemplateMapStore<BankAccount> {
|
|||
object.setAccountId(resultSet.getObject("ACCOUNT_ID", Long.class));
|
||||
object.setBankIdentificationCode(resultSet.getObject("BANK_IDENTIFICATION_CODE", String.class));
|
||||
object.setBankName(resultSet.getObject("BANK_NAME", String.class));
|
||||
object.setCorrespondentAccount(resultSet.getObject("CORRESPONDENT_ACCOUNT", String.class));
|
||||
object.setCorrespondentAccountName(resultSet.getObject("CORRESPONDENT_ACCOUNT_NAME", String.class));
|
||||
object.setCurrency(resultSet.getObject("CURRENCY", String.class));
|
||||
object.setDestination(resultSet.getObject("DESTINATION", String.class));
|
||||
|
|
@ -62,6 +63,7 @@ public class BankAccountMapStore extends TemplateMapStore<BankAccount> {
|
|||
object.getAccountId(),
|
||||
object.getBankIdentificationCode(),
|
||||
object.getBankName(),
|
||||
object.getCorrespondentAccount(),
|
||||
object.getCorrespondentAccountName(),
|
||||
object.getCurrency(),
|
||||
object.getDestination(),
|
||||
|
|
@ -75,5 +77,4 @@ public class BankAccountMapStore extends TemplateMapStore<BankAccount> {
|
|||
return args;
|
||||
}
|
||||
|
||||
}
|
||||
// todo Сделать BusinessEventMapStore BankAccountUpdateMapStore
|
||||
}
|
||||
|
|
@ -2,8 +2,8 @@ package ru.spcex.clearing.imdg.object;
|
|||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.clearing.classes.StaticData.Account.InformationAccount;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import com.spicex.Static.Account.InformationAccount;
|
||||
import ru.spcex.clearing.imdg.base.TemplateMapStore;
|
||||
import ru.spcex.clearing.imdg.utils.DbUtilsHelper;
|
||||
import ru.spcex.clearing.imdg.utils.TimeUtil;
|
||||
|
|
|
|||
|
|
@ -2,12 +2,13 @@ package ru.spcex.clearing.imdg.object;
|
|||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.clearing.classes.statics.data.sdf.RequestDf03;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import com.spicex.Static.;
|
||||
import ru.spcex.clearing.imdg.base.TemplateMapStore;
|
||||
import ru.spcex.clearing.imdg.utils.DbUtilsHelper;
|
||||
import ru.spcex.clearing.imdg.utils.TimeUtil;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
|
|
|
|||
|
|
@ -2,12 +2,13 @@ package ru.spcex.clearing.imdg.object;
|
|||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.clearing.classes.statics.data.sdf.RequestDf05;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import com.spicex.Static.;
|
||||
import ru.spcex.clearing.imdg.base.TemplateMapStore;
|
||||
import ru.spcex.clearing.imdg.utils.DbUtilsHelper;
|
||||
import ru.spcex.clearing.imdg.utils.TimeUtil;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
|
|
|
|||
|
|
@ -2,12 +2,13 @@ package ru.spcex.clearing.imdg.object;
|
|||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.clearing.classes.statics.data.sdf.RequestDf18;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import com.spicex.Static.;
|
||||
import ru.spcex.clearing.imdg.base.TemplateMapStore;
|
||||
import ru.spcex.clearing.imdg.utils.DbUtilsHelper;
|
||||
import ru.spcex.clearing.imdg.utils.TimeUtil;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ package ru.spcex.clearing.imdg.object;
|
|||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.clearing.classes.statics.data.sdf.SDf01;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import com.spicex.Static.;
|
||||
import ru.spcex.clearing.imdg.base.TemplateMapStore;
|
||||
import ru.spcex.clearing.imdg.utils.DbUtilsHelper;
|
||||
import ru.spcex.clearing.imdg.utils.TimeUtil;
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ package ru.spcex.clearing.imdg.object;
|
|||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.clearing.classes.statics.data.sdf.SDf02;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import com.spicex.Static.;
|
||||
import ru.spcex.clearing.imdg.base.TemplateMapStore;
|
||||
import ru.spcex.clearing.imdg.utils.DbUtilsHelper;
|
||||
import ru.spcex.clearing.imdg.utils.TimeUtil;
|
||||
|
|
|
|||
|
|
@ -2,12 +2,13 @@ package ru.spcex.clearing.imdg.object;
|
|||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.clearing.classes.statics.data.sdf.SDf08;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import com.spicex.Static.;
|
||||
import ru.spcex.clearing.imdg.base.TemplateMapStore;
|
||||
import ru.spcex.clearing.imdg.utils.DbUtilsHelper;
|
||||
import ru.spcex.clearing.imdg.utils.TimeUtil;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
|
|
|
|||
|
|
@ -2,12 +2,13 @@ package ru.spcex.clearing.imdg.object;
|
|||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.clearing.classes.statics.data.sdf.SDf16;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import com.spicex.Static.;
|
||||
import ru.spcex.clearing.imdg.base.TemplateMapStore;
|
||||
import ru.spcex.clearing.imdg.utils.DbUtilsHelper;
|
||||
import ru.spcex.clearing.imdg.utils.TimeUtil;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import org.slf4j.LoggerFactory;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import ru.clearing.classes.statics.data.company.Company;
|
||||
import ru.clearing.classes.statics.data.company.CompanyUpdate;
|
||||
import ru.clearing.classes.statics.data.company.CompanyHistory;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
|
||||
@Service
|
||||
|
|
@ -30,10 +30,10 @@ public class UpdateMapService extends AbstractUpdateMapService {
|
|||
log.debug("{} {}", event, eventType);
|
||||
Object value = (EVENT_DELETE.equals(eventType) ? event.getOldValue() : event.getValue());
|
||||
if (value instanceof Company) {
|
||||
CompanyUpdate companyUpdate = new CompanyUpdate();
|
||||
createBusinessEvent(companyUpdate, eventType);
|
||||
companyUpdate.setObject((Company) value);
|
||||
hazelcastServerInstance.getMap(IMDGDistributedNames.Map_CompanyUpdate).put(companyUpdate.getId(), companyUpdate);
|
||||
CompanyHistory companyHistory = new CompanyHistory();
|
||||
createBusinessEvent(companyHistory, eventType);
|
||||
companyHistory.setObject((Company) value);
|
||||
hazelcastServerInstance.getMap(IMDGDistributedNames.Map_CompanyHistory).put(companyHistory.getId(), companyHistory);
|
||||
} else {
|
||||
log.error("unexpected event {}", event);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,18 +8,36 @@ public final class IMDGDistributedNames {
|
|||
}
|
||||
|
||||
public static final String Map_Company = "Map_Company";
|
||||
public static final String Map_CompanyUpdate = "Map_CompanyUpdate";
|
||||
public static final String Map_CompanyHistory = "Map_CompanyHistory";
|
||||
public static final String Map_CompanyRoleSet = "Map_CompanyRoleSet";
|
||||
public static final String Map_CompanySymbols = "Map_CompanySymbols";
|
||||
// public static final String Map_CompanyInfo = "Map_CompanyInfo"; интегрировано в Map_Company
|
||||
public static final String Map_Contact = "Map_Contact";
|
||||
public static final String Map_ProfileDocument = "Map_ProfileDocument";
|
||||
public static final String Map_Account = "Map_Account";
|
||||
public static final String Map_AccountHistory = "Map_AccountHistory";
|
||||
public static final String Map_Relation = "Map_Relation";
|
||||
public static final String Map_ClearingAccount = "Map_ClearingAccount";
|
||||
public static final String Map_ClearingAccountHistory = "Map_ClearingAccountHistory";
|
||||
public static final String Map_BankAccount = "Map_BankAccount";
|
||||
public static final String Map_BankAccountHistory = "Map_BankAccountHistory";
|
||||
public static final String Map_ClearingMemberCategory = "Map_ClearingMemberCategory";
|
||||
public static final String Map_AccountRouting = "Map_AccountRouting";
|
||||
public static final String Map_AccountRoutingHistory = "Map_AccountRoutingHistory";
|
||||
public static final String Map_InformationAccountHistory = "Map_InformationAccountHistory";
|
||||
public static final String Map_InformationAccount = "Map_InformationAccount";
|
||||
public static final String Map_Security = "Map_Security";
|
||||
public static final String Map_SecurityHistory = "Map_SecurityHistory";
|
||||
public static final String Map_RelationHistory = "Map_RelationHistory";
|
||||
public static final String Map_ErrorText = "Map_ErrorText";
|
||||
public static final String Map_Statement = "Map_Statement";
|
||||
public static final String Map_SDf16 = "Map_SDf16";
|
||||
public static final String Map_RequestDf18 = "Map_RequestDf18";
|
||||
public static final String Map_RequestDf03 = "Map_RequestDf03";
|
||||
public static final String Map_RequestDf05 = "Map_RequestDf05";
|
||||
public static final String Map_SDf08 = "Map_SDf08";
|
||||
public static final String Map_SDf02 = "Map_SDf02";
|
||||
public static final String Map_SDf01 = "Map_SDf01";
|
||||
|
||||
// public static final String Map_InterestStatusDictionary = "Map_InterestStatusDictionary"; future
|
||||
public static final String Map_AllowedDictionary = "Map_AllowedDictionary";
|
||||
|
|
@ -53,6 +71,9 @@ public final class IMDGDistributedNames {
|
|||
public static final String Map_ServiceProductDictionary = "Map_ServiceProductDictionary";
|
||||
public static final String Map_ServiceStatusDictionary = "Map_ServiceStatusDictionary";
|
||||
public static final String Map_StatementTypeDictionary = "Map_StatementTypeDictionary";
|
||||
public static final String Map_TermTypeDictionary = "Map_TermTypeDictionary";
|
||||
public static final String Map_CourierTypeDictionary = "Map_CourierTypeDictionary";
|
||||
public static final String Map_ChargeDirectionDictionary = "Map_ChargeDirectionDictionary";
|
||||
|
||||
public static final String Map_KeyRate = "Map_KeyRate";
|
||||
public static final String Map_MoneyMarketSecurity = "Map_MoneyMarketSecurity";
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue