Добавил мапсторы в тест и исправил SessionMapStore, PaymentInstructionMapStore, NotificationMapStore, ManagementJournalMapStore.
This commit is contained in:
parent
d377a788f2
commit
f5afbd5c9f
5 changed files with 31 additions and 19 deletions
|
|
@ -75,7 +75,7 @@ public class ManagementJournalMapStore extends TemplateMapStore<ManagementJourna
|
|||
object.getText(),
|
||||
object.getChangeAccessSign(),
|
||||
object.getChangeDataSign(),
|
||||
object.getEventDate(),
|
||||
TimeUtil.toDateFromInstant(object.getEventDate()),
|
||||
TimeUtil.toDateFromInstant(object.getUpdated()),
|
||||
TimeUtil.toDateFromInstant(object.getCreated()),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import org.springframework.stereotype.Component;
|
|||
import ru.clearing.classes.statics.data.misc.Notification;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.spcex.clearing.imdg.base.TemplateMapStore;
|
||||
import ru.spcex.platform.utils.time.TimeUtil;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
|
@ -60,13 +61,13 @@ public class NotificationMapStore extends TemplateMapStore<Notification> {
|
|||
protected Object[] objectToField(Notification notification) {
|
||||
Object[] args = new Object[]{
|
||||
notification.getId(),
|
||||
notification.getCreated(),
|
||||
notification.getUpdated(),
|
||||
TimeUtil.toDateFromInstant(notification.getCreated()),
|
||||
TimeUtil.toDateFromInstant(notification.getUpdated()),
|
||||
notification.getClearingDate(),
|
||||
notification.getSenderId(),
|
||||
notification.getAddresseeId(),
|
||||
notification.getObjectType(),
|
||||
notification.getObjectId(),
|
||||
TimeUtil.toDateFromInstant(notification.getObjectId()),
|
||||
notification.getNotificationStatus()
|
||||
};
|
||||
return args;
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import org.springframework.stereotype.Component;
|
|||
import ru.clearing.classes.statics.data.payment.PaymentInstruction;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.spcex.clearing.imdg.base.TemplateMapStore;
|
||||
import ru.spcex.platform.utils.time.TimeUtil;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
|
@ -28,7 +29,9 @@ public class PaymentInstructionMapStore extends TemplateMapStore<PaymentInstruct
|
|||
|
||||
@Override
|
||||
public String[] getFields() {
|
||||
return new String[]{"id", "created_at", "updated_at", "sender_id", "addressee_id", "adressee_b_i_c", "payee_bank_name", "payee_b_i_c", "addressee_bank_name", "payment_date", "_payment_purpose", "settlement_date", "credit_leg_amount", "debit_leg_amount", "credit_leg_account_id", "credit_cs_account", "credit_leg_account", "debit_leg_account_id", "debit_cs_account", "debit_leg_account", "credit_leg_direction", "debit_leg_direction", "credit_leg_currency_code", "debit_leg_currency_code", "clearing_date", "transaction_status", "document_number"};
|
||||
return new String[]{"id", "created_at", "updated_at", "sender_id", "addressee_id", "adressee_b_i_c", "payee_bank_name", "payee_b_i_c", "addressee_bank_name", "payment_date",
|
||||
"payment_purpose", "settlement_date", "credit_leg_amount", "debit_leg_amount", "credit_leg_account_id", "credit_cs_account", "credit_leg_account", "debit_leg_account_id",
|
||||
"debit_cs_account", "debit_leg_account", "credit_leg_direction", "debit_leg_direction", "credit_leg_currency_code", "debit_leg_currency_code", "clearing_date", "transaction_status", "document_number"};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -68,17 +71,17 @@ public class PaymentInstructionMapStore extends TemplateMapStore<PaymentInstruct
|
|||
protected Object[] objectToField(PaymentInstruction paymentInstruction) {
|
||||
Object[] args = new Object[]{
|
||||
paymentInstruction.getId(),
|
||||
paymentInstruction.getCreated(),
|
||||
paymentInstruction.getUpdated(),
|
||||
TimeUtil.toDateFromInstant(paymentInstruction.getCreated()),
|
||||
TimeUtil.toDateFromInstant(paymentInstruction.getUpdated()),
|
||||
paymentInstruction.getSenderId(),
|
||||
paymentInstruction.getAddresseeId(),
|
||||
paymentInstruction.getAdresseeBIC(),
|
||||
paymentInstruction.getPayeeBankName(),
|
||||
paymentInstruction.getPayeeBIC(),
|
||||
paymentInstruction.getAddresseeBankName(),
|
||||
paymentInstruction.getPaymentDate(),
|
||||
TimeUtil.toDateFromInstant(paymentInstruction.getPaymentDate()),
|
||||
paymentInstruction.getPaymentPurpose(),
|
||||
paymentInstruction.getSettlementDate(),
|
||||
TimeUtil.toDateFromLocalDate(paymentInstruction.getSettlementDate()),
|
||||
paymentInstruction.getCreditLegAmount(),
|
||||
paymentInstruction.getDebitLegAmount(),
|
||||
paymentInstruction.getCreditLegAccountId(),
|
||||
|
|
@ -91,7 +94,7 @@ public class PaymentInstructionMapStore extends TemplateMapStore<PaymentInstruct
|
|||
paymentInstruction.getDebitLegDirection(),
|
||||
paymentInstruction.getCreditLegCurrencyCode(),
|
||||
paymentInstruction.getDebitLegCurrencyCode(),
|
||||
paymentInstruction.getClearingDate(),
|
||||
TimeUtil.toDateFromLocalDate(paymentInstruction.getClearingDate()),
|
||||
paymentInstruction.getTransactionStatus(),
|
||||
paymentInstruction.getDocumentNumber(),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import org.springframework.stereotype.Component;
|
|||
import ru.clearing.classes.statics.data.misc.Session;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.spcex.clearing.imdg.base.TemplateMapStore;
|
||||
import ru.spcex.platform.utils.time.TimeUtil;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
|
@ -46,9 +47,9 @@ public class SessionMapStore extends TemplateMapStore<Session> {
|
|||
protected Object[] objectToField(Session session) {
|
||||
Object[] args = new Object[]{
|
||||
session.getId(),
|
||||
session.getCreated(),
|
||||
session.getUpdated(),
|
||||
session.getClearingDate(),
|
||||
TimeUtil.toDateFromInstant(session.getCreated()),
|
||||
TimeUtil.toDateFromInstant(session.getUpdated()),
|
||||
TimeUtil.toDateFromLocalDate(session.getClearingDate()),
|
||||
session.getSessionStatus()
|
||||
};
|
||||
return args;
|
||||
|
|
|
|||
|
|
@ -9,11 +9,11 @@ import ru.clearing.classes.statics.data.company.relation.Relation;
|
|||
import ru.clearing.classes.statics.data.company.relation.RelationHistory;
|
||||
import ru.clearing.classes.statics.data.generated.ClearingMemberCategory;
|
||||
import ru.clearing.classes.statics.data.journal.InDocumentJournal;
|
||||
import ru.clearing.classes.statics.data.journal.ManagementJournal;
|
||||
import ru.clearing.classes.statics.data.journal.OutDocumentJournal;
|
||||
import ru.clearing.classes.statics.data.messages.ErrorText;
|
||||
import ru.clearing.classes.statics.data.misc.KeyRate;
|
||||
import ru.clearing.classes.statics.data.misc.Listing;
|
||||
import ru.clearing.classes.statics.data.misc.MoneyMarketSecurity;
|
||||
import ru.clearing.classes.statics.data.misc.*;
|
||||
import ru.clearing.classes.statics.data.payment.PaymentInstruction;
|
||||
import ru.clearing.classes.statics.data.profile.Contact;
|
||||
import ru.clearing.classes.statics.data.profile.ProfileDocument;
|
||||
import ru.clearing.classes.statics.data.scheduler.*;
|
||||
|
|
@ -63,6 +63,8 @@ public class RunnableMapNamesForTesting {
|
|||
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_Launcher, Launcher.class));
|
||||
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_Listing, Listing.class,
|
||||
new SettingOperation("setLotSize", new Class[]{BigDecimal.class}, new Object[]{new BigDecimal("21.11")})));
|
||||
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_ManagementJournal, ManagementJournal.class));
|
||||
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_Market, Market.class));
|
||||
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_Planner, Planner.class));
|
||||
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_PlannerTemplate, PlannerTemplate.class));
|
||||
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_Relation, Relation.class));
|
||||
|
|
@ -78,6 +80,7 @@ public class RunnableMapNamesForTesting {
|
|||
dictionaryObjectForCheckMapStores.add(new DictionaryObjectForCheckMapStore<>(IMDGDistributedNames.Map_AllowedDictionary, AllowedDictionary.class));
|
||||
dictionaryObjectForCheckMapStores.add(new DictionaryObjectForCheckMapStore<>(IMDGDistributedNames.Map_BalanceAccountTypeDictionary, BalanceAccountTypeDictionary.class));
|
||||
dictionaryObjectForCheckMapStores.add(new DictionaryObjectForCheckMapStore<>(IMDGDistributedNames.Map_ChargeDirectionDictionary, ChargeDirectionDictionary.class));
|
||||
dictionaryObjectForCheckMapStores.add(new DictionaryObjectForCheckMapStore<>(IMDGDistributedNames.Map_ClearingCategoryDictionary, ClearingCategoryDictionary.class));
|
||||
dictionaryObjectForCheckMapStores.add(new DictionaryObjectForCheckMapStore<>(IMDGDistributedNames.Map_ClearingStatusDictionary, ClearingStatusDictionary.class));
|
||||
dictionaryObjectForCheckMapStores.add(new DictionaryObjectForCheckMapStore<>(IMDGDistributedNames.Map_CompanyRoleDictionary, CompanyRoleDictionary.class));
|
||||
dictionaryObjectForCheckMapStores.add(new DictionaryObjectForCheckMapStore<>(IMDGDistributedNames.Map_CompanySymbolDictionary, CompanySymbolDictionary.class));
|
||||
|
|
@ -87,6 +90,7 @@ public class RunnableMapNamesForTesting {
|
|||
dictionaryObjectForCheckMapStores.add(new DictionaryObjectForCheckMapStore<>(IMDGDistributedNames.Map_CountryCodeDictionary, CountryCodeDictionary.class));
|
||||
dictionaryObjectForCheckMapStores.add(new DictionaryObjectForCheckMapStore<>(IMDGDistributedNames.Map_CourierTypeDictionary, CourierTypeDictionary.class));
|
||||
dictionaryObjectForCheckMapStores.add(new DictionaryObjectForCheckMapStore<>(IMDGDistributedNames.Map_CurrencyCodeDictionary, CurrencyCodeDictionary.class));
|
||||
dictionaryObjectForCheckMapStores.add(new DictionaryObjectForCheckMapStore<>(IMDGDistributedNames.Map_DayStatusDictionary, DayStatusDictionary.class));
|
||||
dictionaryObjectForCheckMapStores.add(new DictionaryObjectForCheckMapStore<>(IMDGDistributedNames.Map_DocumentTypeDictionary, DocumentTypeDictionary.class));
|
||||
dictionaryObjectForCheckMapStores.add(new DictionaryObjectForCheckMapStore<>(IMDGDistributedNames.Map_ErrorCodeDictionary, ErrorCodeDictionary.class));
|
||||
dictionaryObjectForCheckMapStores.add(new DictionaryObjectForCheckMapStore<>(IMDGDistributedNames.Map_InOutDirectionDictionary, InOutDirectionDictionary.class));
|
||||
|
|
@ -100,17 +104,16 @@ public class RunnableMapNamesForTesting {
|
|||
dictionaryObjectForCheckMapStores.add(new DictionaryObjectForCheckMapStore<>(IMDGDistributedNames.Map_OperationStatusDictionary, OperationStatusDictionary.class));
|
||||
dictionaryObjectForCheckMapStores.add(new DictionaryObjectForCheckMapStore<>(IMDGDistributedNames.Map_OperationTypeDictionary, OperationTypeDictionary.class));
|
||||
dictionaryObjectForCheckMapStores.add(new DictionaryObjectForCheckMapStore<>(IMDGDistributedNames.Map_OrganizationTypeDictionary, OrganizationTypeDictionary.class));
|
||||
dictionaryObjectForCheckMapStores.add(new DictionaryObjectForCheckMapStore<>(IMDGDistributedNames.Map_ParentDictionary, ParentDictionary.class));
|
||||
dictionaryObjectForCheckMapStores.add(new DictionaryObjectForCheckMapStore<>(IMDGDistributedNames.Map_ResultStatusDictionary, ResultStatusDictionary.class));
|
||||
dictionaryObjectForCheckMapStores.add(new DictionaryObjectForCheckMapStore<>(IMDGDistributedNames.Map_SectorDictionary, SectorDictionary.class));
|
||||
dictionaryObjectForCheckMapStores.add(new DictionaryObjectForCheckMapStore<>(IMDGDistributedNames.Map_ServiceDictionary, ServiceDictionary.class));
|
||||
dictionaryObjectForCheckMapStores.add(new DictionaryObjectForCheckMapStore<>(IMDGDistributedNames.Map_ServiceProductDictionary, ServiceProductDictionary.class));
|
||||
dictionaryObjectForCheckMapStores.add(new DictionaryObjectForCheckMapStore<>(IMDGDistributedNames.Map_ServiceStatusDictionary, ServiceStatusDictionary.class));
|
||||
dictionaryObjectForCheckMapStores.add(new DictionaryObjectForCheckMapStore<>(IMDGDistributedNames.Map_ParentDictionary, ParentDictionary.class));
|
||||
dictionaryObjectForCheckMapStores.add(new DictionaryObjectForCheckMapStore<>(IMDGDistributedNames.Map_StatementTypeDictionary, StatementTypeDictionary.class));
|
||||
dictionaryObjectForCheckMapStores.add(new DictionaryObjectForCheckMapStore<>(IMDGDistributedNames.Map_TaskDictionary, TaskDictionary.class));
|
||||
dictionaryObjectForCheckMapStores.add(new DictionaryObjectForCheckMapStore<>(IMDGDistributedNames.Map_TaskStatusDictionary, TaskStatusDictionary.class));
|
||||
dictionaryObjectForCheckMapStores.add(new DictionaryObjectForCheckMapStore<>(IMDGDistributedNames.Map_TermTypeDictionary, TermTypeDictionary.class));
|
||||
dictionaryObjectForCheckMapStores.add(new DictionaryObjectForCheckMapStore<>(IMDGDistributedNames.Map_DayStatusDictionary, DayStatusDictionary.class));
|
||||
dictionaryObjectForCheckMapStores.add(new DictionaryObjectForCheckMapStore<>(IMDGDistributedNames.Map_UserRoleDictionary, UserRoleDictionary.class));
|
||||
dictionaryObjectForCheckMapStores.add(new DictionaryObjectForCheckMapStore<>(IMDGDistributedNames.Map_WorkflowStatusDictionary, WorkflowStatusDictionary.class));
|
||||
|
||||
|
|
@ -121,16 +124,19 @@ public class RunnableMapNamesForTesting {
|
|||
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_CompanyRoleSet, CompanyRoleSet.class));
|
||||
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_CompanySymbols, CompanySymbols.class));
|
||||
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_Contact, Contact.class));
|
||||
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_Currency, Currency.class));
|
||||
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_InDocumentJournal, InDocumentJournal.class,
|
||||
new SettingOperation("setAmount", new Class[]{BigDecimal.class}, new Object[]{new BigDecimal("22.12")})));
|
||||
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_InformationAccount, InformationAccount.class));
|
||||
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_KeyRate, KeyRate.class));
|
||||
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_MoneyMarketSecurity, MoneyMarketSecurity.class,
|
||||
new SettingOperation("setNominalValue", new Class[]{BigDecimal.class}, new Object[]{new BigDecimal("25.25")})));
|
||||
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_Notification, Notification.class));
|
||||
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_OutDocumentJournal, OutDocumentJournal.class,
|
||||
new SettingOperation("setAmount", new Class[]{BigDecimal.class}, new Object[]{new BigDecimal("28.28")})));
|
||||
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_ProfileDocument, ProfileDocument.class));
|
||||
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_PaymentInstruction, PaymentInstruction.class));
|
||||
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_PlannerAllToday, PlannerAllToday.class));
|
||||
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_ProfileDocument, ProfileDocument.class));
|
||||
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_SDf01, SDf01.class));
|
||||
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_SDf02, SDf02.class));
|
||||
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_SDf03, SDf03.class));
|
||||
|
|
@ -145,6 +151,7 @@ public class RunnableMapNamesForTesting {
|
|||
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_SDf16, SDf16.class));
|
||||
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_SDf17, SDf17.class));
|
||||
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_SDf18, SDf18.class));
|
||||
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));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue