Закоментировал лишние поля(setShortName, setFullName, setTradingCode, setClearingCode, setRegistrationCode) в CompanyHistoryMapStore и CompanyMapStore. Поправил тест.

This commit is contained in:
psemenkov 2022-12-28 12:57:22 +03:00
parent a4a2476655
commit cf6f80a0cf
4 changed files with 36 additions and 24 deletions

View file

@ -41,8 +41,8 @@ public class CompanyHistoryMapStore extends BusinessEventMapStore<CompanyHistory
return new String[]{
"id", "event_time", "event_user_id",
"company_info_id", "company_id", "corporation_sole_type", "country_code", "description",
"professional_sign", "legal_kind", "organization_type", "residence", "short_name", "full_name",
"short_name_eng", "full_name_eng", "trading_code", "clearing_code", "registration_code"
"professional_sign", "legal_kind", "organization_type", "residence", "short_name_eng", "full_name_eng"
// ,"short_name", "full_name", "trading_code", "clearing_code", "registration_code"
};
}
@ -105,13 +105,13 @@ public class CompanyHistoryMapStore extends BusinessEventMapStore<CompanyHistory
companyInfo.getLegalKind(),
companyInfo.getOrganizationType(),
companyInfo.getResidence(),
companyInfo.getShortName(),
companyInfo.getFullName(),
companyInfo.getShortNameEng(),
companyInfo.getFullNameEng(),
companyInfo.getTradingCode(),
companyInfo.getClearingCode(),
companyInfo.getRegistrationCode()
companyInfo.getFullNameEng()
// companyInfo.getShortName(),
// companyInfo.getFullName(),
// companyInfo.getTradingCode(),
// companyInfo.getClearingCode(),
// companyInfo.getRegistrationCode()
));
}
}

View file

@ -37,8 +37,8 @@ public class CompanyMapStore extends BusinessObjectMapStore<Company> {
return new String[]{
"id", "company_id", "corporation_sole_type", "country_code", "description",
"professional_sign", "legal_kind", "organization_type", "residence",
"short_name_eng", "full_name_eng", "short_name", "full_name", "trading_code",
"clearing_code", "registration_code"
"short_name_eng", "full_name_eng"
// , "short_name", "full_name", "trading_code","clearing_code", "registration_code"
};
}
@ -114,11 +114,11 @@ public class CompanyMapStore extends BusinessObjectMapStore<Company> {
companyInfo.setResidence(rs.getString("RESIDENCE"));
companyInfo.setShortNameEng(rs.getString("SHORT_NAME_ENG"));
companyInfo.setFullNameEng(rs.getString("FULL_NAME_ENG"));
companyInfo.setShortName(rs.getString("SHORT_NAME"));
companyInfo.setFullName(rs.getString("FULL_NAME"));
companyInfo.setTradingCode(rs.getString("TRADING_CODE"));
companyInfo.setClearingCode(rs.getString("CLEARING_CODE"));
companyInfo.setRegistrationCode(rs.getString("REGISTRATION_CODE"));
// companyInfo.setShortName(rs.getString("SHORT_NAME"));
// companyInfo.setFullName(rs.getString("FULL_NAME"));
// companyInfo.setTradingCode(rs.getString("TRADING_CODE"));
// companyInfo.setClearingCode(rs.getString("CLEARING_CODE"));
// companyInfo.setRegistrationCode(rs.getString("REGISTRATION_CODE"));
return companyInfo;
}
);
@ -150,12 +150,12 @@ public class CompanyMapStore extends BusinessObjectMapStore<Company> {
companyInfo.getOrganizationType(),
companyInfo.getResidence(),
companyInfo.getShortNameEng(),
companyInfo.getFullNameEng(),
companyInfo.getShortName(),
companyInfo.getFullName(),
companyInfo.getTradingCode(),
companyInfo.getClearingCode(),
companyInfo.getRegistrationCode()
companyInfo.getFullNameEng()
// companyInfo.getShortName(),
// companyInfo.getFullName(),
// companyInfo.getTradingCode(),
// companyInfo.getClearingCode(),
// companyInfo.getRegistrationCode()
));
return companyInfoArgs;
}

View file

@ -11,7 +11,7 @@ import static ru.spcex.clearing.imdg.utils.MatcherFactory.usingIgnoringFieldsCom
public class BusinessObjectAndBusinessEventForCheckMapStore<T> {
public final Matcher<T> MATCHER = usingIgnoringFieldsComparator();
public final Matcher<T> MATCHER;
private final String mapName;
private final Class<T> clazz;
private SettingOperation settingOperation;
@ -21,12 +21,20 @@ public class BusinessObjectAndBusinessEventForCheckMapStore<T> {
public BusinessObjectAndBusinessEventForCheckMapStore(String mapName, Class<T> clazz) {
this.mapName = mapName;
this.clazz = clazz;
this.MATCHER = usingIgnoringFieldsComparator();
}
public BusinessObjectAndBusinessEventForCheckMapStore(String mapName, Class<T> clazz, SettingOperation settingOperation) {
this.mapName = mapName;
this.clazz = clazz;
this.settingOperation = settingOperation;
this.MATCHER = usingIgnoringFieldsComparator();
}
public BusinessObjectAndBusinessEventForCheckMapStore(String mapName, Class<T> clazz, Matcher<T> MATCHER) {
this.mapName = mapName;
this.clazz = clazz;
this.MATCHER = MATCHER;
}
public String getMapName() {

View file

@ -30,6 +30,8 @@ import java.math.BigDecimal;
import java.util.LinkedList;
import java.util.List;
import static ru.spcex.clearing.imdg.utils.MatcherFactory.usingIgnoringFieldsComparator;
public class RunnableMapNamesForTesting {
public static List<BusinessObjectAndBusinessEventForCheckMapStore> businessObjectAndBusinessEventForCheckMapStores;
public static List<DictionaryObjectForCheckMapStore> dictionaryObjectForCheckMapStores;
@ -47,7 +49,8 @@ public class RunnableMapNamesForTesting {
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_AccountHistory, AccountHistory.class));
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_AccountRoutingHistory, AccountRoutingHistory.class));
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_BankAccountHistory, BankAccountHistory.class));
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_CompanyHistory, CompanyHistory.class));
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_CompanyHistory, CompanyHistory.class,
usingIgnoringFieldsComparator("object.profile.clearingCode", "object.profile.fullName", "object.profile.registrationCode", "object.profile.shortName", "object.profile.tradingCode")));
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_InformationAccountHistory, InformationAccountHistory.class));
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_RelationHistory, RelationHistory.class));
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_SecurityHistory, SecurityHistory.class));
@ -58,7 +61,8 @@ public class RunnableMapNamesForTesting {
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_AccountBalance, AccountBalance.class));
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_Account, Account.class));
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_ClearingCalendar, ClearingCalendar.class));
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_Company, Company.class));
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_Company, Company.class,
usingIgnoringFieldsComparator("profile.clearingCode", "profile.fullName", "profile.registrationCode", "profile.shortName", "profile.tradingCode")));
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_ErrorText, ErrorText.class));
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_Launcher, Launcher.class));
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_Listing, Listing.class,