imdg http://jira.mfd.msk:8088/browse/CLS-188 добавил мапу STrade
This commit is contained in:
parent
5d9a66eece
commit
b6fa8e7d79
5 changed files with 286 additions and 1 deletions
|
|
@ -1576,7 +1576,7 @@
|
|||
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true"/>
|
||||
<inSDf12Id type="1" name="Идентификатор соответствующей записи из таблицы-источника" shortname="Входящая запись" searchable="true" sortable="true"/>
|
||||
</sDf18>
|
||||
<s_trade name="Сделки из Торговой системы" class="" table="s_trade">
|
||||
<s_trade name="Сделки из Торговой системы" class="ru.clearing.classes.statics.data.misc.STrade" table="s_trade">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
<trade_num type="1" name="Номер сделки" shortname="Номер сделки" searchable="true" sortable="true"/>
|
||||
<sec_code type="2" length="255" name="Код ценной бумаги" shortname="Код ценной бумаги" searchable="true" sortable="true"/>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,189 @@
|
|||
package ru.clearing.classes.statics.data.misc;
|
||||
|
||||
import ru.clearing.classes.ConstSerializable;
|
||||
import ru.spcex.platform.classes.base.SpcexObjectBase;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* Сделки из Торговой системы
|
||||
* <p>
|
||||
* DB table: S_TRADE
|
||||
**/
|
||||
public class STrade extends SpcexObjectBase {
|
||||
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||
|
||||
private Long trade_num;
|
||||
private String sec_code;
|
||||
private Instant trade_date_time;
|
||||
private LocalDate settle_date;
|
||||
private BigDecimal price;
|
||||
private BigDecimal value;
|
||||
private BigDecimal qty;
|
||||
private BigDecimal accruedint;
|
||||
private String firm_id;
|
||||
private String client_code;
|
||||
private BigDecimal exchange_commission;
|
||||
private String class_code;
|
||||
private String operation;
|
||||
private String issue_account;
|
||||
private String money_account;
|
||||
private String trade_type;
|
||||
private Long days_to_mat_date;
|
||||
private String collateral;
|
||||
private String settle_code;
|
||||
|
||||
public Long getTrade_num() {
|
||||
return trade_num;
|
||||
}
|
||||
|
||||
public void setTrade_num(Long value) {
|
||||
this.trade_num = value;
|
||||
}
|
||||
|
||||
public String getSec_code() {
|
||||
return sec_code;
|
||||
}
|
||||
|
||||
public void setSec_code(String value) {
|
||||
this.sec_code = value;
|
||||
}
|
||||
|
||||
public Instant getTrade_date_time() {
|
||||
return trade_date_time;
|
||||
}
|
||||
|
||||
public void setTrade_date_time(Instant value) {
|
||||
this.trade_date_time = value;
|
||||
}
|
||||
|
||||
public LocalDate getSettle_date() {
|
||||
return settle_date;
|
||||
}
|
||||
|
||||
public void setSettle_date(LocalDate value) {
|
||||
this.settle_date = value;
|
||||
}
|
||||
|
||||
public BigDecimal getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setPrice(BigDecimal value) {
|
||||
this.price = value;
|
||||
}
|
||||
|
||||
public BigDecimal getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(BigDecimal value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public BigDecimal getQty() {
|
||||
return qty;
|
||||
}
|
||||
|
||||
public void setQty(BigDecimal value) {
|
||||
this.qty = value;
|
||||
}
|
||||
|
||||
public BigDecimal getAccruedint() {
|
||||
return accruedint;
|
||||
}
|
||||
|
||||
public void setAccruedint(BigDecimal value) {
|
||||
this.accruedint = value;
|
||||
}
|
||||
|
||||
public String getFirm_id() {
|
||||
return firm_id;
|
||||
}
|
||||
|
||||
public void setFirm_id(String value) {
|
||||
this.firm_id = value;
|
||||
}
|
||||
|
||||
public String getClient_code() {
|
||||
return client_code;
|
||||
}
|
||||
|
||||
public void setClient_code(String value) {
|
||||
this.client_code = value;
|
||||
}
|
||||
|
||||
public BigDecimal getExchange_commission() {
|
||||
return exchange_commission;
|
||||
}
|
||||
|
||||
public void setExchange_commission(BigDecimal value) {
|
||||
this.exchange_commission = value;
|
||||
}
|
||||
|
||||
public String getClass_code() {
|
||||
return class_code;
|
||||
}
|
||||
|
||||
public void setClass_code(String value) {
|
||||
this.class_code = value;
|
||||
}
|
||||
|
||||
public String getOperation() {
|
||||
return operation;
|
||||
}
|
||||
|
||||
public void setOperation(String value) {
|
||||
this.operation = value;
|
||||
}
|
||||
|
||||
public String getIssue_account() {
|
||||
return issue_account;
|
||||
}
|
||||
|
||||
public void setIssue_account(String value) {
|
||||
this.issue_account = value;
|
||||
}
|
||||
|
||||
public String getMoney_account() {
|
||||
return money_account;
|
||||
}
|
||||
|
||||
public void setMoney_account(String value) {
|
||||
this.money_account = value;
|
||||
}
|
||||
|
||||
public String getTrade_type() {
|
||||
return trade_type;
|
||||
}
|
||||
|
||||
public void setTrade_type(String value) {
|
||||
this.trade_type = value;
|
||||
}
|
||||
|
||||
public Long getDays_to_mat_date() {
|
||||
return days_to_mat_date;
|
||||
}
|
||||
|
||||
public void setDays_to_mat_date(Long value) {
|
||||
this.days_to_mat_date = value;
|
||||
}
|
||||
|
||||
public String getCollateral() {
|
||||
return collateral;
|
||||
}
|
||||
|
||||
public void setCollateral(String value) {
|
||||
this.collateral = value;
|
||||
}
|
||||
|
||||
public String getSettle_code() {
|
||||
return settle_code;
|
||||
}
|
||||
|
||||
public void setSettle_code(String value) {
|
||||
this.settle_code = value;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
package ru.spcex.clearing.imdg.object;
|
||||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.clearing.classes.statics.data.misc.STrade;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.spcex.clearing.imdg.base.TemplateMapStore;
|
||||
import ru.spcex.platform.utils.time.TimeUtil;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.time.LocalDate;
|
||||
|
||||
@Component
|
||||
public class STradeMapStore extends TemplateMapStore<STrade> {
|
||||
|
||||
public STradeMapStore(JdbcTemplate jdbcTemplate) {
|
||||
super(jdbcTemplate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMapName() {
|
||||
return IMDGDistributedNames.Map_STrade;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTableName() {
|
||||
return "S_TRADE";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getFields() {
|
||||
return new String[]{
|
||||
"ID", "TRADE_NUM", "SEC_CODE", "TRADE_DATE_TIME", "SETTLE_DATE", "PRICE", "VALUE", "QTY", "ACCRUEDINT",
|
||||
"FIRM_ID", "CLIENT_CODE", "EXCHANGE_COMMISSION", "CLASS_CODE", "OPERATION", "ISSUE_ACCOUNT",
|
||||
"MONEY_ACCOUNT", "TRADE_TYPE", "DAYS_TO_MAT_DATE", "COLLATERAL", "SETTLE_CODE"
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public STrade objectReader(ResultSet resultSet) throws SQLException {
|
||||
STrade object = new STrade();
|
||||
object.setId(resultSet.getObject("ID", Long.class));
|
||||
object.setTrade_num(resultSet.getObject("TRADE_NUM", Long.class));
|
||||
object.setSec_code(resultSet.getObject("SEC_CODE", String.class));
|
||||
object.setTrade_date_time(getInstantFromTimestamp(resultSet, "TRADE_DATE_TIME"));
|
||||
object.setSettle_date(resultSet.getObject("SETTLE_DATE", LocalDate.class));
|
||||
object.setPrice(resultSet.getObject("PRICE", BigDecimal.class));
|
||||
object.setValue(resultSet.getObject("VALUE", BigDecimal.class));
|
||||
object.setQty(resultSet.getObject("QTY", BigDecimal.class));
|
||||
object.setAccruedint(resultSet.getObject("ACCRUEDINT", BigDecimal.class));
|
||||
object.setFirm_id(resultSet.getObject("FIRM_ID", String.class));
|
||||
object.setClient_code(resultSet.getObject("CLIENT_CODE", String.class));
|
||||
object.setExchange_commission(resultSet.getObject("EXCHANGE_COMMISSION", BigDecimal.class));
|
||||
object.setClass_code(resultSet.getObject("CLASS_CODE", String.class));
|
||||
object.setOperation(resultSet.getObject("OPERATION", String.class));
|
||||
object.setIssue_account(resultSet.getObject("ISSUE_ACCOUNT", String.class));
|
||||
object.setMoney_account(resultSet.getObject("MONEY_ACCOUNT", String.class));
|
||||
object.setTrade_type(resultSet.getObject("TRADE_TYPE", String.class));
|
||||
object.setDays_to_mat_date(resultSet.getObject("DAYS_TO_MAT_DATE", Long.class));
|
||||
object.setCollateral(resultSet.getObject("COLLATERAL", String.class));
|
||||
object.setSettle_code(resultSet.getObject("SETTLE_CODE", String.class));
|
||||
return object;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] objectToField(STrade object) {
|
||||
Object[] args = new Object[]{
|
||||
object.getId(),
|
||||
object.getTrade_num(),
|
||||
object.getSec_code(),
|
||||
TimeUtil.toDateFromInstant(object.getTrade_date_time()),
|
||||
object.getSettle_date(),
|
||||
object.getPrice(),
|
||||
object.getValue(),
|
||||
object.getQty(),
|
||||
object.getAccruedint(),
|
||||
object.getFirm_id(),
|
||||
object.getClient_code(),
|
||||
object.getExchange_commission(),
|
||||
object.getClass_code(),
|
||||
object.getOperation(),
|
||||
object.getIssue_account(),
|
||||
object.getMoney_account(),
|
||||
object.getTrade_type(),
|
||||
object.getDays_to_mat_date(),
|
||||
object.getCollateral(),
|
||||
object.getSettle_code()
|
||||
};
|
||||
return args;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -163,5 +163,6 @@ public class RunnableMapNamesForTesting {
|
|||
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_Session, Session.class));
|
||||
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_UserRoleSession, UserRoleSession.class));
|
||||
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_UserSettings, UserSettings.class));
|
||||
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_STrade, STrade.class));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -121,6 +121,7 @@ public final class IMDGDistributedNames {
|
|||
public static final String Map_ContractRegister = "Map_ContractRegister";
|
||||
public static final String Map_OrderRegister = "Map_OrderRegister";
|
||||
public static final String Map_VerificationResult = "Map_VerificationResult";
|
||||
public static final String Map_STrade = "Map_STrade";
|
||||
|
||||
public static final String MAP_SEQUENCE_NAME = "MAP_SEQUENCE_NAME";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue