http://jira.mfd.msk:8088/browse/CLS-33 http://jira.mfd.msk:8088/browse/CLS-34 IMDG новые классы (часть), обновления полей
This commit is contained in:
parent
04e6dbadf2
commit
dc9223b470
45 changed files with 1270 additions and 191 deletions
|
|
@ -15,6 +15,7 @@ public class Account extends BusinessObject {
|
|||
private String accountType;
|
||||
private Long relationId;
|
||||
private String status;
|
||||
private String processingSign;
|
||||
|
||||
public String getAccount() {
|
||||
return account;
|
||||
|
|
@ -48,4 +49,11 @@ public class Account extends BusinessObject {
|
|||
this.status = value;
|
||||
}
|
||||
|
||||
public String getProcessingSign() {
|
||||
return processingSign;
|
||||
}
|
||||
|
||||
public void setProcessingSign(String processingSign) {
|
||||
this.processingSign = processingSign;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package ru.clearing.classes.StaticData.Account;
|
||||
|
||||
import ru.clearing.classes.ConstSerializable;
|
||||
import ru.clearing.classes.objects.BusinessEvent;
|
||||
import java.io.Serial;
|
||||
/**
|
||||
* Изменение состояния объекта Маршрутизация счета
|
||||
*
|
||||
* DB table: ACCOUNT_ROUTING_UPDATE
|
||||
**/
|
||||
public class AccountRoutingUpdate extends BusinessEvent<AccountRouting> {
|
||||
@Serial
|
||||
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||
|
||||
private AccountRouting object;
|
||||
|
||||
@Override
|
||||
public AccountRouting getObject() {
|
||||
return object;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setObject(AccountRouting object) {
|
||||
this.object = object;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package ru.clearing.classes.StaticData.Account;
|
||||
|
||||
import ru.clearing.classes.ConstSerializable;
|
||||
import ru.clearing.classes.objects.BusinessEvent;
|
||||
import java.io.Serial;
|
||||
/**
|
||||
* Изменение состояния объекта Счета
|
||||
*
|
||||
* DB table: ACCOUNT_UPDATE
|
||||
**/
|
||||
public class AccountUpdate extends BusinessEvent<Account> {
|
||||
@Serial
|
||||
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||
|
||||
private Account object;
|
||||
|
||||
@Override
|
||||
public Account getObject() {
|
||||
return object;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setObject(Account object) {
|
||||
this.object = object;
|
||||
}
|
||||
}
|
||||
|
|
@ -22,7 +22,7 @@ public class BankAccount extends SpcexObjectBase {
|
|||
private String swiftCode;
|
||||
private String taxpayerIdentificationNumber;
|
||||
private String taxRegistrationReasonCode;
|
||||
private String correspondentAccount;
|
||||
private String account;
|
||||
|
||||
public Long getAccountId() {
|
||||
return accountId;
|
||||
|
|
@ -112,12 +112,11 @@ public class BankAccount extends SpcexObjectBase {
|
|||
this.taxRegistrationReasonCode = value;
|
||||
}
|
||||
|
||||
public String getCorrespondentAccount() {
|
||||
return correspondentAccount;
|
||||
public String getAccount() {
|
||||
return account;
|
||||
}
|
||||
|
||||
public void setCorrespondentAccount(String value) {
|
||||
this.correspondentAccount = value;
|
||||
public void setAccount(String account) {
|
||||
this.account = account;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
package ru.clearing.classes.StaticData.Account;
|
||||
import ru.clearing.classes.ConstSerializable;
|
||||
import ru.clearing.classes.objects.BusinessEvent;
|
||||
import java.io.Serial;
|
||||
/**
|
||||
* Изменение состояния объекта Банковские реквизиты для перечисления денежных средств
|
||||
*
|
||||
* DB table: BANK_ACCOUNT_UPDATE
|
||||
**/
|
||||
public class BankAccountUpdate extends BusinessEvent<BankAccount> {
|
||||
@Serial
|
||||
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||
|
||||
private BankAccount object;
|
||||
|
||||
@Override
|
||||
public BankAccount getObject() {
|
||||
return object;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setObject(BankAccount object) {
|
||||
this.object = object;
|
||||
}
|
||||
}
|
||||
|
|
@ -12,9 +12,7 @@ public class ClearingAccount extends SpcexObjectBase {
|
|||
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||
|
||||
private Long accountId;
|
||||
private Long cashAccountId;
|
||||
private Long depoAccountId;
|
||||
private String settlementCode;
|
||||
private String account;
|
||||
|
||||
public Long getAccountId() {
|
||||
return accountId;
|
||||
|
|
@ -24,28 +22,11 @@ public class ClearingAccount extends SpcexObjectBase {
|
|||
this.accountId = value;
|
||||
}
|
||||
|
||||
public Long getCashAccountId() {
|
||||
return cashAccountId;
|
||||
public String getAccount() {
|
||||
return account;
|
||||
}
|
||||
|
||||
public void setCashAccountId(Long value) {
|
||||
this.cashAccountId = value;
|
||||
public void setAccount(String account) {
|
||||
this.account = account;
|
||||
}
|
||||
|
||||
public Long getDepoAccountId() {
|
||||
return depoAccountId;
|
||||
}
|
||||
|
||||
public void setDepoAccountId(Long value) {
|
||||
this.depoAccountId = value;
|
||||
}
|
||||
|
||||
public String getSettlementCode() {
|
||||
return settlementCode;
|
||||
}
|
||||
|
||||
public void setSettlementCode(String value) {
|
||||
this.settlementCode = value;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package ru.clearing.classes.StaticData.Account;
|
||||
|
||||
import ru.clearing.classes.ConstSerializable;
|
||||
import ru.clearing.classes.objects.BusinessEvent;
|
||||
import java.io.Serial;
|
||||
/**
|
||||
* Изменение состояния объекта Клиринговые счета
|
||||
*
|
||||
* DB table: CLEARING_ACCOUNT_UPDATE
|
||||
**/
|
||||
public class ClearingAccountUpdate extends BusinessEvent<ClearingAccount> {
|
||||
@Serial
|
||||
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||
|
||||
private ClearingAccount object;
|
||||
|
||||
@Override
|
||||
public ClearingAccount getObject() {
|
||||
return object;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setObject(ClearingAccount object) {
|
||||
this.object = object;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
package ru.clearing.classes.StaticData.Account;
|
||||
|
||||
import ru.clearing.classes.ConstSerializable;
|
||||
import ru.spcex.platform.classes.base.SpcexObjectBase;
|
||||
/**
|
||||
* Информационные счета
|
||||
*
|
||||
* DB table: INFORMATION_ACCOUNT
|
||||
**/
|
||||
public class InformationAccount extends SpcexObjectBase {
|
||||
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||
|
||||
// (in parent) private Long id;
|
||||
private Long accountId;
|
||||
private String account;
|
||||
private Long clearingAccountId;
|
||||
|
||||
public Long getAccountId() {
|
||||
return accountId;
|
||||
}
|
||||
public void setAccountId(Long value) {
|
||||
this.accountId=value;
|
||||
}
|
||||
|
||||
public String getAccount() {
|
||||
return account;
|
||||
}
|
||||
public void setAccount(String value) {
|
||||
this.account=value;
|
||||
}
|
||||
|
||||
public Long getClearingAccountId() {
|
||||
return clearingAccountId;
|
||||
}
|
||||
public void setClearingAccountId(Long value) {
|
||||
this.clearingAccountId=value;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package ru.clearing.classes.StaticData.Account;
|
||||
|
||||
import ru.clearing.classes.ConstSerializable;
|
||||
import ru.clearing.classes.objects.BusinessEvent;
|
||||
import java.io.Serial;
|
||||
/**
|
||||
* Изменение состояния объекта Информационные счета
|
||||
*
|
||||
* DB table: INFORMATION_ACCOUNT_UPDATE
|
||||
**/
|
||||
public class InformationAccountUpdate extends BusinessEvent<InformationAccount> {
|
||||
@Serial
|
||||
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||
|
||||
private InformationAccount object;
|
||||
|
||||
@Override
|
||||
public InformationAccount getObject() {
|
||||
return object;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setObject(InformationAccount object) {
|
||||
this.object = object;
|
||||
}
|
||||
}
|
||||
|
|
@ -15,8 +15,8 @@ public class Relation extends BusinessObject {
|
|||
private Long consumerId;
|
||||
private Long supplierId;
|
||||
private String serviceStatus;
|
||||
private Long serviceId;
|
||||
private Long serviceProductId;
|
||||
private Long service;
|
||||
private Long serviceProduct;
|
||||
private String comment;
|
||||
|
||||
public Long getConsumerId() {
|
||||
|
|
@ -43,20 +43,20 @@ public class Relation extends BusinessObject {
|
|||
this.serviceStatus = value;
|
||||
}
|
||||
|
||||
public Long getServiceId() {
|
||||
return serviceId;
|
||||
public Long getService() {
|
||||
return service;
|
||||
}
|
||||
|
||||
public void setServiceId(Long value) {
|
||||
this.serviceId = value;
|
||||
public void setService(Long value) {
|
||||
this.service = value;
|
||||
}
|
||||
|
||||
public Long getServiceProductId() {
|
||||
return serviceProductId;
|
||||
public Long getServiceProduct() {
|
||||
return serviceProduct;
|
||||
}
|
||||
|
||||
public void setServiceProductId(Long value) {
|
||||
this.serviceProductId = value;
|
||||
public void setServiceProduct(Long value) {
|
||||
this.serviceProduct = value;
|
||||
}
|
||||
|
||||
public String getComment() {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,26 @@
|
|||
package ru.clearing.classes.StaticData.Company.Relation;
|
||||
|
||||
import ru.clearing.classes.ConstSerializable;
|
||||
import ru.clearing.classes.objects.BusinessEvent;
|
||||
import java.io.Serial;
|
||||
/**
|
||||
* ИЗменение состояния объекта Договорные отношения
|
||||
*
|
||||
* DB table: RELATION_UPDATE
|
||||
**/
|
||||
public class RelationUpdate extends BusinessEvent<Relation> {
|
||||
@Serial
|
||||
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||
|
||||
private Relation object;
|
||||
|
||||
@Override
|
||||
public Relation getObject() {
|
||||
return object;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setObject(Relation object) {
|
||||
this.object = object;
|
||||
}
|
||||
}
|
||||
|
|
@ -13,9 +13,13 @@ public class Company extends BusinessObject {
|
|||
@Serial
|
||||
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||
|
||||
private String tradingCode;
|
||||
private String clearingCode;
|
||||
private String exchangeCode;
|
||||
private Long statusId; // WorkflowStatusDictionary
|
||||
private String registrationCode;
|
||||
private String workflowStatus; // WorkflowStatusDictionary
|
||||
private String shortName;
|
||||
private String fullName;
|
||||
|
||||
private CompanyInfo profile;
|
||||
|
||||
@Override
|
||||
|
|
@ -29,6 +33,14 @@ public class Company extends BusinessObject {
|
|||
'}';
|
||||
}
|
||||
|
||||
public String getTradingCode() {
|
||||
return tradingCode;
|
||||
}
|
||||
|
||||
public void setTradingCode(String tradingCode) {
|
||||
this.tradingCode = tradingCode;
|
||||
}
|
||||
|
||||
public String getClearingCode() {
|
||||
return clearingCode;
|
||||
}
|
||||
|
|
@ -37,20 +49,36 @@ public class Company extends BusinessObject {
|
|||
this.clearingCode = clearingCode;
|
||||
}
|
||||
|
||||
public String getExchangeCode() {
|
||||
return exchangeCode;
|
||||
public String getRegistrationCode() {
|
||||
return registrationCode;
|
||||
}
|
||||
|
||||
public void setExchangeCode(String exchangeCode) {
|
||||
this.exchangeCode = exchangeCode;
|
||||
public void setRegistrationCode(String registrationCode) {
|
||||
this.registrationCode = registrationCode;
|
||||
}
|
||||
|
||||
public Long getStatusId() {
|
||||
return statusId;
|
||||
public String getWorkflowStatus() {
|
||||
return workflowStatus;
|
||||
}
|
||||
|
||||
public void setStatusId(Long statusId) {
|
||||
this.statusId = statusId;
|
||||
public void setWorkflowStatus(String workflowStatus) {
|
||||
this.workflowStatus = workflowStatus;
|
||||
}
|
||||
|
||||
public String getShortName() {
|
||||
return shortName;
|
||||
}
|
||||
|
||||
public void setShortName(String shortName) {
|
||||
this.shortName = shortName;
|
||||
}
|
||||
|
||||
public String getFullName() {
|
||||
return fullName;
|
||||
}
|
||||
|
||||
public void setFullName(String fullName) {
|
||||
this.fullName = fullName;
|
||||
}
|
||||
|
||||
public CompanyInfo getProfile() {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,9 @@ public class CompanyInfo extends SpcexObjectBase {
|
|||
private String fullName;
|
||||
private String shortNameEng;
|
||||
private String fullNameEng;
|
||||
private String tradingCode;
|
||||
private String clearingCode;
|
||||
private String registrationCode;
|
||||
|
||||
public Long getCompanyId() {
|
||||
return companyId;
|
||||
|
|
@ -126,4 +129,28 @@ public class CompanyInfo extends SpcexObjectBase {
|
|||
public void setFullNameEng(String fullNameEng) {
|
||||
this.fullNameEng = fullNameEng;
|
||||
}
|
||||
|
||||
public String getTradingCode() {
|
||||
return tradingCode;
|
||||
}
|
||||
|
||||
public void setTradingCode(String tradingCode) {
|
||||
this.tradingCode = tradingCode;
|
||||
}
|
||||
|
||||
public String getClearingCode() {
|
||||
return clearingCode;
|
||||
}
|
||||
|
||||
public void setClearingCode(String clearingCode) {
|
||||
this.clearingCode = clearingCode;
|
||||
}
|
||||
|
||||
public String getRegistrationCode() {
|
||||
return registrationCode;
|
||||
}
|
||||
|
||||
public void setRegistrationCode(String registrationCode) {
|
||||
this.registrationCode = registrationCode;
|
||||
}
|
||||
}
|
||||
|
|
@ -22,6 +22,7 @@ public class ProfileDocument extends SpcexObjectBase {
|
|||
private String place;
|
||||
private Instant validFromDate;
|
||||
private Instant validToDate;
|
||||
private String link;
|
||||
|
||||
public Long getCompanyId() {
|
||||
return companyId;
|
||||
|
|
@ -110,4 +111,12 @@ public class ProfileDocument extends SpcexObjectBase {
|
|||
public void setValidToDate(Instant validToDate) {
|
||||
this.validToDate = validToDate;
|
||||
}
|
||||
|
||||
public String getLink() {
|
||||
return link;
|
||||
}
|
||||
|
||||
public void setLink(String link) {
|
||||
this.link = link;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,102 @@
|
|||
package ru.clearing.classes.statics.data.security;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
/**
|
||||
* Инструменты
|
||||
* <p>
|
||||
* DB table: SECURITY
|
||||
**/
|
||||
public class Security extends BusinessObject {
|
||||
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||
|
||||
private String instrumentType;
|
||||
private Long issuerId;
|
||||
private String shortName;
|
||||
private String fullName;
|
||||
private String shortNameEng;
|
||||
private String fullNameEng;
|
||||
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;
|
||||
}
|
||||
|
||||
public void setInstrumentType(String value) {
|
||||
this.instrumentType = value;
|
||||
}
|
||||
|
||||
public Long getIssuerId() {
|
||||
return issuerId;
|
||||
}
|
||||
|
||||
public void setIssuerId(Long value) {
|
||||
this.issuerId = value;
|
||||
}
|
||||
|
||||
public String getShortName() {
|
||||
return shortName;
|
||||
}
|
||||
|
||||
public void setShortName(String value) {
|
||||
this.shortName = value;
|
||||
}
|
||||
|
||||
public String getFullName() {
|
||||
return fullName;
|
||||
}
|
||||
|
||||
public void setFullName(String value) {
|
||||
this.fullName = value;
|
||||
}
|
||||
|
||||
public String getShortNameEng() {
|
||||
return shortNameEng;
|
||||
}
|
||||
|
||||
public void setShortNameEng(String value) {
|
||||
this.shortNameEng = value;
|
||||
}
|
||||
|
||||
public String getFullNameEng() {
|
||||
return fullNameEng;
|
||||
}
|
||||
|
||||
public void setFullNameEng(String value) {
|
||||
this.fullNameEng = value;
|
||||
}
|
||||
|
||||
public String getSecuritySymbol() {
|
||||
return securitySymbol;
|
||||
}
|
||||
|
||||
public void setSecuritySymbol(String value) {
|
||||
this.securitySymbol = value;
|
||||
}
|
||||
|
||||
public String getWorkflowStatus() {
|
||||
return workflowStatus;
|
||||
}
|
||||
|
||||
public void setWorkflowStatus(String value) {
|
||||
this.workflowStatus = value;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package ru.clearing.classes.statics.data.security;
|
||||
|
||||
import ru.clearing.classes.ConstSerializable;
|
||||
import ru.clearing.classes.objects.BusinessEvent;
|
||||
import java.io.Serial;
|
||||
/**
|
||||
* Изменение состояния объекта Инструменты
|
||||
*
|
||||
* DB table: SECURITY_UPDATE
|
||||
**/
|
||||
public class SecurityUpdate extends BusinessEvent<Security> {
|
||||
@Serial
|
||||
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||
|
||||
private Security object;
|
||||
|
||||
@Override
|
||||
public Security getObject() {
|
||||
return object;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setObject(Security object) {
|
||||
this.object = object;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package ru.clearing.platform.dictionary;
|
||||
|
||||
|
||||
/**
|
||||
* Направление начисления комиссии
|
||||
*
|
||||
* Dictionary DB table: CHARGE_DIRECTION_DICTIONARY
|
||||
**/
|
||||
public class ChargeDirectionDictionary extends AbstractDictionary {
|
||||
private static final long serialVersionUID = ConstDictionarySerializable.serialVersionUID;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
package ru.clearing.platform.dictionary;
|
||||
|
||||
/**
|
||||
* Справочник типов комиссий
|
||||
*
|
||||
* Dictionary DB table: CHARGE_TYPE_DICTIONARY
|
||||
**/
|
||||
public class ChargeTypeDictionary extends AbstractDictionary {
|
||||
private static final long serialVersionUID = ConstDictionarySerializable.serialVersionUID;
|
||||
|
||||
}
|
||||
|
|
@ -1,12 +1,11 @@
|
|||
//package ru.clearing.platform.dictionary;
|
||||
//
|
||||
//
|
||||
///**
|
||||
// * Справочник результатов клиринга
|
||||
// *
|
||||
// * Dictionary DB table: CLEARING_STATUS_DICTIONARY
|
||||
// **/
|
||||
//public class ClearingStatusDictionary extends AbstractDictionary {
|
||||
// private static final long serialVersionUID = ConstDictionarySerializable.serialVersionUID;
|
||||
//
|
||||
//}
|
||||
package ru.clearing.platform.dictionary;
|
||||
|
||||
/**
|
||||
* Справочник результатов клиринга
|
||||
*
|
||||
* Dictionary DB table: CLEARING_STATUS_DICTIONARY
|
||||
**/
|
||||
public class ClearingStatusDictionary extends AbstractDictionary {
|
||||
private static final long serialVersionUID = ConstDictionarySerializable.serialVersionUID;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
package ru.clearing.platform.dictionary;
|
||||
|
||||
/**
|
||||
* Способ доставки документа
|
||||
*
|
||||
* Dictionary DB table: COURIER_TYPE_DICTIONARY
|
||||
**/
|
||||
public class CourierTypeDictionary extends AbstractDictionary {
|
||||
private static final long serialVersionUID = ConstDictionarySerializable.serialVersionUID;
|
||||
|
||||
}
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
package ru.clearing.platform.dictionary;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* Dictionary DB table: EXT_ERROR_DICTIONARY
|
||||
**/
|
||||
public class ExtErrorDictionary extends AbstractDictionary {
|
||||
private static final long serialVersionUID = ConstDictionarySerializable.serialVersionUID;
|
||||
|
||||
package ru.clearing.platform.dictionary;
|
||||
|
||||
/**
|
||||
* Коды ошибок
|
||||
*
|
||||
* Dictionary DB table: ERROR_CODE_DICTIONARY
|
||||
**/
|
||||
public class ErrorCodeDictionary extends AbstractDictionary {
|
||||
private static final long serialVersionUID = ConstDictionarySerializable.serialVersionUID;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package ru.clearing.platform.dictionary;
|
||||
|
||||
/**
|
||||
* Справочник видов инстурментов денежного рынка
|
||||
*
|
||||
* Dictionary DB table: TERM_TYPE_DICTIONARY
|
||||
**/
|
||||
public class TermTypeDictionary extends AbstractDictionary {
|
||||
private static final long serialVersionUID = ConstDictionarySerializable.serialVersionUID;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
package ru.spcex.clearing.imdg.businessevent;
|
||||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
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;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
|
||||
@Component
|
||||
public class AccountRoutingUpdateMapStore extends TemplateEventMapStore<AccountRoutingUpdate> {
|
||||
|
||||
public AccountRoutingUpdateMapStore(JdbcTemplate jdbcTemplate) {
|
||||
super(jdbcTemplate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMapName() {
|
||||
return IMDGDistributedNames.Map_AccountRoutingUpdate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTableName() {
|
||||
return "ACCOUNT_ROUTING_UPDATE";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getFields() {
|
||||
return new String[]{"ID","EVENT_TIME", "EVENT_USER_ID",
|
||||
"ACCOUNT_ROUTING_ID", "DESTINATION_ID", "RELATION_ID", "SOURCE_ID"
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] objectToField(AccountRouting updateLog) {
|
||||
AccountRouting object=updateLog.getObject();
|
||||
Object[] args = new Object[]{
|
||||
updateLog.getId(),
|
||||
updateLog.getEventTime(),
|
||||
updateLog.getEventUserId(),
|
||||
|
||||
object.getId(),
|
||||
object.getDestinationId(),
|
||||
object.getRelationId(),
|
||||
object.getSourceId()
|
||||
};
|
||||
return args;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
package ru.spcex.clearing.imdg.businessevent;
|
||||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
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 AccountUpdateMapStore(JdbcTemplate jdbcTemplate) {
|
||||
super(jdbcTemplate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMapName() {
|
||||
return IMDGDistributedNames.Map_AccountUpdate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTableName() {
|
||||
return "ACCOUNT_UPDATE";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getFields() {
|
||||
return new String[]{"ID","EVENT_TIME", "EVENT_USER_ID",
|
||||
"ACCOUNT_ID", "CREATED_AT", "UPDATED_AT", "ACCOUNT", "ACCOUNT_TYPE", "RELATION_ID", "STATUS", "PROCESSING_SIGN"
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] objectToField(Account updateLog) {
|
||||
Account object=updateLog.getObject();
|
||||
Object[] args = new Object[]{
|
||||
updateLog.getId(),
|
||||
updateLog.getEventTime(),
|
||||
updateLog.getEventUserId(),
|
||||
|
||||
object.getId(),
|
||||
TimeUtil.fromInstant(object.getCreatedAt()),
|
||||
TimeUtil.fromInstant(object.getUpdatedAt()),
|
||||
object.getAccount(),
|
||||
object.getAccountType(),
|
||||
object.getRelationId(),
|
||||
object.getStatus(),
|
||||
object.getProcessingSign()
|
||||
};
|
||||
return args;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
package ru.spcex.clearing.imdg.businessevent;
|
||||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
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 BankAccountUpdateMapStore(JdbcTemplate jdbcTemplate) {
|
||||
super(jdbcTemplate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMapName() {
|
||||
return IMDGDistributedNames.Map_BankAccountUpdate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTableName() {
|
||||
return "BANK_ACCOUNT_UPDATE";
|
||||
}
|
||||
|
||||
@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"
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] objectToField(BankAccount updateLog) {
|
||||
BankAccount object=updateLog.getObject();
|
||||
Object[] args = new Object[]{
|
||||
updateLog.getId(),
|
||||
updateLog.getEventTime(),
|
||||
updateLog.getEventUserId(),
|
||||
|
||||
object.getId(),
|
||||
object.getAccountId(),
|
||||
object.getBankIdentificationCode(),
|
||||
object.getBankName(),
|
||||
object.getCorrespondentAccount(),
|
||||
object.getCorrespondentAccountName(),
|
||||
object.getCurrency(),
|
||||
object.getDestination(),
|
||||
object.getIban(),
|
||||
object.getInternationalTransferSign(),
|
||||
object.getSwiftCode(),
|
||||
object.getTaxpayerIdentificationNumber(),
|
||||
object.getTaxRegistrationReasonCode(),
|
||||
object.getAccount(),
|
||||
object.getActions()
|
||||
};
|
||||
return args;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
package ru.spcex.clearing.imdg.businessevent;
|
||||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
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;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
|
||||
@Component
|
||||
public class ClearingAccountUpdateMapStore extends TemplateEventMapStore<ClearingAccountUpdate> {
|
||||
|
||||
public ClearingAccountUpdateMapStore(JdbcTemplate jdbcTemplate) {
|
||||
super(jdbcTemplate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMapName() {
|
||||
return IMDGDistributedNames.Map_ClearingAccountUpdate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTableName() {
|
||||
return "CLEARING_ACCOUNT_UPDATE";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getFields() {
|
||||
return new String[]{"ID","EVENT_TIME", "EVENT_USER_ID",
|
||||
"CLEARING_ACCOUNT_ID", "ACCOUNT_ID", "ACCOUNT"
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] objectToField(ClearingAccount updateLog) {
|
||||
ClearingAccount object=updateLog.getObject();
|
||||
Object[] args = new Object[]{
|
||||
updateLog.getId(),
|
||||
updateLog.getEventTime(),
|
||||
updateLog.getEventUserId(),
|
||||
|
||||
object.getId(),
|
||||
object.getAccountId(),
|
||||
object.getAccount()
|
||||
};
|
||||
return args;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -30,7 +30,7 @@ public class CompanyUpdateMapStore extends BusinessEventMapStore<CompanyUpdate>
|
|||
public String[] getFields() {
|
||||
return new String[]{
|
||||
"id", "event_time", "event_user_id",
|
||||
"company_id", "created_at", "updated_at", "status", "clearing_code", "exchange_code"
|
||||
"company_id", "created_at", "updated_at", "trading_code", "clearing_code", "registration_code", "workflow_status", "short_name", "full_name"
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ public class CompanyUpdateMapStore extends BusinessEventMapStore<CompanyUpdate>
|
|||
"id", "event_time", "event_user_id",
|
||||
"company_info_id", "company_id", "clearing_member_category", "corporation_sole_type", "country_code", "description",
|
||||
"professional_sign", "legal_kind", "organization_type", "residence", "short_name", "full_name",
|
||||
"short_name_eng", "full_name_eng"
|
||||
"short_name_eng", "full_name_eng", "trading_code", "clearing_code", "registration_code"
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -63,9 +63,12 @@ public class CompanyUpdateMapStore extends BusinessEventMapStore<CompanyUpdate>
|
|||
company.getId(), // company_id
|
||||
TimeUtil.fromInstant(company.getCreated()),
|
||||
TimeUtil.fromInstant(company.getUpdated()),
|
||||
company.getStatusId(),
|
||||
company.getTradingCode(),
|
||||
company.getClearingCode(),
|
||||
company.getExchangeCode()
|
||||
company.getRegistrationCode(),
|
||||
company.getWorkflowStatus(),
|
||||
company.getShortName(),
|
||||
company.getFullName(),
|
||||
};
|
||||
batchArgs.add(args);
|
||||
if (company.getProfile() != null) {
|
||||
|
|
@ -106,7 +109,10 @@ public class CompanyUpdateMapStore extends BusinessEventMapStore<CompanyUpdate>
|
|||
companyInfo.getShortName(),
|
||||
companyInfo.getFullName(),
|
||||
companyInfo.getShortNameEng(),
|
||||
companyInfo.getFullNameEng()
|
||||
companyInfo.getFullNameEng(),
|
||||
companyInfo.getTradingCode(),
|
||||
companyInfo.getClearingCode(),
|
||||
companyInfo.getRegistrationCode()
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,56 @@
|
|||
package ru.spcex.clearing.imdg.businessevent;
|
||||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
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;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
|
||||
@Component
|
||||
public class InformationAccountUpdateMapStore extends TemplateEventMapStore<InformationAccountUpdate> {
|
||||
|
||||
public InformationAccountUpdateMapStore(JdbcTemplate jdbcTemplate) {
|
||||
super(jdbcTemplate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMapName() {
|
||||
return IMDGDistributedNames.Map_InformationAccountUpdate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTableName() {
|
||||
return "INFORMATION_ACCOUNT_UPDATE";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getFields() {
|
||||
return new String[]{"ID","EVENT_TIME", "EVENT_USER_ID",
|
||||
INFORMATION_ACCOUNT_ "ID", "ACCOUNT_ID", "ACCOUNT", "CLEARING_ACCOUNT_ID"
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] objectToField(InformationAccount updateLog) {
|
||||
InformationAccount object=updateLog.getObject();
|
||||
Object[] args = new Object[]{
|
||||
updateLog.getId(),
|
||||
updateLog.getEventTime(),
|
||||
updateLog.getEventUserId(),
|
||||
|
||||
object.getId(),
|
||||
object.getAccountId(),
|
||||
object.getAccount(),
|
||||
object.getClearingAccountId()
|
||||
};
|
||||
return args;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package ru.spcex.clearing.imdg.businessevent;
|
||||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
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 RelationUpdateMapStore(JdbcTemplate jdbcTemplate) {
|
||||
super(jdbcTemplate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMapName() {
|
||||
return IMDGDistributedNames.Map_RelationUpdate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTableName() {
|
||||
return "RELATION_UPDATE";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getFields() {
|
||||
return new String[]{"ID","EVENT_TIME", "EVENT_USER_ID",
|
||||
"RELATION_ID", "CREATED_AT", "UPDATED_AT", "CONSUMER_ID", "SUPPLIER_ID", "SERVICE_STATUS", "SERVICE", "SERVICE_PRODUCT", "COMMENT"
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] objectToField(Relation updateLog) {
|
||||
Relation object=updateLog.getObject();
|
||||
Object[] args = new Object[]{
|
||||
updateLog.getId(),
|
||||
updateLog.getEventTime(),
|
||||
updateLog.getEventUserId(),
|
||||
|
||||
object.getId(),
|
||||
TimeUtil.fromInstant(object.getCreatedAt()),
|
||||
TimeUtil.fromInstant(object.getUpdatedAt()),
|
||||
object.getConsumerId(),
|
||||
object.getSupplierId(),
|
||||
object.getServiceStatus(),
|
||||
object.getService(),
|
||||
object.getServiceProduct(),
|
||||
object.getComment()
|
||||
};
|
||||
return args;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
package ru.spcex.clearing.imdg.businessevent;
|
||||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
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;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
|
||||
@Component
|
||||
public class SecurityUpdateMapStore extends TemplateEventMapStore<SecurityUpdate> {
|
||||
|
||||
public SecurityUpdateMapStore(JdbcTemplate jdbcTemplate) {
|
||||
super(jdbcTemplate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMapName() {
|
||||
return IMDGDistributedNames.Map_SecurityUpdate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTableName() {
|
||||
return "SECURITY_UPDATE";
|
||||
}
|
||||
|
||||
@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"
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] objectToField(Security updateLog) {
|
||||
Security object=updateLog.getObject();
|
||||
Object[] args = new Object[]{
|
||||
updateLog.getId(),
|
||||
updateLog.getEventTime(),
|
||||
updateLog.getEventUserId(),
|
||||
|
||||
object.getId(),
|
||||
TimeUtil.fromInstant(object.getCreatedAt()),
|
||||
TimeUtil.fromInstant(object.getUpdatedAt()),
|
||||
object.getInstrumentType(),
|
||||
object.getIssuerId(),
|
||||
object.getShortName(),
|
||||
object.getFullName(),
|
||||
object.getShortNameEng(),
|
||||
object.getFullNameEng(),
|
||||
object.getSecuritySymbol(),
|
||||
object.getWorkflowStatus()
|
||||
};
|
||||
return args;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -32,7 +32,7 @@ public class AccountMapStore extends TemplateMapStore<Account> {
|
|||
@Override
|
||||
public String[] getFields() {
|
||||
return new String[]{
|
||||
"ID", "CREATED_AT", "UPDATED_AT", "ACCOUNT", "ACCOUNT_TYPE", "RELATION_ID", "STATUS"
|
||||
"ID", "CREATED_AT", "UPDATED_AT", "ACCOUNT", "ACCOUNT_TYPE", "RELATION_ID", "STATUS", "PROCESSING_SIGN"
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -40,12 +40,13 @@ public class AccountMapStore extends TemplateMapStore<Account> {
|
|||
public Account objectReader(ResultSet resultSet) throws SQLException {
|
||||
Account object = new Account();
|
||||
object.setId(resultSet.getObject("ID", Long.class));
|
||||
object.setCreated(getInstantFromTimestamp(resultSet, "CREATED_AT"));
|
||||
object.setUpdated(getInstantFromTimestamp(resultSet, "UPDATED_AT"));
|
||||
object.setAccount(resultSet.getObject("ACCOUNT", String.class));
|
||||
object.setAccountType(resultSet.getObject("ACCOUNT_TYPE", String.class));
|
||||
object.setRelationId(resultSet.getObject("RELATION_ID", Long.class));
|
||||
object.setStatus(resultSet.getObject("STATUS", String.class));
|
||||
object.setCreated(getInstantFromTimestamp(resultSet, "CREATED_AT"));
|
||||
object.setUpdated(getInstantFromTimestamp(resultSet, "UPDATED_AT"));
|
||||
object.setAccount(resultSet.getObject("ACCOUNT", String.class));
|
||||
object.setAccountType(resultSet.getObject("ACCOUNT_TYPE", String.class));
|
||||
object.setRelationId(resultSet.getObject("RELATION_ID", Long.class));
|
||||
object.setStatus(resultSet.getObject("STATUS", String.class));
|
||||
object.setProcessingSign(resultSet.getObject("PROCESSING_SIGN", String.class));
|
||||
return object;
|
||||
}
|
||||
|
||||
|
|
@ -58,9 +59,10 @@ public class AccountMapStore extends TemplateMapStore<Account> {
|
|||
object.getAccount(),
|
||||
object.getAccountType(),
|
||||
object.getRelationId(),
|
||||
object.getStatus()
|
||||
object.getStatus(),
|
||||
object.getProcessingSign()
|
||||
};
|
||||
return args;
|
||||
}
|
||||
|
||||
}//todo updatemapstore !!!
|
||||
}
|
||||
|
|
@ -27,7 +27,7 @@ public class CompanyMapStore extends BusinessObjectMapStore<Company> {
|
|||
@Override
|
||||
public String[] getFields() {
|
||||
return new String[]{
|
||||
"id", "created_at", "updated_at", "status", "clearing_code", "exchange_code"
|
||||
"id", "created_at", "updated_at", "trading_code", "clearing_code", "registration_code", "workflow_status", "short_name", "full_name"
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -35,7 +35,7 @@ public class CompanyMapStore extends BusinessObjectMapStore<Company> {
|
|||
return new String[]{
|
||||
"id", "company_id", "clearing_member_category", "corporation_sole_type", "country_code", "description",
|
||||
"professional_sign", "legal_kind", "organization_type", "residence", "short_name", "full_name",
|
||||
"short_name_eng", "full_name_eng"
|
||||
"short_name_eng", "full_name_eng", "trading_code", "clearing_code", "registration_code"
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -49,10 +49,12 @@ public class CompanyMapStore extends BusinessObjectMapStore<Company> {
|
|||
(resultSet, i) -> {
|
||||
Company company = new Company();
|
||||
fillBusinessObjectFields(company, resultSet);
|
||||
company.setId(resultSet.getObject("id", Long.class));
|
||||
company.setStatusId(resultSet.getObject("status", Long.class));
|
||||
company.setClearingCode(resultSet.getObject("clearing_code", String.class));
|
||||
company.setExchangeCode(resultSet.getObject("exchange_code", String.class));
|
||||
company.setTradingCode(resultSet.getObject("TRADING_CODE", String.class));
|
||||
company.setClearingCode(resultSet.getObject("CLEARING_CODE", String.class));
|
||||
company.setRegistrationCode(resultSet.getObject("REGISTRATION_CODE", String.class));
|
||||
company.setWorkflowStatus(resultSet.getObject("WORKFLOW_STATUS", String.class));
|
||||
company.setShortName(resultSet.getObject("SHORT_NAME", String.class));
|
||||
company.setFullName(resultSet.getObject("FULL_NAME", String.class));
|
||||
company.setProfile(getCompanyInfo(company.getId()));
|
||||
return company;
|
||||
});
|
||||
|
|
@ -70,9 +72,12 @@ public class CompanyMapStore extends BusinessObjectMapStore<Company> {
|
|||
company.getId(),
|
||||
TimeUtil.fromInstant(company.getCreated()),
|
||||
TimeUtil.fromInstant(company.getUpdated()),
|
||||
company.getStatusId(),
|
||||
company.getTradingCode(),
|
||||
company.getClearingCode(),
|
||||
company.getExchangeCode()
|
||||
company.getRegistrationCode(),
|
||||
company.getWorkflowStatus(),
|
||||
company.getShortName(),
|
||||
company.getFullName(),
|
||||
};
|
||||
batchArgs.add(args);
|
||||
if (company.getProfile() != null) {
|
||||
|
|
@ -110,6 +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));
|
||||
return companyInfo;
|
||||
}
|
||||
);
|
||||
|
|
@ -144,8 +152,11 @@ public class CompanyMapStore extends BusinessObjectMapStore<Company> {
|
|||
companyInfo.getShortName(),
|
||||
companyInfo.getFullName(),
|
||||
companyInfo.getShortNameEng(),
|
||||
companyInfo.getFullNameEng()
|
||||
));
|
||||
companyInfo.getFullNameEng(),
|
||||
companyInfo.getTradingCode(),
|
||||
companyInfo.getClearingCode(),
|
||||
companyInfo.getRegistrationCode()
|
||||
));
|
||||
return companyInfoArgs;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public class RelationMapStore extends TemplateMapStore<Relation> {
|
|||
@Override
|
||||
public String[] getFields() {
|
||||
return new String[]{
|
||||
"ID", "CREATED_AT", "UPDATED_AT", "CONSUMER_ID", "SUPPLIER_ID", "SERVICE_STATUS", "SERVICE_ID", "SERVICE_PRODUCT_ID", "COMMENT"
|
||||
"ID", "CREATED_AT", "UPDATED_AT", "CONSUMER_ID", "SUPPLIER_ID", "SERVICE_STATUS", "SERVICE", "SERVICE_PRODUCT", "COMMENT"
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -45,8 +45,8 @@ public class RelationMapStore extends TemplateMapStore<Relation> {
|
|||
object.setConsumerId(resultSet.getObject("CONSUMER_ID", Long.class));
|
||||
object.setSupplierId(resultSet.getObject("SUPPLIER_ID", Long.class));
|
||||
object.setServiceStatus(resultSet.getObject("SERVICE_STATUS", String.class));
|
||||
object.setServiceId(resultSet.getObject("SERVICE_ID", Long.class));
|
||||
object.setServiceProductId(resultSet.getObject("SERVICE_PRODUCT_ID", Long.class));
|
||||
object.setService(resultSet.getObject("SERVICE", Long.class));
|
||||
object.setServiceProduct(resultSet.getObject("SERVICE_PRODUCT", Long.class));
|
||||
object.setComment(resultSet.getObject("COMMENT", String.class));
|
||||
return object;
|
||||
}
|
||||
|
|
@ -60,8 +60,8 @@ public class RelationMapStore extends TemplateMapStore<Relation> {
|
|||
object.getConsumerId(),
|
||||
object.getSupplierId(),
|
||||
object.getServiceStatus(),
|
||||
object.getServiceId(),
|
||||
object.getServiceProductId(),
|
||||
object.getService(),
|
||||
object.getServiceProduct(),
|
||||
object.getComment()
|
||||
};
|
||||
return args;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,74 @@
|
|||
package ru.spcex.clearing.imdg.businessobject;
|
||||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
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;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
|
||||
@Component
|
||||
public class SecurityMapStore extends TemplateMapStore<Security> {
|
||||
|
||||
public SecurityMapStore(JdbcTemplate jdbcTemplate) {
|
||||
super(jdbcTemplate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMapName() {
|
||||
return IMDGDistributedNames.Map_Security;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTableName() {
|
||||
return "SECURITY";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getFields() {
|
||||
return new String[]{
|
||||
"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 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.setInstrumentType(resultSet.getObject("INSTRUMENT_TYPE", String.class));
|
||||
object.setIssuerId(resultSet.getObject("ISSUER_ID", Long.class));
|
||||
object.setShortName(resultSet.getObject("SHORT_NAME", String.class));
|
||||
object.setFullName(resultSet.getObject("FULL_NAME", String.class));
|
||||
object.setShortNameEng(resultSet.getObject("SHORT_NAME_ENG", String.class));
|
||||
object.setFullNameEng(resultSet.getObject("FULL_NAME_ENG", String.class));
|
||||
object.setSecuritySymbol(resultSet.getObject("SECURITY_SYMBOL", String.class));
|
||||
object.setWorkflowStatus(resultSet.getObject("WORKFLOW_STATUS", String.class));
|
||||
return object;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] objectToField(Security object) {
|
||||
Object[] args = new Object[]{
|
||||
object.getId(),
|
||||
TimeUtil.fromInstant(object.getCreatedAt()),
|
||||
TimeUtil.fromInstant(object.getUpdatedAt()),
|
||||
object.getInstrumentType(),
|
||||
object.getIssuerId(),
|
||||
object.getShortName(),
|
||||
object.getFullName(),
|
||||
object.getShortNameEng(),
|
||||
object.getFullNameEng(),
|
||||
object.getSecuritySymbol(),
|
||||
object.getWorkflowStatus()
|
||||
};
|
||||
return args;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package ru.spcex.clearing.imdg.dictionary;
|
||||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.clearing.platform.dictionary.ChargeDirectionDictionary;
|
||||
import ru.spcex.clearing.imdg.base.DictionaryTMapStore;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
|
||||
@Component
|
||||
public class ChargeDirectionDictionaryMapStore extends DictionaryTMapStore<ChargeDirectionDictionary> {
|
||||
|
||||
public ChargeDirectionDictionaryMapStore(JdbcTemplate jdbcTemplate) {
|
||||
super(jdbcTemplate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMapName() {
|
||||
return IMDGDistributedNames.Map_ChargeDirectionDictionary;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTableName() {
|
||||
return "CHARGE_DIRECTION_DICTIONARY";
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChargeDirectionDictionary getDictionaryObject() {
|
||||
return new ChargeDirectionDictionary();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,31 +1,31 @@
|
|||
//package ru.spcex.clearing.imdg.dictionary;
|
||||
//
|
||||
//import org.springframework.jdbc.core.JdbcTemplate;
|
||||
//import org.springframework.stereotype.Component;
|
||||
//import ru.clearing.platform.dictionary.ClearingStatusDictionary;
|
||||
//import ru.spcex.clearing.imdg.base.DictionaryTMapStore;
|
||||
//import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
//
|
||||
//@Component
|
||||
//public class ClearingStatusDictionaryMapStore extends DictionaryTMapStore<ClearingStatusDictionary> {
|
||||
//
|
||||
// public ClearingStatusDictionaryMapStore(JdbcTemplate jdbcTemplate) {
|
||||
// super(jdbcTemplate);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String getMapName() {
|
||||
// return IMDGDistributedNames.Map_ClearingStatusDictionary;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String getTableName() {
|
||||
// return "CLEARING_STATUS_DICTIONARY";
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public ClearingStatusDictionary getDictionaryObject() {
|
||||
// return new ClearingStatusDictionary();
|
||||
// }
|
||||
//
|
||||
//}
|
||||
package ru.spcex.clearing.imdg.dictionary;
|
||||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.clearing.platform.dictionary.ClearingStatusDictionary;
|
||||
import ru.spcex.clearing.imdg.base.DictionaryTMapStore;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
|
||||
@Component
|
||||
public class ClearingStatusDictionaryMapStore extends DictionaryTMapStore<ClearingStatusDictionary> {
|
||||
|
||||
public ClearingStatusDictionaryMapStore(JdbcTemplate jdbcTemplate) {
|
||||
super(jdbcTemplate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMapName() {
|
||||
return IMDGDistributedNames.Map_ClearingStatusDictionary;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTableName() {
|
||||
return "CLEARING_STATUS_DICTIONARY";
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClearingStatusDictionary getDictionaryObject() {
|
||||
return new ClearingStatusDictionary();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package ru.spcex.clearing.imdg.dictionary;
|
||||
|
||||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.clearing.platform.dictionary.CourierTypeDictionary;
|
||||
import ru.spcex.clearing.imdg.base.DictionaryTMapStore;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
|
||||
@Component
|
||||
public class CourierTypeDictionaryMapStore extends DictionaryTMapStore<CourierTypeDictionary> {
|
||||
|
||||
public CourierTypeDictionaryMapStore(JdbcTemplate jdbcTemplate) {
|
||||
super(jdbcTemplate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMapName() {
|
||||
return IMDGDistributedNames.Map_CourierTypeDictionary;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTableName() {
|
||||
return "COURIER_TYPE_DICTIONARY";
|
||||
}
|
||||
|
||||
@Override
|
||||
public CourierTypeDictionary getDictionaryObject() {
|
||||
return new CourierTypeDictionary();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package ru.spcex.clearing.imdg.dictionary;
|
||||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.clearing.platform.dictionary.ErrorCodeDictionary;
|
||||
import ru.spcex.clearing.imdg.base.DictionaryTMapStore;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
|
||||
@Component
|
||||
public class ErrorCodeDictionaryMapStore extends DictionaryTMapStore<ErrorCodeDictionary> {
|
||||
|
||||
public ErrorCodeDictionaryMapStore(JdbcTemplate jdbcTemplate) {
|
||||
super(jdbcTemplate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMapName() {
|
||||
return IMDGDistributedNames.Map_ErrorCodeDictionary;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTableName() {
|
||||
return "ERROR_CODE_DICTIONARY";
|
||||
}
|
||||
|
||||
@Override
|
||||
public ErrorCodeDictionary getDictionaryObject() {
|
||||
return new ErrorCodeDictionary();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
package ru.spcex.clearing.imdg.dictionary;
|
||||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.clearing.platform.dictionary.ExtErrorDictionary;
|
||||
import ru.spcex.clearing.imdg.base.DictionaryTMapStore;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
|
||||
@Component
|
||||
public class ExtErrorDictionaryMapStore extends DictionaryTMapStore<ExtErrorDictionary> {
|
||||
|
||||
public ExtErrorDictionaryMapStore(JdbcTemplate jdbcTemplate) {
|
||||
super(jdbcTemplate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMapName() {
|
||||
return IMDGDistributedNames.Map_ExtErrorDictionary;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTableName() {
|
||||
return "EXT_ERROR_DICTIONARY";
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExtErrorDictionary getDictionaryObject() {
|
||||
return new ExtErrorDictionary();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package ru.spcex.clearing.imdg.dictionary;
|
||||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.clearing.platform.dictionary.TermTypeDictionary;
|
||||
import ru.spcex.clearing.imdg.base.DictionaryTMapStore;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
|
||||
@Component
|
||||
public class TermTypeDictionaryMapStore extends DictionaryTMapStore<TermTypeDictionary> {
|
||||
|
||||
public TermTypeDictionaryMapStore(JdbcTemplate jdbcTemplate) {
|
||||
super(jdbcTemplate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMapName() {
|
||||
return IMDGDistributedNames.Map_TermTypeDictionary;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTableName() {
|
||||
return "TERM_TYPE_DICTIONARY";
|
||||
}
|
||||
|
||||
@Override
|
||||
public TermTypeDictionary getDictionaryObject() {
|
||||
return new TermTypeDictionary();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -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", "CORRESPONDENT_ACCOUNT"
|
||||
"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"
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -40,18 +40,18 @@ public class BankAccountMapStore extends TemplateMapStore<BankAccount> {
|
|||
public BankAccount objectReader(ResultSet resultSet) throws SQLException {
|
||||
BankAccount object = new BankAccount();
|
||||
object.setId(resultSet.getObject("ID", Long.class));
|
||||
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.setCorrespondentAccountName(resultSet.getObject("CORRESPONDENT_ACCOUNT_NAME", String.class));
|
||||
object.setCurrency(resultSet.getObject("CURRENCY", String.class));
|
||||
object.setDestination(resultSet.getObject("DESTINATION", String.class));
|
||||
object.setIban(resultSet.getObject("IBAN", String.class));
|
||||
object.setInternationalTransferSign(resultSet.getObject("INTERNATIONAL_TRANSFER_SIGN", String.class));
|
||||
object.setSwiftCode(resultSet.getObject("SWIFT_CODE", String.class));
|
||||
object.setTaxpayerIdentificationNumber(resultSet.getObject("TAXPAYER_IDENTIFICATION_NUMBER", String.class));
|
||||
object.setTaxRegistrationReasonCode(resultSet.getObject("TAX_REGISTRATION_REASON_CODE", String.class));
|
||||
object.setCorrespondentAccount(resultSet.getObject("CORRESPONDENT_ACCOUNT", String.class));
|
||||
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.setCorrespondentAccountName(resultSet.getObject("CORRESPONDENT_ACCOUNT_NAME", String.class));
|
||||
object.setCurrency(resultSet.getObject("CURRENCY", String.class));
|
||||
object.setDestination(resultSet.getObject("DESTINATION", String.class));
|
||||
object.setIban(resultSet.getObject("IBAN", String.class));
|
||||
object.setInternationalTransferSign(resultSet.getObject("INTERNATIONAL_TRANSFER_SIGN", String.class));
|
||||
object.setSwiftCode(resultSet.getObject("SWIFT_CODE", String.class));
|
||||
object.setTaxpayerIdentificationNumber(resultSet.getObject("TAXPAYER_IDENTIFICATION_NUMBER", String.class));
|
||||
object.setTaxRegistrationReasonCode(resultSet.getObject("TAX_REGISTRATION_REASON_CODE", String.class));
|
||||
object.setAccount(resultSet.getObject("ACCOUNT", String.class));
|
||||
return object;
|
||||
}
|
||||
|
||||
|
|
@ -70,7 +70,7 @@ public class BankAccountMapStore extends TemplateMapStore<BankAccount> {
|
|||
object.getSwiftCode(),
|
||||
object.getTaxpayerIdentificationNumber(),
|
||||
object.getTaxRegistrationReasonCode(),
|
||||
object.getCorrespondentAccount()
|
||||
object.getAccount()
|
||||
};
|
||||
return args;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public class ClearingAccountMapStore extends TemplateMapStore<ClearingAccount> {
|
|||
@Override
|
||||
public String[] getFields() {
|
||||
return new String[]{
|
||||
"ID", "ACCOUNT_ID", "CASH_ACCOUNT_ID", "DEPO_ACCOUNT_ID", "SETTLEMENT_CODE"
|
||||
"ID", "ACCOUNT_ID", "ACCOUNT"
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -40,10 +40,8 @@ public class ClearingAccountMapStore extends TemplateMapStore<ClearingAccount> {
|
|||
public ClearingAccount objectReader(ResultSet resultSet) throws SQLException {
|
||||
ClearingAccount object = new ClearingAccount();
|
||||
object.setId(resultSet.getObject("ID", Long.class));
|
||||
object.setAccountId(resultSet.getObject("ACCOUNT_ID", Long.class));
|
||||
object.setCashAccountId(resultSet.getObject("CASH_ACCOUNT_ID", Long.class));
|
||||
object.setDepoAccountId(resultSet.getObject("DEPO_ACCOUNT_ID", Long.class));
|
||||
object.setSettlementCode(resultSet.getObject("SETTLEMENT_CODE", String.class));
|
||||
object.setAccountId(resultSet.getObject("ACCOUNT_ID", Long.class));
|
||||
object.setAccount(resultSet.getObject("ACCOUNT", String.class));
|
||||
return object;
|
||||
}
|
||||
|
||||
|
|
@ -52,12 +50,8 @@ public class ClearingAccountMapStore extends TemplateMapStore<ClearingAccount> {
|
|||
Object[] args = new Object[]{
|
||||
object.getId(),
|
||||
object.getAccountId(),
|
||||
object.getCashAccountId(),
|
||||
object.getDepoAccountId(),
|
||||
object.getSettlementCode()
|
||||
object.getAccount()
|
||||
};
|
||||
return args;
|
||||
}
|
||||
|
||||
}
|
||||
// todo Сделать BusinessEventMapStore ClearingAccountUpdateMapStore
|
||||
}
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
package ru.spcex.clearing.imdg.object;
|
||||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
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;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
|
||||
@Component
|
||||
public class InformationAccountMapStore extends TemplateMapStore<InformationAccount> {
|
||||
|
||||
public InformationAccountMapStore(JdbcTemplate jdbcTemplate) {
|
||||
super(jdbcTemplate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMapName() {
|
||||
return IMDGDistributedNames.Map_InformationAccount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTableName() {
|
||||
return "INFORMATION_ACCOUNT";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getFields() {
|
||||
return new String[]{
|
||||
"ID", "ACCOUNT_ID", "ACCOUNT", "CLEARING_ACCOUNT_ID"
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public InformationAccount objectReader(ResultSet resultSet) throws SQLException {
|
||||
InformationAccount object = new InformationAccount();
|
||||
object.setId(resultSet.getObject("ID", Long.class));
|
||||
object.setAccountId(resultSet.getObject("ACCOUNT_ID", Long.class));
|
||||
object.setAccount(resultSet.getObject("ACCOUNT", String.class));
|
||||
object.setClearingAccountId(resultSet.getObject("CLEARING_ACCOUNT_ID", Long.class));
|
||||
return object;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] objectToField(InformationAccount object) {
|
||||
Object[] args = new Object[]{
|
||||
object.getId(),
|
||||
object.getAccountId(),
|
||||
object.getAccount(),
|
||||
object.getClearingAccountId()
|
||||
};
|
||||
return args;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -25,7 +25,7 @@ public class ProfileDocumentMapStore extends ObjectBaseMapStore<ProfileDocument>
|
|||
public String[] getFields() {
|
||||
return new String[]{
|
||||
"id", "company_id", "document_type", "issue_date", "issue_place", "issuer", "issuer_code",
|
||||
"name", "number", "place", "valid_from_date", "valid_to_date"
|
||||
"name", "number", "place", "valid_from_date", "valid_to_date", "LINK"
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -49,6 +49,7 @@ public class ProfileDocumentMapStore extends ObjectBaseMapStore<ProfileDocument>
|
|||
profileDocument.setPlace(resultSet.getObject("place", String.class));
|
||||
profileDocument.setValidFromDate(getInstantFromTimestamp(resultSet,"valid_from_date"));
|
||||
profileDocument.setValidToDate(getInstantFromTimestamp(resultSet,"valid_to_date"));
|
||||
profileDocument.setLink(resultSet.getObject("LINK", String.class));
|
||||
return profileDocument;
|
||||
});
|
||||
}
|
||||
|
|
@ -72,7 +73,8 @@ public class ProfileDocumentMapStore extends ObjectBaseMapStore<ProfileDocument>
|
|||
profileDocument.getNumber(),
|
||||
profileDocument.getPlace(),
|
||||
TimeUtil.fromInstant(profileDocument.getValidFromDate()),
|
||||
TimeUtil.fromInstant(profileDocument.getValidToDate())
|
||||
TimeUtil.fromInstant(profileDocument.getValidToDate()),
|
||||
profileDocument.getLink()
|
||||
};
|
||||
batchArgs.add(args);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ public final class IMDGDistributedNames {
|
|||
public static final String Map_ClearingCategoryDictionary = "Map_ClearingCategoryDictionary";
|
||||
public static final String Map_ClearingStatusDictionary = "Map_ClearingStatusDictionary";
|
||||
public static final String Map_CurrencyCodeDictionary = "Map_CurrencyCodeDictionary";
|
||||
public static final String Map_ExtErrorDictionary = "Map_ExtErrorDictionary";
|
||||
public static final String Map_ErrorCodeDictionary = "Map_ErrorCodeDictionary";
|
||||
public static final String Map_InOutDirectionDictionary = "Map_InOutDirectionDictionary";
|
||||
public static final String Map_InstrumentTypeDictionary = "Map_InstrumentTypeDictionary";
|
||||
public static final String Map_ManagementJournalPurposeDictionary = "Map_ManagementJournalPurposeDictionary";
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue