diff --git a/clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/sdf/SDf03.java b/clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/sdf/SDf03.java
index 4d190fef9..a8ab57740 100644
--- a/clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/sdf/SDf03.java
+++ b/clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/sdf/SDf03.java
@@ -7,7 +7,7 @@ import java.time.Instant;
/**
* ДФ-03 Сводное платежное поручение
- *
+ *
* DB table: S_DF03
**/
public class SDf03 extends SpcexObjectBase {
@@ -61,6 +61,7 @@ public class SDf03 extends SpcexObjectBase {
private String imp_result;
private Instant generationTime;
private Long generationId;
+ private Long paymentInstructionId;
public String getSeg_type() {
return seg_type;
@@ -445,4 +446,12 @@ public class SDf03 extends SpcexObjectBase {
public void setDocnmprev(String docnmprev) {
this.docnmprev = docnmprev;
}
+
+ public Long getPaymentInstructionId() {
+ return paymentInstructionId;
+ }
+
+ public void setPaymentInstructionId(Long paymentInstructionId) {
+ this.paymentInstructionId = paymentInstructionId;
+ }
}
diff --git a/clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/sdf/SDf11.java b/clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/sdf/SDf11.java
index b8e2f2c69..b0b27136c 100644
--- a/clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/sdf/SDf11.java
+++ b/clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/sdf/SDf11.java
@@ -7,7 +7,7 @@ import java.time.Instant;
/**
* ДФ-11 Из КС в ПРЦ Платежное распоряжение на перевод средств с ТБС Участника на КС Инициатора
- *
+ *
* DB table: S_DF11
**/
public class SDf11 extends SpcexObjectBase {
@@ -60,6 +60,7 @@ public class SDf11 extends SpcexObjectBase {
private String doc_result;
private Instant generationTime;
private Long generationId;
+ private Long paymentInstructionId;
public String getSeg_type() {
return seg_type;
@@ -436,4 +437,12 @@ public class SDf11 extends SpcexObjectBase {
public void setGenerationId(Long generationId) {
this.generationId = generationId;
}
+
+ public Long getPaymentInstructionId() {
+ return paymentInstructionId;
+ }
+
+ public void setPaymentInstructionId(Long paymentInstructionId) {
+ this.paymentInstructionId = paymentInstructionId;
+ }
}
diff --git a/clearing-parent/clearing-service/src/main/java/ru/spcex/clearing/service/order/Sdf03Builder.java b/clearing-parent/clearing-service/src/main/java/ru/spcex/clearing/service/order/Sdf03Builder.java
index a16f02452..d91755610 100644
--- a/clearing-parent/clearing-service/src/main/java/ru/spcex/clearing/service/order/Sdf03Builder.java
+++ b/clearing-parent/clearing-service/src/main/java/ru/spcex/clearing/service/order/Sdf03Builder.java
@@ -47,8 +47,7 @@ public class Sdf03Builder {
}
sDf03.setGenerationTime(Instant.now());
sDf03.setGenerationId(generationId);
- //todo
-// sDf03.setPaymentInstructionId(paymentInstruction.getId());
+ sDf03.setPaymentInstructionId(paymentInstruction.getId());
return sDf03;
}
}
diff --git a/clearing-parent/clearing-service/src/main/java/ru/spcex/clearing/service/order/Sdf11Builder.java b/clearing-parent/clearing-service/src/main/java/ru/spcex/clearing/service/order/Sdf11Builder.java
index 310a77b1d..c609b133e 100644
--- a/clearing-parent/clearing-service/src/main/java/ru/spcex/clearing/service/order/Sdf11Builder.java
+++ b/clearing-parent/clearing-service/src/main/java/ru/spcex/clearing/service/order/Sdf11Builder.java
@@ -47,8 +47,7 @@ public class Sdf11Builder {
}
sDf11.setGenerationTime(Instant.now());
sDf11.setGenerationId(generationId);
- //todo
-// sDf03.setPaymentInstructionId(paymentInstruction.getId());
+ sDf11.setPaymentInstructionId(paymentInstruction.getId());
return sDf11;
}
}
diff --git a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/businessobject/ManagementJournalMapStore.java b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/businessobject/ManagementJournalMapStore.java
index b184781ca..67c8d3031 100644
--- a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/businessobject/ManagementJournalMapStore.java
+++ b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/businessobject/ManagementJournalMapStore.java
@@ -75,7 +75,7 @@ public class ManagementJournalMapStore extends TemplateMapStore {
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;
diff --git a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/object/PaymentInstructionMapStore.java b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/object/PaymentInstructionMapStore.java
index fa42fdb6d..47fa2fbcb 100644
--- a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/object/PaymentInstructionMapStore.java
+++ b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/object/PaymentInstructionMapStore.java
@@ -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 {
@Override
public String[] getFields() {
- return new String[] {
+ return new String[]{
"ID", "SEG_TYPE", "DOC_TYPE", "DOCNM_REF", "DOCNMPREV", "PRIORITY", "SBANKCODE", "C_ACC_DEB", "SBANKNAM1", "SBANKNAM2",
"SBANKNAM3", "SBANKNAM4", "SBANKNAM5", "RBANKCODE", "C_ACC_CRED", "RBANKNAM1", "RBANKNAM2", "RBANKNAM3",
"RBANKNAM4", "RBANKNAM5", "PAY_DATE", "EXT_DATE", "PAY_VAL", "SUM_DEB", "SCLIENTN1", "SCLIENTN2",
"SCLIENTN3", "SCLIENTN4", "SC_CODE", "ACC_DEB", "RCLIENTN1", "RCLIENTN2", "RCLIENTN3", "RCLIENTN4",
"ACC_KR_1", "ACC_KR_2", "SP_CODE", "SPECIF_1", "SPECIF_2", "SPECIF_3", "SPECIF_4", "SPECIF_5",
- "SPECIF_6", "SEND_TYPE", "SERVDATE", "DOC_RESULT", "IMP_RESULT", "GENERATION_TIME", "GENERATION_ID"
+ "SPECIF_6", "SEND_TYPE", "SERVDATE", "DOC_RESULT", "IMP_RESULT", "GENERATION_TIME", "GENERATION_ID", "PAYMENT_INSTRUCTION_ID"
};
}
@@ -91,6 +91,7 @@ public class SDf03MapStore extends TemplateMapStore {
object.setImp_result(resultSet.getObject("IMP_RESULT", String.class));
object.setGenerationTime(getInstantFromTimestamp(resultSet, "GENERATION_TIME"));
object.setGenerationId(resultSet.getObject("GENERATION_ID", Long.class));
+ object.setPaymentInstructionId(resultSet.getObject("PAYMENT_INSTRUCTION_ID", Long.class));
return object;
}
@@ -99,53 +100,54 @@ public class SDf03MapStore extends TemplateMapStore {
Object[] args = new Object[]{
object.getId(),
object.getSeg_type(),
- object.getDoc_type(),
- object.getDocnm_ref(),
- object.getDocnmprev(),
- object.getPriority(),
- object.getSbankcode(),
- object.getC_acc_deb(),
- object.getSbanknam1(),
- object.getSbanknam2(),
- object.getSbanknam3(),
- object.getSbanknam4(),
- object.getSbanknam5(),
- object.getRbankcode(),
- object.getC_acc_cred(),
- object.getRbanknam1(),
- object.getRbanknam2(),
- object.getRbanknam3(),
- object.getRbanknam4(),
- object.getRbanknam5(),
- object.getPay_date(),
- object.getExt_date(),
- object.getPay_val(),
- object.getSum_deb(),
- object.getSclientn1(),
- object.getSclientn2(),
- object.getSclientn3(),
- object.getSclientn4(),
- object.getSc_code(),
- object.getAcc_deb(),
- object.getRclientn1(),
- object.getRclientn2(),
- object.getRclientn3(),
- object.getRclientn4(),
- object.getAcc_kr_1(),
- object.getAcc_kr_2(),
- object.getSp_code(),
- object.getSpecif_1(),
- object.getSpecif_2(),
- object.getSpecif_3(),
- object.getSpecif_4(),
- object.getSpecif_5(),
- object.getSpecif_6(),
- object.getSend_type(),
- object.getServdate(),
- object.getDoc_result(),
- object.getImp_result(),
+ object.getDoc_type(),
+ object.getDocnm_ref(),
+ object.getDocnmprev(),
+ object.getPriority(),
+ object.getSbankcode(),
+ object.getC_acc_deb(),
+ object.getSbanknam1(),
+ object.getSbanknam2(),
+ object.getSbanknam3(),
+ object.getSbanknam4(),
+ object.getSbanknam5(),
+ object.getRbankcode(),
+ object.getC_acc_cred(),
+ object.getRbanknam1(),
+ object.getRbanknam2(),
+ object.getRbanknam3(),
+ object.getRbanknam4(),
+ object.getRbanknam5(),
+ object.getPay_date(),
+ object.getExt_date(),
+ object.getPay_val(),
+ object.getSum_deb(),
+ object.getSclientn1(),
+ object.getSclientn2(),
+ object.getSclientn3(),
+ object.getSclientn4(),
+ object.getSc_code(),
+ object.getAcc_deb(),
+ object.getRclientn1(),
+ object.getRclientn2(),
+ object.getRclientn3(),
+ object.getRclientn4(),
+ object.getAcc_kr_1(),
+ object.getAcc_kr_2(),
+ object.getSp_code(),
+ object.getSpecif_1(),
+ object.getSpecif_2(),
+ object.getSpecif_3(),
+ object.getSpecif_4(),
+ object.getSpecif_5(),
+ object.getSpecif_6(),
+ object.getSend_type(),
+ object.getServdate(),
+ object.getDoc_result(),
+ object.getImp_result(),
TimeUtil.toDateFromInstant(object.getGenerationTime()),
- object.getGenerationId()
+ object.getGenerationId(),
+ object.getPaymentInstructionId()
};
return args;
}
diff --git a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/object/SDf11MapStore.java b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/object/SDf11MapStore.java
index 7667a2acd..febedde70 100644
--- a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/object/SDf11MapStore.java
+++ b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/object/SDf11MapStore.java
@@ -29,13 +29,13 @@ public class SDf11MapStore extends TemplateMapStore {
@Override
public String[] getFields() {
- return new String[] {
+ return new String[]{
"ID", "SEG_TYPE", "DOC_TYPE", "DOCNM_REF", "DOCNMPREV", "PRIORITY", "SBANKCODE", "C_ACC_DEB", "SBANKNAM1",
"SBANKNAM2", "SBANKNAM3", "SBANKNAM4", "SBANKNAM5", "RBANKCODE", "C_ACC_CRED", "RBANKNAM1", "RBANKNAM2",
"RBANKNAM3", "RBANKNAM4", "RBANKNAM5", "PAY_DATE", "EXT_DATE", "PAY_VAL", "SUM_DEB", "SCLIENTN1", "SCLIENTN2",
"SCLIENTN3", "SCLIENTN4", "SC_CODE", "ACC_DEB", "RCLIENTN1", "RCLIENTN2", "RCLIENTN3", "RCLIENTN4",
"ACC_KR_1", "ACC_KR_2", "SP_CODE", "SPECIF_1", "SPECIF_2", "SPECIF_3", "SPECIF_4", "SPECIF_5",
- "SPECIF_6", "SEND_TYPE", "SERVDATE", "DOC_RESULT", "GENERATION_TIME", "GENERATION_ID"
+ "SPECIF_6", "SEND_TYPE", "SERVDATE", "DOC_RESULT", "GENERATION_TIME", "GENERATION_ID", "PAYMENT_INSTRUCTION_ID"
};
}
@@ -90,6 +90,7 @@ public class SDf11MapStore extends TemplateMapStore {
object.setDoc_result(resultSet.getObject("DOC_RESULT", String.class));
object.setGenerationTime(getInstantFromTimestamp(resultSet, "GENERATION_TIME"));
object.setGenerationId(resultSet.getObject("GENERATION_ID", Long.class));
+ object.setPaymentInstructionId(resultSet.getObject("PAYMENT_INSTRUCTION_ID", Long.class));
return object;
}
@@ -98,52 +99,53 @@ public class SDf11MapStore extends TemplateMapStore {
Object[] args = new Object[]{
object.getId(),
object.getSeg_type(),
- object.getDoc_type(),
- object.getDocnm_ref(),
+ object.getDoc_type(),
+ object.getDocnm_ref(),
object.getDocnmprev(),
- object.getPriority(),
- object.getSbankcode(),
- object.getC_acc_deb(),
- object.getSbanknam1(),
- object.getSbanknam2(),
- object.getSbanknam3(),
- object.getSbanknam4(),
- object.getSbanknam5(),
- object.getRbankcode(),
- object.getC_acc_cred(),
- object.getRbanknam1(),
- object.getRbanknam2(),
- object.getRbanknam3(),
- object.getRbanknam4(),
- object.getRbanknam5(),
- object.getPay_date(),
- object.getExt_date(),
- object.getPay_val(),
- object.getSum_deb(),
- object.getSclientn1(),
- object.getSclientn2(),
- object.getSclientn3(),
- object.getSclientn4(),
- object.getSc_code(),
- object.getAcc_deb(),
- object.getRclientn1(),
- object.getRclientn2(),
- object.getRclientn3(),
- object.getRclientn4(),
- object.getAcc_kr_1(),
- object.getAcc_kr_2(),
- object.getSp_code(),
- object.getSpecif_1(),
- object.getSpecif_2(),
- object.getSpecif_3(),
- object.getSpecif_4(),
- object.getSpecif_5(),
- object.getSpecif_6(),
- object.getSend_type(),
- object.getServdate(),
- object.getDoc_result(),
+ object.getPriority(),
+ object.getSbankcode(),
+ object.getC_acc_deb(),
+ object.getSbanknam1(),
+ object.getSbanknam2(),
+ object.getSbanknam3(),
+ object.getSbanknam4(),
+ object.getSbanknam5(),
+ object.getRbankcode(),
+ object.getC_acc_cred(),
+ object.getRbanknam1(),
+ object.getRbanknam2(),
+ object.getRbanknam3(),
+ object.getRbanknam4(),
+ object.getRbanknam5(),
+ object.getPay_date(),
+ object.getExt_date(),
+ object.getPay_val(),
+ object.getSum_deb(),
+ object.getSclientn1(),
+ object.getSclientn2(),
+ object.getSclientn3(),
+ object.getSclientn4(),
+ object.getSc_code(),
+ object.getAcc_deb(),
+ object.getRclientn1(),
+ object.getRclientn2(),
+ object.getRclientn3(),
+ object.getRclientn4(),
+ object.getAcc_kr_1(),
+ object.getAcc_kr_2(),
+ object.getSp_code(),
+ object.getSpecif_1(),
+ object.getSpecif_2(),
+ object.getSpecif_3(),
+ object.getSpecif_4(),
+ object.getSpecif_5(),
+ object.getSpecif_6(),
+ object.getSend_type(),
+ object.getServdate(),
+ object.getDoc_result(),
TimeUtil.toDateFromInstant(object.getGenerationTime()),
- object.getGenerationId()
+ object.getGenerationId(),
+ object.getPaymentInstructionId()
};
return args;
}
diff --git a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/object/SessionMapStore.java b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/object/SessionMapStore.java
index 4e5211b43..eb9baf0a7 100644
--- a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/object/SessionMapStore.java
+++ b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/object/SessionMapStore.java
@@ -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 {
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;
diff --git a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/object/UserRoleSessionMapStore.java b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/object/UserRoleSessionMapStore.java
index f1f9cd4cf..fdc8edf8b 100644
--- a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/object/UserRoleSessionMapStore.java
+++ b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/object/UserRoleSessionMapStore.java
@@ -29,7 +29,7 @@ public class UserRoleSessionMapStore extends TemplateMapStore {
@Override
public String[] getFields() {
return new String[]{
- "ID", "USER_ID", "USER_ROLE", "COMPANY_ID", "STATUS"
+ "ID", "USER_ID", "USER_ROLE", "COMPANY_ID", "STATUS"
};
}
@@ -40,7 +40,7 @@ public class UserRoleSessionMapStore extends TemplateMapStore {
object.setId(resultSet.getObject("ID", Long.class));
object.setUserId(resultSet.getObject("USER_ID", Long.class));
object.setUserRole(resultSet.getObject("USER_ROLE", String.class));
- object.setCompanyId(companyId.equals(0L) ? 1 : companyId);
+ object.setCompanyId(companyId == null || companyId.equals(0L) ? 1 : companyId);
object.setStatus(resultSet.getObject("STATUS", String.class));
return object;
}
diff --git a/clearing-parent/imdg/src/test/java/ru/spcex/clearing/imdg/structure/RunnableMapNamesForTesting.java b/clearing-parent/imdg/src/test/java/ru/spcex/clearing/imdg/structure/RunnableMapNamesForTesting.java
index f97406af2..68991d4be 100644
--- a/clearing-parent/imdg/src/test/java/ru/spcex/clearing/imdg/structure/RunnableMapNamesForTesting.java
+++ b/clearing-parent/imdg/src/test/java/ru/spcex/clearing/imdg/structure/RunnableMapNamesForTesting.java
@@ -9,10 +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.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.*;
@@ -54,18 +55,22 @@ public class RunnableMapNamesForTesting {
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_UserHistory, UserHistory.class));
//business object
- businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_Account, Account.class));
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_ErrorText, ErrorText.class));
- businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_Relation, Relation.class));
+ 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));
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_Security, Security.class));
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_Statement, Statement.class,
new SettingOperation("setAmount", new Class[]{BigDecimal.class}, new Object[]{new BigDecimal("23.22")})));
- businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_Launcher, Launcher.class));
- businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_PlannerTemplate, PlannerTemplate.class));
- businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_ClearingCalendar, ClearingCalendar.class));
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_UserConnect, UserConnect.class));
businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_User, User.class));
@@ -75,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));
@@ -84,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));
@@ -97,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));
@@ -118,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("23.22")})));
+ 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("23.22")})));
+ 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("23.22")})));
- businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_ProfileDocument, ProfileDocument.class));
+ new SettingOperation("setAmount", new Class[]{BigDecimal.class}, new Object[]{new BigDecimal("28.28")})));
+ 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));
@@ -142,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));
}
diff --git a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/LauncherService.java b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/LauncherService.java
new file mode 100644
index 000000000..82e9862af
--- /dev/null
+++ b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/LauncherService.java
@@ -0,0 +1,52 @@
+package ru.spcex.clearing.scheduler.service;
+
+import org.apache.kafka.clients.consumer.Consumer;
+import org.apache.kafka.clients.producer.Producer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.InitializingBean;
+import org.springframework.beans.factory.annotation.Autowired;
+import ru.clearing.classes.statics.data.scheduler.Launcher;
+import ru.spcex.clearing.imdg.IMDGDistributedNames;
+import ru.spcex.clearing.platform.messaging.domain.BaseRequest;
+import ru.spcex.clearing.platform.messaging.domain.Consts;
+import ru.spcex.clearing.platform.messaging.domain.cud.schedule.LauncherCommandRequest;
+import ru.spcex.clearing.platform.messaging.service.QueueConsumer;
+import ru.spcex.platform.imdg.api.Imdg;
+import ru.spcex.platform.imdg.api.ImdgProvider;
+
+import java.time.Instant;
+
+public class LauncherService extends QueueConsumer implements InitializingBean {
+ private final Logger log = LoggerFactory.getLogger(getClass());
+ private final Imdg launcherMap;
+
+ @Autowired
+ public LauncherService(Consumer kafkaQueue, Producer kafkaProducer,
+ ImdgProvider imdgProvider) {
+ super(kafkaQueue, kafkaProducer);
+ this.launcherMap = imdgProvider.getImdg(IMDGDistributedNames.Map_Launcher, Launcher.class);
+ }
+
+ @Override
+ public void afterPropertiesSet() {
+ callback(LauncherCommandRequest.class)
+ .setConsumer(this::newLauncher)
+ .forDestination(Consts.LAUNCHER_NEW, callbacks::put);
+ init();
+ }
+
+ private void newLauncher(BaseRequest userRequest) {
+ LauncherCommandRequest req = userRequest.getRequestPayload();
+ log.debug("LauncherCommandRequest received");
+ Instant created = Instant.now();
+ Launcher launcher = new Launcher();
+ launcher.setTask(req.getTaskName());
+ launcher.setSenderId(req.getUserId());
+ launcher.setCreated(created);
+ launcher.setUpdated(created);
+ launcherMap.insert(launcher);
+ log.debug("successfully processed, new id {}", launcher.getId());
+ }
+
+}