http://jira.mfd.msk:8088/browse/CLS-773 DDL S_DF53 table fixed, meta.xml updated, tests fixed, CompanyMapStore and CompanyHistoryMapStore fixed
This commit is contained in:
parent
d9fdfba69a
commit
e66b2b60c9
9 changed files with 20223 additions and 20194 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--?xml-stylesheet type="text/xsl" href="\..\corp-reports\src\data\meta\meta.server.xslt"?-->
|
||||
<meta version="3.14.105.104">
|
||||
<meta version="3.14.105.105">
|
||||
<!-- _xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" _xsi:noNamespaceSchemaLocation="file:///E:/d/projects/meta/from/meta.xsd" -->
|
||||
<!--Здесь словари-->
|
||||
<enums>
|
||||
|
|
@ -2168,7 +2168,7 @@
|
|||
<generationTime type="4" name="Дата и время создания записи" shortname="Дата и время создания" searchable="true" sortable="true" visible="true"/>
|
||||
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true" visible="true"/>
|
||||
<inSDfId type="1" name="Идентификатор соответствующей записи из таблицы-источника" shortname="Входящая запись" searchable="true" sortable="true" visible="true"/>
|
||||
<accType type="3" name="Признак счета" shortname="Признак счета" searchable="true" sortable="true" visible="true"/>
|
||||
<accType type="2" length="3" name="Признак счета" shortname="Признак счета" searchable="true" sortable="true" visible="true"/>
|
||||
</sDf53>
|
||||
<sDf54 name="ДФ-54 Вывод свободных средств для инициаторов категории В с клирингового счета 30414" destination="s-dfs/s-df54" class="ru.clearing.classes.statics.data.sdf.SDf54" table="s_df_54">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true" visible="false"/>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -4565,7 +4565,7 @@ GRANT ALL PRIVILEGES ON TABLE S_DF52 TO clearing;
|
|||
|
||||
-- sDf53 - ДФ-53 Квитанция о получении информации о состоянии счета (блокировка/разблокировка/закрытие/открытие)
|
||||
DROP TABLE IF EXISTS S_DF53;
|
||||
CREATE TABLE S_DF53(ID bigint PRIMARY KEY, ACC_NAME varchar(30), ACCOUNT varchar(25), DEAL varchar(4), DATE varchar(8), STATUS bigint, RESULT varchar(255), FILE_NAME varchar(255), GENERATION_TIME timestamp, GENERATION_ID bigint, IN_S_DF_ID bigint, ACC_TYPE bigint);
|
||||
CREATE TABLE S_DF53(ID bigint PRIMARY KEY, ACC_NAME varchar(30), ACCOUNT varchar(25), DEAL varchar(4), DATE varchar(8), STATUS bigint, RESULT varchar(255), FILE_NAME varchar(255), GENERATION_TIME timestamp, GENERATION_ID bigint, IN_S_DF_ID bigint, ACC_TYPE varchar(3));
|
||||
COMMENT ON TABLE S_DF53 IS 'ДФ-53 Квитанция о получении информации о состоянии счета (блокировка/разблокировка/закрытие/открытие)';
|
||||
|
||||
COMMENT ON COLUMN S_DF53.ID IS 'Идентификатор записи';
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ public class CompanyHistoryMapStore extends BusinessEventMapStore<CompanyHistory
|
|||
}
|
||||
}
|
||||
batchInsertUpdate(insertStatement, batchArgs);
|
||||
batchInsertUpdate(insertCompanyInfoStatement, batchCompanyInfoArgs);
|
||||
batchInsertUpdate(insertCompanyInfoStatement, batchCompanyInfoArgs, "COMPANY_INFO_HISTORY", this.getFieldsForCompanyInfo());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ public class CompanyMapStore extends BusinessObjectMapStore<Company> {
|
|||
}
|
||||
}
|
||||
batchInsertUpdate(insertStatement, batchArgs);
|
||||
batchInsertUpdate(insertCompanyInfoStatement, batchCompanyInfoArgs);
|
||||
batchInsertUpdate(insertCompanyInfoStatement, batchCompanyInfoArgs, "COMPANY_INFO", this.getFieldsForCompanyInfo());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ public class AllMapStoreTest {
|
|||
companyInfo.setCompanyId(1000000L);
|
||||
companyInfo.setId(1000000L);
|
||||
objectForCheck.setPredictableObj(company);
|
||||
} else if (objectForCheck.getMapName().startsWith("Map_SDf")) {
|
||||
} else if (objectForCheck.getMapName().toUpperCase().startsWith("MAP_SDF")) {
|
||||
trySettingString(object, objectForCheck.getClazz(), "setMarket", 1);
|
||||
trySettingString(object, objectForCheck.getClazz(), "setFile_type", 1);
|
||||
trySettingString(object, objectForCheck.getClazz(), "setSeg_type", 1);
|
||||
|
|
@ -103,7 +103,14 @@ public class AllMapStoreTest {
|
|||
trySettingString(object, objectForCheck.getClazz(), "setOp_order", 1);
|
||||
trySettingString(object, objectForCheck.getClazz(), "setSp_code", 2);
|
||||
trySettingString(object, objectForCheck.getClazz(), "setDoc_result", 2);
|
||||
trySettingString(object, objectForCheck.getClazz(), "setAcc_type", 2);
|
||||
trySettingString(object, objectForCheck.getClazz(), "setDoc_num", 3);
|
||||
if (objectForCheck.getMapName().equalsIgnoreCase("Map_sDf52")) {
|
||||
trySettingString(object, objectForCheck.getClazz(), "setAcc_type", 3);
|
||||
} else if (objectForCheck.getMapName().equalsIgnoreCase("Map_sDf53")) {
|
||||
trySettingString(object, objectForCheck.getClazz(), "setAccType", 3);
|
||||
} else {
|
||||
trySettingString(object, objectForCheck.getClazz(), "setAcc_type", 2);
|
||||
}
|
||||
trySettingString(object, objectForCheck.getClazz(), "setOp_type", 2);
|
||||
trySettingString(object, objectForCheck.getClazz(), "setDoc_result", 2);
|
||||
trySettingString(object, objectForCheck.getClazz(), "setResult", 3);
|
||||
|
|
@ -201,12 +208,13 @@ public class AllMapStoreTest {
|
|||
}
|
||||
if (actual == null) {
|
||||
log.error("No actual object for check {}", objectForCheck.getMapName());
|
||||
// continue; or throw new IllegalArgumentException("Empty actual of "+objectForCheck.getMapName());
|
||||
continue;
|
||||
}
|
||||
objectForCheck.getMATCHER().assertMatch(actual, objectForCheck.getPredictableObj());
|
||||
}
|
||||
for (CheckerDictionaryMapStore objectForCheck : checkerDictionaryMapStores) {
|
||||
String mapName = objectForCheck.getMapName();
|
||||
log.info("Checking map {}", mapName);
|
||||
AbstractDictionary actual;
|
||||
IMap<Long, AbstractDictionary> map = testConfig.getHazelcastInstance().getMap(mapName);
|
||||
actual = map.get(ID);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import static ru.spcex.clearing.imdg.utils.MatcherFactory.usingIgnoringFieldsCom
|
|||
|
||||
public class CheckerDictionaryMapStore<T> {
|
||||
|
||||
public final Matcher<T> MATCHER = usingIgnoringFieldsComparator();
|
||||
public final Matcher<T> MATCHER;
|
||||
private final String mapName;
|
||||
private final Class<T> clazz;
|
||||
|
||||
|
|
@ -19,6 +19,13 @@ public class CheckerDictionaryMapStore<T> {
|
|||
public CheckerDictionaryMapStore(String mapName, Class<T> clazz) {
|
||||
this.mapName = mapName;
|
||||
this.clazz = clazz;
|
||||
this.MATCHER = usingIgnoringFieldsComparator();
|
||||
}
|
||||
|
||||
public CheckerDictionaryMapStore(String mapName, Class<T> clazz, Matcher<T> matcher) {
|
||||
this.mapName = mapName;
|
||||
this.clazz = clazz;
|
||||
this.MATCHER = matcher;
|
||||
}
|
||||
|
||||
public String getMapName() {
|
||||
|
|
|
|||
|
|
@ -150,7 +150,14 @@ public class RunnableMapNamesForTesting {
|
|||
"object.uuid", "object.workflowStatus"
|
||||
)
|
||||
));
|
||||
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ExecutionCurrencyHistory, ExecutionCurrencyHistory.class));
|
||||
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ExecutionCurrencyHistory, ExecutionCurrencyHistory.class, usingIgnoringFieldsComparator(
|
||||
"object.duration",
|
||||
"object.interestAmount",
|
||||
"object.lots",
|
||||
"object.quantity",
|
||||
"object.settlementAmount",
|
||||
"object.settlementCurrency"
|
||||
)));
|
||||
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_SettlementHousePropertiesHistory, SettlementHousePropertiesHistory.class));
|
||||
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_TradingClearingRegistryListHistory, TradingClearingRegistryListHistory.class));
|
||||
|
||||
|
|
@ -218,7 +225,7 @@ public class RunnableMapNamesForTesting {
|
|||
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_CountryCodeDictionary, CountryCodeDictionary.class));
|
||||
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_CourierTypeDictionary, CourierTypeDictionary.class));
|
||||
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_CurrencyCodeDictionary, CurrencyCodeDictionary.class));
|
||||
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_CurrencyPairDictionary, CurrencyPairDictionary.class));
|
||||
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_CurrencyPairDictionary, CurrencyPairDictionary.class, usingIgnoringFieldsComparator("name")));
|
||||
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_CurrencySettlementTypeDictionary, CurrencySettlementTypeDictionary.class));
|
||||
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_DayStatusDictionary, DayStatusDictionary.class));
|
||||
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_DocumentTypeDictionary, DocumentTypeDictionary.class));
|
||||
|
|
@ -336,7 +343,14 @@ public class RunnableMapNamesForTesting {
|
|||
new SettingOperation("setInterestAmount", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}),
|
||||
new SettingOperation("setLots", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}),
|
||||
new SettingOperation("setQuantity", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)})));
|
||||
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ExecutionCurrency, ExecutionCurrency.class));
|
||||
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ExecutionCurrency, ExecutionCurrency.class, usingIgnoringFieldsComparator(
|
||||
"duration",
|
||||
"interestAmount",
|
||||
"lots",
|
||||
"quantity",
|
||||
"settlementAmount",
|
||||
"settlementCurrency"
|
||||
)));
|
||||
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_InDocumentJournal, InDocumentJournal.class,
|
||||
new SettingOperation("setAmount", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)})));
|
||||
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_InformationAccount, InformationAccount.class));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue