From 1c32803b600763f380817797653180892c3824f1 Mon Sep 17 00:00:00 2001 From: psemenkov Date: Tue, 18 Apr 2023 17:03:53 +0300 Subject: [PATCH 01/27] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=B8=D0=BB=20ListingBuilder.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../securities/component/ListingBuilder.java | 133 +++++++++--------- .../service/cud/EquitySecurityService.java | 18 ++- .../cud/FixedIncomeSecurityService.java | 17 ++- .../cud/MoneyMarketSecurityService.java | 17 ++- .../service/AbstractServiceTest.java | 3 +- .../service/EquitySecurityServiceTest.java | 8 +- .../FixedIncomeSecurityServiceTest.java | 8 +- .../MoneyMarketSecurityServiceTest.java | 8 +- 8 files changed, 124 insertions(+), 88 deletions(-) diff --git a/clearing-parent/securities-service/src/main/java/ru/spcex/clearing/securities/component/ListingBuilder.java b/clearing-parent/securities-service/src/main/java/ru/spcex/clearing/securities/component/ListingBuilder.java index e8a65395c..a0cf43bea 100644 --- a/clearing-parent/securities-service/src/main/java/ru/spcex/clearing/securities/component/ListingBuilder.java +++ b/clearing-parent/securities-service/src/main/java/ru/spcex/clearing/securities/component/ListingBuilder.java @@ -10,78 +10,75 @@ import ru.spcex.clearing.platform.messaging.domain.cud.securitites.MoneyMarketSe import ru.spcex.platform.enumeration.Market; import ru.spcex.platform.enumeration.Status; +import java.math.BigDecimal; +import java.time.Instant; + public class ListingBuilder { + private Instant created; + private Long securityId; + private BigDecimal lotSize; private final String market = Market.mkrs.getKey(); + private String symbolCode; + private String symbolName; + private String tradingCurrency; + private final String workflowStatus = Status.Active.getKey(); - public Listing byNewMms(MoneyMarketSecurity mms, MoneyMarketSecurityNewRequest mmsReq) { + public static ListingBuilder builder() { + return new ListingBuilder(); + } + private ListingBuilder(){} + + public ListingBuilder append(MoneyMarketSecurity mms){ + this.created = mms.getCreated(); + this.securityId = mms.getId(); + this.symbolCode = mms.getSecuritySymbol(); + this.symbolName = mms.getFullName(); + this.tradingCurrency = mms.getNominalCurrency(); + return this; + } + + public ListingBuilder append(MoneyMarketSecurityNewRequest mmsReq){ + this.lotSize = mmsReq.getLotSize(); + return this; + } + + public ListingBuilder append(EquitySecurity equitySecurity){ + this.created = equitySecurity.getCreated(); + this.securityId = equitySecurity.getId(); + this.symbolCode = equitySecurity.getSecuritySymbol(); + this.symbolName = equitySecurity.getFullName(); + return this; + } + + public ListingBuilder append(EquitySecurityNewRequest request){ + this.lotSize = request.getLotSize(); + return this; + } + + public ListingBuilder append(FixedIncomeSecurity fixedIncomeSecurity){ + this.created = fixedIncomeSecurity.getCreated(); + this.securityId = fixedIncomeSecurity.getId(); + this.symbolCode = fixedIncomeSecurity.getSecuritySymbol(); + this.symbolName = fixedIncomeSecurity.getFullName(); + this.tradingCurrency = fixedIncomeSecurity.getNominalCurrency(); + return this; + } + + public ListingBuilder append(FixedIncomeSecurityNewRequest request){ + this.lotSize = request.getLotSize(); + return this; + } + + public Listing build(){ Listing listing = new Listing(); - listing.setCreated(mms.getCreated()); - listing.setSecurityId(mms.getId()); - listing.setLotSize(mmsReq.getLotSize()); - listing.setMarket(market); - listing.setSymbolCode(mms.getSecuritySymbol()); - listing.setSymbolName(mms.getFullName()); - listing.setTradingCurrency(mms.getNominalCurrency()); - listing.setWorkflowStatus(Status.Active.getKey()); - return listing; - } - - public Listing byUpdateMms(MoneyMarketSecurity mms, Listing listing) { - listing.setSecurityId(mms.getId()); - listing.setSymbolCode(mms.getSecuritySymbol()); - listing.setSymbolName(mms.getFullName()); - listing.setTradingCurrency(mms.getNominalCurrency()); - listing.setWorkflowStatus(mms.getWorkflowStatus()); - listing.setLotSize(mms.getLotSize()); - listing.setUpdated(mms.getUpdated()); - return listing; - } - - public Listing byNewEquity(EquitySecurity equitySecurity, EquitySecurityNewRequest request) { - Listing listing = new Listing(); - listing.setCreated(equitySecurity.getCreated()); - listing.setSecurityId(equitySecurity.getId()); - listing.setLotSize(request.getLotSize()); - listing.setMarket(market); - listing.setSymbolCode(equitySecurity.getSecuritySymbol()); - listing.setSymbolName(equitySecurity.getFullName()); -// listing.setTradingCurrency(equitySecurity.getNominalCurrency()); - listing.setWorkflowStatus(Status.Active.getKey()); - return listing; - } - - public Listing byUpdateEquity(EquitySecurity equitySecurity, Listing listing) { - listing.setSecurityId(equitySecurity.getId()); - listing.setSymbolCode(equitySecurity.getSecuritySymbol()); - listing.setSymbolName(equitySecurity.getFullName()); - listing.setWorkflowStatus(equitySecurity.getWorkflowStatus()); - listing.setMarket(market); - listing.setLotSize(equitySecurity.getLotSize()); - listing.setUpdated(equitySecurity.getUpdated()); - return listing; - } - - public Listing byNewFixedIncome(FixedIncomeSecurity instant, FixedIncomeSecurityNewRequest request) { - Listing listing = new Listing(); - listing.setCreated(instant.getCreated()); - listing.setSecurityId(instant.getId()); - listing.setLotSize(request.getLotSize()); - listing.setMarket(market); - listing.setSymbolCode(instant.getSecuritySymbol()); - listing.setSymbolName(instant.getFullName()); - listing.setTradingCurrency(instant.getNominalCurrency()); - listing.setWorkflowStatus(Status.Active.getKey()); - return listing; - } - - public Listing byFixedIncomeEquity(FixedIncomeSecurity fixedIncomeSecurity, Listing listing) { - listing.setSecurityId(fixedIncomeSecurity.getId()); - listing.setSymbolCode(fixedIncomeSecurity.getSecuritySymbol()); - listing.setSymbolName(fixedIncomeSecurity.getFullName()); - listing.setTradingCurrency(fixedIncomeSecurity.getNominalCurrency()); - listing.setWorkflowStatus(fixedIncomeSecurity.getWorkflowStatus()); - listing.setLotSize(fixedIncomeSecurity.getLotSize()); - listing.setUpdated(fixedIncomeSecurity.getUpdated()); + listing.setCreated(this.created); + listing.setSecurityId(this.securityId); + listing.setLotSize(this.lotSize); + listing.setMarket(this.market); + listing.setSymbolCode(this.symbolCode); + listing.setSymbolName(this.symbolName); + listing.setTradingCurrency(this.tradingCurrency); + listing.setWorkflowStatus(this.workflowStatus); return listing; } } diff --git a/clearing-parent/securities-service/src/main/java/ru/spcex/clearing/securities/service/cud/EquitySecurityService.java b/clearing-parent/securities-service/src/main/java/ru/spcex/clearing/securities/service/cud/EquitySecurityService.java index c19885ee4..e5ead4784 100644 --- a/clearing-parent/securities-service/src/main/java/ru/spcex/clearing/securities/service/cud/EquitySecurityService.java +++ b/clearing-parent/securities-service/src/main/java/ru/spcex/clearing/securities/service/cud/EquitySecurityService.java @@ -21,6 +21,7 @@ import ru.spcex.clearing.securities.component.ListingBuilder; import ru.spcex.clearing.securities.validation.ValidationProvider; import ru.spcex.clearing.util.security.UserRoleVerification; import ru.spcex.clearing.validation.common.ValidationHelper; +import ru.spcex.platform.enumeration.Market; import ru.spcex.platform.enumeration.UserRole; import ru.spcex.platform.imdg.api.Imdg; import ru.spcex.platform.imdg.api.ImdgId; @@ -40,7 +41,6 @@ public class EquitySecurityService extends QueueConsumer implements Initializing private final ValidationProvider validation; private final UserRoleVerification userRoleVerification; private final ValidationHelper validationHelper; - private final ListingBuilder listingBuilder = new ListingBuilder(); @Autowired public EquitySecurityService(Consumer kafkaQueue, @@ -103,7 +103,8 @@ public class EquitySecurityService extends QueueConsumer implements Initializing Imdg listingMap = transaction.getImdg(IMDGDistributedNames.Map_Listing, Listing.class); //одним скопом выполняем реквест equityImdg.insert(equity); - Listing listing = listingBuilder.byNewEquity(equity, req); + Listing listing = ListingBuilder.builder() + .append(equity).append(req).build(); listingMap.insert(listing); //и сохраняем обновленный // reqInfoMap.insert(reqInfo); @@ -148,7 +149,7 @@ public class EquitySecurityService extends QueueConsumer implements Initializing log.error("MoneyMarketSecurityUpdateRequest id {} couldn't find listing with securityId {}", req.getId(), equity.getId()); return null; } - listing = listingBuilder.byUpdateEquity(equity, listing); + listing = updateListingByEquity(equity, listing); listingImdg.update(listing); return null; } @@ -179,4 +180,15 @@ public class EquitySecurityService extends QueueConsumer implements Initializing listingImdg.update(listing); return null; } + + public Listing updateListingByEquity(EquitySecurity equitySecurity, Listing listing) { + listing.setSecurityId(equitySecurity.getId()); + listing.setSymbolCode(equitySecurity.getSecuritySymbol()); + listing.setSymbolName(equitySecurity.getFullName()); + listing.setWorkflowStatus(equitySecurity.getWorkflowStatus()); + listing.setMarket(Market.mkrs.getKey()); + listing.setLotSize(equitySecurity.getLotSize()); + listing.setUpdated(equitySecurity.getUpdated()); + return listing; + } } diff --git a/clearing-parent/securities-service/src/main/java/ru/spcex/clearing/securities/service/cud/FixedIncomeSecurityService.java b/clearing-parent/securities-service/src/main/java/ru/spcex/clearing/securities/service/cud/FixedIncomeSecurityService.java index d571ed199..5b58b4d97 100644 --- a/clearing-parent/securities-service/src/main/java/ru/spcex/clearing/securities/service/cud/FixedIncomeSecurityService.java +++ b/clearing-parent/securities-service/src/main/java/ru/spcex/clearing/securities/service/cud/FixedIncomeSecurityService.java @@ -40,7 +40,6 @@ public class FixedIncomeSecurityService extends QueueConsumer implements Initial private final ValidationProvider validation; private final UserRoleVerification userRoleVerification; private final ValidationHelper validationHelper; - private final ListingBuilder listingBuilder = new ListingBuilder(); @Autowired public FixedIncomeSecurityService(Consumer kafkaQueue, @@ -108,7 +107,8 @@ public class FixedIncomeSecurityService extends QueueConsumer implements Initial Imdg listingMap = transaction.getImdg(IMDGDistributedNames.Map_Listing, Listing.class); //одним скопом выполняем реквест fixedIncomeImdg.insert(fixedIncome); - Listing listing = listingBuilder.byNewFixedIncome(fixedIncome, req); + Listing listing = ListingBuilder.builder() + .append(fixedIncome).append(req).build(); listingMap.insert(listing); //и сохраняем обновленный // reqInfoMap.insert(reqInfo); @@ -159,7 +159,7 @@ public class FixedIncomeSecurityService extends QueueConsumer implements Initial log.error("updateFixedIncome id {} couldn't find listing with securityId {}", req.getId(), fixedIncome.getId()); return null; } - listing = listingBuilder.byFixedIncomeEquity(fixedIncome, listing); + listing = updateListingByFixedIncome(fixedIncome, listing); listingImdg.update(listing); return null; } @@ -190,4 +190,15 @@ public class FixedIncomeSecurityService extends QueueConsumer implements Initial listingImdg.update(listing); return null; } + + public Listing updateListingByFixedIncome(FixedIncomeSecurity fixedIncomeSecurity, Listing listing) { + listing.setSecurityId(fixedIncomeSecurity.getId()); + listing.setSymbolCode(fixedIncomeSecurity.getSecuritySymbol()); + listing.setSymbolName(fixedIncomeSecurity.getFullName()); + listing.setTradingCurrency(fixedIncomeSecurity.getNominalCurrency()); + listing.setWorkflowStatus(fixedIncomeSecurity.getWorkflowStatus()); + listing.setLotSize(fixedIncomeSecurity.getLotSize()); + listing.setUpdated(fixedIncomeSecurity.getUpdated()); + return listing; + } } diff --git a/clearing-parent/securities-service/src/main/java/ru/spcex/clearing/securities/service/cud/MoneyMarketSecurityService.java b/clearing-parent/securities-service/src/main/java/ru/spcex/clearing/securities/service/cud/MoneyMarketSecurityService.java index 55c1c14b5..285e0d3d4 100644 --- a/clearing-parent/securities-service/src/main/java/ru/spcex/clearing/securities/service/cud/MoneyMarketSecurityService.java +++ b/clearing-parent/securities-service/src/main/java/ru/spcex/clearing/securities/service/cud/MoneyMarketSecurityService.java @@ -48,7 +48,6 @@ public class MoneyMarketSecurityService extends QueueConsumer implements Initial private final UserRoleVerification userRoleVerification; private final ValidationHelper validationHelper; private final IMessageResolver messageResolver; - private final ListingBuilder listingBuilder = new ListingBuilder(); @Autowired public MoneyMarketSecurityService(Consumer kafkaQueue, @@ -133,7 +132,8 @@ public class MoneyMarketSecurityService extends QueueConsumer implements Initial Imdg listingMap = transaction.getImdg(IMDGDistributedNames.Map_Listing, Listing.class); //одним скопом выполняем реквест moneyMarketSecurityMap.insert(mms); - Listing listing = listingBuilder.byNewMms(mms, req); + Listing listing = ListingBuilder.builder() + .append(mms).append(req).build(); listingMap.insert(listing); //и сохраняем обновленный // reqInfoMap.insert(reqInfo); @@ -191,7 +191,7 @@ public class MoneyMarketSecurityService extends QueueConsumer implements Initial log.error("MoneyMarketSecurityUpdateRequest id {} couldn't find listing with securityId {}", req.getId(), mms.getId()); return null; } - listing = listingBuilder.byUpdateMms(mms, listing); + listing = updateListingByMms(mms, listing); listingImdg.update(listing); return null; } @@ -229,4 +229,15 @@ public class MoneyMarketSecurityService extends QueueConsumer implements Initial listingImdg.update(listing); return null; } + + public Listing updateListingByMms(MoneyMarketSecurity mms, Listing listing) { + listing.setSecurityId(mms.getId()); + listing.setSymbolCode(mms.getSecuritySymbol()); + listing.setSymbolName(mms.getFullName()); + listing.setTradingCurrency(mms.getNominalCurrency()); + listing.setWorkflowStatus(mms.getWorkflowStatus()); + listing.setLotSize(mms.getLotSize()); + listing.setUpdated(mms.getUpdated()); + return listing; + } } diff --git a/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/AbstractServiceTest.java b/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/AbstractServiceTest.java index a7231f52d..e74231321 100644 --- a/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/AbstractServiceTest.java +++ b/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/AbstractServiceTest.java @@ -19,7 +19,6 @@ import ru.clearing.classes.statics.data.misc.Listing; import ru.clearing.classes.statics.data.misc.MoneyMarketSecurity; import ru.clearing.platform.dictionary.*; import ru.spcex.clearing.imdg.IMDGDistributedNames; -import ru.spcex.clearing.securities.component.ListingBuilder; import ru.spcex.clearing.securities.config.ErrorResolverConfig; import ru.spcex.clearing.securities.config.ValidationConfig; import ru.spcex.clearing.securities.service.cud.*; @@ -74,7 +73,7 @@ public abstract class AbstractServiceTest { public static Long issuerId = 13243L; public static String termType = "TermType"; public static String currencyCode = "RUB"; - protected final ListingBuilder listingBuilder = new ListingBuilder(); + @Captor protected ArgumentCaptor producerRecord; @MockBean diff --git a/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/EquitySecurityServiceTest.java b/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/EquitySecurityServiceTest.java index cb3a86448..f6654b2a4 100644 --- a/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/EquitySecurityServiceTest.java +++ b/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/EquitySecurityServiceTest.java @@ -10,6 +10,7 @@ import ru.spcex.clearing.platform.messaging.domain.Consts; import ru.spcex.clearing.platform.messaging.domain.cud.common.CommonDeleteRequest; import ru.spcex.clearing.platform.messaging.domain.cud.securitites.EquitySecurityNewRequest; import ru.spcex.clearing.platform.messaging.domain.cud.securitites.EquitySecurityUpdateRequest; +import ru.spcex.clearing.securities.component.ListingBuilder; import ru.spcex.clearing.securities.service.cud.EquitySecurityService; import ru.spcex.clearing.test.MatcherFactory; @@ -44,7 +45,8 @@ public class EquitySecurityServiceTest extends AbstractServiceTest { final EquitySecurity equityPrediction = getEquitySecurity(); final EquitySecurityNewRequest request = getEquitySecurityNewRequest(equityPrediction); - Listing listingPrediction = listingBuilder.byNewEquity(equityPrediction, request); + Listing listingPrediction = ListingBuilder.builder() + .append(equityPrediction).append(request).build(); //ACT String jsonString = getJsonStringForNew(request, ID); @@ -83,7 +85,7 @@ public class EquitySecurityServiceTest extends AbstractServiceTest { equityPrediction.setLotSize(BigDecimal.valueOf(updateLotSize)); final EquitySecurityUpdateRequest request = getEquitySecurityUpdateRequest(equityPrediction); Listing listingPrediction = new Listing(); - listingPrediction = listingBuilder.byUpdateEquity(equityPrediction, listingPrediction); + listingPrediction = equitySecurityService.updateListingByEquity(equityPrediction, listingPrediction); listingImdg.insert(listingPrediction); //ACT @@ -121,7 +123,7 @@ public class EquitySecurityServiceTest extends AbstractServiceTest { equityPrediction.setWorkflowStatus(ru.spcex.platform.enumeration.Status.Blocked.getKey()); Listing listingPrediction = new Listing(); - listingPrediction = listingBuilder.byUpdateEquity(equityPrediction, listingPrediction); + listingPrediction = equitySecurityService.updateListingByEquity(equityPrediction, listingPrediction); listingImdg.insert(listingPrediction); listingPrediction.setWorkflowStatus(ru.spcex.platform.enumeration.Status.Blocked.getKey()); diff --git a/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/FixedIncomeSecurityServiceTest.java b/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/FixedIncomeSecurityServiceTest.java index aff540631..5d756a402 100644 --- a/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/FixedIncomeSecurityServiceTest.java +++ b/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/FixedIncomeSecurityServiceTest.java @@ -10,6 +10,7 @@ import ru.spcex.clearing.platform.messaging.domain.Consts; import ru.spcex.clearing.platform.messaging.domain.cud.common.CommonDeleteRequest; import ru.spcex.clearing.platform.messaging.domain.cud.securitites.FixedIncomeSecurityNewRequest; import ru.spcex.clearing.platform.messaging.domain.cud.securitites.FixedIncomeSecurityUpdateRequest; +import ru.spcex.clearing.securities.component.ListingBuilder; import ru.spcex.clearing.securities.service.cud.FixedIncomeSecurityService; import ru.spcex.clearing.test.MatcherFactory; @@ -45,7 +46,8 @@ public class FixedIncomeSecurityServiceTest extends AbstractServiceTest { final FixedIncomeSecurity fixedIncomePrediction = getFixedIncomeSecurity(); final FixedIncomeSecurityNewRequest request = getFixedIncomeSecurityNewRequest(fixedIncomePrediction); - Listing listingPrediction = listingBuilder.byNewFixedIncome(fixedIncomePrediction, request); + Listing listingPrediction = ListingBuilder.builder() + .append(fixedIncomePrediction).append(request).build(); //ACT String jsonString = getJsonStringForNew(request, ID); @@ -85,7 +87,7 @@ public class FixedIncomeSecurityServiceTest extends AbstractServiceTest { fixedIncomePrediction.setLotSize(BigDecimal.valueOf(updateLotSize)); final FixedIncomeSecurityUpdateRequest request = getFixedIncomeSecurityUpdateRequest(fixedIncomePrediction); Listing listingPrediction = new Listing(); - listingPrediction = listingBuilder.byFixedIncomeEquity(fixedIncomePrediction, listingPrediction); + listingPrediction = fixedIncomeSecurityService.updateListingByFixedIncome(fixedIncomePrediction, listingPrediction); listingImdg.insert(listingPrediction); //ACT @@ -123,7 +125,7 @@ public class FixedIncomeSecurityServiceTest extends AbstractServiceTest { fixedIncomePrediction.setWorkflowStatus(ru.spcex.platform.enumeration.Status.Blocked.getKey()); Listing listingPrediction = new Listing(); - listingPrediction = listingBuilder.byFixedIncomeEquity(fixedIncomePrediction, listingPrediction); + listingPrediction = fixedIncomeSecurityService.updateListingByFixedIncome(fixedIncomePrediction, listingPrediction); listingImdg.insert(listingPrediction); listingPrediction.setWorkflowStatus(ru.spcex.platform.enumeration.Status.Blocked.getKey()); diff --git a/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/MoneyMarketSecurityServiceTest.java b/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/MoneyMarketSecurityServiceTest.java index 61d5854be..73ca5c1e0 100644 --- a/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/MoneyMarketSecurityServiceTest.java +++ b/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/MoneyMarketSecurityServiceTest.java @@ -13,6 +13,7 @@ import ru.spcex.clearing.platform.messaging.domain.cud.securitites.MoneyMarketSe import ru.spcex.clearing.platform.messaging.domain.cud.securitites.MoneyMarketSecurityUpdateRequest; import ru.spcex.clearing.platform.messaging.service.RequestInfo; import ru.spcex.clearing.platform.messaging.service.Status; +import ru.spcex.clearing.securities.component.ListingBuilder; import ru.spcex.clearing.securities.service.cud.MoneyMarketSecurityService; import ru.spcex.clearing.test.MatcherFactory; import ru.spcex.platform.imdg.api.Imdg; @@ -64,7 +65,8 @@ public class MoneyMarketSecurityServiceTest extends AbstractServiceTest{ .getMoneyMarketSecurity(); final MoneyMarketSecurityNewRequest keyRequest = moneyMarketSecurityFactory .getMoneyMarketSecurityNewRequest(); - Listing listingPrediction = listingBuilder.byNewMms(moneyMarketSecurityPrediction, keyRequest); + Listing listingPrediction = ListingBuilder.builder() + .append(moneyMarketSecurityPrediction).append(keyRequest).build(); //ACT String jsonString = getJsonStringForNew(keyRequest, ID); @@ -102,7 +104,7 @@ public class MoneyMarketSecurityServiceTest extends AbstractServiceTest{ moneyMarketSecurityPrediction.setWorkflowStatus(ru.spcex.platform.enumeration.Status.Blocked.getKey()); Listing listingPrediction = new Listing(); - listingPrediction = listingBuilder.byUpdateMms(moneyMarketSecurityPrediction, listingPrediction); + listingPrediction = moneyMarketSecurityService.updateListingByMms(moneyMarketSecurityPrediction, listingPrediction); listingImdg.insert(listingPrediction); listingPrediction.setWorkflowStatus(ru.spcex.platform.enumeration.Status.Blocked.getKey()); @@ -154,7 +156,7 @@ public class MoneyMarketSecurityServiceTest extends AbstractServiceTest{ keyRequest.setTermType(termType); keyRequest.setLotSize(updateLotSize); Listing listingPrediction = new Listing(); - listingPrediction = listingBuilder.byUpdateMms(moneyMarketSecurityPrediction, listingPrediction); + listingPrediction = moneyMarketSecurityService.updateListingByMms(moneyMarketSecurityPrediction, listingPrediction); listingImdg.insert(listingPrediction); listingPrediction.setLotSize(updateLotSize); From 542b8c7e58c3853b7852e80c51a82d3e3845e0c0 Mon Sep 17 00:00:00 2001 From: psemenkov Date: Tue, 18 Apr 2023 17:13:21 +0300 Subject: [PATCH 02/27] =?UTF-8?q?=D0=A1=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB=20?= =?UTF-8?q?=D0=B2=D1=8B=D1=80=D0=B0=D0=B2=D0=BD=D0=B8=D0=B2=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../securities/component/ListingBuilder.java | 18 ++++++++++-------- .../MoneyMarketSecurityServiceTest.java | 7 ++++--- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/clearing-parent/securities-service/src/main/java/ru/spcex/clearing/securities/component/ListingBuilder.java b/clearing-parent/securities-service/src/main/java/ru/spcex/clearing/securities/component/ListingBuilder.java index a0cf43bea..dba5c2768 100644 --- a/clearing-parent/securities-service/src/main/java/ru/spcex/clearing/securities/component/ListingBuilder.java +++ b/clearing-parent/securities-service/src/main/java/ru/spcex/clearing/securities/component/ListingBuilder.java @@ -26,9 +26,11 @@ public class ListingBuilder { public static ListingBuilder builder() { return new ListingBuilder(); } - private ListingBuilder(){} - public ListingBuilder append(MoneyMarketSecurity mms){ + private ListingBuilder() { + } + + public ListingBuilder append(MoneyMarketSecurity mms) { this.created = mms.getCreated(); this.securityId = mms.getId(); this.symbolCode = mms.getSecuritySymbol(); @@ -37,12 +39,12 @@ public class ListingBuilder { return this; } - public ListingBuilder append(MoneyMarketSecurityNewRequest mmsReq){ + public ListingBuilder append(MoneyMarketSecurityNewRequest mmsReq) { this.lotSize = mmsReq.getLotSize(); return this; } - public ListingBuilder append(EquitySecurity equitySecurity){ + public ListingBuilder append(EquitySecurity equitySecurity) { this.created = equitySecurity.getCreated(); this.securityId = equitySecurity.getId(); this.symbolCode = equitySecurity.getSecuritySymbol(); @@ -50,12 +52,12 @@ public class ListingBuilder { return this; } - public ListingBuilder append(EquitySecurityNewRequest request){ + public ListingBuilder append(EquitySecurityNewRequest request) { this.lotSize = request.getLotSize(); return this; } - public ListingBuilder append(FixedIncomeSecurity fixedIncomeSecurity){ + public ListingBuilder append(FixedIncomeSecurity fixedIncomeSecurity) { this.created = fixedIncomeSecurity.getCreated(); this.securityId = fixedIncomeSecurity.getId(); this.symbolCode = fixedIncomeSecurity.getSecuritySymbol(); @@ -64,12 +66,12 @@ public class ListingBuilder { return this; } - public ListingBuilder append(FixedIncomeSecurityNewRequest request){ + public ListingBuilder append(FixedIncomeSecurityNewRequest request) { this.lotSize = request.getLotSize(); return this; } - public Listing build(){ + public Listing build() { Listing listing = new Listing(); listing.setCreated(this.created); listing.setSecurityId(this.securityId); diff --git a/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/MoneyMarketSecurityServiceTest.java b/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/MoneyMarketSecurityServiceTest.java index 73ca5c1e0..9f6be8296 100644 --- a/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/MoneyMarketSecurityServiceTest.java +++ b/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/MoneyMarketSecurityServiceTest.java @@ -25,13 +25,14 @@ import java.util.Map; import static ru.spcex.clearing.test.MatcherFactory.usingIgnoringFieldsComparator; import static ru.spcex.clearing.test.TestUtils.*; -public class MoneyMarketSecurityServiceTest extends AbstractServiceTest{ +public class MoneyMarketSecurityServiceTest extends AbstractServiceTest { private static final MatcherFactory.Matcher MONEY_MARKET_SECURITY_MATCHER = usingIgnoringFieldsComparator("created", "updated"); private final long ID = currentId.getAndIncrement(); private final int PARTITION = 0; private MoneyMarketSecurityFactory moneyMarketSecurityFactory; @Autowired private MoneyMarketSecurityService moneyMarketSecurityService; + @PostConstruct protected void init() { super.init(); @@ -57,7 +58,7 @@ public class MoneyMarketSecurityServiceTest extends AbstractServiceTest{ * {@link MoneyMarketSecurityNewRequest#fullName} - "estat"
*/ @Test - public void testNewMoneyMarketSecurity(){ + public void testNewMoneyMarketSecurity() { clearAllInImdg(moneyMarketSecurityMap); final String TOPIC = Consts.DESTINATION_MONEY_MARKET_SECURITY_NEW; @@ -94,7 +95,7 @@ public class MoneyMarketSecurityServiceTest extends AbstractServiceTest{ * {@link CommonDeleteRequest#id} - Идентификатор записи
*/ @Test - public void testDeleteMoneyMarket(){ + public void testDeleteMoneyMarket() { clearAllInImdg(moneyMarketSecurityMap); final String TOPIC = Consts.DESTINATION_MONEY_MARKET_SECURITY_DELETE; From 384847168b8dade1730d2a944e562bd2c693c518 Mon Sep 17 00:00:00 2001 From: psemenkov Date: Wed, 19 Apr 2023 17:39:33 +0300 Subject: [PATCH 03/27] =?UTF-8?q?http://jira.mfd.msk:8088/browse/CLS-258?= =?UTF-8?q?=20=D0=9F=D0=B5=D1=80=D0=B5=D0=BD=D0=B5=D1=81=20=D0=BE=D0=B1?= =?UTF-8?q?=D1=89=D0=B8=D0=B5=20=D0=BA=D0=BB=D0=B0=D1=81=D1=81=D1=8B=20?= =?UTF-8?q?=D0=B8=20=D0=BA=D0=BE=D0=BD=D1=84=D0=B8=D0=B3=D0=B8=20=D0=B2=20?= =?UTF-8?q?test-clearing.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../company/service/ClearingMemberCategoryServiceTest.java | 6 +++--- .../clearing/company/service/CompanyInfoServiceTest.java | 2 +- .../spcex/clearing/company/service/CompanyServiceTest.java | 4 ++-- .../clearing/company/service/CompanySymbolServiceTest.java | 2 +- .../spcex/clearing/company/service/ContactServiceTest.java | 2 +- .../company/service/ProfileDocumentServiceTest.java | 4 ++-- .../securities/service/CouponPeriodServiceTest.java | 2 +- .../clearing/securities/service/CurrencyServiceTest.java | 2 +- .../securities/service/EquitySecurityServiceTest.java | 4 ++-- .../securities/service/FixedIncomeCashFlowServiceTest.java | 2 +- .../securities/service/FixedIncomeSecurityServiceTest.java | 4 ++-- .../securities/service/MoneyMarketSecurityServiceTest.java | 4 ++-- .../src/main/java/ru/spcex/clearing/test/TestUtils.java | 4 ++-- 13 files changed, 21 insertions(+), 21 deletions(-) diff --git a/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/ClearingMemberCategoryServiceTest.java b/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/ClearingMemberCategoryServiceTest.java index 3902be6aa..f3e40c682 100644 --- a/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/ClearingMemberCategoryServiceTest.java +++ b/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/ClearingMemberCategoryServiceTest.java @@ -13,8 +13,8 @@ import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.test.mock.mockito.SpyBean; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import ru.clearing.classes.statics.data.company.Company; import ru.clearing.classes.statics.data.company.ClearingMemberCategory; +import ru.clearing.classes.statics.data.company.Company; import ru.clearing.platform.dictionary.ClearingCategoryDictionary; import ru.spcex.clearing.company.config.BeanConfiguration; import ru.spcex.clearing.company.config.validation.ClearingMemberCategoryValidationConfig; @@ -151,7 +151,7 @@ class ClearingMemberCategoryServiceTest { predictableClearingMemberCategory.setClearingMemberCategory(clearingMemberCategory); //ACT - String jsonString = getJsonStringForUPDATE(memberCategoryUpdateRequest, id); + String jsonString = getJsonStringForUpdate(memberCategoryUpdateRequest, id); addRecordToKafka((MockConsumer) clearingMemberCategoryService.getConsumer(), TOPIC_MEMBER_CATEGORY_UPDATE, PARTITION, 0, jsonString); //ASSERT @@ -179,7 +179,7 @@ class ClearingMemberCategoryServiceTest { memberCategoryDeleteRequest.setId(id); //ACT - String jsonString = getJsonStringForDELETE(memberCategoryDeleteRequest, id); + String jsonString = getJsonStringForDelete(memberCategoryDeleteRequest, id); addRecordToKafka((MockConsumer) clearingMemberCategoryService.getConsumer(), TOPIC_MEMBER_CATEGORY_DELETE, PARTITION, 0, jsonString); //ASSERT diff --git a/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/CompanyInfoServiceTest.java b/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/CompanyInfoServiceTest.java index f6c22a2e2..48219f376 100644 --- a/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/CompanyInfoServiceTest.java +++ b/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/CompanyInfoServiceTest.java @@ -168,7 +168,7 @@ class CompanyInfoServiceTest { predictableCompanyInfo.setFullName("updated fullName"); //ACT - String jsonString = getJsonStringForUPDATE(companyInfoUpdateRequest, ID); + String jsonString = getJsonStringForUpdate(companyInfoUpdateRequest, ID); addRecordToKafka((MockConsumer) companyInfoService.getConsumer(), TOPIC_COMPANY_INFO_UPDATE, PARTITION, 0, jsonString); diff --git a/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/CompanyServiceTest.java b/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/CompanyServiceTest.java index 85af35dc6..9ef61f7eb 100644 --- a/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/CompanyServiceTest.java +++ b/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/CompanyServiceTest.java @@ -13,9 +13,9 @@ import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.test.mock.mockito.SpyBean; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; +import ru.clearing.classes.statics.data.company.ClearingMemberCategory; import ru.clearing.classes.statics.data.company.Company; import ru.clearing.classes.statics.data.company.CompanySymbols; -import ru.clearing.classes.statics.data.company.ClearingMemberCategory; import ru.clearing.platform.dictionary.CompanySymbolDictionary; import ru.clearing.platform.dictionary.WorkflowStatusDictionary; import ru.spcex.clearing.company.config.BeanConfiguration; @@ -137,7 +137,7 @@ class CompanyServiceTest { commonDeleteRequest.setId(ID); //ACT - String jsonString = getJsonStringForDELETE(commonDeleteRequest, ID); + String jsonString = getJsonStringForDelete(commonDeleteRequest, ID); addRecordToKafka((MockConsumer) companyService.getConsumer(), TOPIC_COMPANY_DELETE, PARTITION, 0, jsonString); //ASSERT diff --git a/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/CompanySymbolServiceTest.java b/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/CompanySymbolServiceTest.java index 1a72f29bf..db460c4d5 100644 --- a/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/CompanySymbolServiceTest.java +++ b/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/CompanySymbolServiceTest.java @@ -130,7 +130,7 @@ class CompanySymbolServiceTest { predictableCompanySymbols.setCompanySymbolValue(companySymbolValue); //ACT - String jsonString = getJsonStringForUPDATE(companySymbolUpdateRequest, ID); + String jsonString = getJsonStringForUpdate(companySymbolUpdateRequest, ID); addRecordToKafka((MockConsumer) companySymbolService.getConsumer(), TOPIC_COMPANY_SYMBOL_UPDATE, PARTITION, 0, jsonString); //ASSERT diff --git a/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/ContactServiceTest.java b/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/ContactServiceTest.java index dd1c9cc59..575d484dd 100644 --- a/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/ContactServiceTest.java +++ b/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/ContactServiceTest.java @@ -147,7 +147,7 @@ class ContactServiceTest { predictableContact.setContactValue("new ContactValue"); //ACT - String jsonString = getJsonStringForUPDATE(contactUpdateRequest, existContactID); + String jsonString = getJsonStringForUpdate(contactUpdateRequest, existContactID); addRecordToKafka((MockConsumer) contactService.getConsumer(), TOPIC_CONTACT_UPDATE, PARTITION, 0, jsonString); //ASSERT diff --git a/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/ProfileDocumentServiceTest.java b/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/ProfileDocumentServiceTest.java index f7450e798..c8ad1bc1a 100644 --- a/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/ProfileDocumentServiceTest.java +++ b/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/ProfileDocumentServiceTest.java @@ -214,7 +214,7 @@ class ProfileDocumentServiceTest { profileDocumentUpdateRequest.setLink("new_link"); //ACT - String jsonString = getJsonStringForUPDATE(profileDocumentUpdateRequest, ID); + String jsonString = getJsonStringForUpdate(profileDocumentUpdateRequest, ID); addRecordToKafka((MockConsumer) profileDocumentService.getConsumer(), TOPIC_DESTINATION_PROFILE_DOCUMENT_UPDATE, PARTITION, 0, jsonString); @@ -249,7 +249,7 @@ class ProfileDocumentServiceTest { profileDocumentDeleteRequest.setId(PROFILE_DOCUMENT_ID); //ACT - String jsonString = getJsonStringForUPDATE(profileDocumentDeleteRequest, ID); + String jsonString = getJsonStringForUpdate(profileDocumentDeleteRequest, ID); addRecordToKafka((MockConsumer) profileDocumentService.getConsumer(), TOPIC_DESTINATION_PROFILE_DOCUMENT_DELETE, PARTITION, 0, jsonString); diff --git a/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/CouponPeriodServiceTest.java b/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/CouponPeriodServiceTest.java index eada23296..d64fa5c52 100644 --- a/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/CouponPeriodServiceTest.java +++ b/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/CouponPeriodServiceTest.java @@ -107,7 +107,7 @@ public class CouponPeriodServiceTest extends AbstractServiceTest { request.setPeriodStartDate(testEndDate); //ACT - String jsonString = getJsonStringForUPDATE(request, id); + String jsonString = getJsonStringForUpdate(request, id); addRecordToKafka((MockConsumer) couponPeriodService.getConsumer(), TOPIC, PARTITION, 0, jsonString); diff --git a/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/CurrencyServiceTest.java b/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/CurrencyServiceTest.java index 03a0cf469..874646b35 100644 --- a/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/CurrencyServiceTest.java +++ b/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/CurrencyServiceTest.java @@ -82,7 +82,7 @@ public class CurrencyServiceTest extends AbstractServiceTest { request.setCurrencyCode(currencyCode); //ACT - String jsonString = getJsonStringForUPDATE(request, ID); + String jsonString = getJsonStringForUpdate(request, ID); addRecordToKafka((MockConsumer) currencyService.getConsumer(), TOPIC, PARTITION, 0, jsonString); diff --git a/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/EquitySecurityServiceTest.java b/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/EquitySecurityServiceTest.java index f6654b2a4..de26ec454 100644 --- a/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/EquitySecurityServiceTest.java +++ b/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/EquitySecurityServiceTest.java @@ -89,7 +89,7 @@ public class EquitySecurityServiceTest extends AbstractServiceTest { listingImdg.insert(listingPrediction); //ACT - String jsonString = getJsonStringForUPDATE(request, ID); + String jsonString = getJsonStringForUpdate(request, ID); addRecordToKafka((MockConsumer) equitySecurityService.getConsumer(), TOPIC, PARTITION, 0, jsonString); @@ -131,7 +131,7 @@ public class EquitySecurityServiceTest extends AbstractServiceTest { commonDeleteRequest.setId(ID); //ACT - String jsonString = getJsonStringForDELETE(commonDeleteRequest, ID); + String jsonString = getJsonStringForDelete(commonDeleteRequest, ID); addRecordToKafka((MockConsumer) equitySecurityService.getConsumer(), TOPIC, PARTITION, 0, jsonString); diff --git a/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/FixedIncomeCashFlowServiceTest.java b/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/FixedIncomeCashFlowServiceTest.java index dad537eb0..745fe392c 100644 --- a/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/FixedIncomeCashFlowServiceTest.java +++ b/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/FixedIncomeCashFlowServiceTest.java @@ -138,7 +138,7 @@ class FixedIncomeCashFlowServiceTest { predictableFixedIncomeCashFlow.setValueDate(TEST_DATE); //ACT - String jsonString = getJsonStringForUPDATE(updateRequest, id); + String jsonString = getJsonStringForUpdate(updateRequest, id); addRecordToKafka((MockConsumer) fixedIncomeCashFlowService.getConsumer(), TOPIC_FIXED_INCOME_CASH_FLOW_UPDATE, PARTITION, 0, jsonString); diff --git a/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/FixedIncomeSecurityServiceTest.java b/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/FixedIncomeSecurityServiceTest.java index 5d756a402..4223553d9 100644 --- a/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/FixedIncomeSecurityServiceTest.java +++ b/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/FixedIncomeSecurityServiceTest.java @@ -91,7 +91,7 @@ public class FixedIncomeSecurityServiceTest extends AbstractServiceTest { listingImdg.insert(listingPrediction); //ACT - String jsonString = getJsonStringForUPDATE(request, ID); + String jsonString = getJsonStringForUpdate(request, ID); addRecordToKafka((MockConsumer) fixedIncomeSecurityService.getConsumer(), TOPIC, PARTITION, 0, jsonString); @@ -133,7 +133,7 @@ public class FixedIncomeSecurityServiceTest extends AbstractServiceTest { commonDeleteRequest.setId(ID); //ACT - String jsonString = getJsonStringForDELETE(commonDeleteRequest, ID); + String jsonString = getJsonStringForDelete(commonDeleteRequest, ID); addRecordToKafka((MockConsumer) fixedIncomeSecurityService.getConsumer(), TOPIC, PARTITION, 0, jsonString); diff --git a/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/MoneyMarketSecurityServiceTest.java b/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/MoneyMarketSecurityServiceTest.java index 9f6be8296..073485b64 100644 --- a/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/MoneyMarketSecurityServiceTest.java +++ b/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/MoneyMarketSecurityServiceTest.java @@ -113,7 +113,7 @@ public class MoneyMarketSecurityServiceTest extends AbstractServiceTest { commonDeleteRequest.setId(ID); //ACT - String jsonString = getJsonStringForDELETE(commonDeleteRequest, ID); + String jsonString = getJsonStringForDelete(commonDeleteRequest, ID); addRecordToKafka((MockConsumer) moneyMarketSecurityService.getConsumer(), TOPIC, PARTITION, 0, jsonString); @@ -162,7 +162,7 @@ public class MoneyMarketSecurityServiceTest extends AbstractServiceTest { listingPrediction.setLotSize(updateLotSize); //ACT - String jsonString = getJsonStringForUPDATE(keyRequest, ID); + String jsonString = getJsonStringForUpdate(keyRequest, ID); addRecordToKafka((MockConsumer) moneyMarketSecurityService.getConsumer(), TOPIC, PARTITION, 0, jsonString); diff --git a/clearing-parent/test-clearing/src/main/java/ru/spcex/clearing/test/TestUtils.java b/clearing-parent/test-clearing/src/main/java/ru/spcex/clearing/test/TestUtils.java index 2d542894e..47fa6449f 100644 --- a/clearing-parent/test-clearing/src/main/java/ru/spcex/clearing/test/TestUtils.java +++ b/clearing-parent/test-clearing/src/main/java/ru/spcex/clearing/test/TestUtils.java @@ -93,11 +93,11 @@ public class TestUtils { return getJsonBaseRequest(accountRequest, id, ActionType.NEW); } - public static String getJsonStringForUPDATE(T accountRequest, long id) { + public static String getJsonStringForUpdate(T accountRequest, long id) { return getJsonBaseRequest(accountRequest, id, ActionType.UPDATE); } - public static String getJsonStringForDELETE(T accountRequest, long id) { + public static String getJsonStringForDelete(T accountRequest, long id) { return getJsonBaseRequest(accountRequest, id, ActionType.DELETE); } From e5239c7a2469207e2bbe89786a0c4a197656354e Mon Sep 17 00:00:00 2001 From: psemenkov Date: Thu, 20 Apr 2023 11:18:06 +0300 Subject: [PATCH 04/27] =?UTF-8?q?http://jira.mfd.msk:8088/browse/CLS-268?= =?UTF-8?q?=20=D0=A1=D0=BE=D0=B7=D0=B4=D0=B0=D0=BB=20=D0=BC=D0=BE=D0=B4?= =?UTF-8?q?=D1=83=D0=BB=D1=8C=20cleaning-builders=20=D0=B4=D0=BB=D1=8F=20?= =?UTF-8?q?=D0=BE=D0=B1=D1=89=D0=B8=D1=85=20=D0=B1=D0=B8=D0=BB=D0=B4=D0=B5?= =?UTF-8?q?=D1=80=D0=BE=D0=B2.=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20PlannerAllTodayBuilder=20=D0=B8=20ISchedulerChecker=20?= =?UTF-8?q?=D0=B4=D0=BB=D1=8F=20=D0=B2=D0=B0=D0=BB=D0=B8=D0=B4=D0=B0=D1=86?= =?UTF-8?q?=D0=B8=D0=B8=20=D0=B8=20=D1=81=D0=BE=D0=B7=D0=B4=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D1=8F=20PlannerAllToday.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- clearing-parent/cleaning-builders/pom.xml | 37 +++++++++++ .../scheduler/PlannerAllTodayBuilder.java | 64 +++++++++++++++++++ .../clearing/scheduler/ISchedulerChecker.java | 34 ++++++++++ 3 files changed, 135 insertions(+) create mode 100644 clearing-parent/cleaning-builders/pom.xml create mode 100644 clearing-parent/cleaning-builders/src/main/java/ru/spcex/clearing/scheduler/PlannerAllTodayBuilder.java create mode 100644 clearing-parent/clearing-validation/src/main/java/ru/spcex/clearing/scheduler/ISchedulerChecker.java diff --git a/clearing-parent/cleaning-builders/pom.xml b/clearing-parent/cleaning-builders/pom.xml new file mode 100644 index 000000000..5a55de34e --- /dev/null +++ b/clearing-parent/cleaning-builders/pom.xml @@ -0,0 +1,37 @@ + + + 4.0.0 + + ru.spcex.clearing + clearing-parent + SPCEX-1.0.0.0 + + + cleaning-builders + cleaning-builders + Cleaning builders module + SPCEX-1.0.0.0 + jar + + + + 17 + 17 + UTF-8 + + + + + ru.spcex.clearing + classes + SPCEX-1.0.0.0 + compile + + + ru.spcex.platform + platform-enum + + + \ No newline at end of file diff --git a/clearing-parent/cleaning-builders/src/main/java/ru/spcex/clearing/scheduler/PlannerAllTodayBuilder.java b/clearing-parent/cleaning-builders/src/main/java/ru/spcex/clearing/scheduler/PlannerAllTodayBuilder.java new file mode 100644 index 000000000..afca5a269 --- /dev/null +++ b/clearing-parent/cleaning-builders/src/main/java/ru/spcex/clearing/scheduler/PlannerAllTodayBuilder.java @@ -0,0 +1,64 @@ +package ru.spcex.clearing.scheduler; + +import ru.clearing.classes.statics.data.scheduler.Planner; +import ru.clearing.classes.statics.data.scheduler.PlannerAllToday; +import ru.clearing.classes.statics.data.scheduler.PlannerTemplate; +import ru.spcex.platform.enumeration.Parent; + +import java.time.LocalDate; +import java.time.LocalTime; + +public class PlannerAllTodayBuilder { + private Long id; + private String task; + private LocalTime taskTime; + private LocalDate clearingDate; + private String market; + private String taskStatus; + private Long companyId; + private Long securityId; + private String parent; + + public static PlannerAllTodayBuilder builder() { + return new PlannerAllTodayBuilder(); + } + private PlannerAllTodayBuilder(){} + + public PlannerAllTodayBuilder append(PlannerTemplate plannerTemplate){ + this.task = plannerTemplate.getTask(); + this.taskTime = plannerTemplate.getTaskTime(); + this.taskStatus = plannerTemplate.getTaskStatus(); + this.companyId = plannerTemplate.getCompanyId(); + this.securityId = plannerTemplate.getSecurityId(); + this.parent = Parent.Planner.getKey(); + this.id = plannerTemplate.getId(); + return this; + } + + public PlannerAllTodayBuilder append(Planner plannerTemplate){ + this.task = plannerTemplate.getTask(); + this.taskTime = plannerTemplate.getTaskTime(); + this.clearingDate = plannerTemplate.getClearingDate(); + this.market = plannerTemplate.getMarket(); + this.taskStatus = plannerTemplate.getTaskStatus(); + this.companyId = plannerTemplate.getCompanyId(); + this.securityId = plannerTemplate.getSecurityId(); + this.parent = Parent.Planner.getKey(); + this.id = plannerTemplate.getId(); + return this; + } + + public PlannerAllToday build() { + PlannerAllToday res = new PlannerAllToday(); + res.setTask(this.task); + res.setTaskTime(this.taskTime); + res.setClearingDate(this.clearingDate); + res.setMarket(this.market); + res.setTaskStatus(this.taskStatus); + res.setCompanyId(this.companyId); + res.setSecurityId(this.securityId); + res.setParent(this.parent); + res.setParentId(this.id); + return res; + } +} diff --git a/clearing-parent/clearing-validation/src/main/java/ru/spcex/clearing/scheduler/ISchedulerChecker.java b/clearing-parent/clearing-validation/src/main/java/ru/spcex/clearing/scheduler/ISchedulerChecker.java new file mode 100644 index 000000000..5e5dc4d2a --- /dev/null +++ b/clearing-parent/clearing-validation/src/main/java/ru/spcex/clearing/scheduler/ISchedulerChecker.java @@ -0,0 +1,34 @@ +package ru.spcex.clearing.scheduler; + +import ru.clearing.classes.statics.data.scheduler.ClearingCalendar; +import ru.clearing.classes.statics.data.scheduler.Planner; +import ru.clearing.classes.statics.data.scheduler.PlannerAllToday; +import ru.spcex.platform.enumeration.DayStatus; + +import java.time.LocalDate; + +public class ISchedulerChecker { + + public static boolean isValidPlanner(Planner planner, LocalDate currentDate) { + return planner.getTaskStatus() != null && (planner.getClearingDate() == null || planner.getClearingDate().isEqual(currentDate)); + } + + public static boolean needRemoveByPlanner(Planner planner, PlannerAllToday plannerAllToday) { + return (planner.getTaskTime() != null && planner.getTaskTime().equals(plannerAllToday.getTaskTime())) + && (planner.getCompanyId() != null && planner.getCompanyId().equals(plannerAllToday.getCompanyId())) + && (planner.getSecurityId() != null && planner.getSecurityId().equals(plannerAllToday.getSecurityId())) + && (planner.getTask() != null && planner.getTask().equalsIgnoreCase(plannerAllToday.getTask())); + } + + /** + * @param isWeekend тек.день=СБ-ВС
+ */ + public static boolean isValidWorkday(ClearingCalendar clearingCalendar, boolean isWeekend) { + if (clearingCalendar.getDayStatus() != null && clearingCalendar.getDayStatus().equalsIgnoreCase(DayStatus.Workday.getKey())) { + if (isWeekend) { + return clearingCalendar.getCompanyId() != null && clearingCalendar.getCompanyId() != 0; + } else return true; + } + return false; + } +} From 026a6a8d09276beff4e97187e4f2e2c8fa9490e9 Mon Sep 17 00:00:00 2001 From: psemenkov Date: Thu, 20 Apr 2023 11:19:35 +0300 Subject: [PATCH 05/27] =?UTF-8?q?http://jira.mfd.msk:8088/browse/CLS-268?= =?UTF-8?q?=20=D0=A1=D0=BE=D0=B7=D0=B4=D0=B0=D0=BB=20=D0=BC=D0=BE=D0=B4?= =?UTF-8?q?=D1=83=D0=BB=D1=8C=20cleaning-builders=20=D0=B4=D0=BB=D1=8F=20?= =?UTF-8?q?=D0=BE=D0=B1=D1=89=D0=B8=D1=85=20=D0=B1=D0=B8=D0=BB=D0=B4=D0=B5?= =?UTF-8?q?=D1=80=D0=BE=D0=B2.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- clearing-parent/pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/clearing-parent/pom.xml b/clearing-parent/pom.xml index ee4e84e2f..9ff3b6aab 100644 --- a/clearing-parent/pom.xml +++ b/clearing-parent/pom.xml @@ -35,6 +35,7 @@ clearing-service registry-service test-clearing + cleaning-builders From 59e4a091ba3510805d5ccbefac0104011d9c0da5 Mon Sep 17 00:00:00 2001 From: psemenkov Date: Thu, 20 Apr 2023 11:22:31 +0300 Subject: [PATCH 06/27] =?UTF-8?q?http://jira.mfd.msk:8088/browse/CLS-258?= =?UTF-8?q?=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20=D1=80=D0=B5?= =?UTF-8?q?=D0=B0=D0=BB=D0=B8=D0=B7=D0=B0=D1=86=D0=B8=D1=8E=20getCollectio?= =?UTF-8?q?nIdsBySQL()=20=D0=B2=20ImdgHazelcast.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../imdg/iml/hazelcast/adapter/ImdgHazelcast.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/platform-parent/platform-imdg-api-hazelcast-impl/src/main/java/ru/spcex/platform/imdg/iml/hazelcast/adapter/ImdgHazelcast.java b/platform-parent/platform-imdg-api-hazelcast-impl/src/main/java/ru/spcex/platform/imdg/iml/hazelcast/adapter/ImdgHazelcast.java index c30a3c9d0..f96612e4d 100644 --- a/platform-parent/platform-imdg-api-hazelcast-impl/src/main/java/ru/spcex/platform/imdg/iml/hazelcast/adapter/ImdgHazelcast.java +++ b/platform-parent/platform-imdg-api-hazelcast-impl/src/main/java/ru/spcex/platform/imdg/iml/hazelcast/adapter/ImdgHazelcast.java @@ -149,6 +149,15 @@ public class ImdgHazelcast implements Imdg { return result; } + @Override + public Collection getCollectionIdsBySQL(String paramString) { + SqlPredicate sqlPredicate = new SqlPredicate(paramString); + Set> found = map.entrySet(sqlPredicate); + List result = new ArrayList<>(found.size()); + for (Map.Entry entry : found) result.add(entry.getKey()); + return result; + } + @Override public Long nextIDSequenceFor() { return idGenerator.newId(); From 015171fc81df8b817f1177f74e7e912342b95c80 Mon Sep 17 00:00:00 2001 From: psemenkov Date: Thu, 20 Apr 2023 11:34:16 +0300 Subject: [PATCH 07/27] =?UTF-8?q?http://jira.mfd.msk:8088/browse/CLS-258?= =?UTF-8?q?=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20=D0=B2=20=D1=82?= =?UTF-8?q?=D0=B5=D1=81=D1=82=D1=8B=20=D1=82=D0=B5=D1=81=D1=82=D0=BE=D0=B2?= =?UTF-8?q?=D0=BE=D0=B3=D0=BE=20=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2?= =?UTF-8?q?=D0=B0=D1=82=D0=B5=D0=BB=D1=8F=20=D1=81=20=D0=BF=D1=80=D0=B0?= =?UTF-8?q?=D0=B2=D0=B0=D0=BC=D0=B8=20=D0=B0=D0=B4=D0=BC=D0=B8=D0=BD=D0=B0?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ClearingMemberCategoryServiceTest.java | 3 ++- .../service/CompanyInfoServiceTest.java | 3 ++- .../company/service/CompanyServiceTest.java | 3 ++- .../service/CompanySymbolServiceTest.java | 3 ++- .../company/service/ContactServiceTest.java | 3 ++- .../service/ProfileDocumentServiceTest.java | 3 ++- .../service/AbstractServiceTest.java | 3 ++- clearing-parent/test-clearing/pom.xml | 8 ++++++++ .../ru/spcex/clearing/test/TestUtils.java | 2 ++ .../clearing/test/config/ImdgTestConfig.java | 20 ++++++++++++++++++- 10 files changed, 43 insertions(+), 8 deletions(-) diff --git a/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/ClearingMemberCategoryServiceTest.java b/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/ClearingMemberCategoryServiceTest.java index f3e40c682..9e43b76fa 100644 --- a/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/ClearingMemberCategoryServiceTest.java +++ b/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/ClearingMemberCategoryServiceTest.java @@ -41,6 +41,7 @@ import static org.mockito.Mockito.spy; import static ru.spcex.clearing.test.MatcherFactory.usingIgnoringFieldsComparator; import static ru.spcex.clearing.test.TestUtils.*; import static ru.spcex.clearing.test.config.ImdgTestConfig.currentID; +import static ru.spcex.clearing.test.config.ImdgTestConfig.waitAvailableImdgProviderAndAddAdminWithDefaultId; @ExtendWith(SpringExtension.class) @ContextConfiguration(classes = { @@ -78,7 +79,7 @@ class ClearingMemberCategoryServiceTest { @PostConstruct private void init() { - hazelcastServiceTest.waitAvailable(); + waitAvailableImdgProviderAndAddAdminWithDefaultId(); memberCategoryImdg = hazelcastServiceTest.getImdg( IMDGDistributedNames.Map_ClearingMemberCategory, ClearingMemberCategory.class diff --git a/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/CompanyInfoServiceTest.java b/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/CompanyInfoServiceTest.java index 48219f376..a70d40205 100644 --- a/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/CompanyInfoServiceTest.java +++ b/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/CompanyInfoServiceTest.java @@ -37,6 +37,7 @@ import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.spy; import static ru.spcex.clearing.test.MatcherFactory.usingIgnoringFieldsComparator; import static ru.spcex.clearing.test.TestUtils.*; +import static ru.spcex.clearing.test.config.ImdgTestConfig.waitAvailableImdgProviderAndAddAdminWithDefaultId; @ExtendWith(SpringExtension.class) @ContextConfiguration(classes = { @@ -74,7 +75,7 @@ class CompanyInfoServiceTest { @PostConstruct private void init() { - hazelcastServiceTest.waitAvailable(); + waitAvailableImdgProviderAndAddAdminWithDefaultId(); companyImdg = hazelcastServiceTest.getImdg(IMDGDistributedNames.Map_Company, Company.class); // Словари для теста, применяются в ValidationConfig diff --git a/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/CompanyServiceTest.java b/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/CompanyServiceTest.java index 9ef61f7eb..b80446af5 100644 --- a/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/CompanyServiceTest.java +++ b/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/CompanyServiceTest.java @@ -45,6 +45,7 @@ import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.spy; import static ru.spcex.clearing.test.MatcherFactory.usingIgnoringFieldsComparator; import static ru.spcex.clearing.test.TestUtils.*; +import static ru.spcex.clearing.test.config.ImdgTestConfig.waitAvailableImdgProviderAndAddAdminWithDefaultId; @ExtendWith(SpringExtension.class) @ContextConfiguration(classes = { @@ -83,7 +84,7 @@ class CompanyServiceTest { @PostConstruct private void init() { - hazelcastServiceTest.waitAvailable(); + waitAvailableImdgProviderAndAddAdminWithDefaultId(); companyImdg = hazelcastServiceTest.getImdg(IMDGDistributedNames.Map_Company, Company.class); companySymbolsImdg = hazelcastServiceTest.getImdg(IMDGDistributedNames.Map_CompanySymbols, CompanySymbols.class); diff --git a/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/CompanySymbolServiceTest.java b/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/CompanySymbolServiceTest.java index db460c4d5..e247fb26a 100644 --- a/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/CompanySymbolServiceTest.java +++ b/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/CompanySymbolServiceTest.java @@ -36,6 +36,7 @@ import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.spy; import static ru.spcex.clearing.test.MatcherFactory.usingIgnoringFieldsComparator; import static ru.spcex.clearing.test.TestUtils.*; +import static ru.spcex.clearing.test.config.ImdgTestConfig.waitAvailableImdgProviderAndAddAdminWithDefaultId; @ExtendWith(SpringExtension.class) @ContextConfiguration(classes = { @@ -73,7 +74,7 @@ class CompanySymbolServiceTest { @PostConstruct private void init() { - hazelcastServiceTest.waitAvailable(); + waitAvailableImdgProviderAndAddAdminWithDefaultId(); companySymbolsImdg = hazelcastServiceTest.getImdg(IMDGDistributedNames.Map_CompanySymbols, CompanySymbols.class); diff --git a/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/ContactServiceTest.java b/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/ContactServiceTest.java index 575d484dd..6597b9e68 100644 --- a/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/ContactServiceTest.java +++ b/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/ContactServiceTest.java @@ -38,6 +38,7 @@ import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.spy; import static ru.spcex.clearing.test.MatcherFactory.usingIgnoringFieldsComparator; import static ru.spcex.clearing.test.TestUtils.*; +import static ru.spcex.clearing.test.config.ImdgTestConfig.waitAvailableImdgProviderAndAddAdminWithDefaultId; @ExtendWith(SpringExtension.class) @ContextConfiguration(classes = { @@ -73,7 +74,7 @@ class ContactServiceTest { @PostConstruct private void init() { - hazelcastServiceTest.waitAvailable(); + waitAvailableImdgProviderAndAddAdminWithDefaultId(); contactImdg = hazelcastServiceTest.getImdg(IMDGDistributedNames.Map_Contact, Contact.class); Imdg companyImdg = hazelcastServiceTest.getImdg(IMDGDistributedNames.Map_Company, Company.class); diff --git a/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/ProfileDocumentServiceTest.java b/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/ProfileDocumentServiceTest.java index c8ad1bc1a..b37689ea8 100644 --- a/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/ProfileDocumentServiceTest.java +++ b/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/ProfileDocumentServiceTest.java @@ -43,6 +43,7 @@ import static org.mockito.Mockito.spy; import static ru.spcex.clearing.test.MatcherFactory.usingIgnoringFieldsComparator; import static ru.spcex.clearing.test.TestUtils.*; import static ru.spcex.clearing.test.config.ImdgTestConfig.currentID; +import static ru.spcex.clearing.test.config.ImdgTestConfig.waitAvailableImdgProviderAndAddAdminWithDefaultId; @ExtendWith(SpringExtension.class) @ContextConfiguration(classes = { @@ -88,7 +89,7 @@ class ProfileDocumentServiceTest { @PostConstruct private void init() { - hazelcastServiceTest.waitAvailable(); + waitAvailableImdgProviderAndAddAdminWithDefaultId(); this.profileDocumentMap = hazelcastServiceTest.getImdg(IMDGDistributedNames.Map_ProfileDocument, ProfileDocument.class); this.companyMap = hazelcastServiceTest.getImdg(IMDGDistributedNames.Map_Company, Company.class); diff --git a/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/AbstractServiceTest.java b/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/AbstractServiceTest.java index e74231321..58aba5911 100644 --- a/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/AbstractServiceTest.java +++ b/clearing-parent/securities-service/src/test/java/ru/spcex/clearing/securities/service/AbstractServiceTest.java @@ -35,6 +35,7 @@ import java.util.concurrent.atomic.AtomicLong; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.spy; import static ru.spcex.clearing.test.MatcherFactory.usingIgnoringFieldsComparator; +import static ru.spcex.clearing.test.config.ImdgTestConfig.waitAvailableImdgProviderAndAddAdminWithDefaultId; @ExtendWith(SpringExtension.class) @ContextConfiguration(classes = { @@ -83,7 +84,7 @@ public abstract class AbstractServiceTest { protected ImdgProvider imdgProvider; protected void init() { - imdgProvider.waitAvailable(); + waitAvailableImdgProviderAndAddAdminWithDefaultId(); this.moneyMarketSecurityMap = imdgProvider.getImdg(IMDGDistributedNames.Map_MoneyMarketSecurity, MoneyMarketSecurity.class); this.listingImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Listing, Listing.class); this.equitySecurityImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_EquitySecurity, EquitySecurity.class); diff --git a/clearing-parent/test-clearing/pom.xml b/clearing-parent/test-clearing/pom.xml index 4c1f1dc5e..65746a7de 100644 --- a/clearing-parent/test-clearing/pom.xml +++ b/clearing-parent/test-clearing/pom.xml @@ -60,5 +60,13 @@ ru.spcex.platform platform-imdg-api-hazelcast-impl + + ru.spcex.clearing + classes + + + ru.spcex.platform + platform-enum + diff --git a/clearing-parent/test-clearing/src/main/java/ru/spcex/clearing/test/TestUtils.java b/clearing-parent/test-clearing/src/main/java/ru/spcex/clearing/test/TestUtils.java index 47fa6449f..11b6871de 100644 --- a/clearing-parent/test-clearing/src/main/java/ru/spcex/clearing/test/TestUtils.java +++ b/clearing-parent/test-clearing/src/main/java/ru/spcex/clearing/test/TestUtils.java @@ -31,6 +31,7 @@ import static org.mockito.Mockito.timeout; import static org.mockito.Mockito.verify; import static ru.spcex.clearing.platform.messaging.service.Status.Success; import static ru.spcex.clearing.test.MatcherFactory.usingIgnoringFieldsComparator; +import static ru.spcex.clearing.test.config.ImdgTestConfig.defaultAdminId; public class TestUtils { public static final MatcherFactory.Matcher> BASE_REQUEST_MATCHER = usingIgnoringFieldsComparator(); @@ -105,6 +106,7 @@ public class TestUtils { BaseRequest baseRequest = new BaseRequest<>(); baseRequest.setRequestPayload(accountRequest); baseRequest.setId(id); + baseRequest.setUserId(defaultAdminId); baseRequest.setActionType(actionType); String jsonBaseRequest; try { diff --git a/clearing-parent/test-clearing/src/main/java/ru/spcex/clearing/test/config/ImdgTestConfig.java b/clearing-parent/test-clearing/src/main/java/ru/spcex/clearing/test/config/ImdgTestConfig.java index ca50a9d5f..56932f90f 100644 --- a/clearing-parent/test-clearing/src/main/java/ru/spcex/clearing/test/config/ImdgTestConfig.java +++ b/clearing-parent/test-clearing/src/main/java/ru/spcex/clearing/test/config/ImdgTestConfig.java @@ -8,6 +8,11 @@ import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; +import ru.clearing.classes.statics.data.user.UserRoleSession; +import ru.spcex.clearing.imdg.IMDGDistributedNames; +import ru.spcex.platform.enumeration.Status; +import ru.spcex.platform.enumeration.UserRole; +import ru.spcex.platform.imdg.api.Imdg; import ru.spcex.platform.imdg.api.ImdgProvider; import ru.spcex.platform.imdg.iml.hazelcast.config.HazelcastClientParams; import ru.spcex.platform.imdg.iml.hazelcast.service.HazelcastService; @@ -21,7 +26,19 @@ import java.util.concurrent.atomic.AtomicLong; public class ImdgTestConfig { public static final AtomicLong currentID = new AtomicLong(0L); + public static final Long defaultAdminId = 1000L; private HazelcastInstance hazelcastInstance; + private static ImdgProvider imdgProvider; + + public static void waitAvailableImdgProviderAndAddAdminWithDefaultId(){ + imdgProvider.waitAvailable(); + Imdg userRoleSessions = imdgProvider.getImdg(IMDGDistributedNames.Map_UserRoleSession, UserRoleSession.class); + UserRoleSession userRoleSession = new UserRoleSession(); + userRoleSession.setUserId(defaultAdminId); + userRoleSession.setUserRole(UserRole.Admin.getKey()); + userRoleSession.setStatus(Status.Active.getKey()); + userRoleSessions.insert(userRoleSession); + } private static ThreadPoolTaskExecutor createThreadPoolTestTaskExecutor(int maxPoolSz, boolean waitForCompletion) { ThreadPoolTaskExecutor pool = new ThreadPoolTaskExecutor(); @@ -61,7 +78,8 @@ public class ImdgTestConfig { cfg.setNetworkConfig(networkConfig); hazelcastInstance = Hazelcast.getOrCreateHazelcastInstance(cfg); HazelcastHelper.imdgSystem_setStorageState(true, hazelcastInstance); - return new HazelcastService(taskExecutorHazelcastClientInitializer, taskExecutorIdGeneratorAwaiter, params); + imdgProvider = new HazelcastService(taskExecutorHazelcastClientInitializer, taskExecutorIdGeneratorAwaiter, params); + return imdgProvider; } @Bean(name = "hazelcastClientParams") From 24dccbf4b794fb6b73f535742044d45741235f58 Mon Sep 17 00:00:00 2001 From: psemenkov Date: Thu, 20 Apr 2023 11:36:29 +0300 Subject: [PATCH 08/27] =?UTF-8?q?http://jira.mfd.msk:8088/browse/CLS-258?= =?UTF-8?q?=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20=D0=BF=D1=83?= =?UTF-8?q?=D1=81=D1=82=D0=BE=D0=B9=20=D0=BA=D0=BE=D0=BD=D1=81=D1=82=D1=80?= =?UTF-8?q?=D1=83=D0=BA=D1=82=D0=BE=D1=80=20=D1=87=D1=82=D0=BE=D0=B1=D1=8B?= =?UTF-8?q?=20=D1=81=D0=BF=D1=80=D0=B8=D0=BD=D0=B3=20=D0=BC=D0=BE=D0=B3=20?= =?UTF-8?q?=D1=81=D0=BE=D0=B7=D0=B4=D0=B0=D0=B2=D0=B0=D1=82=D1=8C=20=D0=B1?= =?UTF-8?q?=D0=B8=D0=BD.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ru/spcex/clearing/util/security/UserRoleVerification.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clearing-parent/security-util/src/main/java/ru/spcex/clearing/util/security/UserRoleVerification.java b/clearing-parent/security-util/src/main/java/ru/spcex/clearing/util/security/UserRoleVerification.java index 7c1911380..565d10bc0 100644 --- a/clearing-parent/security-util/src/main/java/ru/spcex/clearing/util/security/UserRoleVerification.java +++ b/clearing-parent/security-util/src/main/java/ru/spcex/clearing/util/security/UserRoleVerification.java @@ -46,6 +46,8 @@ public class UserRoleVerification { this.roleVerificationError = roleVerificationError; } + //нужен чтобы спринг мог создать бин + private UserRoleVerification(){} public UserRoleVerification(ImdgProvider imdg, IMessageResolver messageResolver, UserRole roleForVerification, From 02c5b2a176dada276e61f1982b9c3c646b062ce4 Mon Sep 17 00:00:00 2001 From: psemenkov Date: Thu, 20 Apr 2023 11:41:48 +0300 Subject: [PATCH 09/27] =?UTF-8?q?http://jira.mfd.msk:8088/browse/CLS-258?= =?UTF-8?q?=20=D0=9F=D1=80=D0=B8=D0=B2=D0=B5=D0=BB=20=D0=B2=20=D1=81=D0=BE?= =?UTF-8?q?=D0=BE=D1=82=D0=B2=D0=B5=D1=82=D1=81=D1=82=D0=B2=D0=B8=D0=B5=20?= =?UTF-8?q?=D1=81=20=D0=A2=D0=97=20PlannerAllTodayMaker=20=D0=B8=20=D0=B4?= =?UTF-8?q?=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20=D1=82=D0=B5=D1=81=D1=82?= =?UTF-8?q?=D1=8B=20=D0=BA=20=D0=BD=D0=B5=D0=BC=D1=83.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- clearing-parent/imdg/pom.xml | 10 ++ .../imdg/config/HazelcastConfiguration.java | 2 +- .../imdg/services/PlannerAllTodayMaker.java | 89 +++++--------- .../imdg/config/TestConfiguration.java | 2 + .../services/PlannerAllTodayMakerTest.java | 111 ++++++++++++++++++ 5 files changed, 153 insertions(+), 61 deletions(-) create mode 100644 clearing-parent/imdg/src/test/java/ru/spcex/clearing/imdg/services/PlannerAllTodayMakerTest.java diff --git a/clearing-parent/imdg/pom.xml b/clearing-parent/imdg/pom.xml index cb06f2437..24a1cef03 100644 --- a/clearing-parent/imdg/pom.xml +++ b/clearing-parent/imdg/pom.xml @@ -75,6 +75,16 @@ ru.spcex.platform platform-enum + + ru.spcex.clearing + cleaning-builders + SPCEX-1.0.0.0 + compile + + + ru.spcex.clearing + clearing-validation + diff --git a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/config/HazelcastConfiguration.java b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/config/HazelcastConfiguration.java index ed760d9c4..f6e601f92 100644 --- a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/config/HazelcastConfiguration.java +++ b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/config/HazelcastConfiguration.java @@ -24,7 +24,7 @@ public class HazelcastConfiguration { this.hzSettings = imdgSettings.getHazelcast(); } - @Bean + @Bean("hazelcastInstanceImdg") public HazelcastInstance hazelcastServerInstance(Config config) { return Hazelcast.newHazelcastInstance(config); } diff --git a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/services/PlannerAllTodayMaker.java b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/services/PlannerAllTodayMaker.java index 81e9c8dc8..40eea61ce 100644 --- a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/services/PlannerAllTodayMaker.java +++ b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/services/PlannerAllTodayMaker.java @@ -8,18 +8,15 @@ import ru.clearing.classes.statics.data.scheduler.ClearingCalendar; import ru.clearing.classes.statics.data.scheduler.Planner; import ru.clearing.classes.statics.data.scheduler.PlannerAllToday; import ru.clearing.classes.statics.data.scheduler.PlannerTemplate; -import ru.spcex.platform.enumeration.DayStatus; -import ru.spcex.platform.enumeration.Parent; +import ru.spcex.clearing.scheduler.PlannerAllTodayBuilder; import ru.spcex.platform.enumeration.Status; import java.time.DayOfWeek; import java.time.LocalDate; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Optional; +import java.util.*; import static ru.spcex.clearing.imdg.IMDGDistributedNames.*; +import static ru.spcex.clearing.scheduler.ISchedulerChecker.*; @Service public class PlannerAllTodayMaker { @@ -37,7 +34,7 @@ public class PlannerAllTodayMaker { plannerTemplateMap = hazelcastInstance.getMap(Map_PlannerTemplate); plannerAllTodayMap = hazelcastInstance.getMap(Map_PlannerAllToday); } - + public void makeSchedulerAllTodayMap() { LocalDate currentDate = LocalDate.now(); List listOfPlannerAllToday = new ArrayList<>(); @@ -45,17 +42,15 @@ public class PlannerAllTodayMaker { if (!plannerMap.isEmpty()) listOfPlannerAllToday.addAll(getPlannersAllTodayToDate(currentDate)); plannerMap.values().stream() - .filter(x -> x.getTaskStatus() != null) - .filter((x) -> x.getClearingDate() == null || x.getClearingDate().isEqual(currentDate)).forEach((x) -> { - if (x.getTaskStatus().equalsIgnoreCase(Status.Active.getKey())) { - listOfPlannerAllToday.add(createPlannerAllTodayFromPlanner(x)); - } + .filter(x -> isValidPlanner(x, currentDate)).forEach((planner) -> { + if (planner.getTaskStatus().equalsIgnoreCase(Status.Active.getKey())) { + listOfPlannerAllToday.add(PlannerAllTodayBuilder.builder().append(planner).build()); + } - if (x.getTaskStatus().equalsIgnoreCase(Status.Cancel.getKey()) || x.getTaskStatus().equalsIgnoreCase(Status.Blocked.getKey())) { - listOfPlannerAllToday.removeIf((allToday) -> x.getTaskTime().equals(allToday.getTaskTime()) && - x.getTask().equalsIgnoreCase(allToday.getTask())); - } - }); + if (planner.getTaskStatus().equalsIgnoreCase(Status.Cancel.getKey()) || planner.getTaskStatus().equalsIgnoreCase(Status.Blocked.getKey())) { + listOfPlannerAllToday.removeIf((allToday) -> needRemoveByPlanner(planner, allToday)); + } + }); for (PlannerAllToday plannerAllToday : listOfPlannerAllToday) { plannerAllToday.setId(hazelcastInstance.getIdGenerator(MAP_SEQUENCE_NAME).newId()); plannerAllTodayMap.put(plannerAllToday.getId(), plannerAllToday); @@ -63,55 +58,29 @@ public class PlannerAllTodayMaker { } private List getPlannersAllTodayToDate(LocalDate currentDate) { - boolean weekend = Arrays.asList(DayOfWeek.SATURDAY, DayOfWeek.SUNDAY).contains(currentDate.getDayOfWeek()); List res = new ArrayList<>(); - if (clearingCalendarMap == null || clearingCalendarMap.isEmpty()) { - if (!weekend) { - for (PlannerTemplate plannerTemplate : plannerTemplateMap.values()) { - res.add(createPlannerAllTodayFromPlannerTemplate(plannerTemplate)); - } + + if (needAddFromPlannerTemplate(currentDate, clearingCalendarMap.values())){ + for (PlannerTemplate plannerTemplate : plannerTemplateMap.values()) { + res.add(PlannerAllTodayBuilder.builder().append(plannerTemplate).build()); } + } + return res; + } + + public boolean needAddFromPlannerTemplate(LocalDate currentDate, Collection clearingCalendar){ + boolean isWeekend = Arrays.asList(DayOfWeek.SATURDAY, DayOfWeek.SUNDAY).contains(currentDate.getDayOfWeek()); + + if (clearingCalendar == null || clearingCalendar.isEmpty()) { + return !isWeekend; } else { - Optional clearingCalendarOptional = clearingCalendarMap.values().stream() - .filter((calendar) -> calendar.getClearingDate().isEqual(currentDate)) + Optional clearingCalendarOptional = clearingCalendar.stream() + .filter((calendar) -> calendar.getClearingDate() != null && calendar.getClearingDate().isEqual(currentDate)) .findFirst(); if (clearingCalendarOptional.isPresent()) { ClearingCalendar calendar = clearingCalendarOptional.get(); - if (calendar.getDayStatus().equalsIgnoreCase(DayStatus.Workday.getKey())) { - if (calendar.getCompanyId() != null && calendar.getCompanyId() != 0) { - for (PlannerTemplate plannerTemplate : plannerTemplateMap.values()) { - res.add(createPlannerAllTodayFromPlannerTemplate(plannerTemplate)); - } - } - } - } + return isValidWorkday(calendar, isWeekend); + } else return !isWeekend; } - - return res; } - - private PlannerAllToday createPlannerAllTodayFromPlanner(Planner planner) { - PlannerAllToday res = new PlannerAllToday(); - res.setTask(planner.getTask()); - res.setTaskTime(planner.getTaskTime()); - res.setClearingDate(planner.getClearingDate()); - res.setMarket(planner.getMarket()); - res.setTaskStatus(planner.getTaskStatus()); - res.setCompanyId(planner.getCompanyId()); - res.setSecurityId(planner.getSecurityId()); - res.setParent(Parent.Planner.getKey()); - res.setParentId(planner.getId()); - return res; - } - - private PlannerAllToday createPlannerAllTodayFromPlannerTemplate(PlannerTemplate plannerTemplate) { - PlannerAllToday res = new PlannerAllToday(); - res.setTask(plannerTemplate.getTask()); - res.setTaskTime(plannerTemplate.getTaskTime()); - res.setTaskStatus(plannerTemplate.getTaskStatus()); - res.setParent(Parent.Template.getKey()); - res.setParentId(plannerTemplate.getId()); - return res; - } - } diff --git a/clearing-parent/imdg/src/test/java/ru/spcex/clearing/imdg/config/TestConfiguration.java b/clearing-parent/imdg/src/test/java/ru/spcex/clearing/imdg/config/TestConfiguration.java index 39c46e355..02890c364 100644 --- a/clearing-parent/imdg/src/test/java/ru/spcex/clearing/imdg/config/TestConfiguration.java +++ b/clearing-parent/imdg/src/test/java/ru/spcex/clearing/imdg/config/TestConfiguration.java @@ -6,6 +6,7 @@ import com.hazelcast.core.HazelcastInstance; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; @@ -16,6 +17,7 @@ import org.springframework.context.annotation.Import; public class TestConfiguration { private final Logger log = LoggerFactory.getLogger(this.getClass()); @Autowired + @Qualifier("hazelcastInstanceImdg") private HazelcastInstance hazelcastInstance; @Autowired diff --git a/clearing-parent/imdg/src/test/java/ru/spcex/clearing/imdg/services/PlannerAllTodayMakerTest.java b/clearing-parent/imdg/src/test/java/ru/spcex/clearing/imdg/services/PlannerAllTodayMakerTest.java new file mode 100644 index 000000000..99a0d9cab --- /dev/null +++ b/clearing-parent/imdg/src/test/java/ru/spcex/clearing/imdg/services/PlannerAllTodayMakerTest.java @@ -0,0 +1,111 @@ +package ru.spcex.clearing.imdg.services; + +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit.jupiter.SpringExtension; +import ru.clearing.classes.statics.data.scheduler.ClearingCalendar; +import ru.clearing.classes.statics.data.scheduler.Planner; +import ru.clearing.classes.statics.data.scheduler.PlannerAllToday; +import ru.spcex.clearing.imdg.config.TestConfiguration; +import ru.spcex.platform.enumeration.DayStatus; + +import java.nio.file.Path; +import java.nio.file.Paths; +import java.time.LocalDate; +import java.time.LocalTime; +import java.util.Collections; + +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static ru.spcex.clearing.scheduler.ISchedulerChecker.*; + +@ExtendWith(SpringExtension.class) +@ContextConfiguration(classes = { + TestConfiguration.class + }) +class PlannerAllTodayMakerTest { + @Autowired + TestConfiguration testConfig; + + private final LocalDate weekendDate = LocalDate.of(2023, 4, 16); + private final LocalDate workDate = LocalDate.of(2023, 4, 14); + + @BeforeAll + static void setProperty() { + Path path = Paths.get("src", "main", "resources"); + String currentPath = path.toAbsolutePath().toString(); + System.setProperty("spring.config.location", currentPath); + } + + @Test + void needAddFromPlannerTemplate() { + PlannerAllTodayMaker plannerAllTodayMaker = new PlannerAllTodayMaker(testConfig.getHazelcastInstance()); + assertFalse(plannerAllTodayMaker.needAddFromPlannerTemplate(weekendDate, null)); + assertTrue(plannerAllTodayMaker.needAddFromPlannerTemplate(workDate, null)); + ClearingCalendar clearingCalendar = new ClearingCalendar(); + assertTrue(plannerAllTodayMaker.needAddFromPlannerTemplate(workDate, Collections.singleton(clearingCalendar))); + clearingCalendar.setClearingDate(workDate); + clearingCalendar.setDayStatus(DayStatus.Workday.getKey()); + assertTrue(plannerAllTodayMaker.needAddFromPlannerTemplate(workDate, Collections.singleton(clearingCalendar))); + clearingCalendar.setClearingDate(weekendDate); + clearingCalendar.setDayStatus(DayStatus.Workday.getKey()); + assertFalse(plannerAllTodayMaker.needAddFromPlannerTemplate(weekendDate, Collections.singleton(clearingCalendar))); + clearingCalendar.setCompanyId(11L); + assertTrue(plannerAllTodayMaker.needAddFromPlannerTemplate(weekendDate, Collections.singleton(clearingCalendar))); + } + + @Test + void isValidWorkdayTest() { + ClearingCalendar clearingCalendar = new ClearingCalendar(); + assertFalse(isValidWorkday(clearingCalendar, true)); + clearingCalendar.setDayStatus(DayStatus.Workday.getKey()); + assertFalse(isValidWorkday(clearingCalendar, true)); + clearingCalendar.setDayStatus(DayStatus.DayOff.getKey()); + assertFalse(isValidWorkday(clearingCalendar, true)); + assertFalse(isValidWorkday(clearingCalendar, false)); + clearingCalendar.setDayStatus(DayStatus.Workday.getKey()); + assertTrue(isValidWorkday(clearingCalendar, false)); + assertFalse(isValidWorkday(clearingCalendar, true)); + clearingCalendar.setCompanyId(1L); + assertTrue(isValidWorkday(clearingCalendar, true)); + } + + @Test + void needRemoveByPlannerTest() { + PlannerAllToday plannerAllToday = new PlannerAllToday(); + Planner planner = new Planner(); + LocalTime localTime = LocalTime.now(); + assertFalse(needRemoveByPlanner(planner, plannerAllToday)); + planner.setTaskTime(localTime); + assertFalse(needRemoveByPlanner(planner, plannerAllToday)); + plannerAllToday.setTaskTime(localTime); + assertFalse(needRemoveByPlanner(planner, plannerAllToday)); + planner.setCompanyId(1L); + assertFalse(needRemoveByPlanner(planner, plannerAllToday)); + plannerAllToday.setCompanyId(1L); + assertFalse(needRemoveByPlanner(planner, plannerAllToday)); + planner.setSecurityId(1L); + assertFalse(needRemoveByPlanner(planner, plannerAllToday)); + plannerAllToday.setSecurityId(1L); + assertFalse(needRemoveByPlanner(planner, plannerAllToday)); + plannerAllToday.setTask("1L"); + assertFalse(needRemoveByPlanner(planner, plannerAllToday)); + planner.setTask("1L"); + assertTrue(needRemoveByPlanner(planner, plannerAllToday)); + } + + @Test + void isValidPlannerTest() { + Planner planner = new Planner(); + assertFalse(isValidPlanner(planner, weekendDate)); + planner.setTaskStatus("ACTV"); + assertTrue(isValidPlanner(planner, weekendDate)); + planner.setClearingDate(workDate); + assertFalse(isValidPlanner(planner, weekendDate)); + planner.setClearingDate(weekendDate); + assertTrue(isValidPlanner(planner, weekendDate)); + } +} \ No newline at end of file From 5096a2eb73fd9765bd3a0285010592c82e90f08f Mon Sep 17 00:00:00 2001 From: psemenkov Date: Thu, 20 Apr 2023 13:47:47 +0300 Subject: [PATCH 10/27] =?UTF-8?q?http://jira.mfd.msk:8088/browse/CLS-258?= =?UTF-8?q?=20=D0=A1=D0=B4=D0=B5=D0=BB=D0=B0=D1=82=20=D0=B4=D0=BE=D0=BF?= =?UTF-8?q?=D0=BE=D0=BB=D0=BD=D0=B8=D1=82=D0=B5=D0=BB=D1=8C=D0=BD=D1=83?= =?UTF-8?q?=D1=8E=20=D0=BD=D0=B0=D1=81=D1=82=D1=80=D0=BE=D0=B9=D0=BA=D1=83?= =?UTF-8?q?,=20=D0=BF=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=20=D0=BA?= =?UTF-8?q?=D0=BE=D0=B4=D1=8B=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BE=D0=BA,=20?= =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20=D1=82=D0=B5=D1=81?= =?UTF-8?q?=D1=82=D0=BE=D0=B2=D1=8B=D0=B9=20=D0=BC=D0=BE=D0=B4=D1=83=D0=BB?= =?UTF-8?q?=D1=8C(=D0=B8=20=D1=83=D0=B4=D0=B0=D0=BB=D0=B8=D0=BB=20=D0=B4?= =?UTF-8?q?=D1=83=D0=B1=D0=BB=D0=B8=D1=80=D1=83=D1=8E=D1=89=D0=B8=D0=B5=20?= =?UTF-8?q?=D0=B8=D1=85=20=D0=BA=D0=BE=D0=BD=D1=84=D0=B8=D0=B3=D0=B8)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- clearing-parent/scheduler-service/pom.xml | 36 +++++++++ .../scheduler/error/ValidationError.java | 8 +- .../rules/common/TimeNotBeforeRule.java | 36 ++++++--- .../HazelcastServiceTestConfiguration.java | 75 ------------------- .../scheduler/utils/MatcherFactory.java | 38 ---------- 5 files changed, 66 insertions(+), 127 deletions(-) delete mode 100644 clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/config/HazelcastServiceTestConfiguration.java delete mode 100644 clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/utils/MatcherFactory.java diff --git a/clearing-parent/scheduler-service/pom.xml b/clearing-parent/scheduler-service/pom.xml index cb13c4eef..d607fa83e 100644 --- a/clearing-parent/scheduler-service/pom.xml +++ b/clearing-parent/scheduler-service/pom.xml @@ -36,6 +36,20 @@ ru.spcex.clearing classes + + ru.spcex.clearing + clearing-validation + + + ru.spcex.clearing + security-util + + + ru.spcex.clearing + cleaning-builders + SPCEX-1.0.0.0 + compile + org.springframework.boot spring-boot-starter @@ -51,6 +65,11 @@ spring-boot-starter-test test + + ru.spcex.clearing + test-clearing + test + @@ -78,6 +97,23 @@ ${project.artifactId} + + org.apache.maven.plugins + maven-surefire-plugin + 2.21.0 + + + org.junit.platform + junit-platform-surefire-provider + 1.2.0-M1 + + + org.junit.jupiter + junit-jupiter-engine + 5.2.0-M1 + + + diff --git a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/error/ValidationError.java b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/error/ValidationError.java index 678f62c27..7e64c1cc1 100644 --- a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/error/ValidationError.java +++ b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/error/ValidationError.java @@ -3,8 +3,9 @@ package ru.spcex.clearing.scheduler.error; import ru.spcex.platform.utils.enumeration.IErrorEnumId; public enum ValidationError implements IErrorEnumId { - WrongDictionaryValue(10003L), - EmptyRequiredValue(10002L), + UserVerifyDenial(18001L), + EmptyRequiredValue(18002L), + WrongDictionaryValue(18003L), WrongEnumValue(777L), //todo set code RecordNotFound(7006L), TaskForPastDate(7010L), @@ -12,8 +13,7 @@ public enum ValidationError implements IErrorEnumId { CompanyNotFound(7014L), SecurityNotFound(7012L), CompanyNotActive(7015L), - SecurityNotActive(7013L) - ; + SecurityNotActive(7013L); private final Long id; diff --git a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/validation/rules/common/TimeNotBeforeRule.java b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/validation/rules/common/TimeNotBeforeRule.java index 90287864e..acdc2df60 100644 --- a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/validation/rules/common/TimeNotBeforeRule.java +++ b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/validation/rules/common/TimeNotBeforeRule.java @@ -11,27 +11,42 @@ import java.util.function.Function; /** * Проверка поля с LocalTime. Условие проверки: проверяемое время >= текущее время + * * @param Класс проверяемого объекта */ -public record TimeNotBeforeRule(String fieldName, Function getter, boolean required) implements IValidationRule> { +public record TimeNotBeforeRule(String fieldName, + Function getter, + boolean required, + boolean isToday) implements IValidationRule> { /** * @param fieldName Название поля класса, используется для передачи ошибки - * @param getter Метод получения проверяемого времени - * @param required Флаг обязательности поля - * @param Класс проверяемого объекта + * @param getter Метод получения проверяемого времени + * @param required Флаг обязательности поля + * @param Класс проверяемого объекта + * @param isToday Флаг что дата сегодняшняя */ - public static TimeNotBeforeRule instance(String fieldName, Function getter, boolean required) { - return new TimeNotBeforeRule<>(fieldName, getter, required); + public static TimeNotBeforeRule instance(String fieldName, Function getter, boolean required, boolean isToday) { + return new TimeNotBeforeRule<>(fieldName, getter, required, isToday); } /** * @param fieldName Название поля класса, используется для передачи ошибки - * @param getter Метод получения проверяемого времени - * @param Класс проверяемого объекта + * @param getter Метод получения проверяемого времени + * @param required Флаг обязательности поля + * @param Класс проверяемого объекта + */ + public static TimeNotBeforeRule instance(String fieldName, Function getter, boolean required) { + return new TimeNotBeforeRule<>(fieldName, getter, required, true); + } + + /** + * @param fieldName Название поля класса, используется для передачи ошибки + * @param getter Метод получения проверяемого времени + * @param Класс проверяемого объекта */ public static TimeNotBeforeRule instance(String fieldName, Function getter) { - return new TimeNotBeforeRule<>(fieldName, getter, true); + return new TimeNotBeforeRule<>(fieldName, getter, true, true); } @Override @@ -39,7 +54,8 @@ public record TimeNotBeforeRule(String fieldName, Function gett R validatedObject = context.getValidatedObject(); LocalTime date = getter.apply(validatedObject); if (date == null) return required ? of(ValidationError.EmptyRequiredValue, fieldName) : Optional.empty(); - if (date.isBefore(LocalTime.now())) return of(ValidationError.TaskForPastTime, fieldName); + if (date.isBefore(LocalTime.now())) + return isToday ? of(ValidationError.TaskForPastTime, fieldName) : Optional.empty(); return Optional.empty(); } } diff --git a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/config/HazelcastServiceTestConfiguration.java b/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/config/HazelcastServiceTestConfiguration.java deleted file mode 100644 index ed08bbbb9..000000000 --- a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/config/HazelcastServiceTestConfiguration.java +++ /dev/null @@ -1,75 +0,0 @@ -package ru.specx.clearing.scheduler.config; - -import com.hazelcast.config.*; -import com.hazelcast.core.Hazelcast; -import com.hazelcast.core.HazelcastInstance; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; -import ru.spcex.platform.imdg.iml.hazelcast.config.HazelcastClientParams; -import ru.spcex.platform.imdg.iml.hazelcast.service.HazelcastService; -import ru.spcex.platform.imdg.iml.hazelcast.util.HazelcastHelper; -import ru.spcex.platform.utils.enumeration.IMessageResolver; -import ru.spcex.platform.utils.enumeration.SimpleMessageResolver; - -import java.util.List; -import java.util.Random; - -@Configuration -public class HazelcastServiceTestConfiguration { - private HazelcastInstance hazelcastInstance; - - private static ThreadPoolTaskExecutor createThreadPoolTaskExecutor(int maxPoolSz, boolean waitForCompletion) { - ThreadPoolTaskExecutor pool = new ThreadPoolTaskExecutor(); - if (maxPoolSz > 2) { - pool.setKeepAliveSeconds(60); - pool.setAllowCoreThreadTimeOut(true); - } - pool.setCorePoolSize(maxPoolSz); - pool.setWaitForTasksToCompleteOnShutdown(waitForCompletion); - return pool; - } - - @Bean(name = "hazelcastServiceTest") - public HazelcastService hazelcastService(@Qualifier("taskExecutorHazelcastClientInitializer") ThreadPoolTaskExecutor taskExecutorHazelcastClientInitializer, @Qualifier("taskExecutorIdGeneratorAwaiter") ThreadPoolTaskExecutor taskExecutorIdGeneratorAwaiter, HazelcastClientParams params) { - Config cfg = new Config(); - cfg.setInstanceName("localhost"); - - NetworkConfig networkConfig = new NetworkConfig(); - JoinConfig joinConfig = new JoinConfig(); - joinConfig.setMulticastConfig(new MulticastConfig().setEnabled(false)); - joinConfig.setTcpIpConfig(new TcpIpConfig().setEnabled(true).setMembers(List.of("127.0.0.1"))); - networkConfig.setJoin(joinConfig); - cfg.setNetworkConfig(networkConfig); - hazelcastInstance = Hazelcast.newHazelcastInstance(cfg); - HazelcastHelper.imdgSystem_setStorageState(true, hazelcastInstance); - return new HazelcastService(taskExecutorHazelcastClientInitializer, taskExecutorIdGeneratorAwaiter, params); - } - - @Bean(name = "taskExecutorHazelcastClientInitializer") - public ThreadPoolTaskExecutor taskExecutorHazelcastClientInitializer() { - return createThreadPoolTaskExecutor(1, true); - } - - @Bean(name = "taskExecutorIdGeneratorAwaiter") - public ThreadPoolTaskExecutor taskExecutorIdGeneratorAwaiter() { - return createThreadPoolTaskExecutor(1, false); - } - - @Bean(name = "hazelcastClientParams") - public HazelcastClientParams getHazelcastClientParams() { - HazelcastClientParams params = new HazelcastClientParams(); - params.setLogin("dev"); - params.setPassword("dev-pass"); - params.setClusterMembers("127.0.0.1"); - params.setInstanceName("hzTestClient" + new Random().nextInt()); - params.setNearCacheConfig(new NearCacheConfig()); - return params; - } - - @Bean - public IMessageResolver messageResolver() { - return new SimpleMessageResolver(); - } -} diff --git a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/utils/MatcherFactory.java b/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/utils/MatcherFactory.java deleted file mode 100644 index c214393ea..000000000 --- a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/utils/MatcherFactory.java +++ /dev/null @@ -1,38 +0,0 @@ -package ru.specx.clearing.scheduler.utils; - -import java.util.Arrays; - -import static org.assertj.core.api.Assertions.assertThat; - -/** - * Factory for creating test matchers. - *

- * Comparing actual and expected objects via AssertJ - */ -public class MatcherFactory { - - public static Matcher usingIgnoringFieldsComparator(String... fieldsToIgnore) { - return new Matcher<>(fieldsToIgnore); - } - - public static class Matcher { - private final String[] fieldsToIgnore; - - private Matcher(String... fieldsToIgnore) { - this.fieldsToIgnore = fieldsToIgnore; - } - - public void assertMatch(T actual, T expected) { - assertThat(actual).usingRecursiveComparison().ignoringFields(fieldsToIgnore).isEqualTo(expected); - } - - @SafeVarargs - public final void assertMatch(Iterable actual, T... expected) { - assertMatch(actual, Arrays.asList(expected)); - } - - public void assertMatch(Iterable actual, Iterable expected) { - assertThat(actual).usingRecursiveFieldByFieldElementComparatorIgnoringFields(fieldsToIgnore).isEqualTo(expected); - } - } -} From 41a0f2a4b7f21ef7f03dc59994d5619342744025 Mon Sep 17 00:00:00 2001 From: psemenkov Date: Thu, 20 Apr 2023 13:50:39 +0300 Subject: [PATCH 11/27] =?UTF-8?q?http://jira.mfd.msk:8088/browse/CLS-268?= =?UTF-8?q?=20=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=20=D1=81?= =?UTF-8?q?=D1=83=D1=89=D0=B5=D1=81=D1=82=D0=B2=D1=83=D1=8E=D1=89=D0=B8?= =?UTF-8?q?=D0=B5=20=D1=82=D0=B5=D1=81=D1=82=D1=8B=20=D0=B2=D0=B0=D0=BB?= =?UTF-8?q?=D0=B8=D0=B4=D0=B0=D1=82=D0=BE=D1=80=D0=BE=D0=B2,=20=D1=87?= =?UTF-8?q?=D1=82=D0=BE=D0=B1=D1=8B=20=D0=BE=D0=BD=D0=B8=20=D0=B7=D0=B0?= =?UTF-8?q?=D0=BF=D1=83=D1=81=D0=BA=D0=B0=D0=BB=D0=B8=D1=81=D1=8C=20=D0=BC?= =?UTF-8?q?=D0=B0=D0=B2=D0=B5=D0=BD=D0=BE=D0=BC.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scheduler/AbstractServiceTest.java | 181 ++++++++++++++++++ .../validation/DateNotBeforeRuleTest.java | 6 +- .../validation/DictionaryPresentRuleTest.java | 22 +-- .../validation/EnumPresentRuleTest.java | 10 +- .../validation/FieldRequiredRuleTest.java | 6 +- .../validation/IdPresentRuleTest.java | 10 +- .../validation/TimeNotBeforeRuleTest.java | 6 +- 7 files changed, 199 insertions(+), 42 deletions(-) create mode 100644 clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/AbstractServiceTest.java diff --git a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/AbstractServiceTest.java b/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/AbstractServiceTest.java new file mode 100644 index 000000000..d4196c5c4 --- /dev/null +++ b/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/AbstractServiceTest.java @@ -0,0 +1,181 @@ +package ru.specx.clearing.scheduler; + +import org.apache.kafka.clients.producer.MockProducer; +import org.apache.kafka.clients.producer.ProducerRecord; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.ArgumentCaptor; +import org.mockito.Captor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit.jupiter.SpringExtension; +import ru.clearing.classes.statics.data.company.Company; +import ru.clearing.classes.statics.data.scheduler.*; +import ru.clearing.classes.statics.data.security.Security; +import ru.clearing.platform.dictionary.DayStatusDictionary; +import ru.clearing.platform.dictionary.TaskDictionary; +import ru.clearing.platform.dictionary.TaskStatusDictionary; +import ru.spcex.clearing.imdg.IMDGDistributedNames; +import ru.spcex.clearing.scheduler.PlannerAllTodayBuilder; +import ru.spcex.clearing.scheduler.config.ErrorResolverConfig; +import ru.spcex.clearing.scheduler.config.validation.ClearingCalendarValidationConfig; +import ru.spcex.clearing.scheduler.config.validation.PlannerTemplateValidationConfig; +import ru.spcex.clearing.scheduler.config.validation.PlannerValidationConfig; +import ru.spcex.clearing.scheduler.config.validation.ValidationConfig; +import ru.spcex.clearing.scheduler.service.ClearingCalendarService; +import ru.spcex.clearing.scheduler.service.LauncherService; +import ru.spcex.clearing.scheduler.service.PlannerService; +import ru.spcex.clearing.scheduler.service.PlannerTemplateService; +import ru.spcex.clearing.test.MatcherFactory; +import ru.spcex.clearing.test.TestUtils; +import ru.spcex.clearing.test.config.ImdgTestConfig; +import ru.spcex.clearing.test.config.KafkaTestConfig; +import ru.spcex.platform.enumeration.DayStatus; +import ru.spcex.platform.enumeration.Status; +import ru.spcex.platform.enumeration.Task; +import ru.spcex.platform.enumeration.WorkflowStatus; +import ru.spcex.platform.imdg.api.Imdg; +import ru.spcex.platform.imdg.api.ImdgProvider; + +import java.time.LocalDate; +import java.time.LocalTime; + +import static org.mockito.Mockito.doReturn; +import static org.mockito.Mockito.spy; +import static ru.spcex.clearing.test.MatcherFactory.usingIgnoringFieldsComparator; +import static ru.spcex.clearing.test.config.ImdgTestConfig.currentID; +import static ru.spcex.clearing.test.config.ImdgTestConfig.waitAvailableImdgProviderAndAddAdminWithDefaultId; +import static ru.spcex.platform.enumeration.Market.mkrs; + +@ExtendWith(SpringExtension.class) +@ContextConfiguration(classes = { + PlannerService.class, + PlannerTemplateValidationConfig.class, + ClearingCalendarService.class, + PlannerTemplateService.class, + PlannerValidationConfig.class, + ClearingCalendarValidationConfig.class, + ValidationConfig.class, + LauncherService.class, + ErrorResolverConfig.class, + ImdgTestConfig.class, + KafkaTestConfig.class}) +public abstract class AbstractServiceTest { + protected static final MatcherFactory.Matcher PLANNER_ALL_TODAY_MATCHER = usingIgnoringFieldsComparator("created", "updated"); + protected static final long id = currentID.getAndIncrement(); + protected Imdg plannerAllTodayImdg; + protected Imdg plannerTemplateImdg; + protected Imdg clearingCalendarImdg; + protected Imdg plannerImdg; + protected Imdg launcherMap; + protected long newCompanyId = currentID.getAndIncrement(); + protected long updateCompanyId = currentID.getAndIncrement(); + protected long deleteCompanyId = currentID.getAndIncrement(); + protected long testSecurityId = currentID.getAndIncrement(); + + @Captor + protected ArgumentCaptor producerRecord; + @MockBean + protected MockProducer mockProducer; + @Autowired + @Qualifier("hazelcastServiceTest") + protected ImdgProvider imdgProvider; + + protected void init() { + waitAvailableImdgProviderAndAddAdminWithDefaultId(); + this.plannerAllTodayImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_PlannerAllToday, PlannerAllToday.class); + this.plannerTemplateImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_PlannerTemplate, PlannerTemplate.class); + this.clearingCalendarImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_ClearingCalendar, ClearingCalendar.class); + this.plannerImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Planner, Planner.class); + this.launcherMap = imdgProvider.getImdg(IMDGDistributedNames.Map_Launcher, Launcher.class); + + TaskDictionary taskDictionary = new TaskDictionary(); + Imdg taskDictionaryImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_TaskDictionary, TaskDictionary.class); + taskDictionary.setCode(Task.accountBlock.getKey()); + taskDictionary.setId(id); + taskDictionaryImdg.insert(taskDictionary); + + DayStatusDictionary dayStatusDictionary = new DayStatusDictionary(); + dayStatusDictionary.setId(0L); + dayStatusDictionary.setCode(DayStatus.Workday.getKey()); + Imdg dayStatusDictionaryImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_DayStatusDictionary, DayStatusDictionary.class); + dayStatusDictionaryImdg.insert(dayStatusDictionary); + + TaskStatusDictionary taskStatusDictionary = new TaskStatusDictionary(); + taskStatusDictionary.setCode(Status.Active.getKey()); + taskStatusDictionary.setId(id); + Imdg taskStatusDictionaryImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_TaskStatusDictionary, TaskStatusDictionary.class); + taskStatusDictionaryImdg.insert(taskStatusDictionary); + + Company company = new Company(); + company.setId(newCompanyId); + company.setWorkflowStatus(WorkflowStatus.Active.getKey()); + Imdg companyImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Company, Company.class); + companyImdg.insert(company); + company.setId(updateCompanyId); + company.setWorkflowStatus(WorkflowStatus.Active.getKey()); + companyImdg.insert(company); + company.setId(deleteCompanyId); + company.setWorkflowStatus(WorkflowStatus.Active.getKey()); + companyImdg.insert(company); + + Security security = new Security(); + security.setId(testSecurityId); + security.setWorkflowStatus(WorkflowStatus.Active.getKey()); + Imdg securityImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Security, Security.class); + securityImdg.insert(security); + + clearingCalendarImdg.insert(getClearingCalendar()); + + TestUtils.FutureRecordMetadata future = spy(new TestUtils.FutureRecordMetadata()); + doReturn(future).when(mockProducer).send(producerRecord.capture()); + } + + protected PlannerTemplate getPlannerTemplate(long companyId) { + PlannerTemplate plannerTemplate = new PlannerTemplate(); + plannerTemplate.setId(currentID.getAndIncrement()); + plannerTemplate.setTask(Task.accountBlock.getKey()); + plannerTemplate.setTaskTime(LocalTime.now().plusHours(1).withNano(0)); + plannerTemplate.setTaskStatus(Status.Active.getKey()); + plannerTemplate.setCompanyId(companyId); + plannerTemplate.setSecurityId(testSecurityId); + return plannerTemplate; + } + + protected Planner getPlanner(long companyId) { + Planner planner = new Planner(); + planner.setId(currentID.getAndIncrement()); + planner.setTask(Task.accountBlock.getKey()); + planner.setTaskTime(LocalTime.now().plusHours(1).withNano(0)); + planner.setClearingDate(LocalDate.now()); + planner.setMarket(mkrs.getKey()); + planner.setTaskStatus(Status.Active.getKey()); + planner.setCompanyId(companyId); + planner.setSecurityId(testSecurityId); + return planner; + } + + protected void checkPlannerAllTodayByPlannerTemplate(PlannerTemplate plannerTemplate) { + PlannerAllToday plannerAllToday = PlannerAllTodayBuilder.builder().append(plannerTemplate).build(); + PlannerAllToday plannerAllTodayRes = plannerAllTodayImdg.getSingleObjectBySQL(String.format("companyId = %s", plannerTemplate.getCompanyId())); + plannerAllToday.setId(plannerAllTodayRes.getId()); + PLANNER_ALL_TODAY_MATCHER.assertMatch(plannerAllTodayRes, plannerAllToday); + } + + protected void checkPlannerAllTodayByPlanner(Planner planner) { + PlannerAllToday plannerAllToday = PlannerAllTodayBuilder.builder().append(planner).build(); + PlannerAllToday plannerAllTodayRes = plannerAllTodayImdg.getSingleObjectBySQL(String.format("companyId = %s", planner.getCompanyId())); + plannerAllToday.setId(plannerAllTodayRes.getId()); + PLANNER_ALL_TODAY_MATCHER.assertMatch(plannerAllTodayRes, plannerAllToday); + } + + protected ClearingCalendar getClearingCalendar() { + ClearingCalendar clearingCalendar = new ClearingCalendar(); + clearingCalendar.setId(currentID.getAndIncrement()); + clearingCalendar.setClearingDate(LocalDate.now()); + clearingCalendar.setCompanyId(deleteCompanyId); + clearingCalendar.setDayStatus(DayStatus.Workday.getKey()); + return clearingCalendar; + } +} diff --git a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/DateNotBeforeRuleTest.java b/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/DateNotBeforeRuleTest.java index 311bf050c..753c5f9c9 100644 --- a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/DateNotBeforeRuleTest.java +++ b/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/DateNotBeforeRuleTest.java @@ -1,14 +1,13 @@ package ru.specx.clearing.scheduler.validation; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.springframework.test.context.junit.jupiter.SpringExtension; import ru.spcex.clearing.platform.messaging.domain.cud.schedule.PlannerNewRequest; import ru.spcex.clearing.scheduler.validation.rules.common.DateNotBeforeRule; import ru.spcex.platform.imdg.validation.ImdgValidationContext; import ru.spcex.platform.utils.enumeration.EnumMessage; import ru.spcex.platform.utils.validation.IValidator; import ru.spcex.platform.utils.validation.ValidatorImpl; +import ru.specx.clearing.scheduler.AbstractServiceTest; import java.time.LocalDate; import java.util.Collection; @@ -17,8 +16,7 @@ import java.util.function.Function; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; -@ExtendWith(SpringExtension.class) -class DateNotBeforeRuleTest { +class DateNotBeforeRuleTest extends AbstractServiceTest { @Test public void dateNotBeforeRuleTest() { diff --git a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/DictionaryPresentRuleTest.java b/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/DictionaryPresentRuleTest.java index 3cbcf6698..a3efdcfa2 100644 --- a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/DictionaryPresentRuleTest.java +++ b/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/DictionaryPresentRuleTest.java @@ -1,11 +1,8 @@ package ru.specx.clearing.scheduler.validation; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit.jupiter.SpringExtension; import ru.clearing.platform.dictionary.AbstractDictionary; import ru.clearing.platform.dictionary.DayStatusDictionary; import ru.clearing.platform.dictionary.TaskDictionary; @@ -25,7 +22,7 @@ import ru.spcex.platform.utils.enumeration.EnumMessage; import ru.spcex.platform.utils.enumeration.IEnumKey; import ru.spcex.platform.utils.validation.IValidator; import ru.spcex.platform.utils.validation.ValidatorImpl; -import ru.specx.clearing.scheduler.config.HazelcastServiceTestConfiguration; +import ru.specx.clearing.scheduler.AbstractServiceTest; import java.lang.reflect.InvocationTargetException; import java.util.Collection; @@ -35,10 +32,7 @@ import java.util.function.Function; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; -@ExtendWith(SpringExtension.class) -@ContextConfiguration(classes = { - HazelcastServiceTestConfiguration.class}) -class DictionaryPresentRuleTest { +class DictionaryPresentRuleTest extends AbstractServiceTest { @Autowired @Qualifier("hazelcastServiceTest") private HazelcastService hazelcastServiceTest; @@ -70,12 +64,12 @@ class DictionaryPresentRuleTest { } private void testDictionary(String dictionaryKey, - Class dictionaryClass, - Class recordClass, - String fieldName, - E[] enumValues, - Function getter, - BiConsumer setter) throws NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException { + Class dictionaryClass, + Class recordClass, + String fieldName, + E[] enumValues, + Function getter, + BiConsumer setter) throws NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException { Imdg dictionaryImdg = hazelcastServiceTest.getImdg(dictionaryKey, dictionaryClass); long idIdx = 0; for (E enumValue : enumValues) { diff --git a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/EnumPresentRuleTest.java b/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/EnumPresentRuleTest.java index 8303e0872..1f7b5c658 100644 --- a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/EnumPresentRuleTest.java +++ b/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/EnumPresentRuleTest.java @@ -1,11 +1,8 @@ package ru.specx.clearing.scheduler.validation; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit.jupiter.SpringExtension; import ru.clearing.platform.dictionary.AbstractDictionary; import ru.spcex.clearing.platform.messaging.domain.cud.schedule.ClearingCalendarNewRequest; import ru.spcex.clearing.platform.messaging.domain.cud.schedule.PlannerNewRequest; @@ -20,7 +17,7 @@ import ru.spcex.platform.utils.enumeration.EnumMessage; import ru.spcex.platform.utils.enumeration.IEnumKey; import ru.spcex.platform.utils.validation.IValidator; import ru.spcex.platform.utils.validation.ValidatorImpl; -import ru.specx.clearing.scheduler.config.HazelcastServiceTestConfiguration; +import ru.specx.clearing.scheduler.AbstractServiceTest; import java.lang.reflect.InvocationTargetException; import java.util.Collection; @@ -31,10 +28,7 @@ import java.util.function.Function; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; -@ExtendWith(SpringExtension.class) -@ContextConfiguration(classes = { - HazelcastServiceTestConfiguration.class}) -class EnumPresentRuleTest { +class EnumPresentRuleTest extends AbstractServiceTest { @Autowired @Qualifier("hazelcastServiceTest") private HazelcastService hazelcastServiceTest; diff --git a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/FieldRequiredRuleTest.java b/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/FieldRequiredRuleTest.java index 78cbec5d0..351442878 100644 --- a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/FieldRequiredRuleTest.java +++ b/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/FieldRequiredRuleTest.java @@ -1,14 +1,13 @@ package ru.specx.clearing.scheduler.validation; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.springframework.test.context.junit.jupiter.SpringExtension; import ru.spcex.clearing.platform.messaging.domain.cud.schedule.PlannerNewRequest; import ru.spcex.clearing.scheduler.validation.rules.common.FieldRequiredRule; import ru.spcex.platform.imdg.validation.ImdgValidationContext; import ru.spcex.platform.utils.enumeration.EnumMessage; import ru.spcex.platform.utils.validation.IValidator; import ru.spcex.platform.utils.validation.ValidatorImpl; +import ru.specx.clearing.scheduler.AbstractServiceTest; import java.util.Collection; import java.util.function.Function; @@ -16,8 +15,7 @@ import java.util.function.Function; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; -@ExtendWith(SpringExtension.class) -class FieldRequiredRuleTest { +class FieldRequiredRuleTest extends AbstractServiceTest { @Test public void fieldRequiredRuleTest() { diff --git a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/IdPresentRuleTest.java b/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/IdPresentRuleTest.java index 9bc738c22..97259580c 100644 --- a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/IdPresentRuleTest.java +++ b/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/IdPresentRuleTest.java @@ -1,11 +1,8 @@ package ru.specx.clearing.scheduler.validation; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit.jupiter.SpringExtension; import ru.clearing.classes.statics.data.company.Company; import ru.clearing.classes.statics.data.security.Security; import ru.spcex.clearing.imdg.IMDGDistributedNames; @@ -19,7 +16,7 @@ import ru.spcex.platform.imdg.validation.ImdgValidationContext; import ru.spcex.platform.utils.enumeration.EnumMessage; import ru.spcex.platform.utils.validation.IValidator; import ru.spcex.platform.utils.validation.ValidatorImpl; -import ru.specx.clearing.scheduler.config.HazelcastServiceTestConfiguration; +import ru.specx.clearing.scheduler.AbstractServiceTest; import java.lang.reflect.InvocationTargetException; import java.util.Collection; @@ -29,10 +26,7 @@ import java.util.function.Function; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; -@ExtendWith(SpringExtension.class) -@ContextConfiguration(classes = { - HazelcastServiceTestConfiguration.class}) -class IdPresentRuleTest { +class IdPresentRuleTest extends AbstractServiceTest { private final static Long TEST_ID = 777L; @Autowired diff --git a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/TimeNotBeforeRuleTest.java b/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/TimeNotBeforeRuleTest.java index 32206cda7..aca552382 100644 --- a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/TimeNotBeforeRuleTest.java +++ b/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/TimeNotBeforeRuleTest.java @@ -1,14 +1,13 @@ package ru.specx.clearing.scheduler.validation; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.springframework.test.context.junit.jupiter.SpringExtension; import ru.spcex.clearing.platform.messaging.domain.cud.schedule.PlannerNewRequest; import ru.spcex.clearing.scheduler.validation.rules.common.TimeNotBeforeRule; import ru.spcex.platform.imdg.validation.ImdgValidationContext; import ru.spcex.platform.utils.enumeration.EnumMessage; import ru.spcex.platform.utils.validation.IValidator; import ru.spcex.platform.utils.validation.ValidatorImpl; +import ru.specx.clearing.scheduler.AbstractServiceTest; import java.time.LocalTime; import java.util.Collection; @@ -17,8 +16,7 @@ import java.util.function.Function; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; -@ExtendWith(SpringExtension.class) -class TimeNotBeforeRuleTest { +class TimeNotBeforeRuleTest extends AbstractServiceTest { @Test public void timeNotBeforeRuleTest() { From 1fa4944ad1672e80e70d37676155b88fe6dfa163 Mon Sep 17 00:00:00 2001 From: psemenkov Date: Thu, 20 Apr 2023 13:52:27 +0300 Subject: [PATCH 12/27] =?UTF-8?q?http://jira.mfd.msk:8088/browse/CLS-268?= =?UTF-8?q?=20=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=20=D1=81?= =?UTF-8?q?=D1=83=D1=89=D0=B5=D1=81=D1=82=D0=B2=D1=83=D1=8E=D1=89=D0=B8?= =?UTF-8?q?=D0=B9=20=D1=81=D0=B5=D1=80=D0=B8=D1=81,=20=D0=B2=D0=B0=D0=BB?= =?UTF-8?q?=D0=B8=D0=B4=D0=B0=D1=82=D0=BE=D1=80=D1=8B,=20=D1=82=D0=B5?= =?UTF-8?q?=D1=81=D1=82=D1=8B=20=D0=B4=D0=BB=D1=8F=20clearingCalendar.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ClearingCalendarValidationConfig.java | 5 +- .../service/ClearingCalendarService.java | 89 +++++- .../service/ClearingCalendarServiceTest.java | 292 +++++++++--------- 3 files changed, 239 insertions(+), 147 deletions(-) diff --git a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/validation/ClearingCalendarValidationConfig.java b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/validation/ClearingCalendarValidationConfig.java index c16595d10..20728668d 100644 --- a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/validation/ClearingCalendarValidationConfig.java +++ b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/validation/ClearingCalendarValidationConfig.java @@ -58,6 +58,7 @@ public class ClearingCalendarValidationConfig { ImdgValidationContext context = new ImdgValidationContext<>(); context.setValidatedObject(clearingCalendarUpdateRequest); Consumer addImdg = (s) -> context.addImdg(s, imdgForValidation.get(s)); + addImdg.accept(IMDGDistributedNames.Map_ClearingCalendar); addImdg.accept(IMDGDistributedNames.Map_Company); addImdg.accept(IMDGDistributedNames.Map_DayStatusDictionary); return new ValidatorImpl<>(context, @@ -83,10 +84,12 @@ public class ClearingCalendarValidationConfig { } @Bean("clearingCalendarDeleteRequestValidator") - public Function clearingCalendarDeleteRequestValidator() { + public Function clearingCalendarDeleteRequestValidator(Map> imdgForValidation) { return clearingCalendarDeleteRequest -> { ImdgValidationContext context = new ImdgValidationContext<>(); context.setValidatedObject(clearingCalendarDeleteRequest); + Consumer addImdg = (s) -> context.addImdg(s, imdgForValidation.get(s)); + addImdg.accept(IMDGDistributedNames.Map_ClearingCalendar); return new ValidatorImpl<>(context, IdPresentRule.instance("id", CommonDeleteRequest::getId, diff --git a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/ClearingCalendarService.java b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/ClearingCalendarService.java index adbf15094..04a46c4b8 100644 --- a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/ClearingCalendarService.java +++ b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/ClearingCalendarService.java @@ -9,6 +9,9 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Service; import ru.clearing.classes.statics.data.scheduler.ClearingCalendar; +import ru.clearing.classes.statics.data.scheduler.Planner; +import ru.clearing.classes.statics.data.scheduler.PlannerAllToday; +import ru.clearing.classes.statics.data.scheduler.PlannerTemplate; import ru.spcex.clearing.imdg.IMDGDistributedNames; import ru.spcex.clearing.platform.messaging.domain.BaseRequest; import ru.spcex.clearing.platform.messaging.domain.Consts; @@ -17,19 +20,36 @@ import ru.spcex.clearing.platform.messaging.domain.cud.schedule.ClearingCalendar import ru.spcex.clearing.platform.messaging.domain.cud.schedule.ClearingCalendarUpdateRequest; import ru.spcex.clearing.platform.messaging.service.QueueConsumer; import ru.spcex.clearing.platform.messaging.service.RequestInfoUpdate; +import ru.spcex.clearing.scheduler.PlannerAllTodayBuilder; +import ru.spcex.clearing.util.security.UserRoleVerification; +import ru.spcex.platform.classes.base.SpcexObjectBase; +import ru.spcex.platform.enumeration.DayStatus; +import ru.spcex.platform.enumeration.Status; import ru.spcex.platform.imdg.api.Imdg; import ru.spcex.platform.imdg.api.ImdgProvider; import ru.spcex.platform.utils.enumeration.IMessageResolver; import ru.spcex.platform.utils.validation.IValidator; +import java.time.DayOfWeek; import java.time.Instant; +import java.time.LocalDate; +import java.util.Arrays; +import java.util.Collection; +import java.util.List; +import java.util.Map; import java.util.function.Function; +import static ru.spcex.clearing.scheduler.ISchedulerChecker.isValidWorkday; + @Service public class ClearingCalendarService extends QueueConsumer implements InitializingBean { private final Logger log = LoggerFactory.getLogger(getClass()); private final Imdg clearingCalendarMap; + private final Imdg plannerTemplateMap; + private final Imdg plannerAllTodayMap; + private final Imdg plannerMap; private final IMessageResolver messageResolver; + private final UserRoleVerification userRoleVerification; private final Function clearingCalendarDeleteRequestValidation; private final Function clearingCalendarNewRequestValidation; private final Function clearingCalendarUpdateRequestValidation; @@ -38,11 +58,16 @@ public class ClearingCalendarService extends QueueConsumer implements Initializi public ClearingCalendarService(Consumer kafkaQueue, Producer kafkaProducer, ImdgProvider imdgProvider, IMessageResolver messageResolver, + @Qualifier("userRoleVerificationBean") UserRoleVerification userRoleVerification, @Qualifier("clearingCalendarDeleteRequestValidator") Function clearingCalendarDeleteRequestValidator, @Qualifier("clearingCalendarNewRequestValidator") Function clearingCalendarNewRequestValidator, @Qualifier("clearingCalendarUpdateRequestValidator") Function clearingCalendarUpdateRequestValidator) { super(kafkaQueue, kafkaProducer); this.clearingCalendarMap = imdgProvider.getImdg(IMDGDistributedNames.Map_ClearingCalendar, ClearingCalendar.class); + this.plannerTemplateMap = imdgProvider.getImdg(IMDGDistributedNames.Map_PlannerTemplate, PlannerTemplate.class); + this.plannerMap = imdgProvider.getImdg(IMDGDistributedNames.Map_Planner, Planner.class); + this.plannerAllTodayMap = imdgProvider.getImdg(IMDGDistributedNames.Map_PlannerAllToday, PlannerAllToday.class); + this.userRoleVerification = userRoleVerification; this.clearingCalendarDeleteRequestValidation = clearingCalendarDeleteRequestValidator; this.clearingCalendarNewRequestValidation = clearingCalendarNewRequestValidator; this.clearingCalendarUpdateRequestValidation = clearingCalendarUpdateRequestValidator; @@ -66,24 +91,35 @@ public class ClearingCalendarService extends QueueConsumer implements Initializi private RequestInfoUpdate newClearingCalendar(BaseRequest userRequest) { ClearingCalendarNewRequest req = userRequest.getRequestPayload(); log.debug("ClearingCalendarNewRequest received"); - RequestInfoUpdate requestInfoUpdate = validate(userRequest, clearingCalendarNewRequestValidation, messageResolver); + + RequestInfoUpdate requestInfoUpdate = userRoleVerification.validateRoleAndGetResult(userRequest); if (requestInfoUpdate != null) return requestInfoUpdate; + requestInfoUpdate = validate(userRequest, clearingCalendarNewRequestValidation, messageResolver); + if (requestInfoUpdate != null) return requestInfoUpdate; + ClearingCalendar clearingCalendar = new ClearingCalendar(); Instant created = Instant.now(); clearingCalendar.setCreated(created); + clearingCalendar.setUpdated(created); clearingCalendar.setClearingDate(req.getClearingDate()); clearingCalendar.setCompanyId(req.getCompanyId()); clearingCalendar.setDayStatus(req.getDayStatus()); clearingCalendarMap.insert(clearingCalendar); log.debug("successfully processed, new id {}", clearingCalendar.getId()); + //если clearingCalendar.getClearingDate() сегодняшний день необходимо проверить/добавить plannerTemplate + updateFromPlannerAllTodayMap(clearingCalendar); return null; } private RequestInfoUpdate updateClearingCalendar(BaseRequest userRequest) { ClearingCalendarUpdateRequest req = userRequest.getRequestPayload(); log.debug("ClearingCalendarUpdateRequest received"); - RequestInfoUpdate requestInfoUpdate = validate(userRequest, clearingCalendarUpdateRequestValidation, messageResolver); + + RequestInfoUpdate requestInfoUpdate = userRoleVerification.validateRoleAndGetResult(userRequest); if (requestInfoUpdate != null) return requestInfoUpdate; + requestInfoUpdate = validate(userRequest, clearingCalendarUpdateRequestValidation, messageResolver); + if (requestInfoUpdate != null) return requestInfoUpdate; + Instant updated = Instant.now(); ClearingCalendar clearingCalendar = clearingCalendarMap.getSingleObjectByID(req.getId()); clearingCalendar.setClearingDate(req.getClearingDate()); @@ -92,16 +128,63 @@ public class ClearingCalendarService extends QueueConsumer implements Initializi clearingCalendar.setUpdated(updated); clearingCalendarMap.update(clearingCalendar); log.debug("successfully processed, new id {}", clearingCalendar.getId()); + //если clearingCalendar.getClearingDate() сегодняшний день необходимо проверить/добавить plannerTemplate + updateFromPlannerAllTodayMap(clearingCalendar); return null; } private RequestInfoUpdate deleteClearingCalendar(BaseRequest userRequest) { CommonDeleteRequest req = userRequest.getRequestPayload(); - RequestInfoUpdate requestInfoUpdate = validate(userRequest, clearingCalendarDeleteRequestValidation, messageResolver); + + RequestInfoUpdate requestInfoUpdate = userRoleVerification.validateRoleAndGetResult(userRequest); if (requestInfoUpdate != null) return requestInfoUpdate; + requestInfoUpdate = validate(userRequest, clearingCalendarDeleteRequestValidation, messageResolver); + if (requestInfoUpdate != null) return requestInfoUpdate; + log.debug("CommonDeleteRequest received id = {}", req.getId()); ClearingCalendar clearingCalendar = clearingCalendarMap.getSingleObjectByID(req.getId()); + clearingCalendarMap.delete(clearingCalendar); + deleteFromPlannerAllTodayMap(); return null; } + + private void updateFromPlannerAllTodayMap(ClearingCalendar clearingCalendar) { + LocalDate currentDate = LocalDate.now(); + if (clearingCalendar.getClearingDate() == null || !clearingCalendar.getClearingDate().equals(currentDate)) + return; + boolean isWeekend = Arrays.asList(DayOfWeek.SATURDAY, DayOfWeek.SUNDAY).contains(currentDate.getDayOfWeek()); + if (isValidWorkday(clearingCalendar, isWeekend)) { + for (PlannerTemplate plannerTemplate : plannerTemplateMap.getAllValues()) { + PlannerAllToday plannerAllToday = plannerAllTodayMap.getSingleObjectBySQL(String.format("parentId = %s", plannerTemplate.getId())); + if (plannerAllToday == null) + plannerAllTodayMap.insert(PlannerAllTodayBuilder.builder().append(plannerTemplate).build()); + } + } + } + + public void deleteFromPlannerAllTodayMap() { + LocalDate currentDate = LocalDate.now(); + boolean isWeekend = Arrays.asList(DayOfWeek.SATURDAY, DayOfWeek.SUNDAY).contains(currentDate.getDayOfWeek()); + //проверим есть ли другие записи clearingCalendar с таким же clearingDate, если они актуальные ничего не удаляем + Collection clearingCalendars = clearingCalendarMap.getCollectionObjectsByFieldValues(Map.of("dayStatus", DayStatus.Workday.getKey(), + "clearingDate", currentDate)); + if (clearingCalendars != null && !clearingCalendars.isEmpty()) { + for (ClearingCalendar calendar : clearingCalendars) { + //если будет хоть один валидные ClearingCalendar на сегодня на основании которого(и plannerTemplate -ов) могли быть созданы PlannerAllToday + //ничего проверять\удалять дальше не будем + if (isValidWorkday(calendar, isWeekend)) return; + } + } + //удалим все PlannerAllToday созданные на основании plannerTemplate кроме созданных на основании planner + List plannerIds = plannerMap.getCollectionObjectsByFieldValues(Map.of("taskStatus", Status.Active.getKey(), + "clearingDate", currentDate)).stream() + .mapToLong(SpcexObjectBase::getId) + .boxed().toList(); + + Collection values = plannerAllTodayMap.getAllValues().stream() + .filter(plannerAllToday -> !plannerIds.contains(plannerAllToday.getParentId())).toList(); + + values.forEach(plannerAllTodayMap::delete); + } } diff --git a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/service/ClearingCalendarServiceTest.java b/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/service/ClearingCalendarServiceTest.java index 258f6e1a3..df32644e6 100644 --- a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/service/ClearingCalendarServiceTest.java +++ b/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/service/ClearingCalendarServiceTest.java @@ -1,192 +1,198 @@ package ru.specx.clearing.scheduler.service; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.hazelcast.core.IMap; -import com.hazelcast.map.listener.EntryRemovedListener; -import org.apache.kafka.clients.consumer.ConsumerRecord; import org.apache.kafka.clients.consumer.MockConsumer; -import org.apache.kafka.clients.consumer.OffsetResetStrategy; -import org.apache.kafka.clients.producer.MockProducer; -import org.apache.kafka.common.TopicPartition; -import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit.jupiter.SpringExtension; -import ru.clearing.classes.statics.data.company.Company; -import ru.clearing.classes.statics.data.profile.Contact; import ru.clearing.classes.statics.data.scheduler.ClearingCalendar; -import ru.clearing.platform.dictionary.DayStatusDictionary; -import ru.spcex.clearing.imdg.IMDGDistributedNames; -import ru.spcex.clearing.platform.messaging.domain.ActionType; +import ru.clearing.classes.statics.data.scheduler.Planner; +import ru.clearing.classes.statics.data.scheduler.PlannerAllToday; +import ru.clearing.classes.statics.data.scheduler.PlannerTemplate; import ru.spcex.clearing.platform.messaging.domain.BaseRequest; import ru.spcex.clearing.platform.messaging.domain.Consts; import ru.spcex.clearing.platform.messaging.domain.cud.common.CommonDeleteRequest; import ru.spcex.clearing.platform.messaging.domain.cud.schedule.ClearingCalendarNewRequest; import ru.spcex.clearing.platform.messaging.domain.cud.schedule.ClearingCalendarUpdateRequest; -import ru.spcex.clearing.scheduler.config.validation.ClearingCalendarValidationConfig; -import ru.spcex.clearing.scheduler.config.validation.ValidationConfig; +import ru.spcex.clearing.scheduler.PlannerAllTodayBuilder; import ru.spcex.clearing.scheduler.service.ClearingCalendarService; +import ru.spcex.clearing.test.MatcherFactory; import ru.spcex.platform.enumeration.DayStatus; -import ru.spcex.platform.enumeration.WorkflowStatus; -import ru.spcex.platform.imdg.api.Imdg; -import ru.spcex.platform.imdg.iml.hazelcast.service.HazelcastService; -import ru.spcex.platform.utils.enumeration.IMessageResolver; -import ru.spcex.platform.utils.validation.IValidator; -import ru.specx.clearing.scheduler.config.HazelcastServiceTestConfiguration; +import ru.spcex.platform.enumeration.Status; +import ru.specx.clearing.scheduler.AbstractServiceTest; -import java.time.Instant; +import javax.annotation.PostConstruct; import java.time.LocalDate; -import java.util.Collections; -import java.util.HashMap; -import java.util.function.Function; -@ExtendWith(SpringExtension.class) -@ContextConfiguration(classes = { - HazelcastServiceTestConfiguration.class, - ValidationConfig.class, - ClearingCalendarValidationConfig.class -}) -class ClearingCalendarServiceTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static ru.spcex.clearing.test.MatcherFactory.usingIgnoringFieldsComparator; +import static ru.spcex.clearing.test.TestUtils.*; +import static ru.spcex.clearing.test.config.ImdgTestConfig.currentID; +class ClearingCalendarServiceTest extends AbstractServiceTest { + protected static final MatcherFactory.Matcher CLEARING_CALENDAR_MATCHER = usingIgnoringFieldsComparator("created", "updated"); private static final int PARTITION = 0; private static final String TOPIC_CLEARING_CALENDAR_NEW = Consts.DESTINATION_CLEARING_CALENDAR_NEW; - private static final Long ID = 0L; + private static final String TOPIC_CLEARING_CALENDAR_UPDATE = Consts.DESTINATION_CLEARING_CALENDAR_UPDATE; + private static final String TOPIC_CLEARING_CALENDAR_DELETE = Consts.DESTINATION_CLEARING_CALENDAR_DELETE; + private static final Long ID = currentID.getAndIncrement(); @Autowired - @Qualifier("hazelcastServiceTest") - private HazelcastService hazelcastServiceTest; - private MockConsumer mockConsumer; - private MockProducer mockProducer; + ClearingCalendarService clearingCalendarService; - @Autowired - private IMessageResolver messageResolver; - - @Autowired - private Function clearingCalendarDeleteRequestValidation; - - @Autowired - private Function clearingCalendarNewRequestValidation; - - @Autowired - private Function clearingCalendarUpdateRequestValidation; + @PostConstruct + public void init() { + super.init(); + } @BeforeEach - void setUp() { - mockConsumer = new MockConsumer<>(OffsetResetStrategy.EARLIEST); - mockProducer = new MockProducer<>(); + public void prepare() { + clearAllInImdg(plannerTemplateImdg); + clearAllInImdg(plannerAllTodayImdg); } /** - * {@link ClearingCalendarService#newTradingCalendar(BaseRequest)}(BaseRequest)}
+ * {@link ClearingCalendarService#newClearingCalendar(BaseRequest)}(BaseRequest)}
* Тест проверяет создание сущности {@link ClearingCalendar} в Hazelcast при передаче из Apache Kafka.
* Входной запрос {@link ClearingCalendarNewRequest}:
*/ @Test - public void newClearingCalendarInQueue() throws InterruptedException { - // Prepare test objects - hazelcastServiceTest.waitAvailable(); - Company company = new Company(); - company.setId(0L); - company.setWorkflowStatus(WorkflowStatus.Active.getKey()); - Imdg companyImdg = hazelcastServiceTest.getImdg(IMDGDistributedNames.Map_Company, Company.class); - companyImdg.insert(company); - - DayStatus dayStatus = DayStatus.Workday; - DayStatusDictionary dayStatusDictionary = new DayStatusDictionary(); - dayStatusDictionary.setId(0L); - dayStatusDictionary.setCode(dayStatus.getKey()); - Imdg dayStatusDictionaryImdg = hazelcastServiceTest.getImdg(IMDGDistributedNames.Map_DayStatusDictionary, DayStatusDictionary.class); - dayStatusDictionaryImdg.insert(dayStatusDictionary); - + public void newClearingCalendar() { //ARRANGE ClearingCalendar clearingCalendar = new ClearingCalendar(); - Instant created = Instant.now(); - clearingCalendar.setCreated(created); - clearingCalendar.setClearingDate(LocalDate.now().plusDays(1)); - clearingCalendar.setCompanyId(0L); + clearingCalendar.setClearingDate(LocalDate.now()); + clearingCalendar.setCompanyId(newCompanyId); clearingCalendar.setDayStatus(DayStatus.Workday.getKey()); + PlannerTemplate plannerTemplate = getPlannerTemplate(newCompanyId); + plannerTemplateImdg.insert(plannerTemplate); ClearingCalendarNewRequest clearingCalendarNewRequest = new ClearingCalendarNewRequest(); clearingCalendarNewRequest.setClearingDate(clearingCalendar.getClearingDate()); clearingCalendarNewRequest.setCompanyId(clearingCalendar.getCompanyId()); clearingCalendarNewRequest.setDayStatus(clearingCalendar.getDayStatus()); - BaseRequest baseNewRequest = new BaseRequest<>(); - baseNewRequest.setRequestPayload(clearingCalendarNewRequest); - baseNewRequest.setId(ID); - baseNewRequest.setActionType(ActionType.NEW); - String jsonBaseForRequest; - ObjectMapper objectMapper = new ObjectMapper(); - try { - jsonBaseForRequest = objectMapper.writeValueAsString(baseNewRequest); - } catch (JsonProcessingException e) { - throw new RuntimeException(e); - } + //ACT + String jsonString = getJsonStringForNew(clearingCalendarNewRequest, ID); + addRecordToKafka((MockConsumer) clearingCalendarService.getConsumer(), TOPIC_CLEARING_CALENDAR_NEW, PARTITION, 0, jsonString); + + //ASSERT + waitingWhenAddedRecordAndCheckIt(ID, mockProducer, producerRecord); + + ClearingCalendar clearingCalendarRes = clearingCalendarImdg.getSingleObjectBySQL(String.format("companyId = %s", clearingCalendar.getCompanyId())); + clearingCalendar.setId(clearingCalendarRes.getId()); + CLEARING_CALENDAR_MATCHER.assertMatch(clearingCalendarRes, clearingCalendar); + checkPlannerAllTodayByPlannerTemplate(plannerTemplate); + } + + /** + * {@link ClearingCalendarService#updateClearingCalendar(BaseRequest)}(BaseRequest)}
+ * Тест проверяет создание сущности {@link ClearingCalendar} в Hazelcast при передаче из Apache Kafka.
+ * Входной запрос {@link ClearingCalendarUpdateRequest}:
+ */ + @Test + public void updateClearingCalendar() { + //ARRANGE + ClearingCalendar clearingCalendar = new ClearingCalendar(); + clearingCalendar.setId(currentID.getAndIncrement()); + clearingCalendar.setClearingDate(LocalDate.now()); + clearingCalendar.setCompanyId(newCompanyId); + clearingCalendar.setDayStatus(DayStatus.Workday.getKey()); + clearingCalendarImdg.insert(clearingCalendar); + clearingCalendar.setCompanyId(updateCompanyId); + + PlannerTemplate plannerTemplate = getPlannerTemplate(newCompanyId); + plannerTemplateImdg.insert(plannerTemplate); + + ClearingCalendarUpdateRequest clearingCalendarNewRequest = new ClearingCalendarUpdateRequest(); + clearingCalendarNewRequest.setId(clearingCalendar.getId()); + clearingCalendarNewRequest.setClearingDate(clearingCalendar.getClearingDate()); + clearingCalendarNewRequest.setCompanyId(clearingCalendar.getCompanyId()); + clearingCalendarNewRequest.setDayStatus(clearingCalendar.getDayStatus()); //ACT - //service set up - ClearingCalendarService clearingCalendarService = new ClearingCalendarService(mockConsumer, - mockProducer, - hazelcastServiceTest, - messageResolver, - clearingCalendarDeleteRequestValidation, - clearingCalendarNewRequestValidation, - clearingCalendarUpdateRequestValidation); + String jsonString = getJsonStringForUpdate(clearingCalendarNewRequest, ID); + addRecordToKafka((MockConsumer) clearingCalendarService.getConsumer(), TOPIC_CLEARING_CALENDAR_UPDATE, PARTITION, 0, jsonString); - //callbacks set up - clearingCalendarService.afterPropertiesSet(); - - BaseRequest baseRequest = new BaseRequest<>(); - baseRequest.setId(1L); - baseRequest.setActionType(ActionType.NEW); - ClearingCalendarNewRequest newRequest = new ClearingCalendarNewRequest(); - baseRequest.setRequestPayload(newRequest); - - IMap iMap = hazelcastServiceTest.getHazelcast().getMap(IMDGDistributedNames.Map_ClearingCalendar); - //KAFKA - HashMap startOffsetsUpdating = new HashMap<>(); - TopicPartition topic = new TopicPartition(TOPIC_CLEARING_CALENDAR_NEW, PARTITION); - startOffsetsUpdating.put(topic, 0L); - mockConsumer.updateBeginningOffsets(startOffsetsUpdating); - - mockConsumer.schedulePollTask(() -> { - mockConsumer.rebalance(Collections.singletonList(new TopicPartition(TOPIC_CLEARING_CALENDAR_NEW, PARTITION))); - mockConsumer.addRecord(new ConsumerRecord<>(TOPIC_CLEARING_CALENDAR_NEW, PARTITION, 0, "key", jsonBaseForRequest)); - }); - - //waiting for hazelcast map item removes - Object waiter = new Object(); - String listenerID = iMap.addEntryListener((EntryRemovedListener) entryEvent -> { - System.out.println("Checking If pushed.."); - - try { - waiter.wait(100); - } catch (InterruptedException e) { - throw new RuntimeException(e); - } - synchronized (waiter) { - waiter.notify(); - } - }, false); - - synchronized (waiter) { - waiter.wait(100); - } - ClearingCalendar clearingCalendarRes = iMap.get(iMap.keySet().stream().findFirst().get()); //ASSERT - Assertions.assertEquals(1, iMap.size()); + waitingWhenAddedRecordAndCheckIt(ID, mockProducer, producerRecord); - Assertions.assertNotNull(clearingCalendarRes.getCreated()); - Assertions.assertEquals(clearingCalendar.getClearingDate(), clearingCalendarRes.getClearingDate()); - Assertions.assertEquals(clearingCalendar.getCompanyId(), clearingCalendarRes.getCompanyId()); - Assertions.assertEquals(clearingCalendar.getDayStatus(), clearingCalendarRes.getDayStatus()); + ClearingCalendar clearingCalendarRes = clearingCalendarImdg.getSingleObjectBySQL(String.format("companyId = %s", clearingCalendar.getCompanyId())); + clearingCalendar.setId(clearingCalendarRes.getId()); + CLEARING_CALENDAR_MATCHER.assertMatch(clearingCalendarRes, clearingCalendar); + checkPlannerAllTodayByPlannerTemplate(plannerTemplate); + } - //preparing hazelcastImdgProvider for next test - iMap.removeEntryListener(listenerID); + + /** + * {@link ClearingCalendarService#deleteClearingCalendar(BaseRequest)}(BaseRequest)}
+ * Тест проверяет удаление сущности {@link ru.clearing.classes.statics.data.scheduler.ClearingCalendar} в Hazelcast при передаче из Apache Kafka.
+ * Входной запрос {@link CommonDeleteRequest}:
+ */ + @Test + public void deleteClearingCalendar() { + //ARRANGE + clearAllInImdg(clearingCalendarImdg); + ClearingCalendar clearingCalendar = getClearingCalendar(); + clearingCalendarImdg.insert(clearingCalendar); + + PlannerTemplate plannerTemplate = getPlannerTemplate(newCompanyId); + long id = clearingCalendar.getId(); + + plannerTemplate.setCompanyId(deleteCompanyId); + plannerAllTodayImdg.insert(PlannerAllTodayBuilder.builder().append(plannerTemplate).build()); + + CommonDeleteRequest commonDeleteRequest = new CommonDeleteRequest(); + commonDeleteRequest.setId(id); + + //ACT + String jsonString = getJsonStringForDelete(commonDeleteRequest, id); + addRecordToKafka((MockConsumer) clearingCalendarService.getConsumer(), TOPIC_CLEARING_CALENDAR_DELETE, PARTITION, 0, jsonString); + + //ASSERT + waitingWhenAddedRecordAndCheckIt(id, mockProducer, producerRecord); + + ClearingCalendar plannerTemplateRes = clearingCalendarImdg.getSingleObjectBySQL(String.format("companyId = %s", clearingCalendar.getCompanyId())); + assertNull(plannerTemplateRes); + PlannerAllToday plannerAllTodayRes = plannerAllTodayImdg.getSingleObjectBySQL(String.format("companyId = %s", plannerTemplate.getCompanyId())); + assertNull(plannerAllTodayRes); + + //добавим в clearingCalendarImdg валидный clearingCalendar на случай если тесты plannerTemplate еще не отработали + clearingCalendarImdg.insert(clearingCalendar); + } + + /** + * {@link ClearingCalendarService#deleteFromPlannerAllTodayMap()}}
+ * Тест проверяет удаление сущности {@link ru.clearing.classes.statics.data.scheduler.PlannerAllToday} в Hazelcast.
+ */ + @Test + public void deleteFromPlannerAllTodayMap() { + //проверка удаления PlannerAllToday + Planner planner = getPlanner(newCompanyId); + planner.setId(12L); + planner.setTaskStatus(Status.Active.getKey()); + planner.setCompanyId(newCompanyId); + planner.setClearingDate(LocalDate.now()); + plannerImdg.insert(planner); + plannerAllTodayImdg.insert(PlannerAllTodayBuilder.builder().append(planner).build()); + PlannerTemplate plannerTemplate = new PlannerTemplate(); + plannerTemplate.setId(13L); + plannerTemplate.setCompanyId(updateCompanyId); + plannerAllTodayImdg.insert(PlannerAllTodayBuilder.builder().append(plannerTemplate).build()); + + //ни чего не должно быть удалено ест валидный clearingCalendar + clearingCalendarService.deleteFromPlannerAllTodayMap(); + assertEquals(2, plannerAllTodayImdg.getAllValues().size()); + checkPlannerAllTodayByPlanner(planner); + checkPlannerAllTodayByPlannerTemplate(plannerTemplate); + + //сейчас удалятся только созданные на основании plannerTemplate + clearAllInImdg(clearingCalendarImdg); + clearingCalendarService.deleteFromPlannerAllTodayMap(); + + checkPlannerAllTodayByPlanner(planner); + assertEquals(1, plannerAllTodayImdg.getAllValues().size()); + + //добавим в clearingCalendarImdg валидный clearingCalendar на случай если тесты plannerTemplate еще не отработали + clearingCalendarImdg.insert(getClearingCalendar()); } } \ No newline at end of file From eae197cef9ba42b2cc652c78cbf33861d6d44d39 Mon Sep 17 00:00:00 2001 From: psemenkov Date: Thu, 20 Apr 2023 13:53:03 +0300 Subject: [PATCH 13/27] =?UTF-8?q?http://jira.mfd.msk:8088/browse/CLS-268?= =?UTF-8?q?=20=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=20=D1=81?= =?UTF-8?q?=D1=83=D1=89=D0=B5=D1=81=D1=82=D0=B2=D1=83=D1=8E=D1=89=D0=B8?= =?UTF-8?q?=D0=B9=20=D1=81=D0=B5=D1=80=D0=B8=D1=81,=20=D0=B2=D0=B0=D0=BB?= =?UTF-8?q?=D0=B8=D0=B4=D0=B0=D1=82=D0=BE=D1=80=D1=8B,=20=D1=82=D0=B5?= =?UTF-8?q?=D1=81=D1=82=D1=8B=20=D0=B4=D0=BB=D1=8F=20plannerTemplate=20.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PlannerTemplateValidationConfig.java | 15 +- .../scheduler/service/PlannerService.java | 74 ++++- .../service/PlannerTemplateServiceTest.java | 266 +++++++----------- 3 files changed, 170 insertions(+), 185 deletions(-) diff --git a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/validation/PlannerTemplateValidationConfig.java b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/validation/PlannerTemplateValidationConfig.java index 56c9f706f..b63fe45b4 100644 --- a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/validation/PlannerTemplateValidationConfig.java +++ b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/validation/PlannerTemplateValidationConfig.java @@ -74,6 +74,7 @@ public class PlannerTemplateValidationConfig { Consumer addImdg = (s) -> context.addImdg(s, imdgForValidation.get(s)); addImdg.accept(IMDGDistributedNames.Map_TaskDictionary); addImdg.accept(IMDGDistributedNames.Map_TaskStatusDictionary); + addImdg.accept(IMDGDistributedNames.Map_PlannerTemplate); addImdg.accept(IMDGDistributedNames.Map_Company); addImdg.accept(IMDGDistributedNames.Map_Security); return new ValidatorImpl<>(context, @@ -83,27 +84,27 @@ public class PlannerTemplateValidationConfig { PlannerTemplate.class, ValidationError.RecordNotFound), DictionaryPresentRule.instance("task", - PlannerTemplateNewRequest::getTask, + PlannerTemplateUpdateRequest::getTask, IMDGDistributedNames.Map_TaskDictionary, TaskDictionary.class, false), TimeNotBeforeRule.instance("taskTime", - PlannerTemplateNewRequest::getTaskTime, + PlannerTemplateUpdateRequest::getTaskTime, false), DictionaryPresentRule.instance("taskStatus", - PlannerTemplateNewRequest::getTaskStatus, + PlannerTemplateUpdateRequest::getTaskStatus, IMDGDistributedNames.Map_TaskStatusDictionary, TaskStatusDictionary.class, false), IdPresentRule.instance("companyId", - PlannerTemplateNewRequest::getCompanyId, + PlannerTemplateUpdateRequest::getCompanyId, IMDGDistributedNames.Map_Company, Company.class, ValidationError.CompanyNotFound, false, company -> WorkflowStatus.Active.getKey().equals(company.getWorkflowStatus()) ? null : ValidationError.CompanyNotActive), IdPresentRule.instance("securityId", - PlannerTemplateNewRequest::getSecurityId, + PlannerTemplateUpdateRequest::getSecurityId, IMDGDistributedNames.Map_Security, Security.class, ValidationError.SecurityNotFound, @@ -115,10 +116,12 @@ public class PlannerTemplateValidationConfig { @Bean("plannerTemplateDeleteRequestValidator") - public Function plannerTemplateDeleteRequestValidator() { + public Function plannerTemplateDeleteRequestValidator(Map> imdgForValidation) { return plannerTemplateDeleteRequest -> { ImdgValidationContext context = new ImdgValidationContext<>(); context.setValidatedObject(plannerTemplateDeleteRequest); + Consumer addImdg = (s) -> context.addImdg(s, imdgForValidation.get(s)); + addImdg.accept(IMDGDistributedNames.Map_PlannerTemplate); return new ValidatorImpl<>(context, IdPresentRule.instance("id", CommonDeleteRequest::getId, diff --git a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/PlannerService.java b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/PlannerService.java index 4f0870dbc..dddcc9ba7 100644 --- a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/PlannerService.java +++ b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/PlannerService.java @@ -9,6 +9,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Service; import ru.clearing.classes.statics.data.scheduler.Planner; +import ru.clearing.classes.statics.data.scheduler.PlannerAllToday; import ru.spcex.clearing.imdg.IMDGDistributedNames; import ru.spcex.clearing.platform.messaging.domain.BaseRequest; import ru.spcex.clearing.platform.messaging.domain.Consts; @@ -17,19 +18,28 @@ import ru.spcex.clearing.platform.messaging.domain.cud.schedule.PlannerNewReques import ru.spcex.clearing.platform.messaging.domain.cud.schedule.PlannerUpdateRequest; import ru.spcex.clearing.platform.messaging.service.QueueConsumer; import ru.spcex.clearing.platform.messaging.service.RequestInfoUpdate; +import ru.spcex.clearing.scheduler.PlannerAllTodayBuilder; +import ru.spcex.clearing.util.security.UserRoleVerification; +import ru.spcex.platform.enumeration.Status; import ru.spcex.platform.imdg.api.Imdg; import ru.spcex.platform.imdg.api.ImdgProvider; import ru.spcex.platform.utils.enumeration.IMessageResolver; import ru.spcex.platform.utils.validation.IValidator; import java.time.Instant; +import java.time.LocalDate; +import java.util.Collection; +import java.util.Map; import java.util.function.Function; @Service public class PlannerService extends QueueConsumer implements InitializingBean { private final Logger log = LoggerFactory.getLogger(getClass()); private final Imdg plannerMap; + private final Imdg plannerAllTodayMap; + private final IMessageResolver messageResolver; + private final UserRoleVerification userRoleVerification; private final Function plannerDeleteRequestValidation; private final Function plannerNewRequestValidation; private final Function plannerUpdateRequestValidation; @@ -39,12 +49,15 @@ public class PlannerService extends QueueConsumer implements InitializingBean { Producer kafkaProducer, ImdgProvider imdgProvider, IMessageResolver messageResolver, + @Qualifier("userRoleVerificationBean") UserRoleVerification userRoleVerification, @Qualifier("plannerDeleteRequestValidator") Function plannerDeleteRequestValidator, @Qualifier("plannerNewRequestValidator") Function plannerNewRequestValidator, @Qualifier("plannerUpdateRequestValidator") Function plannerUpdateRequestValidator) { super(kafkaQueue, kafkaProducer); this.plannerMap = imdgProvider.getImdg(IMDGDistributedNames.Map_Planner, Planner.class); + this.plannerAllTodayMap = imdgProvider.getImdg(IMDGDistributedNames.Map_PlannerAllToday, PlannerAllToday.class); this.messageResolver = messageResolver; + this.userRoleVerification = userRoleVerification; this.plannerDeleteRequestValidation = plannerDeleteRequestValidator; this.plannerNewRequestValidation = plannerNewRequestValidator; this.plannerUpdateRequestValidation = plannerUpdateRequestValidator; @@ -53,24 +66,30 @@ public class PlannerService extends QueueConsumer implements InitializingBean { @Override public void afterPropertiesSet() { callback(PlannerNewRequest.class) - .setFunction(this::newScheduler) + .setFunction(this::newPlanner) .forDestination(Consts.DESTINATION_PLANNER_NEW, callbacks::put); callback(PlannerUpdateRequest.class) - .setFunction(this::updateScheduler) + .setFunction(this::updatePlanner) .forDestination(Consts.DESTINATION_PLANNER_UPDATE, callbacks::put); callback(CommonDeleteRequest.class) - .setFunction(this::deleteScheduler) + .setFunction(this::deletePlanner) .forDestination(Consts.DESTINATION_PLANNER_DELETE, callbacks::put); init(); } - private RequestInfoUpdate newScheduler(BaseRequest userRequest) { + private RequestInfoUpdate newPlanner(BaseRequest userRequest) { PlannerNewRequest req = userRequest.getRequestPayload(); log.debug("PlannerNewRequest received"); - RequestInfoUpdate requestInfoUpdate = validate(userRequest, plannerNewRequestValidation, messageResolver); + + RequestInfoUpdate requestInfoUpdate = userRoleVerification.validateRoleAndGetResult(userRequest); if (requestInfoUpdate != null) return requestInfoUpdate; + requestInfoUpdate = validate(userRequest, plannerNewRequestValidation, messageResolver); + if (requestInfoUpdate != null) return requestInfoUpdate; + + Instant created = Instant.now(); Planner planner = new Planner(); - planner.setCreated(Instant.now()); + planner.setCreated(created); + planner.setUpdated(created); planner.setTask(req.getTask()); planner.setTaskTime(req.getTaskTime()); planner.setClearingDate(req.getClearingDate()); @@ -79,15 +98,23 @@ public class PlannerService extends QueueConsumer implements InitializingBean { planner.setCompanyId(req.getCompanyId()); planner.setSecurityId(req.getSecurityId()); plannerMap.insert(planner); + LocalDate currentDate = LocalDate.now(); + if (req.getClearingDate() != null && currentDate.equals(req.getClearingDate()) && planner.getTaskStatus() != null) { + cudPlannerAllToday(planner); + } log.debug("successfully processed, new id {}", planner.getId()); return null; } - private RequestInfoUpdate updateScheduler(BaseRequest userRequest) { + private RequestInfoUpdate updatePlanner(BaseRequest userRequest) { PlannerUpdateRequest req = userRequest.getRequestPayload(); log.debug("PlannerUpdateRequest received id = {}", req.getId()); - RequestInfoUpdate requestInfoUpdate = validate(userRequest, plannerUpdateRequestValidation, messageResolver); + + RequestInfoUpdate requestInfoUpdate = userRoleVerification.validateRoleAndGetResult(userRequest); if (requestInfoUpdate != null) return requestInfoUpdate; + requestInfoUpdate = validate(userRequest, plannerUpdateRequestValidation, messageResolver); + if (requestInfoUpdate != null) return requestInfoUpdate; + Planner planner = plannerMap.getSingleObjectByID(req.getId()); planner.setUpdated(Instant.now()); planner.setTask(req.getTask()); @@ -98,17 +125,44 @@ public class PlannerService extends QueueConsumer implements InitializingBean { planner.setCompanyId(req.getCompanyId()); planner.setSecurityId(req.getSecurityId()); plannerMap.update(planner); + LocalDate currentDate = LocalDate.now(); + if (req.getClearingDate() != null && currentDate.equals(req.getClearingDate()) && planner.getTaskStatus() != null) { + cudPlannerAllToday(planner); + } return null; } - private RequestInfoUpdate deleteScheduler(BaseRequest userRequest) { + private RequestInfoUpdate deletePlanner(BaseRequest userRequest) { CommonDeleteRequest req = userRequest.getRequestPayload(); log.debug("CommonDeleteRequest received id = {}", req.getId()); - RequestInfoUpdate requestInfoUpdate = validate(userRequest, plannerDeleteRequestValidation, messageResolver); + + RequestInfoUpdate requestInfoUpdate = userRoleVerification.validateRoleAndGetResult(userRequest); if (requestInfoUpdate != null) return requestInfoUpdate; + requestInfoUpdate = validate(userRequest, plannerDeleteRequestValidation, messageResolver); + if (requestInfoUpdate != null) return requestInfoUpdate; + Planner planner = plannerMap.getSingleObjectByID(req.getId()); plannerMap.delete(planner); + Collection values = plannerAllTodayMap.getCollectionObjectsBySQL(String.format("parentId = %s", planner.getId())); + values.forEach(plannerAllTodayMap::delete); return null; } + public void cudPlannerAllToday(Planner planner) { + if (planner.getTaskStatus().equalsIgnoreCase(Status.Active.getKey())) { + PlannerAllToday plannerAllToday = PlannerAllTodayBuilder.builder().append(planner).build(); + PlannerAllToday allToday = plannerAllTodayMap.getSingleObjectBySQL(String.format("parentId = %s", planner.getId())); + if (allToday != null) plannerAllToday.setId(allToday.getId()); + plannerAllTodayMap.insert(plannerAllToday); + } + + if (planner.getTaskStatus().equalsIgnoreCase(Status.Cancel.getKey()) || planner.getTaskStatus().equalsIgnoreCase(Status.Blocked.getKey())) { + Collection values = plannerAllTodayMap.getCollectionObjectsByFieldValues(Map.of( + "task", planner.getTask(), + "taskTime", planner.getTaskTime(), + "securityId", planner.getSecurityId(), + "companyId", planner.getCompanyId())); + values.forEach(plannerAllTodayMap::delete); + } + } } diff --git a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/service/PlannerTemplateServiceTest.java b/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/service/PlannerTemplateServiceTest.java index 7fd0b0d66..269a20562 100644 --- a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/service/PlannerTemplateServiceTest.java +++ b/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/service/PlannerTemplateServiceTest.java @@ -1,206 +1,134 @@ package ru.specx.clearing.scheduler.service; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.hazelcast.core.IMap; -import com.hazelcast.map.listener.EntryRemovedListener; -import org.apache.kafka.clients.consumer.ConsumerRecord; import org.apache.kafka.clients.consumer.MockConsumer; -import org.apache.kafka.clients.consumer.OffsetResetStrategy; -import org.apache.kafka.clients.producer.MockProducer; -import org.apache.kafka.common.TopicPartition; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit.jupiter.SpringExtension; -import ru.clearing.classes.statics.data.company.Company; -import ru.clearing.classes.statics.data.profile.Contact; +import ru.clearing.classes.statics.data.scheduler.PlannerAllToday; import ru.clearing.classes.statics.data.scheduler.PlannerTemplate; -import ru.clearing.classes.statics.data.security.Security; -import ru.clearing.platform.dictionary.TaskDictionary; -import ru.clearing.platform.dictionary.TaskStatusDictionary; -import ru.spcex.clearing.imdg.IMDGDistributedNames; -import ru.spcex.clearing.platform.messaging.domain.ActionType; import ru.spcex.clearing.platform.messaging.domain.BaseRequest; import ru.spcex.clearing.platform.messaging.domain.Consts; import ru.spcex.clearing.platform.messaging.domain.cud.common.CommonDeleteRequest; import ru.spcex.clearing.platform.messaging.domain.cud.schedule.PlannerTemplateNewRequest; import ru.spcex.clearing.platform.messaging.domain.cud.schedule.PlannerTemplateUpdateRequest; -import ru.spcex.clearing.scheduler.config.validation.PlannerTemplateValidationConfig; -import ru.spcex.clearing.scheduler.config.validation.ValidationConfig; +import ru.spcex.clearing.scheduler.PlannerAllTodayBuilder; import ru.spcex.clearing.scheduler.service.PlannerTemplateService; -import ru.spcex.platform.enumeration.Status; -import ru.spcex.platform.enumeration.Task; -import ru.spcex.platform.enumeration.WorkflowStatus; -import ru.spcex.platform.imdg.api.Imdg; -import ru.spcex.platform.imdg.iml.hazelcast.service.HazelcastService; -import ru.spcex.platform.utils.enumeration.IMessageResolver; -import ru.spcex.platform.utils.validation.IValidator; -import ru.specx.clearing.scheduler.config.HazelcastServiceTestConfiguration; +import ru.spcex.clearing.test.MatcherFactory; +import ru.specx.clearing.scheduler.AbstractServiceTest; -import java.time.Instant; -import java.time.LocalTime; -import java.time.temporal.ChronoUnit; -import java.util.Collections; -import java.util.HashMap; -import java.util.function.Function; +import javax.annotation.PostConstruct; -@ExtendWith(SpringExtension.class) -@ContextConfiguration(classes = { - HazelcastServiceTestConfiguration.class, - ValidationConfig.class, - PlannerTemplateValidationConfig.class -}) -class PlannerTemplateServiceTest { +import static org.junit.jupiter.api.Assertions.assertNull; +import static ru.spcex.clearing.test.MatcherFactory.usingIgnoringFieldsComparator; +import static ru.spcex.clearing.test.TestUtils.*; +import static ru.spcex.clearing.test.config.ImdgTestConfig.currentID; +class PlannerTemplateServiceTest extends AbstractServiceTest { + protected static final MatcherFactory.Matcher PLANNER_TEMPLATE_MATCHER = usingIgnoringFieldsComparator("created", "updated"); private static final int PARTITION = 0; private static final String TOPIC_PLANNER_TEMPLATE_NEW = Consts.DESTINATION_PLANNER_TEMPLATE_NEW; - private static final Long ID = 0L; + private static final String TOPIC_PLANNER_TEMPLATE_UPDATE = Consts.DESTINATION_PLANNER_TEMPLATE_UPDATE; + private static final String TOPIC_PLANNER_TEMPLATE_DELETE = Consts.DESTINATION_PLANNER_TEMPLATE_DELETE; + private static final Long ID = currentID.getAndIncrement(); @Autowired - @Qualifier("hazelcastServiceTest") - private HazelcastService hazelcastServiceTest; - private MockConsumer mockConsumer; - private MockProducer mockProducer; + private PlannerTemplateService plannerTemplateService; - @Autowired - private IMessageResolver messageResolver; - - @Autowired - private Function plannerTemplateDeleteRequestValidation; - - @Autowired - private Function plannerTemplateNewRequestValidation; - - @Autowired - private Function plannerTemplateUpdateRequestValidation; - - @BeforeEach - void setUp() { - mockConsumer = new MockConsumer<>(OffsetResetStrategy.EARLIEST); - mockProducer = new MockProducer<>(); + @PostConstruct + public void init() { + super.init(); } /** - * {@link PlannerTemplateService#newTimetable(BaseRequest)}(BaseRequest)}
+ * {@link PlannerTemplateService#newPlannerTemplate(BaseRequest)}(BaseRequest)}
* Тест проверяет создание сущности {@link ru.clearing.classes.statics.data.scheduler.PlannerTemplate} в Hazelcast при передаче из Apache Kafka.
* Входной запрос {@link PlannerTemplateNewRequest}:
*/ @Test public void newPlannerTemplateInQueue() throws InterruptedException { - Task testTask = Task.accountBlock; - TaskDictionary taskDictionary = new TaskDictionary(); - taskDictionary.setId(0L); - taskDictionary.setCode(testTask.getKey()); - Imdg taskDictionaryImdg = hazelcastServiceTest.getImdg(IMDGDistributedNames.Map_TaskDictionary, TaskDictionary.class); - taskDictionaryImdg.insert(taskDictionary); - - Status testTaskStatus = Status.Active; - TaskStatusDictionary taskStatusDictionary = new TaskStatusDictionary(); - taskStatusDictionary.setId(0L); - taskStatusDictionary.setCode(testTaskStatus.getKey()); - Imdg taskStatusDictionaryImdg = hazelcastServiceTest.getImdg(IMDGDistributedNames.Map_TaskStatusDictionary, TaskStatusDictionary.class); - taskStatusDictionaryImdg.insert(taskStatusDictionary); - - long testCompanyId = 0L; - Company company = new Company(); - company.setId(testCompanyId); - company.setWorkflowStatus(WorkflowStatus.Active.getKey()); - Imdg companyImdg = hazelcastServiceTest.getImdg(IMDGDistributedNames.Map_Company, Company.class); - companyImdg.insert(company); - - long testSecurityId = 0L; - Security security = new Security(); - security.setId(testSecurityId); - security.setWorkflowStatus(WorkflowStatus.Active.getKey()); - Imdg securityImdg = hazelcastServiceTest.getImdg(IMDGDistributedNames.Map_Security, Security.class); - securityImdg.insert(security); - //ARRANGE - Instant created = Instant.now(); - PlannerTemplate plannerTemplate = new PlannerTemplate(); - plannerTemplate.setTask(testTask.getKey()); - plannerTemplate.setTaskTime(LocalTime.now().plusHours(1)); - plannerTemplate.setTaskStatus(testTaskStatus.getKey()); - plannerTemplate.setCompanyId(testCompanyId); - plannerTemplate.setSecurityId(testSecurityId); + PlannerTemplate plannerTemplate = getPlannerTemplate(newCompanyId); - PlannerTemplateNewRequest plannerTemplateNewRequest = new PlannerTemplateNewRequest(); - plannerTemplateNewRequest.setTask(plannerTemplate.getTask()); - plannerTemplateNewRequest.setTaskTime(plannerTemplate.getTaskTime()); - plannerTemplateNewRequest.setTaskStatus(plannerTemplate.getTaskStatus()); - plannerTemplateNewRequest.setCompanyId(plannerTemplate.getCompanyId()); - plannerTemplateNewRequest.setSecurityId(plannerTemplate.getSecurityId()); - - BaseRequest plannerTemplateRequest = new BaseRequest<>(); - plannerTemplateRequest.setRequestPayload(plannerTemplateNewRequest); - plannerTemplateRequest.setId(ID); - plannerTemplateRequest.setActionType(ActionType.NEW); - String jsonBaseForDeleteRequest; - ObjectMapper objectMapper = new ObjectMapper(); - try { - jsonBaseForDeleteRequest = objectMapper.writeValueAsString(plannerTemplateRequest); - } catch (JsonProcessingException e) { - throw new RuntimeException(e); - } + PlannerTemplateNewRequest templateNewRequest = new PlannerTemplateNewRequest(); + templateNewRequest.setTask(plannerTemplate.getTask()); + templateNewRequest.setTaskTime(plannerTemplate.getTaskTime()); + templateNewRequest.setTaskStatus(plannerTemplate.getTaskStatus()); + templateNewRequest.setCompanyId(plannerTemplate.getCompanyId()); + templateNewRequest.setSecurityId(plannerTemplate.getSecurityId()); //ACT - //service set up - PlannerTemplateService plannerTemplateService = new PlannerTemplateService(mockConsumer, - mockProducer, - hazelcastServiceTest, - messageResolver, - plannerTemplateDeleteRequestValidation, - plannerTemplateNewRequestValidation, - plannerTemplateUpdateRequestValidation); + String jsonString = getJsonStringForNew(templateNewRequest, ID); + addRecordToKafka((MockConsumer) plannerTemplateService.getConsumer(), TOPIC_PLANNER_TEMPLATE_NEW, PARTITION, 0, jsonString); - //callbacks set up - plannerTemplateService.afterPropertiesSet(); - IMap iMap = hazelcastServiceTest.getHazelcast().getMap(IMDGDistributedNames.Map_PlannerTemplate); - //KAFKA - HashMap startOffsetsUpdating = new HashMap<>(); - TopicPartition topic = new TopicPartition(TOPIC_PLANNER_TEMPLATE_NEW, PARTITION); - startOffsetsUpdating.put(topic, 0L); - mockConsumer.updateBeginningOffsets(startOffsetsUpdating); - - mockConsumer.schedulePollTask(() -> { - mockConsumer.rebalance(Collections.singletonList(new TopicPartition(TOPIC_PLANNER_TEMPLATE_NEW, PARTITION))); - mockConsumer.addRecord(new ConsumerRecord<>(TOPIC_PLANNER_TEMPLATE_NEW, PARTITION, 0, "key", jsonBaseForDeleteRequest)); - }); - - //waiting for hazelcast map item removes - Object waiter = new Object(); - String listenerID = iMap.addEntryListener((EntryRemovedListener) entryEvent -> { - System.out.println("Checking If pushed.."); - - try { - waiter.wait(100); - } catch (InterruptedException e) { - throw new RuntimeException(e); - } - synchronized (waiter) { - waiter.notify(); - } - }, false); - - synchronized (waiter) { - waiter.wait(100); - } - PlannerTemplate plannerTemplateRes = iMap.get(iMap.keySet().stream().findFirst().get()); //ASSERT - Assertions.assertEquals(1, iMap.size()); + waitingWhenAddedRecordAndCheckIt(ID, mockProducer, producerRecord); - Assertions.assertNotNull(plannerTemplateRes.getCreated()); - Assertions.assertEquals(plannerTemplate.getTask(), plannerTemplateRes.getTask()); - Assertions.assertEquals(plannerTemplate.getTaskTime().truncatedTo(ChronoUnit.SECONDS), plannerTemplateRes.getTaskTime().truncatedTo(ChronoUnit.SECONDS)); - Assertions.assertEquals(plannerTemplate.getTaskStatus(), plannerTemplateRes.getTaskStatus()); - Assertions.assertEquals(plannerTemplate.getCompanyId(), plannerTemplateRes.getCompanyId()); - Assertions.assertEquals(plannerTemplate.getSecurityId(), plannerTemplateRes.getSecurityId()); - //preparing hazelcastImdgProvider for next test - iMap.removeEntryListener(listenerID); + PlannerTemplate plannerTemplateRes = plannerTemplateImdg.getSingleObjectBySQL(String.format("companyId = %s", plannerTemplate.getCompanyId())); + plannerTemplate.setId(plannerTemplateRes.getId()); + PLANNER_TEMPLATE_MATCHER.assertMatch(plannerTemplateRes, plannerTemplate); + checkPlannerAllTodayByPlannerTemplate(plannerTemplate); + } + + /** + * {@link PlannerTemplateService#updatePlannerTemplate(BaseRequest)}(BaseRequest)}
+ * Тест проверяет обновление сущности {@link ru.clearing.classes.statics.data.scheduler.PlannerTemplate} в Hazelcast при передаче из Apache Kafka.
+ * Входной запрос {@link PlannerTemplateUpdateRequest}:
+ */ + @Test + public void updatePlannerTemplate() throws InterruptedException { + //ARRANGE + PlannerTemplate plannerTemplate = getPlannerTemplate(newCompanyId); + plannerTemplateImdg.insert(plannerTemplate); + plannerTemplate.setCompanyId(updateCompanyId); + + PlannerTemplateUpdateRequest plannerTemplateUpdateRequest = new PlannerTemplateUpdateRequest(); + plannerTemplateUpdateRequest.setId(plannerTemplate.getId()); + plannerTemplateUpdateRequest.setTask(plannerTemplate.getTask()); + plannerTemplateUpdateRequest.setTaskTime(plannerTemplate.getTaskTime()); + plannerTemplateUpdateRequest.setTaskStatus(plannerTemplate.getTaskStatus()); + plannerTemplateUpdateRequest.setCompanyId(plannerTemplate.getCompanyId()); + plannerTemplateUpdateRequest.setSecurityId(plannerTemplate.getSecurityId()); + + //ACT + String jsonString = getJsonStringForUpdate(plannerTemplateUpdateRequest, ID); + addRecordToKafka((MockConsumer) plannerTemplateService.getConsumer(), TOPIC_PLANNER_TEMPLATE_UPDATE, PARTITION, 0, jsonString); + + //ASSERT + waitingWhenAddedRecordAndCheckIt(ID, mockProducer, producerRecord); + + PlannerTemplate plannerTemplateRes = plannerTemplateImdg.getSingleObjectBySQL(String.format("companyId = %s", plannerTemplate.getCompanyId())); + plannerTemplate.setId(plannerTemplateRes.getId()); + PLANNER_TEMPLATE_MATCHER.assertMatch(plannerTemplateRes, plannerTemplate); + checkPlannerAllTodayByPlannerTemplate(plannerTemplate); + } + + /** + * {@link PlannerTemplateService#deletePlannerTemplate(BaseRequest)}(BaseRequest)}
+ * Тест проверяет удаление сущности {@link ru.clearing.classes.statics.data.scheduler.PlannerTemplate} в Hazelcast при передаче из Apache Kafka.
+ * Входной запрос {@link CommonDeleteRequest}:
+ */ + @Test + public void deletePlannerTemplate() throws InterruptedException { + //ARRANGE + PlannerTemplate plannerTemplate = getPlannerTemplate(newCompanyId); + long id = plannerTemplate.getId(); + + plannerTemplate.setCompanyId(deleteCompanyId); + plannerTemplateImdg.insert(plannerTemplate); + plannerAllTodayImdg.insert(PlannerAllTodayBuilder.builder().append(plannerTemplate).build()); + + CommonDeleteRequest commonDeleteRequest = new CommonDeleteRequest(); + commonDeleteRequest.setId(id); + + //ACT + String jsonString = getJsonStringForDelete(commonDeleteRequest, id); + addRecordToKafka((MockConsumer) plannerTemplateService.getConsumer(), TOPIC_PLANNER_TEMPLATE_DELETE, PARTITION, 0, jsonString); + + //ASSERT + waitingWhenAddedRecordAndCheckIt(id, mockProducer, producerRecord); + + PlannerTemplate plannerTemplateRes = plannerTemplateImdg.getSingleObjectBySQL(String.format("companyId = %s", plannerTemplate.getCompanyId())); + assertNull(plannerTemplateRes); + PlannerAllToday plannerAllTodayRes = plannerAllTodayImdg.getSingleObjectBySQL(String.format("companyId = %s", plannerTemplate.getCompanyId())); + assertNull(plannerAllTodayRes); } } \ No newline at end of file From 6b2acb66e7ff0476089586b46d325a049ac9e1e6 Mon Sep 17 00:00:00 2001 From: psemenkov Date: Thu, 20 Apr 2023 13:53:47 +0300 Subject: [PATCH 14/27] =?UTF-8?q?http://jira.mfd.msk:8088/browse/CLS-268?= =?UTF-8?q?=20=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=20=D1=81?= =?UTF-8?q?=D1=83=D1=89=D0=B5=D1=81=D1=82=D0=B2=D1=83=D1=8E=D1=89=D0=B8?= =?UTF-8?q?=D0=B9=20=D1=81=D0=B5=D1=80=D0=B8=D1=81,=20=D0=B2=D0=B0=D0=BB?= =?UTF-8?q?=D0=B8=D0=B4=D0=B0=D1=82=D0=BE=D1=80=D1=8B,=20=D1=82=D0=B5?= =?UTF-8?q?=D1=81=D1=82=D1=8B=20=D0=B4=D0=BB=D1=8F=20plannerTemplate=20.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../validation/PlannerValidationConfig.java | 14 +- .../config/validation/ValidationConfig.java | 24 +++ .../service/PlannerTemplateService.java | 78 +++++++- .../scheduler/service/PlannerServiceTest.java | 171 ++++++++++++++++++ 4 files changed, 274 insertions(+), 13 deletions(-) create mode 100644 clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/service/PlannerServiceTest.java diff --git a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/validation/PlannerValidationConfig.java b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/validation/PlannerValidationConfig.java index 16a4e8501..05e77caf6 100644 --- a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/validation/PlannerValidationConfig.java +++ b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/validation/PlannerValidationConfig.java @@ -21,6 +21,7 @@ import ru.spcex.platform.imdg.validation.ImdgValidationContext; import ru.spcex.platform.utils.validation.IValidator; import ru.spcex.platform.utils.validation.ValidatorImpl; +import java.time.LocalDate; import java.util.Map; import java.util.function.Consumer; import java.util.function.Function; @@ -43,10 +44,11 @@ public class PlannerValidationConfig { PlannerNewRequest::getTask, IMDGDistributedNames.Map_TaskDictionary, TaskDictionary.class), - TimeNotBeforeRule.instance("taskTime", - PlannerNewRequest::getTaskTime), DateNotBeforeRule.instance("clearingDate", PlannerNewRequest::getClearingDate), + TimeNotBeforeRule.instance("taskTime", + PlannerNewRequest::getTaskTime, + LocalDate.now().equals(plannerNewRequest.getClearingDate())), EnumPresentRule.instance("market", PlannerNewRequest::getMarket, Market.values(), @@ -78,6 +80,7 @@ public class PlannerValidationConfig { context.setValidatedObject(plannerUpdateRequest); Consumer addImdg = (s) -> context.addImdg(s, imdgForValidation.get(s)); addImdg.accept(IMDGDistributedNames.Map_TaskDictionary); + addImdg.accept(IMDGDistributedNames.Map_Planner); addImdg.accept(IMDGDistributedNames.Map_TaskStatusDictionary); addImdg.accept(IMDGDistributedNames.Map_Company); addImdg.accept(IMDGDistributedNames.Map_Security); @@ -94,7 +97,8 @@ public class PlannerValidationConfig { false), TimeNotBeforeRule.instance("taskTime", PlannerUpdateRequest::getTaskTime, - false), + false, + LocalDate.now().equals(plannerUpdateRequest.getClearingDate())), DateNotBeforeRule.instance("clearingDate", PlannerUpdateRequest::getClearingDate, false), @@ -126,10 +130,12 @@ public class PlannerValidationConfig { } @Bean("plannerDeleteRequestValidator") - public Function plannerDeleteRequestValidator() { + public Function plannerDeleteRequestValidator(Map> imdgForValidation) { return plannerDeleteRequest -> { ImdgValidationContext context = new ImdgValidationContext<>(); context.setValidatedObject(plannerDeleteRequest); + Consumer addImdg = (s) -> context.addImdg(s, imdgForValidation.get(s)); + addImdg.accept(IMDGDistributedNames.Map_Planner); return new ValidatorImpl<>(context, IdPresentRule.instance("id", CommonDeleteRequest::getId, diff --git a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/validation/ValidationConfig.java b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/validation/ValidationConfig.java index d12745c9e..14188dfcb 100644 --- a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/validation/ValidationConfig.java +++ b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/validation/ValidationConfig.java @@ -1,16 +1,26 @@ package ru.spcex.clearing.scheduler.config.validation; +import org.springframework.beans.factory.config.ConfigurableBeanFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Scope; import ru.clearing.classes.statics.data.company.Company; +import ru.clearing.classes.statics.data.scheduler.ClearingCalendar; +import ru.clearing.classes.statics.data.scheduler.Planner; +import ru.clearing.classes.statics.data.scheduler.PlannerTemplate; import ru.clearing.classes.statics.data.security.Security; import ru.clearing.platform.dictionary.DayStatusDictionary; import ru.clearing.platform.dictionary.TaskDictionary; import ru.clearing.platform.dictionary.TaskStatusDictionary; import ru.spcex.clearing.imdg.IMDGDistributedNames; +import ru.spcex.clearing.scheduler.error.ValidationError; +import ru.spcex.clearing.util.security.UserRoleVerification; +import ru.spcex.clearing.validation.common.ValidationHelper; import ru.spcex.platform.classes.base.SpcexObjectBase; +import ru.spcex.platform.enumeration.UserRole; import ru.spcex.platform.imdg.api.Imdg; import ru.spcex.platform.imdg.api.ImdgProvider; +import ru.spcex.platform.utils.enumeration.IMessageResolver; import java.util.HashMap; import java.util.Map; @@ -24,6 +34,9 @@ public class ValidationConfig { final Map> imdg = new HashMap<>(); BiConsumer> addImdg = (s, aClass) -> imdg.put(s, imdgProvider.getImdg(s, aClass)); addImdg.accept(IMDGDistributedNames.Map_TaskDictionary, TaskDictionary.class); + addImdg.accept(IMDGDistributedNames.Map_PlannerTemplate, PlannerTemplate.class); + addImdg.accept(IMDGDistributedNames.Map_Planner, Planner.class); + addImdg.accept(IMDGDistributedNames.Map_ClearingCalendar, ClearingCalendar.class); addImdg.accept(IMDGDistributedNames.Map_TaskStatusDictionary, TaskStatusDictionary.class); addImdg.accept(IMDGDistributedNames.Map_Company, Company.class); addImdg.accept(IMDGDistributedNames.Map_Security, Security.class); @@ -31,4 +44,15 @@ public class ValidationConfig { return imdg; } + @Bean("validationHelper") + @Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE) + public ValidationHelper validationHelper(IMessageResolver messageResolver) { + return new ValidationHelper(messageResolver); + } + + @Bean("userRoleVerificationBean") + @Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE) + public UserRoleVerification userRoleVerification(ImdgProvider imdgProvider, IMessageResolver messageResolver) { + return new UserRoleVerification(imdgProvider, messageResolver, UserRole.Admin, ValidationError.UserVerifyDenial); + } } diff --git a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/PlannerTemplateService.java b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/PlannerTemplateService.java index 2b7c7c76a..443f0c540 100644 --- a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/PlannerTemplateService.java +++ b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/PlannerTemplateService.java @@ -8,6 +8,8 @@ import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Service; +import ru.clearing.classes.statics.data.scheduler.ClearingCalendar; +import ru.clearing.classes.statics.data.scheduler.PlannerAllToday; import ru.clearing.classes.statics.data.scheduler.PlannerTemplate; import ru.spcex.clearing.imdg.IMDGDistributedNames; import ru.spcex.clearing.platform.messaging.domain.BaseRequest; @@ -17,19 +19,32 @@ import ru.spcex.clearing.platform.messaging.domain.cud.schedule.PlannerTemplateN import ru.spcex.clearing.platform.messaging.domain.cud.schedule.PlannerTemplateUpdateRequest; import ru.spcex.clearing.platform.messaging.service.QueueConsumer; import ru.spcex.clearing.platform.messaging.service.RequestInfoUpdate; +import ru.spcex.clearing.scheduler.PlannerAllTodayBuilder; +import ru.spcex.clearing.util.security.UserRoleVerification; +import ru.spcex.platform.enumeration.DayStatus; import ru.spcex.platform.imdg.api.Imdg; import ru.spcex.platform.imdg.api.ImdgProvider; import ru.spcex.platform.utils.enumeration.IMessageResolver; import ru.spcex.platform.utils.validation.IValidator; +import java.time.DayOfWeek; import java.time.Instant; +import java.time.LocalDate; +import java.util.Arrays; +import java.util.Collection; +import java.util.Map; import java.util.function.Function; +import static ru.spcex.clearing.scheduler.ISchedulerChecker.isValidWorkday; + @Service public class PlannerTemplateService extends QueueConsumer implements InitializingBean { private final Logger log = LoggerFactory.getLogger(getClass()); private final Imdg plannerTemplateMap; + private final Imdg plannerAllTodayMap; + private final Imdg clearingCalendarMap; private final IMessageResolver messageResolver; + private final UserRoleVerification userRoleVerification; private final Function plannerTemplateDeleteRequestValidation; private final Function plannerTemplateNewRequestValidation; private final Function plannerTemplateUpdateRequestValidation; @@ -38,11 +53,15 @@ public class PlannerTemplateService extends QueueConsumer implements Initializin public PlannerTemplateService(Consumer kafkaQueue, Producer kafkaProducer, ImdgProvider imdgProvider, IMessageResolver messageResolver, + @Qualifier("userRoleVerificationBean") UserRoleVerification userRoleVerification, @Qualifier("plannerTemplateDeleteRequestValidator") Function plannerTemplateDeleteRequestValidator, @Qualifier("plannerTemplateNewRequestValidator") Function plannerTemplateNewRequestValidator, @Qualifier("plannerTemplateUpdateRequestValidator") Function plannerTemplateUpdateRequestValidator) { super(kafkaQueue, kafkaProducer); this.plannerTemplateMap = imdgProvider.getImdg(IMDGDistributedNames.Map_PlannerTemplate, PlannerTemplate.class); + this.plannerAllTodayMap = imdgProvider.getImdg(IMDGDistributedNames.Map_PlannerAllToday, PlannerAllToday.class); + this.clearingCalendarMap = imdgProvider.getImdg(IMDGDistributedNames.Map_ClearingCalendar, ClearingCalendar.class); + this.userRoleVerification = userRoleVerification; this.plannerTemplateDeleteRequestValidation = plannerTemplateDeleteRequestValidator; this.plannerTemplateNewRequestValidation = plannerTemplateNewRequestValidator; this.plannerTemplateUpdateRequestValidation = plannerTemplateUpdateRequestValidator; @@ -52,40 +71,51 @@ public class PlannerTemplateService extends QueueConsumer implements Initializin @Override public void afterPropertiesSet() { callback(PlannerTemplateNewRequest.class) - .setFunction(this::newTimetable) + .setFunction(this::newPlannerTemplate) .forDestination(Consts.DESTINATION_PLANNER_TEMPLATE_NEW, callbacks::put); callback(PlannerTemplateUpdateRequest.class) - .setFunction(this::updateTimetable) + .setFunction(this::updatePlannerTemplate) .forDestination(Consts.DESTINATION_PLANNER_TEMPLATE_UPDATE, callbacks::put); callback(CommonDeleteRequest.class) - .setFunction(this::deleteTimetable) + .setFunction(this::deletePlannerTemplate) .forDestination(Consts.DESTINATION_PLANNER_TEMPLATE_DELETE, callbacks::put); init(); } - private RequestInfoUpdate newTimetable(BaseRequest userRequest) { + private RequestInfoUpdate newPlannerTemplate(BaseRequest userRequest) { PlannerTemplateNewRequest req = userRequest.getRequestPayload(); log.debug("PlannerTemplateNewRequest received"); - RequestInfoUpdate requestInfoUpdate = validate(userRequest, plannerTemplateNewRequestValidation, messageResolver); + + RequestInfoUpdate requestInfoUpdate = userRoleVerification.validateRoleAndGetResult(userRequest); if (requestInfoUpdate != null) return requestInfoUpdate; + requestInfoUpdate = validate(userRequest, plannerTemplateNewRequestValidation, messageResolver); + if (requestInfoUpdate != null) return requestInfoUpdate; + PlannerTemplate plannerTemplate = new PlannerTemplate(); Instant created = Instant.now(); plannerTemplate.setCreated(created); + plannerTemplate.setUpdated(created); plannerTemplate.setTask(req.getTask()); plannerTemplate.setTaskTime(req.getTaskTime()); plannerTemplate.setTaskStatus(req.getTaskStatus()); plannerTemplate.setCompanyId(req.getCompanyId()); plannerTemplate.setSecurityId(req.getSecurityId()); plannerTemplateMap.insert(plannerTemplate); + + if (todayWorkDay()) plannerAllTodayMap.insert(PlannerAllTodayBuilder.builder().append(plannerTemplate).build()); log.debug("successfully processed, new id {}", plannerTemplate.getId()); return null; } - private RequestInfoUpdate updateTimetable(BaseRequest userRequest) { + private RequestInfoUpdate updatePlannerTemplate(BaseRequest userRequest) { PlannerTemplateUpdateRequest req = userRequest.getRequestPayload(); log.debug("PlannerTemplateUpdateRequest received"); - RequestInfoUpdate requestInfoUpdate = validate(userRequest, plannerTemplateUpdateRequestValidation, messageResolver); + + RequestInfoUpdate requestInfoUpdate = userRoleVerification.validateRoleAndGetResult(userRequest); if (requestInfoUpdate != null) return requestInfoUpdate; + requestInfoUpdate = validate(userRequest, plannerTemplateUpdateRequestValidation, messageResolver); + if (requestInfoUpdate != null) return requestInfoUpdate; + PlannerTemplate plannerTemplate = plannerTemplateMap.getSingleObjectByID(req.getId()); Instant updated = Instant.now(); plannerTemplate.setUpdated(updated); @@ -95,17 +125,47 @@ public class PlannerTemplateService extends QueueConsumer implements Initializin plannerTemplate.setCompanyId(req.getCompanyId()); plannerTemplate.setSecurityId(req.getSecurityId()); plannerTemplateMap.update(plannerTemplate); + + if (todayWorkDay()) { + PlannerAllToday planner = PlannerAllTodayBuilder.builder().append(plannerTemplate).build(); + PlannerAllToday plannerAllToday = plannerAllTodayMap.getSingleObjectBySQL(String.format("parentId = %s", plannerTemplate.getId())); + if (plannerAllToday != null) planner.setId(plannerAllToday.getId()); + plannerAllTodayMap.insert(planner); + } log.debug("successfully processed, new id {}", plannerTemplate.getId()); return null; } - private RequestInfoUpdate deleteTimetable(BaseRequest userRequest) { + private RequestInfoUpdate deletePlannerTemplate(BaseRequest userRequest) { CommonDeleteRequest req = userRequest.getRequestPayload(); log.debug("CommonDeleteRequest received id = {}", req.getId()); - RequestInfoUpdate requestInfoUpdate = validate(userRequest, plannerTemplateDeleteRequestValidation, messageResolver); + + RequestInfoUpdate requestInfoUpdate = userRoleVerification.validateRoleAndGetResult(userRequest); if (requestInfoUpdate != null) return requestInfoUpdate; + requestInfoUpdate = validate(userRequest, plannerTemplateDeleteRequestValidation, messageResolver); + if (requestInfoUpdate != null) return requestInfoUpdate; + PlannerTemplate plannerTemplate = plannerTemplateMap.getSingleObjectByID(req.getId()); + + if (todayWorkDay()) { + PlannerAllToday plannerAllToday = plannerAllTodayMap.getSingleObjectBySQL(String.format("parentId = %s", plannerTemplate.getId())); + if (plannerAllToday != null) plannerAllTodayMap.delete(plannerAllToday); + } plannerTemplateMap.delete(plannerTemplate); return null; } + + private boolean todayWorkDay() { + LocalDate currentDate = LocalDate.now(); + boolean isWeekend = Arrays.asList(DayOfWeek.SATURDAY, DayOfWeek.SUNDAY).contains(currentDate.getDayOfWeek()); + //проверим есть ли другие записи clearingCalendar с таким же clearingDate, если они актуальные ничего не удаляем + Collection clearingCalendars = clearingCalendarMap.getCollectionObjectsByFieldValues(Map.of("dayStatus", DayStatus.Workday.getKey(), + "clearingDate", currentDate)); + if (clearingCalendars != null && !clearingCalendars.isEmpty()) { + for (ClearingCalendar calendar : clearingCalendars) { + if (isValidWorkday(calendar, isWeekend)) return true; + } + } + return false; + } } diff --git a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/service/PlannerServiceTest.java b/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/service/PlannerServiceTest.java new file mode 100644 index 000000000..49bd15c27 --- /dev/null +++ b/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/service/PlannerServiceTest.java @@ -0,0 +1,171 @@ +package ru.specx.clearing.scheduler.service; + +import org.apache.kafka.clients.consumer.MockConsumer; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import ru.clearing.classes.statics.data.scheduler.Planner; +import ru.clearing.classes.statics.data.scheduler.PlannerAllToday; +import ru.spcex.clearing.platform.messaging.domain.BaseRequest; +import ru.spcex.clearing.platform.messaging.domain.Consts; +import ru.spcex.clearing.platform.messaging.domain.cud.common.CommonDeleteRequest; +import ru.spcex.clearing.platform.messaging.domain.cud.schedule.PlannerNewRequest; +import ru.spcex.clearing.platform.messaging.domain.cud.schedule.PlannerUpdateRequest; +import ru.spcex.clearing.scheduler.PlannerAllTodayBuilder; +import ru.spcex.clearing.scheduler.service.PlannerService; +import ru.spcex.clearing.test.MatcherFactory; +import ru.spcex.platform.enumeration.Status; +import ru.specx.clearing.scheduler.AbstractServiceTest; + +import javax.annotation.PostConstruct; + +import static org.junit.jupiter.api.Assertions.assertNull; +import static ru.spcex.clearing.test.MatcherFactory.usingIgnoringFieldsComparator; +import static ru.spcex.clearing.test.TestUtils.*; +import static ru.spcex.clearing.test.config.ImdgTestConfig.currentID; + +class PlannerServiceTest extends AbstractServiceTest { + protected static final MatcherFactory.Matcher PLANNER_MATCHER = usingIgnoringFieldsComparator("created", "updated"); + private static final int PARTITION = 0; + private static final String TOPIC_PLANNER_NEW = Consts.DESTINATION_PLANNER_NEW; + private static final String TOPIC_PLANNER_UPDATE = Consts.DESTINATION_PLANNER_UPDATE; + private static final String TOPIC_PLANNER_DELETE = Consts.DESTINATION_PLANNER_DELETE; + + @Autowired + private PlannerService plannerService; + + @PostConstruct + public void init() { + super.init(); + } + + @BeforeEach + public void prepare(){ + clearAllInImdg(plannerAllTodayImdg); + } + + /** + * {@link PlannerService#newPlanner(BaseRequest)}(BaseRequest)}
+ * Тест проверяет создание сущности {@link ru.clearing.classes.statics.data.scheduler.Planner} в Hazelcast при передаче из Apache Kafka.
+ * Входной запрос {@link PlannerNewRequest}:
+ */ + @Test + public void newPlanner() { + //ARRANGE + Long ID = currentID.getAndIncrement(); + Planner planner = getPlanner(newCompanyId); + + PlannerNewRequest plannerNewRequest = new PlannerNewRequest(); + plannerNewRequest.setTask(planner.getTask()); + plannerNewRequest.setTaskTime(planner.getTaskTime()); + plannerNewRequest.setTaskStatus(planner.getTaskStatus()); + plannerNewRequest.setClearingDate(planner.getClearingDate()); + plannerNewRequest.setMarket(planner.getMarket()); + plannerNewRequest.setCompanyId(planner.getCompanyId()); + plannerNewRequest.setSecurityId(planner.getSecurityId()); + + //ACT + String jsonString = getJsonStringForUpdate(plannerNewRequest, ID); + addRecordToKafka((MockConsumer) plannerService.getConsumer(), TOPIC_PLANNER_NEW, PARTITION, 0, jsonString); + + //ASSERT + waitingWhenAddedRecordAndCheckIt(ID, mockProducer, producerRecord); + + Planner plannerReq = plannerImdg.getSingleObjectBySQL(String.format("companyId = %s", planner.getCompanyId())); + planner.setId(plannerReq.getId()); + PLANNER_MATCHER.assertMatch(plannerReq, planner); + checkPlannerAllTodayByPlanner(planner); + } + + /** + * {@link PlannerService#updatePlanner(BaseRequest)}(BaseRequest)}
+ * Тест проверяет создание сущности {@link ru.clearing.classes.statics.data.scheduler.Planner} в Hazelcast при передаче из Apache Kafka.
+ * Входной запрос {@link PlannerUpdateRequest}:
+ */ + @Test + public void updateScheduler() { + //ARRANGE + Planner planner = getPlanner(newCompanyId); + plannerImdg.insert(planner); + planner.setCompanyId(updateCompanyId); + + PlannerUpdateRequest plannerUpdateRequest = new PlannerUpdateRequest(); + plannerUpdateRequest.setId(planner.getId()); + plannerUpdateRequest.setTask(planner.getTask()); + plannerUpdateRequest.setTaskTime(planner.getTaskTime()); + plannerUpdateRequest.setTaskStatus(planner.getTaskStatus()); + plannerUpdateRequest.setClearingDate(planner.getClearingDate()); + plannerUpdateRequest.setMarket(planner.getMarket()); + plannerUpdateRequest.setCompanyId(planner.getCompanyId()); + plannerUpdateRequest.setSecurityId(planner.getSecurityId()); + + //ACT + String jsonString = getJsonStringForUpdate(plannerUpdateRequest, planner.getId()); + addRecordToKafka((MockConsumer) plannerService.getConsumer(), TOPIC_PLANNER_UPDATE, PARTITION, 0, jsonString); + + //ASSERT + waitingWhenAddedRecordAndCheckIt(planner.getId(), mockProducer, producerRecord); + + Planner plannerReq = plannerImdg.getSingleObjectBySQL(String.format("companyId = %s", planner.getCompanyId())); + planner.setId(plannerReq.getId()); + PLANNER_MATCHER.assertMatch(plannerReq, planner); + checkPlannerAllTodayByPlanner(planner); + } + + /** + * {@link PlannerService#deletePlanner(BaseRequest)}(BaseRequest)}
+ * Тест проверяет удаление сущности {@link ru.clearing.classes.statics.data.scheduler.Planner} в Hazelcast при передаче из Apache Kafka.
+ * Входной запрос {@link CommonDeleteRequest}:
+ */ + @Test + public void deletePlanner(){ + //ARRANGE + clearAllInImdg(plannerImdg); + Planner planner = getPlanner(deleteCompanyId); + plannerImdg.insert(planner); + + long plannerId = planner.getId(); + + plannerAllTodayImdg.insert(PlannerAllTodayBuilder.builder().append(planner).build()); + + CommonDeleteRequest commonDeleteRequest = new CommonDeleteRequest(); + commonDeleteRequest.setId(plannerId); + + //ACT + String jsonString = getJsonStringForDelete(commonDeleteRequest, plannerId); + addRecordToKafka((MockConsumer) plannerService.getConsumer(), TOPIC_PLANNER_DELETE, PARTITION, 0, jsonString); + + //ASSERT + waitingWhenAddedRecordAndCheckIt(plannerId, mockProducer, producerRecord); + + Planner plannerReq = plannerImdg.getSingleObjectBySQL(String.format("companyId = %s", planner.getCompanyId())); + assertNull(plannerReq); + PlannerAllToday plannerAllTodayRes = plannerAllTodayImdg.getSingleObjectBySQL(String.format("companyId = %s", planner.getCompanyId())); + assertNull(plannerAllTodayRes); + } + + /** + * {@link PlannerService#cudPlannerAllToday(Planner)}(BaseRequest)}
+ * Тест проверяет добавление, обновление, удаление сущности {@link ru.clearing.classes.statics.data.scheduler.PlannerAllToday} в Hazelcast.
+ * Входной запрос {@link Planner}:
+ */ + @Test + public void cudPlannerAllToday(){ + //проверка добавления + Planner planner = getPlanner(newCompanyId); + plannerService.cudPlannerAllToday(planner); + checkPlannerAllTodayByPlanner(planner); + + //проверка обновления + planner.setCompanyId(updateCompanyId); + plannerService.cudPlannerAllToday(planner); + checkPlannerAllTodayByPlanner(planner); + + //проверка удаления всех PlannerAllToday + planner.setTaskStatus(Status.Cancel.getKey()); + plannerAllTodayImdg.insert(PlannerAllTodayBuilder.builder().append(planner).build()); + plannerService.cudPlannerAllToday(planner); + PlannerAllToday plannerAllTodayRes = plannerAllTodayImdg.getSingleObjectBySQL(String.format("parentId = %s", planner.getId())); + assertNull(plannerAllTodayRes); + } +} \ No newline at end of file From 45ca3d9b56ea81599c8bc498970866c2bffe10d2 Mon Sep 17 00:00:00 2001 From: psemenkov Date: Thu, 20 Apr 2023 13:54:15 +0300 Subject: [PATCH 15/27] =?UTF-8?q?http://jira.mfd.msk:8088/browse/CLS-268?= =?UTF-8?q?=20=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=20=D1=81?= =?UTF-8?q?=D1=83=D1=89=D0=B5=D1=81=D1=82=D0=B2=D1=83=D1=8E=D1=89=D0=B8?= =?UTF-8?q?=D0=B9=20=D1=81=D0=B5=D1=80=D0=B8=D1=81,=20=D1=82=D0=B5=D1=81?= =?UTF-8?q?=D1=82=20=D0=B4=D0=BB=D1=8F=20laucnher.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scheduler/service/LauncherService.java | 18 +++- .../service/LauncherServiceTest.java | 92 +++++++++++++++++++ 2 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/service/LauncherServiceTest.java 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 index aa869d0d4..65d2d190d 100644 --- 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 @@ -7,6 +7,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Service; import ru.clearing.classes.statics.data.scheduler.Launcher; import ru.spcex.clearing.imdg.IMDGDistributedNames; @@ -14,6 +15,9 @@ 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.clearing.platform.messaging.service.RequestInfoUpdate; +import ru.spcex.clearing.scheduler.error.ValidationError; +import ru.spcex.clearing.util.security.UserRoleVerification; import ru.spcex.platform.enumeration.Task; import ru.spcex.platform.imdg.api.Imdg; import ru.spcex.platform.imdg.api.ImdgProvider; @@ -27,12 +31,16 @@ public class LauncherService extends QueueConsumer implements InitializingBean { private final Logger log = LoggerFactory.getLogger(getClass()); private final Imdg launcherMap; private final Producer kafkaProducer; + private final UserRoleVerification userRoleVerification; + @Autowired public LauncherService(Consumer kafkaQueue, Producer kafkaProducer, + @Qualifier("userRoleVerificationBean") UserRoleVerification userRoleVerification, ImdgProvider imdgProvider) { - super(kafkaQueue, kafkaProducer); + super(kafkaQueue, null); this.kafkaProducer = kafkaProducer; + this.userRoleVerification = userRoleVerification; this.launcherMap = imdgProvider.getImdg(IMDGDistributedNames.Map_Launcher, Launcher.class); } @@ -47,6 +55,14 @@ public class LauncherService extends QueueConsumer implements InitializingBean { private void newLauncher(BaseRequest userRequest) { LauncherCommandRequest req = userRequest.getRequestPayload(); log.debug("LauncherCommandRequest received"); + + RequestInfoUpdate requestInfoUpdate = userRoleVerification.validateRoleAndGetResult(userRequest); + if (requestInfoUpdate != null) throw new IllegalStateException(ValidationError.UserVerifyDenial.name()); + + if (req.getUserId() == null || !req.getUserId().equals(userRequest.getUserId())) { + throw new IllegalStateException(String.format("User id in request must match: baseRequest.userId = %s, launcherCommandRequest.userId = %s", userRequest.getUserId(), req.getUserId())); + } + Instant created = Instant.now(); Launcher launcher = new Launcher(); if (getEnumByKey(Task.class, req.getTaskName()) == null) { diff --git a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/service/LauncherServiceTest.java b/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/service/LauncherServiceTest.java new file mode 100644 index 000000000..9a4a508a0 --- /dev/null +++ b/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/service/LauncherServiceTest.java @@ -0,0 +1,92 @@ +package ru.specx.clearing.scheduler.service; + +import org.apache.kafka.clients.consumer.MockConsumer; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import ru.clearing.classes.statics.data.scheduler.Launcher; +import ru.clearing.classes.statics.data.scheduler.Planner; +import ru.spcex.clearing.platform.messaging.domain.ActionType; +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.scheduler.service.LauncherService; +import ru.spcex.clearing.test.MatcherFactory; +import ru.specx.clearing.scheduler.AbstractServiceTest; + +import javax.annotation.PostConstruct; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.mockito.Mockito.timeout; +import static org.mockito.Mockito.verify; +import static ru.spcex.clearing.test.MatcherFactory.usingIgnoringFieldsComparator; +import static ru.spcex.clearing.test.TestUtils.*; +import static ru.spcex.clearing.test.config.ImdgTestConfig.currentID; +import static ru.spcex.clearing.test.config.ImdgTestConfig.defaultAdminId; +import static ru.spcex.platform.enumeration.Task.accountBlock; + +class LauncherServiceTest extends AbstractServiceTest { + private final Logger log = LoggerFactory.getLogger(getClass()); + + protected static final MatcherFactory.Matcher LAUNCHER_MATCHER = usingIgnoringFieldsComparator("created", "updated"); + private static final int PARTITION = 0; + private static final String TOPIC_LAUNCHER_NEW = Consts.LAUNCHER_NEW; + private static final Long ID = currentID.getAndIncrement(); + + @Autowired + private LauncherService launcherService; + + @PostConstruct + public void init() { + super.init(); + } + + @BeforeEach + public void prepare() { + clearAllInImdg(plannerAllTodayImdg); + } + + /** + * {@link LauncherService#newLauncher(BaseRequest)}(BaseRequest)}
+ * Тест проверяет создание сущности {@link Planner} в Hazelcast при передаче из Apache Kafka.
+ * Входной запрос {@link LauncherCommandRequest}:
+ */ + @Test + public void newPlanner() { + //ARRANGE + Launcher launcher = new Launcher(); + launcher.setSenderId(defaultAdminId); + launcher.setTask(accountBlock.getKey()); + + LauncherCommandRequest launcherCommandRequest = new LauncherCommandRequest(); + launcherCommandRequest.setTaskName(launcher.getTask()); + launcherCommandRequest.setUserId(launcher.getSenderId()); + launcherCommandRequest.setCompanyId(newCompanyId); + launcherCommandRequest.setSecurityId(testSecurityId); + + BaseRequest predictableBaseRequest = new BaseRequest<>(); + predictableBaseRequest.setRequestPayload(launcherCommandRequest); + predictableBaseRequest.setId(ID); + predictableBaseRequest.setUserId(launcher.getSenderId()); + predictableBaseRequest.setActionType(ActionType.NEW); + + //ACT + String jsonString = getJsonStringForNew(launcherCommandRequest, ID); + addRecordToKafka((MockConsumer) launcherService.getConsumer(), TOPIC_LAUNCHER_NEW, PARTITION, 0, jsonString); + + //ASSERT + verify(mockProducer, timeout(30_000L).times(1)) + .send(producerRecord.capture()); + + BaseRequest baseRequestResult = (BaseRequest) producerRecord.getValue().value(); + assertEquals("launcher-" + launcher.getTask(), producerRecord.getValue().topic()); + BASE_REQUEST_MATCHER.assertMatch(baseRequestResult, predictableBaseRequest); + + + Launcher launcherReq = launcherMap.getSingleObjectBySQL(String.format("senderId = %s", launcher.getSenderId())); + launcher.setId(launcherReq.getId()); + LAUNCHER_MATCHER.assertMatch(launcherReq, launcher); + } +} \ No newline at end of file From 9bfc038111e54131944dfbf3d503e09207f2e6bf Mon Sep 17 00:00:00 2001 From: psemenkov Date: Thu, 20 Apr 2023 14:44:52 +0300 Subject: [PATCH 16/27] Squashed commit of the following: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit 670d21b13fb0897783fb077ceb29da769bce9ad6 Merge: dd41ada2 7720f416 Author: AKurakin Date: Wed Apr 19 16:44:12 2023 +0300 Merge branch 'DDL_CLS-275' into dev commit 7720f416996ce4017293940b2dfd79c7cb970d4e Author: AKurakin Date: Wed Apr 19 15:59:48 2023 +0300 http://jira.mfd.msk:8088/browse/CLS-275 DDL (3) часть 3 правки тестов и кода TODO commit 07e4e946de3b5958a2120999cbff7d768e5c82d7 Author: AKurakin Date: Wed Apr 19 15:51:06 2023 +0300 http://jira.mfd.msk:8088/browse/CLS-275 DDL (3) часть 2 доделал тест IMDG commit a1a68d50b21dbea885e5d095e33cdd74bcf87dbb Author: AKurakin Date: Wed Apr 19 13:06:51 2023 +0300 http://jira.mfd.msk:8088/browse/CLS-275 DDL (3) часть 2 переименование STrade -> STrades commit 762ddeacc5bec9a930e7c943dd2328b22c6d53fe Author: AKurakin Date: Wed Apr 19 12:14:04 2023 +0300 http://jira.mfd.msk:8088/browse/CLS-275 DDL (3) часть 1 commit dd41ada2563b2a665dfced1d35af2c61982e6b71 Author: AKurakin Date: Tue Apr 18 16:02:37 2023 +0300 backend-api . CLS-264 CLS-257 commit d7c74b25b1a82d7eff2f9cdda4633b19c82b0188 Author: AKurakin Date: Tue Apr 18 15:57:32 2023 +0300 backend-api http://jira.mfd.msk:8088/browse/CLS-257 /accounting/ commit 32590c00f8507623d9f4629ffdb4bfb80b1e689b Author: AKurakin Date: Tue Apr 18 14:12:41 2023 +0300 backend-api http://jira.mfd.msk:8088/browse/CLS-257 unit-test дополнил, поправил commit 5d75c6f53d8cbaad38e1f8ac8f95640cdf748dc0 Author: AKurakin Date: Tue Apr 18 12:19:29 2023 +0300 backend-api http://jira.mfd.msk:8088/browse/CLS-257 commit a213ca1872701a7261e05d7064d6d5a350ab5e51 Author: AKurakin Date: Mon Apr 17 17:21:33 2023 +0300 backend-api . commit 0ea216fef2c2996c0f30cc721e24596c63489a83 Author: AKurakin Date: Mon Apr 17 17:19:55 2023 +0300 http://jira.mfd.msk:8088/browse/CLS-256 backend-api. Юбилейный 256 таск :) --- .../queue/AbstractQueueController.java | 11 + .../account/AccountBalanceController.java | 1 + .../queue/account/AccountController.java | 56 +- .../queue/account/BankAccountController.java | 4 +- .../account/ClearingAccountController.java | 39 + .../queue/account/DepoAccountController.java | 39 + .../EditClearingMemberCategoryController.java | 2 +- .../company/EditCompanyInfoController.java | 2 +- .../company/EditCompanySymbolController.java | 2 +- .../queue/company/EditContactController.java | 2 +- .../company/ProfileDocumentController.java | 31 +- .../queue/company/RelationController.java | 2 +- .../scheduler/ClearingCalendarController.java | 2 +- .../queue/scheduler/PlannerController.java | 2 +- .../scheduler/PlannerTemplateController.java | 2 +- .../securities/CudCouponPeriodController.java | 43 + .../CudEquitySecurityController.java | 86 + .../CudFixedIncomeCashFlowController.java | 43 + .../CudFixedIncomeSecurityController.java | 86 + .../CudMoneyMarketSecurityController.java | 2 +- .../queue/securities/SecurityController.java | 1 + .../queue/utilities/CudKeyRateController.java | 2 +- .../request/cud/account/AccountNewAction.java | 91 + .../cud/account/AccountUpdateAction.java | 101 + .../cud/company/CompanyInfoUpdateAction.java | 82 +- .../company/ProfileDocumentUpdateAction.java | 95 + .../securities/EquitySecurityNewAction.java | 179 + .../EquitySecurityUpdateAction.java | 184 + .../FixedIncomeSecurityNewAction.java | 246 + .../FixedIncomeSecurityUpdateAction.java | 251 + .../MoneyMarketSecurityNewAction.java | 34 +- .../MoneyMarketSecurityUpdateAction.java | 29 +- .../entity/company/CompanyBackendGetAll.java | 5 - .../company/CompanyBackendInfoGetAll.java | 5 - .../errors/ActionValidationException.java | 6 + .../backendapi/service/IOperator.java | 13 + .../backendapi/service/impl/OperatorImpl.java | 20 + .../src/main/resources/meta/data.xml | 468 +- .../src/main/resources/meta/meta.xml | 269 +- .../queue/AbstractControllerTest.java | 16 +- .../account/AccountBalanceControllerTest.java | 1 + .../queue/account/AccountControllerTest.java | 81 +- .../account/BankAccountControllerTest.java | 8 +- .../ClearingAccountControllerTest.java | 30 + .../account/DepoAccountControllerTest.java | 30 + .../EditCompanyInfoControllerTest.java | 13 +- .../ExecutionDepositControllerTest.java | 9 +- .../InDocumentJournalControllerTest.java | 2 +- .../CudCouponPeriodControllerTest.java | 38 + .../CudEquitySecurityControllerTest.java | 113 + .../CudFixedIncomeCashFlowControllerTest.java | 39 + .../CudFixedIncomeSecurityControllerTest.java | 113 + .../CudMoneyMarketSecurityControllerTest.java | 8 +- .../utilities/CudKeyRateControllerTest.java | 2 +- .../backend-api/src/test/resources/meta.json | 16032 +++++++++------- .../data/execution/ExecutionDeposit.java | 31 +- .../execution/ExecutionDepositHistory.java | 28 + .../statics/data/execution/ExecutionFond.java | 263 + .../data/execution/ExecutionFondHistory.java | 28 + .../classes/statics/data/misc/STrade.java | 189 - .../classes/statics/data/misc/STrades.java | 414 + .../classes/statics/data/misc/Session.java | 45 + .../statics/data/misc/SessionHistory.java | 28 + .../statics/data/profile/CompanyInfo.java | 50 +- .../ru/spcex/clearing/service/Clearing.java | 8 +- .../service/ExecutionDepositComponent.java | 54 +- .../LiabilitiesClaimsAssetsCreator.java | 10 +- .../ExecutionDepositValidationRule.java | 43 +- .../clearing/service/ClearingServiceTest.java | 9 +- .../ExecutionDepositComponentTest.java | 16 +- .../company/service/CompanyInfoService.java | 2 - .../service/CompanyInfoServiceTest.java | 8 +- .../db-scripts/src/main/resources/db/DATA.sql | 42 +- .../db-scripts/src/main/resources/db/DDL.sql | 620 +- .../dictionary/SessionStatusDictionary.java | 11 + .../dictionary/SessionTypeDictionary.java | 11 + .../ExecutionDepositHistoryMapStore.java | 82 + .../ExecutionFondHistoryMapStore.java | 78 + .../businessevent/SessionHistoryMapStore.java | 58 + .../businessobject/ExecutionFondMapStore.java | 114 + .../SessionStatusDictionaryMapStore.java | 31 + .../SessionTypeDictionaryMapStore.java | 31 + .../imdg/object/ExecutionDepositMapStore.java | 50 +- .../clearing/imdg/object/STradeMapStore.java | 94 - .../clearing/imdg/object/STradesMapStore.java | 147 + .../clearing/imdg/object/SessionMapStore.java | 26 +- .../imdg/services/UpdateMapService.java | 2 +- ...bjectAndBusinessEventForCheckMapStore.java | 11 + .../structure/RunnableMapNamesForTesting.java | 144 +- .../clearing/imdg/IMDGDistributedNames.java | 8 +- .../platform/messaging/domain/Consts.java | 3 + .../domain/cud/account/AccountNewRequest.java | 46 + .../cud/account/AccountUpdateRequest.java | 56 + .../cud/company/CompanyInfoUpdateRequest.java | 20 +- .../utils/enumeration/EnumMessage.java | 6 + 95 files changed, 13670 insertions(+), 8320 deletions(-) create mode 100644 clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/account/ClearingAccountController.java create mode 100644 clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/account/DepoAccountController.java create mode 100644 clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/securities/CudCouponPeriodController.java create mode 100644 clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/securities/CudEquitySecurityController.java create mode 100644 clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/securities/CudFixedIncomeCashFlowController.java create mode 100644 clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/securities/CudFixedIncomeSecurityController.java create mode 100644 clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/account/AccountNewAction.java create mode 100644 clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/account/AccountUpdateAction.java create mode 100644 clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/company/ProfileDocumentUpdateAction.java create mode 100644 clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/securities/EquitySecurityNewAction.java create mode 100644 clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/securities/EquitySecurityUpdateAction.java create mode 100644 clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/securities/FixedIncomeSecurityNewAction.java create mode 100644 clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/securities/FixedIncomeSecurityUpdateAction.java create mode 100644 clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/account/ClearingAccountControllerTest.java create mode 100644 clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/account/DepoAccountControllerTest.java create mode 100644 clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/securities/CudCouponPeriodControllerTest.java create mode 100644 clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/securities/CudEquitySecurityControllerTest.java create mode 100644 clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/securities/CudFixedIncomeCashFlowControllerTest.java create mode 100644 clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/securities/CudFixedIncomeSecurityControllerTest.java create mode 100644 clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/execution/ExecutionDepositHistory.java create mode 100644 clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/execution/ExecutionFond.java create mode 100644 clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/execution/ExecutionFondHistory.java delete mode 100644 clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/misc/STrade.java create mode 100644 clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/misc/STrades.java create mode 100644 clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/misc/SessionHistory.java create mode 100644 clearing-parent/dictionary/src/main/java/ru/clearing/platform/dictionary/SessionStatusDictionary.java create mode 100644 clearing-parent/dictionary/src/main/java/ru/clearing/platform/dictionary/SessionTypeDictionary.java create mode 100644 clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/businessevent/ExecutionDepositHistoryMapStore.java create mode 100644 clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/businessevent/ExecutionFondHistoryMapStore.java create mode 100644 clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/businessevent/SessionHistoryMapStore.java create mode 100644 clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/businessobject/ExecutionFondMapStore.java create mode 100644 clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/dictionary/SessionStatusDictionaryMapStore.java create mode 100644 clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/dictionary/SessionTypeDictionaryMapStore.java delete mode 100644 clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/object/STradeMapStore.java create mode 100644 clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/object/STradesMapStore.java create mode 100644 platform-parent/platform-messaging/src/main/java/ru/spcex/clearing/platform/messaging/domain/cud/account/AccountNewRequest.java create mode 100644 platform-parent/platform-messaging/src/main/java/ru/spcex/clearing/platform/messaging/domain/cud/account/AccountUpdateRequest.java diff --git a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/AbstractQueueController.java b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/AbstractQueueController.java index 5718d77e3..15d7d0b4e 100644 --- a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/AbstractQueueController.java +++ b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/AbstractQueueController.java @@ -20,4 +20,15 @@ public class AbstractQueueController { responseToClient.setMessage("success"); return responseToClient; } + + /** + * Для оптимизации передачи userId + */ + protected CudResponse processRequest(String destination, IAction iAction, Long userId) throws ExecutionException, InterruptedException { + CudResponse responseToClient = new CudResponse(); + responseToClient.setPayload(operator.sendRequestToQueue(destination, iAction, userId)); + responseToClient.setCode(0); + responseToClient.setMessage("success"); + return responseToClient; + } } diff --git a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/account/AccountBalanceController.java b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/account/AccountBalanceController.java index e8c954bcc..cfc8b71a0 100644 --- a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/account/AccountBalanceController.java +++ b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/account/AccountBalanceController.java @@ -16,6 +16,7 @@ import ru.spcex.clearing.imdg.IMDGDistributedNames; import java.util.Collection; import java.util.Map; +@Deprecated @Controller @RequestMapping("/account-balances") public class AccountBalanceController { diff --git a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/account/AccountController.java b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/account/AccountController.java index 8aae9a920..12e0b79f9 100644 --- a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/account/AccountController.java +++ b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/account/AccountController.java @@ -1,28 +1,38 @@ package ru.spcex.clearing.backendapi.controller.queue.account; import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.MediaType; import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.*; import ru.clearing.classes.statics.data.account.Account; +import ru.spcex.clearing.backendapi.controller.queue.AbstractQueueController; +import ru.spcex.clearing.backendapi.controller.request.cud.account.AccountNewAction; +import ru.spcex.clearing.backendapi.controller.request.cud.account.AccountUpdateAction; +import ru.spcex.clearing.backendapi.controller.request.cud.common.CommonDeleteAction; +import ru.spcex.clearing.backendapi.controller.response.BasicSpcexResponse; +import ru.spcex.clearing.backendapi.controller.response.cud.CudResponse; import ru.spcex.clearing.backendapi.controller.response.entity.CommonGetAllResponse; +import ru.spcex.clearing.backendapi.service.IOperator; import ru.spcex.clearing.backendapi.service.IStateLoader; import ru.spcex.clearing.imdg.IMDGDistributedNames; +import ru.spcex.clearing.platform.messaging.domain.Consts; import java.util.Collection; import java.util.Map; +import java.util.concurrent.ExecutionException; @Controller @RequestMapping("/accounting/accounts") -public class AccountController { +public class AccountController extends AbstractQueueController { private final IStateLoader stateLoader; @Autowired - public AccountController(IStateLoader stateLoader) { + public AccountController(IOperator operator, IStateLoader stateLoader) { + super(operator); this.stateLoader = stateLoader; } @@ -36,4 +46,40 @@ public class AccountController { response.fromEntity(all); return response; } + + + @ApiOperation(value = "create account.") + @ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CudResponse.class), @ApiResponse(code = 400, message = "Ошибка валидации", response = BasicSpcexResponse.class)}) + @RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) + @ResponseBody + public CudResponse add( + @ApiParam(value = "Параметры команды в JSON формате.", required = true) + @RequestBody AccountNewAction accountNewAction) throws ExecutionException, InterruptedException { + return processRequest(Consts.DESTINATION_ACCOUNT_NEW, accountNewAction); + } + + @ApiOperation(value = "update account.") + @ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CudResponse.class), @ApiResponse(code = 400, message = "Ошибка валидации", response = BasicSpcexResponse.class)}) + @RequestMapping(value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE) + @ResponseBody + public CudResponse update( + @ApiParam(value = "Идентификатор изменяемого объекта.", required = true, example = "1234") + @PathVariable("id") Long id, + @ApiParam(value = "Новые значения полей объекта.", required = true) + @RequestBody AccountUpdateAction accountUpdateAction) throws ExecutionException, InterruptedException { + accountUpdateAction.setId(id); + return processRequest(Consts.DESTINATION_ACCOUNT_UPDATE, accountUpdateAction); + } + + @ApiOperation(value = "delete account.") + @ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CudResponse.class), @ApiResponse(code = 400, message = "Ошибка валидации", response = BasicSpcexResponse.class)}) + @RequestMapping(value = "/{id}", method = RequestMethod.DELETE) + @ResponseBody + public CudResponse delete(@ApiParam(value = "Идентификатор удаляемого объекта", required = true, example = "1234") + @PathVariable("id") Long id) throws ExecutionException, InterruptedException { + CommonDeleteAction deleteAction = new CommonDeleteAction(); + deleteAction.setId(id); + return processRequest(Consts.DESTINATION_ACCOUNT_DELETE, deleteAction); + } + } diff --git a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/account/BankAccountController.java b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/account/BankAccountController.java index b2442db7b..662624850 100644 --- a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/account/BankAccountController.java +++ b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/account/BankAccountController.java @@ -28,7 +28,7 @@ import java.util.Optional; import java.util.concurrent.ExecutionException; @Controller -@RequestMapping("/securities/bank-accounts") +@RequestMapping("/accounting/bank-accounts") public class BankAccountController extends AbstractQueueController { private final IStateLoader stateLoader; @@ -53,7 +53,7 @@ public class BankAccountController extends AbstractQueueController { @RequestMapping(value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE) @ResponseBody public CudResponse update( - @ApiParam(value = "Идентификатор изменяего объекта.", required = true, example = "1234") + @ApiParam(value = "Идентификатор изменяемого объекта.", required = true, example = "1234") @PathVariable("id") Long id, @ApiParam(value = "Новые значения полей объекта.", required = true) @RequestBody BankAccountUpdateAction bankAccountUpdateAction) throws ExecutionException, InterruptedException { diff --git a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/account/ClearingAccountController.java b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/account/ClearingAccountController.java new file mode 100644 index 000000000..4b4491202 --- /dev/null +++ b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/account/ClearingAccountController.java @@ -0,0 +1,39 @@ +package ru.spcex.clearing.backendapi.controller.queue.account; + +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiResponse; +import io.swagger.annotations.ApiResponses; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; +import ru.clearing.classes.statics.data.account.ClearingAccount; +import ru.spcex.clearing.backendapi.controller.response.entity.CommonGetAllResponse; +import ru.spcex.clearing.backendapi.service.IStateLoader; +import ru.spcex.clearing.imdg.IMDGDistributedNames; + +import java.util.Collection; +import java.util.Map; + +@Controller +@RequestMapping("/accounting/clearing-accounts") +public class ClearingAccountController { + private final IStateLoader stateLoader; + + @Autowired + public ClearingAccountController(IStateLoader stateLoader) { + this.stateLoader = stateLoader; + } + + @ApiOperation(value = "get all clearing account.") + @ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CommonGetAllResponse.class)}) + @RequestMapping(method = RequestMethod.GET) + @ResponseBody + public CommonGetAllResponse getAll() { + Collection> all = stateLoader.getAllMetaTransform(IMDGDistributedNames.Map_ClearingAccount, ClearingAccount.class); + CommonGetAllResponse response = new CommonGetAllResponse(); + response.fromEntity(all); + return response; + } +} diff --git a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/account/DepoAccountController.java b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/account/DepoAccountController.java new file mode 100644 index 000000000..9c252536b --- /dev/null +++ b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/account/DepoAccountController.java @@ -0,0 +1,39 @@ +package ru.spcex.clearing.backendapi.controller.queue.account; + +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiResponse; +import io.swagger.annotations.ApiResponses; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; +import ru.clearing.classes.statics.data.account.DepoAccount; +import ru.spcex.clearing.backendapi.controller.response.entity.CommonGetAllResponse; +import ru.spcex.clearing.backendapi.service.IStateLoader; +import ru.spcex.clearing.imdg.IMDGDistributedNames; + +import java.util.Collection; +import java.util.Map; + +@Controller +@RequestMapping("/accounting/depo-accounts") +public class DepoAccountController { + private final IStateLoader stateLoader; + + @Autowired + public DepoAccountController(IStateLoader stateLoader) { + this.stateLoader = stateLoader; + } + + @ApiOperation(value = "get all depo account.") + @ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CommonGetAllResponse.class)}) + @RequestMapping(method = RequestMethod.GET) + @ResponseBody + public CommonGetAllResponse getAll() { + Collection> all = stateLoader.getAllMetaTransform(IMDGDistributedNames.Map_DepoAccount, DepoAccount.class); + CommonGetAllResponse response = new CommonGetAllResponse(); + response.fromEntity(all); + return response; + } +} diff --git a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/company/EditClearingMemberCategoryController.java b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/company/EditClearingMemberCategoryController.java index 8d4f64ae4..dc8b1bd1b 100644 --- a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/company/EditClearingMemberCategoryController.java +++ b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/company/EditClearingMemberCategoryController.java @@ -51,7 +51,7 @@ public class EditClearingMemberCategoryController extends AbstractQueueControlle @RequestMapping(value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE) @ResponseBody public CudResponse update( - @ApiParam(value = "Идентификатор изменяего объекта.", required = true, example = "1234") + @ApiParam(value = "Идентификатор изменяемого объекта.", required = true, example = "1234") @PathVariable("id") Long id, @ApiParam(value = "Новые значения полей объекта.", required = true) @RequestBody ClearingMemberCategoryUpdateAction clearingMemberCategoryUpdateAction) throws ExecutionException, InterruptedException { diff --git a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/company/EditCompanyInfoController.java b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/company/EditCompanyInfoController.java index 65b9e227f..b922132ed 100644 --- a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/company/EditCompanyInfoController.java +++ b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/company/EditCompanyInfoController.java @@ -47,7 +47,7 @@ public class EditCompanyInfoController extends AbstractQueueController { @RequestMapping(value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE) @ResponseBody public CudResponse update( - @ApiParam(value = "Идентификатор изменяего объекта.", required = true, example = "1234") + @ApiParam(value = "Идентификатор изменяемого объекта.", required = true, example = "1234") @PathVariable("id") Long id, @ApiParam(value = "Новые значения полей объекта.", required = true) @RequestBody CompanyInfoUpdateAction companyInfoUpdateAction) throws ExecutionException, InterruptedException { diff --git a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/company/EditCompanySymbolController.java b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/company/EditCompanySymbolController.java index c9c2bd8fd..235599627 100644 --- a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/company/EditCompanySymbolController.java +++ b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/company/EditCompanySymbolController.java @@ -40,7 +40,7 @@ public class EditCompanySymbolController extends AbstractQueueController { @RequestMapping(value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE) @ResponseBody public CudResponse update( - @ApiParam(value = "Идентификатор изменяего объекта.", required = true, example = "1234") + @ApiParam(value = "Идентификатор изменяемого объекта.", required = true, example = "1234") @PathVariable("id") Long id, @ApiParam(value = "Новые значения полей объекта.", required = true) @RequestBody CompanySymbolUpdateAction companySymbolsUpdateAction) throws ExecutionException, InterruptedException { diff --git a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/company/EditContactController.java b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/company/EditContactController.java index 6ac2abd0e..7851b556d 100644 --- a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/company/EditContactController.java +++ b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/company/EditContactController.java @@ -39,7 +39,7 @@ public class EditContactController extends AbstractQueueController { @RequestMapping(value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE) @ResponseBody public CudResponse update( - @ApiParam(value = "Идентификатор изменяего объекта.", required = true, example = "1234") + @ApiParam(value = "Идентификатор изменяемого объекта.", required = true, example = "1234") @PathVariable("id") Long id, @ApiParam(value = "Новые значения полей объекта.", required = true) @RequestBody ContactUpdateAction contactUpdateAction) throws ExecutionException, InterruptedException { diff --git a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/company/ProfileDocumentController.java b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/company/ProfileDocumentController.java index 589051d3c..49778ab9d 100644 --- a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/company/ProfileDocumentController.java +++ b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/company/ProfileDocumentController.java @@ -7,13 +7,12 @@ import io.swagger.annotations.ApiResponses; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.*; import ru.clearing.classes.statics.data.profile.ProfileDocument; import ru.spcex.clearing.backendapi.controller.queue.AbstractQueueController; +import ru.spcex.clearing.backendapi.controller.request.cud.common.CommonDeleteAction; import ru.spcex.clearing.backendapi.controller.request.cud.company.ProfileDocumentNewAction; +import ru.spcex.clearing.backendapi.controller.request.cud.company.ProfileDocumentUpdateAction; import ru.spcex.clearing.backendapi.controller.response.BasicSpcexResponse; import ru.spcex.clearing.backendapi.controller.response.cud.CudResponse; import ru.spcex.clearing.backendapi.controller.response.entity.CommonGetAllResponse; @@ -57,4 +56,28 @@ public class ProfileDocumentController extends AbstractQueueController { @RequestBody ProfileDocumentNewAction profileDocumentNewAction) throws ExecutionException, InterruptedException { return processRequest(Consts.DESTINATION_PROFILE_DOCUMENT_NEW, profileDocumentNewAction); } + + @ApiOperation(value = "update profile document.") + @ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CudResponse.class), @ApiResponse(code = 400, message = "Ошибка валидации", response = BasicSpcexResponse.class)}) + @RequestMapping(value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) + @ResponseBody + public CudResponse update( + @PathVariable("id") Long id, + @ApiParam(value = "Параметры команды в JSON формате.", required = true) + @RequestBody ProfileDocumentUpdateAction profileDocumentUpdateAction) throws ExecutionException, InterruptedException { + profileDocumentUpdateAction.setId(id); + return processRequest(Consts.DESTINATION_PROFILE_DOCUMENT_UPDATE, profileDocumentUpdateAction); + } + + + @ApiOperation(value = "delete profile document.") + @ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CudResponse.class)}) + @RequestMapping(value = "/{id}", method = RequestMethod.DELETE) + @ResponseBody + public CudResponse delete(@ApiParam(value = "Идентификатор удаляемого объекта", required = true, example = "1234") + @PathVariable("id") Long id) throws ExecutionException, InterruptedException { + CommonDeleteAction deleteAction = new CommonDeleteAction(); + deleteAction.setId(id); + return processRequest(Consts.DESTINATION_PROFILE_DOCUMENT_DELETE, deleteAction); + } } diff --git a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/company/RelationController.java b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/company/RelationController.java index a222c4238..cb9dd28c3 100644 --- a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/company/RelationController.java +++ b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/company/RelationController.java @@ -51,7 +51,7 @@ public class RelationController extends AbstractQueueController { @RequestMapping(value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE) @ResponseBody public CudResponse update( - @ApiParam(value = "Идентификатор изменяего объекта.", required = true, example = "1234") + @ApiParam(value = "Идентификатор изменяемого объекта.", required = true, example = "1234") @PathVariable("id") Long id, @ApiParam(value = "Новые значения полей объекта.", required = true) @RequestBody RelationUpdateAction relationUpdateAction) throws ExecutionException, InterruptedException { diff --git a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/scheduler/ClearingCalendarController.java b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/scheduler/ClearingCalendarController.java index 1f7100e1a..c2a7d5261 100644 --- a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/scheduler/ClearingCalendarController.java +++ b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/scheduler/ClearingCalendarController.java @@ -62,7 +62,7 @@ public class ClearingCalendarController extends AbstractQueueController { @RequestMapping(value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE) @ResponseBody public CudResponse update( - @ApiParam(value = "Идентификатор изменяего объекта.", required = true, example = "1234") + @ApiParam(value = "Идентификатор изменяемого объекта.", required = true, example = "1234") @PathVariable("id") Long id, @ApiParam(value = "Новые значения полей объекта.", required = true) @RequestBody ClearingCalendarUpdateAction clearingCalendarUpdateAction) throws ExecutionException, InterruptedException { diff --git a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/scheduler/PlannerController.java b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/scheduler/PlannerController.java index 20f8badbd..ddc9eaacc 100644 --- a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/scheduler/PlannerController.java +++ b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/scheduler/PlannerController.java @@ -62,7 +62,7 @@ public class PlannerController extends AbstractQueueController { @RequestMapping(value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE) @ResponseBody public CudResponse update( - @ApiParam(value = "Идентификатор изменяего объекта.", required = true, example = "1234") + @ApiParam(value = "Идентификатор изменяемого объекта.", required = true, example = "1234") @PathVariable("id") Long id, @ApiParam(value = "Новые значения полей объекта.", required = true) @RequestBody PlannerUpdateAction plannerUpdateAction) throws ExecutionException, InterruptedException { diff --git a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/scheduler/PlannerTemplateController.java b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/scheduler/PlannerTemplateController.java index ad33f6d34..a3124e4ed 100644 --- a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/scheduler/PlannerTemplateController.java +++ b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/scheduler/PlannerTemplateController.java @@ -62,7 +62,7 @@ public class PlannerTemplateController extends AbstractQueueController { @RequestMapping(value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE) @ResponseBody public CudResponse update( - @ApiParam(value = "Идентификатор изменяего объекта.", required = true, example = "1234") + @ApiParam(value = "Идентификатор изменяемого объекта.", required = true, example = "1234") @PathVariable("id") Long id, @ApiParam(value = "Новые значения полей объекта.", required = true) @RequestBody PlannerTemplateUpdateAction plannerTemplateUpdateAction) throws ExecutionException, InterruptedException { diff --git a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/securities/CudCouponPeriodController.java b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/securities/CudCouponPeriodController.java new file mode 100644 index 000000000..cc6de3e0c --- /dev/null +++ b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/securities/CudCouponPeriodController.java @@ -0,0 +1,43 @@ +package ru.spcex.clearing.backendapi.controller.queue.securities; + +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiResponse; +import io.swagger.annotations.ApiResponses; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; +import ru.clearing.classes.statics.data.instrument.issue.CouponPeriod; +import ru.spcex.clearing.backendapi.controller.queue.AbstractQueueController; +import ru.spcex.clearing.backendapi.controller.response.entity.CommonGetAllResponse; +import ru.spcex.clearing.backendapi.service.IOperator; +import ru.spcex.clearing.backendapi.service.IStateLoader; +import ru.spcex.clearing.imdg.IMDGDistributedNames; + +import java.util.Collection; +import java.util.Map; + +@Controller +@RequestMapping("/securities/coupon-period-securities") +public class CudCouponPeriodController extends AbstractQueueController { + private final IStateLoader stateLoader; + + @Autowired + public CudCouponPeriodController(IOperator operator, IStateLoader stateLoader) { + super(operator); + this.stateLoader = stateLoader; + } + + @ApiOperation(value = "get all coupon periods.") + @ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CommonGetAllResponse.class)}) + @RequestMapping(method = RequestMethod.GET) + @ResponseBody + public CommonGetAllResponse getAll() { + Collection> all = stateLoader.getAllMetaTransform(IMDGDistributedNames.Map_CouponPeriod, + CouponPeriod.class); + CommonGetAllResponse response = new CommonGetAllResponse(); + response.fromEntity(all); + return response; + } +} diff --git a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/securities/CudEquitySecurityController.java b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/securities/CudEquitySecurityController.java new file mode 100644 index 000000000..39579df45 --- /dev/null +++ b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/securities/CudEquitySecurityController.java @@ -0,0 +1,86 @@ +package ru.spcex.clearing.backendapi.controller.queue.securities; + +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import io.swagger.annotations.ApiResponse; +import io.swagger.annotations.ApiResponses; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.MediaType; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; +import ru.clearing.classes.statics.data.instrument.issue.EquitySecurity; +import ru.spcex.clearing.backendapi.controller.queue.AbstractQueueController; +import ru.spcex.clearing.backendapi.controller.request.cud.common.CommonDeleteAction; +import ru.spcex.clearing.backendapi.controller.request.cud.securities.EquitySecurityNewAction; +import ru.spcex.clearing.backendapi.controller.request.cud.securities.EquitySecurityUpdateAction; +import ru.spcex.clearing.backendapi.controller.response.BasicSpcexResponse; +import ru.spcex.clearing.backendapi.controller.response.cud.CudResponse; +import ru.spcex.clearing.backendapi.controller.response.entity.CommonGetAllResponse; +import ru.spcex.clearing.backendapi.service.IOperator; +import ru.spcex.clearing.backendapi.service.IStateLoader; +import ru.spcex.clearing.imdg.IMDGDistributedNames; +import ru.spcex.clearing.platform.messaging.domain.Consts; +import ru.spcex.platform.enumeration.Status; + +import java.util.Collection; +import java.util.Map; +import java.util.concurrent.ExecutionException; + +@Controller +@RequestMapping("/securities/equity-securities") +public class CudEquitySecurityController extends AbstractQueueController { + private final IStateLoader stateLoader; + + @Autowired + public CudEquitySecurityController(IOperator operator, IStateLoader stateLoader) { + super(operator); + this.stateLoader = stateLoader; + } + + @ApiOperation(value = "create equity security.") + @ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CudResponse.class), @ApiResponse(code = 400, message = "Ошибка валидации", response = BasicSpcexResponse.class)}) + @RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) + @ResponseBody + public CudResponse add( + @ApiParam(value = "Параметры команды в JSON формате.", required = true) + @RequestBody EquitySecurityNewAction equitySecurityNewAction) throws ExecutionException, InterruptedException { + return processRequest(Consts.DESTINATION_EQUITY_SECURITY_NEW, equitySecurityNewAction); + } + + @ApiOperation(value = "update equity security.") + @ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CudResponse.class), @ApiResponse(code = 400, message = "Ошибка валидации", response = BasicSpcexResponse.class)}) + @RequestMapping(value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE) + @ResponseBody + public CudResponse update( + @ApiParam(value = "Идентификатор изменяемого объекта.", required = true, example = "1234") + @PathVariable("id") Long id, + @ApiParam(value = "Новые значения полей объекта.", required = true) + @RequestBody EquitySecurityUpdateAction equitySecurityUpdateAction) throws ExecutionException, InterruptedException { + equitySecurityUpdateAction.setId(id); + return processRequest(Consts.DESTINATION_EQUITY_SECURITY_UPDATE, equitySecurityUpdateAction); + } + + @ApiOperation(value = "delete equity security.") + @ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CudResponse.class), @ApiResponse(code = 400, message = "Ошибка валидации", response = BasicSpcexResponse.class)}) + @RequestMapping(value = "/{id}", method = RequestMethod.DELETE) + @ResponseBody + public CudResponse delete(@ApiParam(value = "Идентификатор удаляемого объекта", required = true, example = "1234") + @PathVariable("id") Long id) throws ExecutionException, InterruptedException { + CommonDeleteAction deleteAction = new CommonDeleteAction(); + deleteAction.setId(id); + return processRequest(Consts.DESTINATION_EQUITY_SECURITY_DELETE, deleteAction); + } + + @ApiOperation(value = "get all equity securities.") + @ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CommonGetAllResponse.class)}) + @RequestMapping(method = RequestMethod.GET) + @ResponseBody + public CommonGetAllResponse getAll() { + Collection> all = stateLoader.getAllMetaTransform(IMDGDistributedNames.Map_EquitySecurity, + EquitySecurity.class, + Map.of("workflowStatus", Status.Active.getKey())); + CommonGetAllResponse response = new CommonGetAllResponse(); + response.fromEntity(all); + return response; + } +} diff --git a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/securities/CudFixedIncomeCashFlowController.java b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/securities/CudFixedIncomeCashFlowController.java new file mode 100644 index 000000000..2a088010c --- /dev/null +++ b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/securities/CudFixedIncomeCashFlowController.java @@ -0,0 +1,43 @@ +package ru.spcex.clearing.backendapi.controller.queue.securities; + +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiResponse; +import io.swagger.annotations.ApiResponses; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; +import ru.clearing.classes.statics.data.instrument.issue.FixedIncomeCashFlow; +import ru.spcex.clearing.backendapi.controller.queue.AbstractQueueController; +import ru.spcex.clearing.backendapi.controller.response.entity.CommonGetAllResponse; +import ru.spcex.clearing.backendapi.service.IOperator; +import ru.spcex.clearing.backendapi.service.IStateLoader; +import ru.spcex.clearing.imdg.IMDGDistributedNames; + +import java.util.Collection; +import java.util.Map; + +@Controller +@RequestMapping("/securities/fixed-income-cash-flow-securities") +public class CudFixedIncomeCashFlowController extends AbstractQueueController { + private final IStateLoader stateLoader; + + @Autowired + public CudFixedIncomeCashFlowController(IOperator operator, IStateLoader stateLoader) { + super(operator); + this.stateLoader = stateLoader; + } + + @ApiOperation(value = "get all fixed income cash flow securities.") + @ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CommonGetAllResponse.class)}) + @RequestMapping(method = RequestMethod.GET) + @ResponseBody + public CommonGetAllResponse getAll() { + Collection> all = stateLoader.getAllMetaTransform(IMDGDistributedNames.Map_FixedIncomeCashFlow, + FixedIncomeCashFlow.class); + CommonGetAllResponse response = new CommonGetAllResponse(); + response.fromEntity(all); + return response; + } +} diff --git a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/securities/CudFixedIncomeSecurityController.java b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/securities/CudFixedIncomeSecurityController.java new file mode 100644 index 000000000..7bb82f98c --- /dev/null +++ b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/securities/CudFixedIncomeSecurityController.java @@ -0,0 +1,86 @@ +package ru.spcex.clearing.backendapi.controller.queue.securities; + +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import io.swagger.annotations.ApiResponse; +import io.swagger.annotations.ApiResponses; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.MediaType; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; +import ru.clearing.classes.statics.data.instrument.issue.FixedIncomeSecurity; +import ru.spcex.clearing.backendapi.controller.queue.AbstractQueueController; +import ru.spcex.clearing.backendapi.controller.request.cud.common.CommonDeleteAction; +import ru.spcex.clearing.backendapi.controller.request.cud.securities.FixedIncomeSecurityNewAction; +import ru.spcex.clearing.backendapi.controller.request.cud.securities.FixedIncomeSecurityUpdateAction; +import ru.spcex.clearing.backendapi.controller.response.BasicSpcexResponse; +import ru.spcex.clearing.backendapi.controller.response.cud.CudResponse; +import ru.spcex.clearing.backendapi.controller.response.entity.CommonGetAllResponse; +import ru.spcex.clearing.backendapi.service.IOperator; +import ru.spcex.clearing.backendapi.service.IStateLoader; +import ru.spcex.clearing.imdg.IMDGDistributedNames; +import ru.spcex.clearing.platform.messaging.domain.Consts; +import ru.spcex.platform.enumeration.Status; + +import java.util.Collection; +import java.util.Map; +import java.util.concurrent.ExecutionException; + +@Controller +@RequestMapping("/securities/fixed-income-securities") +public class CudFixedIncomeSecurityController extends AbstractQueueController { + private final IStateLoader stateLoader; + + @Autowired + public CudFixedIncomeSecurityController(IOperator operator, IStateLoader stateLoader) { + super(operator); + this.stateLoader = stateLoader; + } + + @ApiOperation(value = "create fixed income security.") + @ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CudResponse.class), @ApiResponse(code = 400, message = "Ошибка валидации", response = BasicSpcexResponse.class)}) + @RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) + @ResponseBody + public CudResponse add( + @ApiParam(value = "Параметры команды в JSON формате.", required = true) + @RequestBody FixedIncomeSecurityNewAction fixedIncomeSecurityNewAction) throws ExecutionException, InterruptedException { + return processRequest(Consts.DESTINATION_FIXED_INCOME_SECURITY_NEW, fixedIncomeSecurityNewAction); + } + + @ApiOperation(value = "update fixed income security.") + @ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CudResponse.class), @ApiResponse(code = 400, message = "Ошибка валидации", response = BasicSpcexResponse.class)}) + @RequestMapping(value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE) + @ResponseBody + public CudResponse update( + @ApiParam(value = "Идентификатор изменяемого объекта.", required = true, example = "1234") + @PathVariable("id") Long id, + @ApiParam(value = "Новые значения полей объекта.", required = true) + @RequestBody FixedIncomeSecurityUpdateAction fixedIncomeSecurityUpdateAction) throws ExecutionException, InterruptedException { + fixedIncomeSecurityUpdateAction.setId(id); + return processRequest(Consts.DESTINATION_FIXED_INCOME_SECURITY_UPDATE, fixedIncomeSecurityUpdateAction); + } + + @ApiOperation(value = "delete fixed income security.") + @ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CudResponse.class), @ApiResponse(code = 400, message = "Ошибка валидации", response = BasicSpcexResponse.class)}) + @RequestMapping(value = "/{id}", method = RequestMethod.DELETE) + @ResponseBody + public CudResponse delete(@ApiParam(value = "Идентификатор удаляемого объекта", required = true, example = "1234") + @PathVariable("id") Long id) throws ExecutionException, InterruptedException { + CommonDeleteAction deleteAction = new CommonDeleteAction(); + deleteAction.setId(id); + return processRequest(Consts.DESTINATION_FIXED_INCOME_SECURITY_DELETE, deleteAction); + } + + @ApiOperation(value = "get all equity securities.") + @ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CommonGetAllResponse.class)}) + @RequestMapping(method = RequestMethod.GET) + @ResponseBody + public CommonGetAllResponse getAll() { + Collection> all = stateLoader.getAllMetaTransform(IMDGDistributedNames.Map_FixedIncomeSecurity, + FixedIncomeSecurity.class, + Map.of("workflowStatus", Status.Active.getKey())); + CommonGetAllResponse response = new CommonGetAllResponse(); + response.fromEntity(all); + return response; + } +} diff --git a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/securities/CudMoneyMarketSecurityController.java b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/securities/CudMoneyMarketSecurityController.java index 197c0fe52..d1709ade9 100644 --- a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/securities/CudMoneyMarketSecurityController.java +++ b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/securities/CudMoneyMarketSecurityController.java @@ -52,7 +52,7 @@ public class CudMoneyMarketSecurityController extends AbstractQueueController { @RequestMapping(value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE) @ResponseBody public CudResponse update( - @ApiParam(value = "Идентификатор изменяего объекта.", required = true, example = "1234") + @ApiParam(value = "Идентификатор изменяемого объекта.", required = true, example = "1234") @PathVariable("id") Long id, @ApiParam(value = "Новые значения полей объекта.", required = true) @RequestBody MoneyMarketSecurityUpdateAction moneySecurityUpdateAction) throws ExecutionException, InterruptedException { diff --git a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/securities/SecurityController.java b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/securities/SecurityController.java index 26bcd009d..18856e186 100644 --- a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/securities/SecurityController.java +++ b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/securities/SecurityController.java @@ -16,6 +16,7 @@ import ru.spcex.clearing.imdg.IMDGDistributedNames; import java.util.Collection; import java.util.Map; +@Deprecated //todo не лишний ли этот контроллер? См. CudMoneyMarketSecurityController @Deprecated @Controller @RequestMapping("/securities") public class SecurityController { diff --git a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/utilities/CudKeyRateController.java b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/utilities/CudKeyRateController.java index 903fb1740..08b6fe8cc 100644 --- a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/utilities/CudKeyRateController.java +++ b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/utilities/CudKeyRateController.java @@ -51,7 +51,7 @@ public class CudKeyRateController extends AbstractQueueController { @RequestMapping(value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE) @ResponseBody public CudResponse update( - @ApiParam(value = "Идентификатор изменяего объекта.", required = true, example = "1234") + @ApiParam(value = "Идентификатор изменяемого объекта.", required = true, example = "1234") @PathVariable("id") Long id, @ApiParam(value = "Новые значения полей объекта.", required = true) @RequestBody KeyRateUpdateAction keyRateUpdateAction) throws ExecutionException, InterruptedException { diff --git a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/account/AccountNewAction.java b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/account/AccountNewAction.java new file mode 100644 index 000000000..b82832d29 --- /dev/null +++ b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/account/AccountNewAction.java @@ -0,0 +1,91 @@ +package ru.spcex.clearing.backendapi.controller.request.cud.account; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.annotations.ApiModelProperty; +import org.springframework.util.StringUtils; +import ru.spcex.clearing.backendapi.domain.actions.IAction; +import ru.spcex.clearing.backendapi.errors.BackEndError; +import ru.spcex.clearing.platform.messaging.domain.ActionType; +import ru.spcex.clearing.platform.messaging.domain.cud.account.AccountNewRequest; +import ru.spcex.platform.utils.enumeration.EnumMessage; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; + +public class AccountNewAction implements IAction { + + @ApiModelProperty(value = "Наименование компании", example = "1200") + @JsonProperty + private Long companyId; + @ApiModelProperty(value = "Номер счета", example = "A30101111111111111776") + @JsonProperty + private String account; + @ApiModelProperty(value = "Наименование статуса", example = "ACTV") + @JsonProperty + private String status; + @ApiModelProperty(value = "Наименование типа счета", example = "CLRN") + @JsonProperty + private String accountType; + + @Override + public Collection validate() { + List errors = new ArrayList<>(); + if (this.companyId == null) + errors.add(new EnumMessage(BackEndError.ValidationError, "companyId")); + if (!StringUtils.hasLength(this.account)) + errors.add(new EnumMessage(BackEndError.ValidationError, "account")); + if (!StringUtils.hasLength(this.accountType)) + errors.add(new EnumMessage(BackEndError.ValidationError, "accountType")); + return errors.isEmpty() ? Collections.emptyList() : errors; + } + + @Override + public AccountNewRequest toRequest() { + var req = new AccountNewRequest(); + req.setCompanyId(this.companyId); + req.setAccount(this.account); + req.setStatus(this.status); + req.setAccountType(this.accountType); + return req; + } + + @ApiModelProperty(hidden = true) + @Override + public ActionType getActionType() { + return ActionType.NEW; + } + + public Long getCompanyId() { + return companyId; + } + + public void setCompanyId(Long companyId) { + this.companyId = companyId; + } + + public String getAccount() { + return account; + } + + public void setAccount(String account) { + this.account = account; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getAccountType() { + return accountType; + } + + public void setAccountType(String accountType) { + this.accountType = accountType; + } +} diff --git a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/account/AccountUpdateAction.java b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/account/AccountUpdateAction.java new file mode 100644 index 000000000..9bbabc425 --- /dev/null +++ b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/account/AccountUpdateAction.java @@ -0,0 +1,101 @@ +package ru.spcex.clearing.backendapi.controller.request.cud.account; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.annotations.ApiModelProperty; +import org.springframework.util.StringUtils; +import ru.spcex.clearing.backendapi.domain.actions.IAction; +import ru.spcex.clearing.backendapi.errors.BackEndError; +import ru.spcex.clearing.platform.messaging.domain.ActionType; +import ru.spcex.clearing.platform.messaging.domain.cud.account.AccountUpdateRequest; +import ru.spcex.platform.utils.enumeration.EnumMessage; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; + +public class AccountUpdateAction implements IAction { + + @ApiModelProperty(hidden = true) + @JsonProperty + public Long id; + @ApiModelProperty(value = "Наименование компании", example = "1200") + @JsonProperty + private Long companyId; + @ApiModelProperty(value = "Номер счета", example = "A30101111111111111776") + @JsonProperty + private String account; + @ApiModelProperty(value = "Наименование статуса", example = "ACTV") + @JsonProperty + private String status; + @ApiModelProperty(value = "Наименование типа счета", example = "CLRN") + @JsonProperty + private String accountType; + + @Override + public Collection validate() { + List errors = new ArrayList<>(); + if (this.id == null) + errors.add(new EnumMessage(BackEndError.ValidationError, "id")); + if (!StringUtils.hasLength(this.accountType)) + errors.add(new EnumMessage(BackEndError.ValidationError, "accountType")); + return errors.isEmpty() ? Collections.emptyList() : errors; + } + + @Override + public AccountUpdateRequest toRequest() { + var req = new AccountUpdateRequest(); + req.setId(this.id); + req.setCompanyId(this.companyId); + req.setAccount(this.account); + req.setStatus(this.status); + req.setAccountType(this.accountType); + return req; + } + + @ApiModelProperty(hidden = true) + @Override + public ActionType getActionType() { + return ActionType.UPDATE; + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getCompanyId() { + return companyId; + } + + public void setCompanyId(Long companyId) { + this.companyId = companyId; + } + + public String getAccount() { + return account; + } + + public void setAccount(String account) { + this.account = account; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getAccountType() { + return accountType; + } + + public void setAccountType(String accountType) { + this.accountType = accountType; + } +} diff --git a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/company/CompanyInfoUpdateAction.java b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/company/CompanyInfoUpdateAction.java index 45ebfbe06..e9ec48c61 100644 --- a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/company/CompanyInfoUpdateAction.java +++ b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/company/CompanyInfoUpdateAction.java @@ -11,45 +11,42 @@ public class CompanyInfoUpdateAction implements IAction { + @ApiModelProperty(hidden = true) + @JsonProperty + private Long id; + @ApiModelProperty(value = "Идентификатор Компании", example = "123") + @JsonProperty + private Long companyId; + @ApiModelProperty(value = "Идентификатор типа документа", example = "ABCD") + @JsonProperty + private String documentType; + @ApiModelProperty(value = "Дата выдачи", example = "2022-12-25") + @JsonSerialize(using = LocalDateSerializer.class) + @JsonDeserialize(using = LocalDateDeserializer.class) + @JsonProperty + private LocalDate issueDate; + @ApiModelProperty(value = "Место выдачи", example = "Example string") + @JsonProperty + private String issuePlace; + @ApiModelProperty(value = "Кем выдан", example = "Example string") + @JsonProperty + private String issuer; + @ApiModelProperty(value = "Код выдавшего органа", example = "Example string") + @JsonProperty + private String issuerCode; + @ApiModelProperty(value = "Наименование", example = "Example string") + @JsonProperty + private String name; + @ApiModelProperty(value = "Номер", example = "Example string") + @JsonProperty + private String number; + @ApiModelProperty(value = "Место", example = "Example string") + @JsonProperty + private String place; + @ApiModelProperty(value = "Дата начала срока действия", example = "2022-12-25") + @JsonSerialize(using = LocalDateSerializer.class) + @JsonDeserialize(using = LocalDateDeserializer.class) + @JsonProperty + private LocalDate validFromDate; + @ApiModelProperty(value = "Дата окончания срока действия", example = "2022-12-25") + @JsonSerialize(using = LocalDateSerializer.class) + @JsonDeserialize(using = LocalDateDeserializer.class) + @JsonProperty + private LocalDate validToDate; + @ApiModelProperty(value = "Ссылка на документ", example = "Example string") + @JsonProperty + private String link; + + @Override + public ProfileDocumentUpdateRequest toRequest() { + ProfileDocumentUpdateRequest request = new ProfileDocumentUpdateRequest(); + request.setId(this.id); + request.setCompanyId(this.companyId); + request.setDocumentType(this.documentType); + request.setIssueDate(this.issueDate); + request.setIssuePlace(this.issuePlace); + request.setIssuer(this.issuer); + request.setIssuerCode(this.issuerCode); + request.setName(this.name); + request.setNumber(this.number); + request.setPlace(this.place); + request.setValidFromDate(this.validFromDate); + request.setValidToDate(this.validToDate); + request.setLink(this.link); + return request; + } + + @ApiModelProperty(hidden = true) + @Override + public ActionType getActionType() { + return ActionType.UPDATE; + } + + @ApiModelProperty(hidden = true) + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } +} diff --git a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/securities/EquitySecurityNewAction.java b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/securities/EquitySecurityNewAction.java new file mode 100644 index 000000000..eb062b3af --- /dev/null +++ b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/securities/EquitySecurityNewAction.java @@ -0,0 +1,179 @@ +package ru.spcex.clearing.backendapi.controller.request.cud.securities; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.annotations.ApiModelProperty; +import ru.spcex.clearing.backendapi.domain.actions.IAction; +import ru.spcex.clearing.backendapi.errors.BackEndError; +import ru.spcex.clearing.platform.messaging.domain.ActionType; +import ru.spcex.clearing.platform.messaging.domain.cud.securitites.EquitySecurityNewRequest; +import ru.spcex.platform.classes.base.interfaces.WithSecuritySymbol; +import ru.spcex.platform.utils.enumeration.EnumMessage; +import ru.spcex.platform.utils.text.TextUtil; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; + +public class EquitySecurityNewAction implements IAction, WithSecuritySymbol { + @ApiModelProperty(value = "Код инструмента", example = "ABSDEFJ") + @JsonProperty + public String securitySymbol; + @ApiModelProperty(value = "Краткое наименование инструмента", example = "ABSDE") + @JsonProperty + public String shortName; + @ApiModelProperty(value = "Полное наименование инструмента", example = "Treasury bills") + @JsonProperty + public String fullName; + @ApiModelProperty(value = "Наименование инструмента ISIN", example = "AFLT") + @JsonProperty + public String isin; + @ApiModelProperty(value = "Код типа акции", example = "S") + @JsonProperty + public String shareType; + @ApiModelProperty(value = "Размер лота", example = "300.5") + @JsonProperty + public BigDecimal lotSize; + @ApiModelProperty(value = "Наименование эмитента (company)", example = "123") + @JsonProperty + public Long issuerId; + @ApiModelProperty(value = "Краткое наименование инструмента на английском", example = "Aero LLC") + @JsonProperty + public String shortNameEng; + @ApiModelProperty(value = "Полное наименование инструмента на английском", example = "Aero floating Limited local Company") + @JsonProperty + public String fullNameEng; + @ApiModelProperty(value = "Наименование статуса", example = "ACTV") + @JsonProperty + public String workflowStatus; + @ApiModelProperty(value = "Наименование типа инструмента", example = "EQTY") + @JsonProperty + public String instrumentType; + + @Override + public Collection validate() { + List errors = new ArrayList<>(); + if (TextUtil.isEmpty(shortName)) + errors.add(new EnumMessage(BackEndError.ValidationError, "shortName")); + if (TextUtil.isEmpty(securitySymbol)) + errors.add(new EnumMessage(BackEndError.ValidationError, "securitySymbol")); + if (lotSize == null) + errors.add(new EnumMessage(BackEndError.ValidationError, "lotSize")); + if (TextUtil.isEmpty(instrumentType)) + errors.add(new EnumMessage(BackEndError.ValidationError, "instrumentType")); + return errors.size() > 0 ? errors : Collections.emptyList(); + } + + @Override + public EquitySecurityNewRequest toRequest() { + var req = new EquitySecurityNewRequest(); + req.setSecuritySymbol(this.getSecuritySymbol()); + req.setShortName(this.getShortName()); + req.setFullName(this.getFullName()); + req.setIsin(this.getIsin()); + req.setShareType(this.getShareType()); + req.setLotSize(this.getLotSize()); + req.setIssuerId(this.getIssuerId()); + req.setShortNameEng(this.getShortNameEng()); + req.setFullNameEng(this.getFullNameEng()); + req.setWorkflowStatus(this.getWorkflowStatus()); + req.setInstrumentType(this.getInstrumentType()); + return req; + } + + @ApiModelProperty(hidden = true) + @Override + public ActionType getActionType() { + return ActionType.NEW; + } + + @Override + public String getSecuritySymbol() { + return securitySymbol; + } + + public void setSecuritySymbol(String securitySymbol) { + this.securitySymbol = securitySymbol; + } + + public String getShortName() { + return shortName; + } + + public void setShortName(String shortName) { + this.shortName = shortName; + } + + public String getFullName() { + return fullName; + } + + public void setFullName(String fullName) { + this.fullName = fullName; + } + + public String getIsin() { + return isin; + } + + public void setIsin(String isin) { + this.isin = isin; + } + + public String getShareType() { + return shareType; + } + + public void setShareType(String shareType) { + this.shareType = shareType; + } + + public BigDecimal getLotSize() { + return lotSize; + } + + public void setLotSize(BigDecimal lotSize) { + this.lotSize = lotSize; + } + + public Long getIssuerId() { + return issuerId; + } + + public void setIssuerId(Long issuerId) { + this.issuerId = issuerId; + } + + public String getShortNameEng() { + return shortNameEng; + } + + public void setShortNameEng(String shortNameEng) { + this.shortNameEng = shortNameEng; + } + + public String getFullNameEng() { + return fullNameEng; + } + + public void setFullNameEng(String fullNameEng) { + this.fullNameEng = fullNameEng; + } + + public String getWorkflowStatus() { + return workflowStatus; + } + + public void setWorkflowStatus(String workflowStatus) { + this.workflowStatus = workflowStatus; + } + + public String getInstrumentType() { + return instrumentType; + } + + public void setInstrumentType(String instrumentType) { + this.instrumentType = instrumentType; + } +} diff --git a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/securities/EquitySecurityUpdateAction.java b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/securities/EquitySecurityUpdateAction.java new file mode 100644 index 000000000..b60c07046 --- /dev/null +++ b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/securities/EquitySecurityUpdateAction.java @@ -0,0 +1,184 @@ +package ru.spcex.clearing.backendapi.controller.request.cud.securities; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.annotations.ApiModelProperty; +import ru.spcex.clearing.backendapi.domain.actions.IAction; +import ru.spcex.clearing.backendapi.errors.BackEndError; +import ru.spcex.clearing.platform.messaging.domain.ActionType; +import ru.spcex.clearing.platform.messaging.domain.cud.securitites.EquitySecurityUpdateRequest; +import ru.spcex.platform.classes.base.interfaces.WithSecuritySymbol; +import ru.spcex.platform.utils.enumeration.EnumMessage; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; + +public class EquitySecurityUpdateAction implements IAction, WithSecuritySymbol { + @ApiModelProperty(hidden = true) + @JsonProperty + public Long id; + @ApiModelProperty(value = "Код инструмента", example = "ABSDEFJ") + @JsonProperty + public String securitySymbol; + @ApiModelProperty(value = "Краткое наименование инструмента", example = "ABSDE") + @JsonProperty + public String shortName; + @ApiModelProperty(value = "Полное наименование инструмента", example = "Treasury bills") + @JsonProperty + public String fullName; + @ApiModelProperty(value = "Наименование инструмента ISIN", example = "AFLT") + @JsonProperty + public String isin; + @ApiModelProperty(value = "Код типа акции", example = "S") + @JsonProperty + public String shareType; + @ApiModelProperty(value = "Размер лота", example = "300.5") + @JsonProperty + public BigDecimal lotSize; + @ApiModelProperty(value = "Наименование эмитента (company)", example = "123") + @JsonProperty + public Long issuerId; + @ApiModelProperty(value = "Краткое наименование инструмента на английском", example = "Aero LLC") + @JsonProperty + public String shortNameEng; + @ApiModelProperty(value = "Полное наименование инструмента на английском", example = "Aero floating Limited local Company") + @JsonProperty + public String fullNameEng; + @ApiModelProperty(value = "Наименование статуса", example = "ACTV") + @JsonProperty + public String workflowStatus; + @ApiModelProperty(value = "Наименование типа инструмента", example = "EQTY") + @JsonProperty + public String instrumentType; + + @Override + public Collection validate() { + List errors = new ArrayList<>(); + if (id == null) + errors.add(new EnumMessage(BackEndError.ValidationError, "id")); + return errors.size() > 0 ? errors : Collections.emptyList(); + } + + @Override + public EquitySecurityUpdateRequest toRequest() { + var req = new EquitySecurityUpdateRequest(); + req.setId(this.getId()); + req.setSecuritySymbol(this.getSecuritySymbol()); + req.setShortName(this.getShortName()); + req.setFullName(this.getFullName()); + req.setIsin(this.getIsin()); + req.setShareType(this.getShareType()); + req.setLotSize(this.getLotSize()); + req.setIssuerId(this.getIssuerId()); + req.setShortNameEng(this.getShortNameEng()); + req.setFullNameEng(this.getFullNameEng()); + req.setWorkflowStatus(this.getWorkflowStatus()); + req.setInstrumentType(this.getInstrumentType()); + return req; + } + + @ApiModelProperty(hidden = true) + @Override + public ActionType getActionType() { + return ActionType.UPDATE; + } + + @Override + public String getSecuritySymbol() { + return securitySymbol; + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public void setSecuritySymbol(String securitySymbol) { + this.securitySymbol = securitySymbol; + } + + public String getShortName() { + return shortName; + } + + public void setShortName(String shortName) { + this.shortName = shortName; + } + + public String getFullName() { + return fullName; + } + + public void setFullName(String fullName) { + this.fullName = fullName; + } + + public String getIsin() { + return isin; + } + + public void setIsin(String isin) { + this.isin = isin; + } + + public String getShareType() { + return shareType; + } + + public void setShareType(String shareType) { + this.shareType = shareType; + } + + public BigDecimal getLotSize() { + return lotSize; + } + + public void setLotSize(BigDecimal lotSize) { + this.lotSize = lotSize; + } + + public Long getIssuerId() { + return issuerId; + } + + public void setIssuerId(Long issuerId) { + this.issuerId = issuerId; + } + + public String getShortNameEng() { + return shortNameEng; + } + + public void setShortNameEng(String shortNameEng) { + this.shortNameEng = shortNameEng; + } + + public String getFullNameEng() { + return fullNameEng; + } + + public void setFullNameEng(String fullNameEng) { + this.fullNameEng = fullNameEng; + } + + public String getWorkflowStatus() { + return workflowStatus; + } + + public void setWorkflowStatus(String workflowStatus) { + this.workflowStatus = workflowStatus; + } + + public String getInstrumentType() { + return instrumentType; + } + + public void setInstrumentType(String instrumentType) { + this.instrumentType = instrumentType; + } +} diff --git a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/securities/FixedIncomeSecurityNewAction.java b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/securities/FixedIncomeSecurityNewAction.java new file mode 100644 index 000000000..0832d6846 --- /dev/null +++ b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/securities/FixedIncomeSecurityNewAction.java @@ -0,0 +1,246 @@ +package ru.spcex.clearing.backendapi.controller.request.cud.securities; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.swagger.annotations.ApiModelProperty; +import ru.spcex.clearing.backendapi.domain.actions.IAction; +import ru.spcex.clearing.backendapi.errors.BackEndError; +import ru.spcex.clearing.platform.messaging.domain.ActionType; +import ru.spcex.clearing.platform.messaging.domain.cud.securitites.FixedIncomeSecurityNewRequest; +import ru.spcex.clearing.platform.messaging.domain.json.deserialize.LocalDateDeserializer; +import ru.spcex.platform.classes.base.interfaces.WithSecuritySymbol; +import ru.spcex.platform.utils.enumeration.EnumMessage; +import ru.spcex.platform.utils.text.TextUtil; + +import java.math.BigDecimal; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; + +public class FixedIncomeSecurityNewAction implements IAction, WithSecuritySymbol { + @ApiModelProperty(value = "Код инструмента", example = "ABSDEFJ") + @JsonProperty + public String securitySymbol; + @ApiModelProperty(value = "Краткое наименование инструмента", example = "ABSDE") + @JsonProperty + public String shortName; + @ApiModelProperty(value = "Полное наименование инструмента", example = "Treasury bills") + @JsonProperty + public String fullName; + @ApiModelProperty(value = "Наименование инструмента ISIN", example = "AFLT") + @JsonProperty + public String isin; + @ApiModelProperty(value = "Код типа облигации", example = "AFLT") + @JsonProperty + public String bondType; + @ApiModelProperty(value = "Размер лота", example = "300.5") + @JsonProperty + public BigDecimal lotSize; + @ApiModelProperty(value = "Номинал", example = "200.5") + @JsonProperty + public BigDecimal nominalValue; + @ApiModelProperty(value = "Наименование валюты номинала", example = "RUB") + @JsonProperty + public String nominalCurrency; + @ApiModelProperty(value = "Дата погашения", example = "2022-02-21") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "Europe/Moscow") + @JsonDeserialize(using = LocalDateDeserializer.class) + @JsonProperty + public LocalDate maturityDate; + @ApiModelProperty(value = "Купон", example = "310.5") + @JsonProperty + public BigDecimal coupon; + @ApiModelProperty(value = "Длительность купона", example = "4") + @JsonProperty + public Long couponFrequency; + @ApiModelProperty(value = "Наименование эмитента", example = "1000") + @JsonProperty + public Long issuerId; + + @ApiModelProperty(value = "Краткое наименование инструмента на английском", example = "Short LLT") + @JsonProperty + public String shortNameEng; + @ApiModelProperty(value = "Полное наименование инструмента на английском", example = "True short name Limited Lumia Technology LLT") + @JsonProperty + public String fullNameEng; + @ApiModelProperty(value = "Наименование статуса", example = "ACTV") + @JsonProperty + public String workflowStatus; + @ApiModelProperty(value = "Наименование типа инструмента", example = "EQTY") + @JsonProperty + public String instrumentType; + + @Override + public Collection validate() { + List errors = new ArrayList<>(); + if (TextUtil.isEmpty(securitySymbol)) + errors.add(new EnumMessage(BackEndError.ValidationError, "securitySymbol")); + if (TextUtil.isEmpty(shortName)) + errors.add(new EnumMessage(BackEndError.ValidationError, "shortName")); + if (lotSize == null) + errors.add(new EnumMessage(BackEndError.ValidationError, "lotSize")); + if (TextUtil.isEmpty(instrumentType)) + errors.add(new EnumMessage(BackEndError.ValidationError, "instrumentType")); + return errors.size() > 0 ? errors : Collections.emptyList(); + } + + @Override + public FixedIncomeSecurityNewRequest toRequest() { + var req = new FixedIncomeSecurityNewRequest(); + req.setSecuritySymbol(this.getSecuritySymbol()); + req.setShortName(this.getShortName()); + req.setFullName(this.getFullName()); + req.setIsin(this.getIsin()); + req.setBondType(this.getBondType()); + req.setLotSize(this.getLotSize()); + req.setNominalValue(this.getNominalValue()); + req.setNominalCurrency(this.getNominalCurrency()); + req.setMaturityDate(this.getMaturityDate()); + req.setCoupon(this.getCoupon()); + req.setCouponFrequency(this.getCouponFrequency()); + req.setIssuerId(this.getIssuerId()); + req.setShortNameEng(this.getShortNameEng()); + req.setFullNameEng(this.getFullNameEng()); + req.setWorkflowStatus(this.getWorkflowStatus()); + req.setInstrumentType(this.getInstrumentType()); + return req; + } + + @ApiModelProperty(hidden = true) + @Override + public ActionType getActionType() { + return ActionType.NEW; + } + + @Override + public String getSecuritySymbol() { + return securitySymbol; + } + + public void setSecuritySymbol(String securitySymbol) { + this.securitySymbol = securitySymbol; + } + + public String getShortName() { + return shortName; + } + + public void setShortName(String shortName) { + this.shortName = shortName; + } + + public String getFullName() { + return fullName; + } + + public void setFullName(String fullName) { + this.fullName = fullName; + } + + public String getIsin() { + return isin; + } + + public void setIsin(String isin) { + this.isin = isin; + } + + public String getBondType() { + return bondType; + } + + public void setBondType(String bondType) { + this.bondType = bondType; + } + + public BigDecimal getLotSize() { + return lotSize; + } + + public void setLotSize(BigDecimal lotSize) { + this.lotSize = lotSize; + } + + public BigDecimal getNominalValue() { + return nominalValue; + } + + public void setNominalValue(BigDecimal nominalValue) { + this.nominalValue = nominalValue; + } + + public String getNominalCurrency() { + return nominalCurrency; + } + + public void setNominalCurrency(String nominalCurrency) { + this.nominalCurrency = nominalCurrency; + } + + public LocalDate getMaturityDate() { + return maturityDate; + } + + public void setMaturityDate(LocalDate maturityDate) { + this.maturityDate = maturityDate; + } + + public BigDecimal getCoupon() { + return coupon; + } + + public void setCoupon(BigDecimal coupon) { + this.coupon = coupon; + } + + public Long getCouponFrequency() { + return couponFrequency; + } + + public void setCouponFrequency(Long couponFrequency) { + this.couponFrequency = couponFrequency; + } + + public Long getIssuerId() { + return issuerId; + } + + public void setIssuerId(Long issuerId) { + this.issuerId = issuerId; + } + + public String getShortNameEng() { + return shortNameEng; + } + + public void setShortNameEng(String shortNameEng) { + this.shortNameEng = shortNameEng; + } + + public String getFullNameEng() { + return fullNameEng; + } + + public void setFullNameEng(String fullNameEng) { + this.fullNameEng = fullNameEng; + } + + public String getWorkflowStatus() { + return workflowStatus; + } + + public void setWorkflowStatus(String workflowStatus) { + this.workflowStatus = workflowStatus; + } + + public String getInstrumentType() { + return instrumentType; + } + + public void setInstrumentType(String instrumentType) { + this.instrumentType = instrumentType; + } +} diff --git a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/securities/FixedIncomeSecurityUpdateAction.java b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/securities/FixedIncomeSecurityUpdateAction.java new file mode 100644 index 000000000..1ea013ee6 --- /dev/null +++ b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/securities/FixedIncomeSecurityUpdateAction.java @@ -0,0 +1,251 @@ +package ru.spcex.clearing.backendapi.controller.request.cud.securities; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.swagger.annotations.ApiModelProperty; +import ru.spcex.clearing.backendapi.domain.actions.IAction; +import ru.spcex.clearing.backendapi.errors.BackEndError; +import ru.spcex.clearing.platform.messaging.domain.ActionType; +import ru.spcex.clearing.platform.messaging.domain.cud.securitites.FixedIncomeSecurityUpdateRequest; +import ru.spcex.clearing.platform.messaging.domain.json.deserialize.LocalDateDeserializer; +import ru.spcex.platform.classes.base.interfaces.WithSecuritySymbol; +import ru.spcex.platform.utils.enumeration.EnumMessage; + +import java.math.BigDecimal; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; + +public class FixedIncomeSecurityUpdateAction implements IAction, WithSecuritySymbol { + @ApiModelProperty(hidden = true) + @JsonProperty + public Long id; + @ApiModelProperty(value = "Код инструмента", example = "ABSDEFJ") + @JsonProperty + public String securitySymbol; + @ApiModelProperty(value = "Краткое наименование инструмента", example = "ABSDE") + @JsonProperty + public String shortName; + @ApiModelProperty(value = "Полное наименование инструмента", example = "Treasury bills") + @JsonProperty + public String fullName; + @ApiModelProperty(value = "Наименование инструмента ISIN", example = "AFLT") + @JsonProperty + public String isin; + @ApiModelProperty(value = "Код типа облигации", example = "AFLT") + @JsonProperty + public String bondType; + @ApiModelProperty(value = "Размер лота", example = "300.5") + @JsonProperty + public BigDecimal lotSize; + @ApiModelProperty(value = "Номинал", example = "200.5") + @JsonProperty + public BigDecimal nominalValue; + @ApiModelProperty(value = "Наименование валюты номинала", example = "RUB") + @JsonProperty + public String nominalCurrency; + @ApiModelProperty(value = "Дата погашения", example = "2022-02-21") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "Europe/Moscow") + @JsonDeserialize(using = LocalDateDeserializer.class) + @JsonProperty + public LocalDate maturityDate; + @ApiModelProperty(value = "Купон", example = "310.5") + @JsonProperty + public BigDecimal coupon; + @ApiModelProperty(value = "Длительность купона", example = "4") + @JsonProperty + public Long couponFrequency; + @ApiModelProperty(value = "Наименование эмитента", example = "1000") + @JsonProperty + public Long issuerId; + + @ApiModelProperty(value = "Краткое наименование инструмента на английском", example = "Short LLT") + @JsonProperty + public String shortNameEng; + @ApiModelProperty(value = "Полное наименование инструмента на английском", example = "True short name Limited Lumia Technology LLT") + @JsonProperty + public String fullNameEng; + @ApiModelProperty(value = "Наименование статуса", example = "ACTV") + @JsonProperty + public String workflowStatus; + @ApiModelProperty(value = "Наименование типа инструмента", example = "EQTY") + @JsonProperty + public String instrumentType; + + @Override + public Collection validate() { + List errors = new ArrayList<>(); + if (id == null) + errors.add(new EnumMessage(BackEndError.ValidationError, "id")); + return errors.size() > 0 ? errors : Collections.emptyList(); + } + + @Override + public FixedIncomeSecurityUpdateRequest toRequest() { + var req = new FixedIncomeSecurityUpdateRequest(); + req.setId(this.getId()); + req.setSecuritySymbol(this.getSecuritySymbol()); + req.setShortName(this.getShortName()); + req.setFullName(this.getFullName()); + req.setIsin(this.getIsin()); + req.setBondType(this.getBondType()); + req.setLotSize(this.getLotSize()); + req.setNominalValue(this.getNominalValue()); + req.setNominalCurrency(this.getNominalCurrency()); + req.setMaturityDate(this.getMaturityDate()); + req.setCoupon(this.getCoupon()); + req.setCouponFrequency(this.getCouponFrequency()); + req.setIssuerId(this.getIssuerId()); + req.setShortNameEng(this.getShortNameEng()); + req.setFullNameEng(this.getFullNameEng()); + req.setWorkflowStatus(this.getWorkflowStatus()); + req.setInstrumentType(this.getInstrumentType()); + return req; + } + + @ApiModelProperty(hidden = true) + @Override + public ActionType getActionType() { + return ActionType.UPDATE; + } + + @Override + public String getSecuritySymbol() { + return securitySymbol; + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public void setSecuritySymbol(String securitySymbol) { + this.securitySymbol = securitySymbol; + } + + public String getShortName() { + return shortName; + } + + public void setShortName(String shortName) { + this.shortName = shortName; + } + + public String getFullName() { + return fullName; + } + + public void setFullName(String fullName) { + this.fullName = fullName; + } + + public String getIsin() { + return isin; + } + + public void setIsin(String isin) { + this.isin = isin; + } + + public String getBondType() { + return bondType; + } + + public void setBondType(String bondType) { + this.bondType = bondType; + } + + public BigDecimal getLotSize() { + return lotSize; + } + + public void setLotSize(BigDecimal lotSize) { + this.lotSize = lotSize; + } + + public BigDecimal getNominalValue() { + return nominalValue; + } + + public void setNominalValue(BigDecimal nominalValue) { + this.nominalValue = nominalValue; + } + + public String getNominalCurrency() { + return nominalCurrency; + } + + public void setNominalCurrency(String nominalCurrency) { + this.nominalCurrency = nominalCurrency; + } + + public LocalDate getMaturityDate() { + return maturityDate; + } + + public void setMaturityDate(LocalDate maturityDate) { + this.maturityDate = maturityDate; + } + + public BigDecimal getCoupon() { + return coupon; + } + + public void setCoupon(BigDecimal coupon) { + this.coupon = coupon; + } + + public Long getCouponFrequency() { + return couponFrequency; + } + + public void setCouponFrequency(Long couponFrequency) { + this.couponFrequency = couponFrequency; + } + + public Long getIssuerId() { + return issuerId; + } + + public void setIssuerId(Long issuerId) { + this.issuerId = issuerId; + } + + public String getShortNameEng() { + return shortNameEng; + } + + public void setShortNameEng(String shortNameEng) { + this.shortNameEng = shortNameEng; + } + + public String getFullNameEng() { + return fullNameEng; + } + + public void setFullNameEng(String fullNameEng) { + this.fullNameEng = fullNameEng; + } + + public String getWorkflowStatus() { + return workflowStatus; + } + + public void setWorkflowStatus(String workflowStatus) { + this.workflowStatus = workflowStatus; + } + + public String getInstrumentType() { + return instrumentType; + } + + public void setInstrumentType(String instrumentType) { + this.instrumentType = instrumentType; + } +} diff --git a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/securities/MoneyMarketSecurityNewAction.java b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/securities/MoneyMarketSecurityNewAction.java index 4fd684ba6..fc5f8bc61 100644 --- a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/securities/MoneyMarketSecurityNewAction.java +++ b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/securities/MoneyMarketSecurityNewAction.java @@ -49,26 +49,31 @@ public class MoneyMarketSecurityNewAction implements IAction validate() { List errors = new ArrayList<>(); - if (this.startDate == null) - errors.add(new EnumMessage(BackEndError.ValidationError, "startDate")); - if (this.endDate == null) - errors.add(new EnumMessage(BackEndError.ValidationError, "endDate")); + if (TextUtil.isEmpty(securitySymbol)) + errors.add(new EnumMessage(BackEndError.ValidationError, "securitySymbol")); + if (TextUtil.isEmpty(shortName)) + errors.add(new EnumMessage(BackEndError.ValidationError, "shortName")); + if (this.lotSize == null) + errors.add(new EnumMessage(BackEndError.ValidationError, "lotSize")); if (this.nominalValue == null) errors.add(new EnumMessage(BackEndError.ValidationError, "nominalValue")); if (TextUtil.isEmpty(nominalCurrency)) errors.add(new EnumMessage(BackEndError.ValidationError, "nominalCurrency")); + if (this.startDate == null) + errors.add(new EnumMessage(BackEndError.ValidationError, "startDate")); + if (this.endDate == null) + errors.add(new EnumMessage(BackEndError.ValidationError, "endDate")); +// if (this.termType == null) +// errors.add(new EnumMessage(BackEndError.ValidationError, "termType")); if (TextUtil.isEmpty(instrumentType)) errors.add(new EnumMessage(BackEndError.ValidationError, "instrumentType")); - if (TextUtil.isEmpty(fullName)) - errors.add(new EnumMessage(BackEndError.ValidationError, "fullName")); - if (TextUtil.isEmpty(securitySymbol)) - errors.add(new EnumMessage(BackEndError.ValidationError, "securitySymbol")); - if (this.lotSize == null) - errors.add(new EnumMessage(BackEndError.ValidationError, "lotSize")); return errors.size() > 0 ? errors : Collections.emptyList(); } @@ -83,6 +88,7 @@ public class MoneyMarketSecurityNewAction implements IAction validate() { List errors = new ArrayList<>(); - if (this.startDate == null) - errors.add(new EnumMessage(BackEndError.ValidationError, "startDate")); - if (this.endDate == null) - errors.add(new EnumMessage(BackEndError.ValidationError, "endDate")); - if (this.nominalValue == null) - errors.add(new EnumMessage(BackEndError.ValidationError, "nominalValue")); - if (TextUtil.isEmpty(nominalCurrency)) - errors.add(new EnumMessage(BackEndError.ValidationError, "nominalCurrency")); - if (TextUtil.isEmpty(instrumentType)) - errors.add(new EnumMessage(BackEndError.ValidationError, "instrumentType")); - if (TextUtil.isEmpty(fullName)) - errors.add(new EnumMessage(BackEndError.ValidationError, "fullName")); - if (this.lotSize == null) - errors.add(new EnumMessage(BackEndError.ValidationError, "lotSize")); + if (this.id == null) + errors.add(new EnumMessage(BackEndError.ValidationError, "id")); return errors.size() > 0 ? errors : Collections.emptyList(); } @@ -154,4 +145,12 @@ public class MoneyMarketSecurityUpdateAction implements IAction getErrors() { return errors; } + + @Override + public String toString() { + return "ActionValidationException{message:" + getMessage() + + ", errors=" + errors + "}"; + } } diff --git a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/service/IOperator.java b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/service/IOperator.java index 67c331b7a..55257c2ac 100644 --- a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/service/IOperator.java +++ b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/service/IOperator.java @@ -7,4 +7,17 @@ import java.util.concurrent.ExecutionException; public interface IOperator { QueueSuccessResponse sendRequestToQueue(String destination, IAction iAction, boolean appendUserId) throws ExecutionException, InterruptedException; + + /** + * Для оптимизации проставления userId. + * Аналог sendRequestToQueue(String destination, IAction iAction, true) + * + * @param destination + * @param iAction + * @param userId совершивший запрос + * @return + * @throws ExecutionException + * @throws InterruptedException + */ + QueueSuccessResponse sendRequestToQueue(String destination, IAction iAction, Long userId) throws ExecutionException, InterruptedException; } diff --git a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/service/impl/OperatorImpl.java b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/service/impl/OperatorImpl.java index b039cdd82..3757706ad 100644 --- a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/service/impl/OperatorImpl.java +++ b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/service/impl/OperatorImpl.java @@ -25,6 +25,7 @@ import ru.spcex.platform.imdg.api.Imdg; import ru.spcex.platform.imdg.api.ImdgId; import ru.spcex.platform.imdg.api.ImdgProvider; import ru.spcex.platform.utils.enumeration.EnumMessage; +import ru.spcex.platform.utils.log.ExceptionUtils; import ru.spcex.platform.utils.validation.IValidator; import java.util.Collection; @@ -80,6 +81,25 @@ public class OperatorImpl implements IOperator { return new QueueSuccessResponse(request.getActionType(), request.getId()); } + @Override + public QueueSuccessResponse sendRequestToQueue(String destination, IAction iAction, Long userId) throws ExecutionException, InterruptedException { + throwValidate(destination, iAction); + BaseRequest request = new BaseRequest<>(); + request.setId(idGenerator.nextId()); + request.setActionType(iAction.getActionType()); + request.setRequestPayload(iAction.toRequest()); + if (userId == null) { + log.warn("userId not set, Stacktrace: {}", ExceptionUtils.getStackTrace(new IllegalArgumentException("Empty userId"))); + } else { + request.setUserId(userId); + } + //сохраняет данные о запросе в хранилище + saveRequestToStorage(destination, request); + Future send = kafka.send(new ProducerRecord<>(destination, request)); + send.get(); + return new QueueSuccessResponse(request.getActionType(), request.getId()); + } + private void saveRequestToStorage(String destination, BaseRequest request) { Imdg requestStorage = imdgProvider.getImdg(IMDGDistributedNames.Map_RequestInfo, RequestInfo.class); RequestInfo requestInfo = RequestInfo.create(request.getId()); diff --git a/clearing-parent/backend-api/src/main/resources/meta/data.xml b/clearing-parent/backend-api/src/main/resources/meta/data.xml index 2627cc907..4caf52f1c 100644 --- a/clearing-parent/backend-api/src/main/resources/meta/data.xml +++ b/clearing-parent/backend-api/src/main/resources/meta/data.xml @@ -1,230 +1,245 @@ - + - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -243,8 +258,6 @@ - - @@ -266,9 +279,6 @@ - - - diff --git a/clearing-parent/backend-api/src/main/resources/meta/meta.xml b/clearing-parent/backend-api/src/main/resources/meta/meta.xml index 70a75f9a5..1c4e806ee 100644 --- a/clearing-parent/backend-api/src/main/resources/meta/meta.xml +++ b/clearing-parent/backend-api/src/main/resources/meta/meta.xml @@ -1,6 +1,6 @@ - + @@ -136,32 +136,32 @@ - + - + - + - + - + - + @@ -207,6 +207,22 @@ + + + + + + + + + + + + + + + + @@ -232,11 +248,6 @@ - - - - - @@ -287,11 +298,6 @@ - - - - - @@ -421,7 +427,7 @@ - + @@ -602,7 +608,7 @@ - + @@ -649,7 +655,7 @@ - + @@ -711,7 +717,7 @@ - + @@ -719,7 +725,7 @@ - + @@ -788,7 +794,7 @@ - + @@ -805,6 +811,21 @@ + + + + + + + + + + + + + + + @@ -864,6 +885,24 @@ + + + + + + + + + + + + + + + + + + @@ -1151,6 +1190,130 @@ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1278,37 +1441,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1951,28 +2083,6 @@ - - - - - - - - - - - - - - - - - - - - - - @@ -2004,13 +2114,6 @@ - - - - - - - diff --git a/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/AbstractControllerTest.java b/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/AbstractControllerTest.java index 68be40768..0f1c3d1d9 100644 --- a/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/AbstractControllerTest.java +++ b/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/AbstractControllerTest.java @@ -28,9 +28,7 @@ import org.springframework.web.context.WebApplicationContext; import org.springframework.web.filter.CharacterEncodingFilter; import ru.clearing.classes.statics.data.user.User; import ru.spcex.clearing.backendapi.controller.config.*; -import ru.spcex.clearing.backendapi.controller.queue.account.AccountBalanceController; -import ru.spcex.clearing.backendapi.controller.queue.account.AccountController; -import ru.spcex.clearing.backendapi.controller.queue.account.BankAccountController; +import ru.spcex.clearing.backendapi.controller.queue.account.*; import ru.spcex.clearing.backendapi.controller.queue.company.*; import ru.spcex.clearing.backendapi.controller.queue.execution.ExecutionDepositController; import ru.spcex.clearing.backendapi.controller.queue.journal.InDocumentJournalController; @@ -42,9 +40,7 @@ import ru.spcex.clearing.backendapi.controller.queue.misc.*; import ru.spcex.clearing.backendapi.controller.queue.payment.PaymentInstructionController; import ru.spcex.clearing.backendapi.controller.queue.register.*; import ru.spcex.clearing.backendapi.controller.queue.scheduler.*; -import ru.spcex.clearing.backendapi.controller.queue.securities.CudMoneyMarketSecurityController; -import ru.spcex.clearing.backendapi.controller.queue.securities.InformationAccountController; -import ru.spcex.clearing.backendapi.controller.queue.securities.SecurityController; +import ru.spcex.clearing.backendapi.controller.queue.securities.*; import ru.spcex.clearing.backendapi.controller.queue.user.UserController; import ru.spcex.clearing.backendapi.controller.queue.user.UserRoleSessionController; import ru.spcex.clearing.backendapi.controller.queue.utilities.CudKeyRateController; @@ -90,6 +86,8 @@ import static ru.spcex.clearing.test.json.MatcherFactoryWithJson.usingIgnoringFi AccountBalanceController.class, AccountController.class, BankAccountController.class, + ClearingAccountController.class, + DepoAccountController.class, //company CompanyRoleSetController.class, CompanyController.class, @@ -135,6 +133,10 @@ import static ru.spcex.clearing.test.json.MatcherFactoryWithJson.usingIgnoringFi PlannerTemplateController.class, //securities CudMoneyMarketSecurityController.class, + CudCouponPeriodController.class, + CudEquitySecurityController.class, + CudFixedIncomeCashFlowController.class, + CudFixedIncomeSecurityController.class, InformationAccountController.class, SecurityController.class, //user @@ -156,7 +158,7 @@ import static ru.spcex.clearing.test.json.MatcherFactoryWithJson.usingIgnoringFi @WebMvcTest//(controllers = DeleteCompanyController.class) //@TestPropertySource(properties = "spring.config.location=D:/repo/mfd/clearing/clearing-parent/backend-api/src/main/resources/") public abstract class AbstractControllerTest { - protected static final MatcherFactoryWithJson.Matcher BASE_REQUEST_MATCHER = usingIgnoringFieldsComparatorForClass(BaseRequest.class); + protected static final MatcherFactoryWithJson.Matcher BASE_REQUEST_MATCHER = usingIgnoringFieldsComparatorForClass(BaseRequest.class,"userId"); protected static final MatcherFactoryWithJson.Matcher CUD_RESPONSE_MATCHER = usingIgnoringFieldsComparatorForClass(CudResponse.class); protected static final AtomicLong currentId = new AtomicLong(); private static final CharacterEncodingFilter CHARACTER_ENCODING_FILTER = new CharacterEncodingFilter(); diff --git a/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/account/AccountBalanceControllerTest.java b/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/account/AccountBalanceControllerTest.java index bb6bff49c..8c6155c85 100644 --- a/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/account/AccountBalanceControllerTest.java +++ b/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/account/AccountBalanceControllerTest.java @@ -5,6 +5,7 @@ import ru.clearing.classes.statics.data.account.AccountBalance; import ru.spcex.clearing.backendapi.controller.queue.AbstractControllerTest; import ru.spcex.clearing.imdg.IMDGDistributedNames; +@Deprecated class AccountBalanceControllerTest extends AbstractControllerTest { private static final String REST_URL = "/account-balances/"; diff --git a/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/account/AccountControllerTest.java b/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/account/AccountControllerTest.java index 1970c7bd1..b00ffc9a0 100644 --- a/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/account/AccountControllerTest.java +++ b/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/account/AccountControllerTest.java @@ -3,7 +3,11 @@ package ru.spcex.clearing.backendapi.controller.queue.account; import org.junit.jupiter.api.Test; import ru.clearing.classes.statics.data.account.Account; import ru.spcex.clearing.backendapi.controller.queue.AbstractControllerTest; +import ru.spcex.clearing.backendapi.controller.request.cud.account.AccountNewAction; +import ru.spcex.clearing.backendapi.controller.request.cud.account.AccountUpdateAction; +import ru.spcex.clearing.backendapi.controller.request.cud.common.CommonDeleteAction; import ru.spcex.clearing.imdg.IMDGDistributedNames; +import ru.spcex.clearing.platform.messaging.domain.Consts; class AccountControllerTest extends AbstractControllerTest { private static final String REST_URL = "/accounting/accounts/"; @@ -11,7 +15,7 @@ class AccountControllerTest extends AbstractControllerTest { /** * {@link AccountController#getAll()}
* Тест проверяет получение запроса по REST API и отправку всех записей из таблицы hazelcast Map_BankAccount.
- * Входной запрос /securities/bank-accounts/
+ * Входной запрос /accounting/accounts/
* Ответ CommonGetAllResponse
*/ @Test @@ -25,4 +29,79 @@ class AccountControllerTest extends AbstractControllerTest { //ACT and ASSERT checkGettingAllFromRestApi(IMDGDistributedNames.Map_Account, existBankAccount, REST_URL); } + + /** + * {@link AccountController#add(AccountNewAction)}
+ * Тест проверяет получение сущности {@link AccountNewAction} по REST API и отправку в Apache Kafka.
+ * Входной запрос {@link AccountNewAction}:
+ */ + @Test + void add() throws Exception { + //ARRANGE + AccountNewAction accountNewAction = new AccountNewAction(); + accountNewAction.setStatus("ACTV"); + accountNewAction.setAccount("A11112222333"); + accountNewAction.setCompanyId(5L); + accountNewAction.setAccountType("BANK"); + + //ACT and ASSERT + checkAddingByRestApi(REST_URL, accountNewAction); + checkSendedMessegeFromKafka(Consts.DESTINATION_ACCOUNT_NEW, accountNewAction); + } + + /** + * {@link AccountController#update(Long, AccountUpdateAction)}
+ * Тест проверяет получение сущности {@link AccountUpdateAction} по REST API и отправку в Apache Kafka.
+ * Входной запрос {@link AccountUpdateAction}:
+ */ + @Test + void update() throws Exception { + //ARRANGE + long id = currentId.getAndIncrement(); + AccountUpdateAction accountUpdateAction = new AccountUpdateAction(); + accountUpdateAction.setId(id); + accountUpdateAction.setStatus("ACTV"); + accountUpdateAction.setAccount("A11112222333"); + accountUpdateAction.setCompanyId(5L); + accountUpdateAction.setAccountType("BANK"); + Account account = getAccount(id); + + //ACT and ASSERT + checkUpdatingWithIdVolidationByRestApi(IMDGDistributedNames.Map_Account, account, + REST_URL, accountUpdateAction, id); + checkSendedMessegeFromKafka(Consts.DESTINATION_ACCOUNT_UPDATE, accountUpdateAction); + } + + /** + * {@link AccountController#delete(Long)}
+ * Тест проверяет получение id сущности {@link Long} по REST API и отправку в Apache Kafka.
+ * Входной запрос /securities/account/{@link Long}: - 0L
+ */ + @Test + void delete() throws Exception { + //ARRANGE + long id = currentId.getAndIncrement(); + CommonDeleteAction deleteAction = new CommonDeleteAction(); + deleteAction.setId(id); + Account account = getAccount(id); + + //ACT and ASSERT + checkDeletingWithIdVolidationByRestApi(IMDGDistributedNames.Map_Account, account, + REST_URL, id); + checkSendedMessegeFromKafka(Consts.DESTINATION_ACCOUNT_DELETE, deleteAction); + } + + + private Account getAccount(Long id) { + Account account = new Account(); + account.setId(id); + account.setStatus("ACTV"); + account.setAccount("A11112222333"); + account.setRelationId(4L); + account.setCompanyId(5L); + account.setAccountType("BANK"); + account.setProcessingSign("B"); + account.setRelationId(6L); + return account; + } } \ No newline at end of file diff --git a/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/account/BankAccountControllerTest.java b/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/account/BankAccountControllerTest.java index ae92ef4eb..6c60d38e8 100644 --- a/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/account/BankAccountControllerTest.java +++ b/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/account/BankAccountControllerTest.java @@ -25,7 +25,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. import static ru.spcex.clearing.test.json.JsonUtil.writeValue; class BankAccountControllerTest extends AbstractControllerTest { - private static final String REST_URL = "/securities/bank-accounts/"; + private static final String REST_URL = "/accounting/bank-accounts/"; /** * {@link BankAccountController#add(BankAccountNewAction)}
@@ -124,7 +124,7 @@ class BankAccountControllerTest extends AbstractControllerTest { /** * {@link BankAccountController#delete(Long)}
* Тест проверяет получение id сущности {@link Long} по REST API и отправку в Apache Kafka.
- * Входной запрос /securities/bank-accounts/{@link Long}: - 0L
+ * Входной запрос /accounting/bank-accounts/{@link Long}: - 0L
*/ @Test void delete() throws Exception { @@ -140,7 +140,7 @@ class BankAccountControllerTest extends AbstractControllerTest { /** * {@link BankAccountController#getById(Long)}
* Тест проверяет получение запроса по REST API и отправку всех записей из таблицы hazelcast Map_BankAccount.
- * Входной запрос /securities/bank-accounts/{@link Long}: - 0L
+ * Входной запрос /accounting/bank-accounts/{@link Long}: - 0L
* Ответ BankAccountBackendGetById
*/ @Test @@ -185,7 +185,7 @@ class BankAccountControllerTest extends AbstractControllerTest { /** * {@link BankAccountController#getAll()}
* Тест проверяет получение запроса по REST API и отправку всех записей из таблицы hazelcast Map_BankAccount.
- * Входной запрос /securities/bank-accounts/
+ * Входной запрос /accounting/bank-accounts/
* Ответ CommonGetAllResponse
*/ @Test diff --git a/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/account/ClearingAccountControllerTest.java b/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/account/ClearingAccountControllerTest.java new file mode 100644 index 000000000..8e8ec9118 --- /dev/null +++ b/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/account/ClearingAccountControllerTest.java @@ -0,0 +1,30 @@ +package ru.spcex.clearing.backendapi.controller.queue.account; + +import org.junit.jupiter.api.Test; +import ru.clearing.classes.statics.data.account.ClearingAccount; +import ru.spcex.clearing.backendapi.controller.queue.AbstractControllerTest; +import ru.spcex.clearing.imdg.IMDGDistributedNames; + +class ClearingAccountControllerTest extends AbstractControllerTest { + private static final String REST_URL = "/accounting/clearing-accounts/"; + + /** + * {@link ClearingAccountController#getAll()}
+ * Тест проверяет получение запроса по REST API и отправку всех записей из таблицы hazelcast Map_ClearingAccount.
+ * Входной запрос /securities/clearing-accounts/
+ * Ответ CommonGetAllResponse
+ */ + @Test + void getAll() throws Exception { + //ARRANGE + ClearingAccount existClearingAccount = new ClearingAccount(); + existClearingAccount.setAccountId(99L); + existClearingAccount.setClearingAccountType("CATPE-1"); + existClearingAccount.setCompanyId(6L); + existClearingAccount.setId(currentId.get()); + + //ACT and ASSERT + checkGettingAllFromRestApi(IMDGDistributedNames.Map_ClearingAccount, existClearingAccount, REST_URL); + } + +} \ No newline at end of file diff --git a/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/account/DepoAccountControllerTest.java b/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/account/DepoAccountControllerTest.java new file mode 100644 index 000000000..2bb605998 --- /dev/null +++ b/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/account/DepoAccountControllerTest.java @@ -0,0 +1,30 @@ +package ru.spcex.clearing.backendapi.controller.queue.account; + +import org.junit.jupiter.api.Test; +import ru.clearing.classes.statics.data.account.DepoAccount; +import ru.spcex.clearing.backendapi.controller.queue.AbstractControllerTest; +import ru.spcex.clearing.imdg.IMDGDistributedNames; + +class DepoAccountControllerTest extends AbstractControllerTest { + private static final String REST_URL = "/accounting/depo-accounts/"; + + /** + * {@link DepoAccountController#getAll()}
+ * Тест проверяет получение запроса по REST API и отправку всех записей из таблицы hazelcast Map_ClearingAccount.
+ * Входной запрос /securities/depo-accounts/
+ * Ответ CommonGetAllResponse
+ */ + @Test + void getAll() throws Exception { + //ARRANGE + DepoAccount existDepoAccount = new DepoAccount(); + existDepoAccount.setAccountId(99L); + existDepoAccount.setDepoAccountType("T1001"); + existDepoAccount.setCompanyId(6L); + existDepoAccount.setId(currentId.get()); + + //ACT and ASSERT + checkGettingAllFromRestApi(IMDGDistributedNames.Map_DepoAccount, existDepoAccount, REST_URL); + } + +} \ No newline at end of file diff --git a/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/company/EditCompanyInfoControllerTest.java b/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/company/EditCompanyInfoControllerTest.java index 6e97f2d8e..3e9622306 100644 --- a/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/company/EditCompanyInfoControllerTest.java +++ b/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/company/EditCompanyInfoControllerTest.java @@ -33,8 +33,7 @@ class EditCompanyInfoControllerTest extends AbstractControllerTest { * {@link EditCompanyInfoController#update(Long, CompanyInfoUpdateAction)}
* Тест проверяет получение сущности {@link CompanyInfoUpdateAction} по REST API и отправку в Apache Kafka.
* Входной запрос {@link CompanyInfoUpdateAction}:
- * {@link CompanyInfoUpdateAction#clearingCode} - 11
- * {@link CompanyInfoUpdateAction#tradingCode} - 11
+ * {@link CompanyInfoUpdateAction#workflowStatus} - ACTV
* {@link CompanyInfoUpdateAction#corporationSoleType} - 0000
* {@link CompanyInfoUpdateAction#countryCode} - 0000
* {@link CompanyInfoUpdateAction#description} - exists description
@@ -58,8 +57,7 @@ class EditCompanyInfoControllerTest extends AbstractControllerTest { * {@link EditCompanyInfoController#update(Long, CompanyInfoUpdateAction)}
* Тест проверяет получение сущности {@link CompanyInfoUpdateAction} по REST API и отправку в Apache Kafka.
* Входной запрос {@link CompanyInfoUpdateAction}:
- * {@link CompanyInfoUpdateAction#clearingCode} - 11
- * {@link CompanyInfoUpdateAction#tradingCode} - 11
+ * {@link CompanyInfoUpdateAction#workflowStatus} - ACTV
* {@link CompanyInfoUpdateAction#corporationSoleType} - 0000
* {@link CompanyInfoUpdateAction#countryCode} - 0000
* {@link CompanyInfoUpdateAction#description} - exists description
@@ -77,8 +75,7 @@ class EditCompanyInfoControllerTest extends AbstractControllerTest { void update() throws Exception { //ARRANGE CompanyInfoUpdateAction companyInfoUpdateAction = new CompanyInfoUpdateAction(); - companyInfoUpdateAction.setClearingCode("11"); - companyInfoUpdateAction.setTradingCode("11"); + companyInfoUpdateAction.setWorkflowStatus("ACTV"); companyInfoUpdateAction.setCorporationSoleType("0000"); companyInfoUpdateAction.setCountryCode("0000"); companyInfoUpdateAction.setDescription("exists description"); @@ -100,7 +97,7 @@ class EditCompanyInfoControllerTest extends AbstractControllerTest { /** * {@link EditCompanyInfoController#getAll()}
* Тест проверяет получение запроса по REST API и отправку всех записей из таблицы hazelcast Map_Company.
- * Входной запрос /securities/bank-accounts/
+ * Входной запрос /company-infos/
* Ответ CommonGetAllResponse
*/ @Test @@ -119,8 +116,6 @@ class EditCompanyInfoControllerTest extends AbstractControllerTest { existsCompanyInfo.setResidence("0000"); existsCompanyInfo.setShortNameEng("exists shortNameEng"); existsCompanyInfo.setFullNameEng("exists fullNameEng"); - existsCompanyInfo.setShortName("exists shortName"); - existsCompanyInfo.setFullName("exists fullName"); Company existsCompany = new Company(); existsCompany.setId(ID); existsCompany.setProfile(existsCompanyInfo); diff --git a/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/execution/ExecutionDepositControllerTest.java b/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/execution/ExecutionDepositControllerTest.java index 2fa34634a..c6786f993 100644 --- a/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/execution/ExecutionDepositControllerTest.java +++ b/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/execution/ExecutionDepositControllerTest.java @@ -26,7 +26,10 @@ class ExecutionDepositControllerTest extends AbstractControllerTest { executionDeposit.setExchangeExecutionId(currentId.get()); executionDeposit.setExchangeExecutionTime(Instant.now()); executionDeposit.setTradingDate(LocalDate.now()); - executionDeposit.setAccountId(currentId.get()); + executionDeposit.setTradingClearingRegistryId(currentId.get()); + executionDeposit.setFirstLegSettlementCode("lcde1"); + executionDeposit.setSecondLegSettlementCode("lcde2"); + executionDeposit.setContract("contract12"); executionDeposit.setMarket("mark"); executionDeposit.setPrice(new BigDecimal(0)); executionDeposit.setLots(new BigDecimal(0)); @@ -40,8 +43,8 @@ class ExecutionDepositControllerTest extends AbstractControllerTest { executionDeposit.setDuration(currentId.get()); executionDeposit.setFirstLegSettlementDate(LocalDate.now()); executionDeposit.setSecondLegSettlementDate(LocalDate.now()); - executionDeposit.setFirstLegSettlementCode(LocalDate.now()); - executionDeposit.setSecondLegSettlementCode(LocalDate.now()); + executionDeposit.setFirstLegSettlementCode("leg1c"); + executionDeposit.setSecondLegSettlementCode("leg2c"); executionDeposit.setSecurityFullName("sec"); executionDeposit.setSecuritySymbol("sec"); executionDeposit.setSecurityId(currentId.get()); diff --git a/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/journal/InDocumentJournalControllerTest.java b/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/journal/InDocumentJournalControllerTest.java index b2753da02..e87550cdb 100644 --- a/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/journal/InDocumentJournalControllerTest.java +++ b/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/journal/InDocumentJournalControllerTest.java @@ -15,7 +15,7 @@ class InDocumentJournalControllerTest extends AbstractControllerTest { /** * {@link InDocumentJournalController#getAll()}
* Тест проверяет получение запроса по REST API.
- * Входной запрос /securities/bank-accounts/
+ * Входной запрос /in-document-journals/
* Ответ CommonGetAllResponse
*/ @Test diff --git a/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/securities/CudCouponPeriodControllerTest.java b/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/securities/CudCouponPeriodControllerTest.java new file mode 100644 index 000000000..4f21fada5 --- /dev/null +++ b/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/securities/CudCouponPeriodControllerTest.java @@ -0,0 +1,38 @@ +package ru.spcex.clearing.backendapi.controller.queue.securities; + +import org.junit.jupiter.api.Test; +import ru.clearing.classes.statics.data.instrument.issue.CouponPeriod; +import ru.spcex.clearing.backendapi.controller.queue.AbstractControllerTest; +import ru.spcex.clearing.imdg.IMDGDistributedNames; + +import java.math.BigDecimal; +import java.time.LocalDate; + +class CudCouponPeriodControllerTest extends AbstractControllerTest { + public static final String REST_URL = "/securities/coupon-period-securities/"; + + /** + * {@link CudCouponPeriodController#getAll()}
+ * Тест проверяет получение запроса по REST API.
+ * Входной запрос /securities/coupon-period-securities/
+ * Ответ CommonGetAllResponse
+ */ + @Test + void getAll() throws Exception { + //ARRANGE + CouponPeriod couponPeriod = getCouponPeriod(currentId.get()); + + //ACT and ASSERT + checkGettingAllFromRestApi(IMDGDistributedNames.Map_CouponPeriod, couponPeriod, REST_URL); + } + + private CouponPeriod getCouponPeriod(Long id) { + CouponPeriod couponPeriod = new CouponPeriod(); + couponPeriod.setId(id); + couponPeriod.setCouponRate(BigDecimal.valueOf(120.33)); + couponPeriod.setNumber(3L); + couponPeriod.setPeriodStartDate(LocalDate.now().minusDays(1)); + couponPeriod.setPeriodEndDate(LocalDate.now().plusDays(2)); + return couponPeriod; + } +} \ No newline at end of file diff --git a/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/securities/CudEquitySecurityControllerTest.java b/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/securities/CudEquitySecurityControllerTest.java new file mode 100644 index 000000000..c6ab1760d --- /dev/null +++ b/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/securities/CudEquitySecurityControllerTest.java @@ -0,0 +1,113 @@ +package ru.spcex.clearing.backendapi.controller.queue.securities; + +import org.junit.jupiter.api.Test; +import ru.clearing.classes.statics.data.instrument.issue.EquitySecurity; +import ru.spcex.clearing.backendapi.controller.queue.AbstractControllerTest; +import ru.spcex.clearing.backendapi.controller.request.cud.common.CommonDeleteAction; +import ru.spcex.clearing.backendapi.controller.request.cud.securities.EquitySecurityNewAction; +import ru.spcex.clearing.backendapi.controller.request.cud.securities.EquitySecurityUpdateAction; +import ru.spcex.clearing.imdg.IMDGDistributedNames; +import ru.spcex.clearing.platform.messaging.domain.Consts; +import ru.spcex.platform.enumeration.Status; + +import java.math.BigDecimal; + +class CudEquitySecurityControllerTest extends AbstractControllerTest { + public static final String REST_URL = "/securities/equity-securities/"; + + /** + * {@link CudEquitySecurityController#add(EquitySecurityNewAction)}
+ * Тест проверяет получение сущности {@link EquitySecurityNewAction} по REST API и отправку в Apache Kafka.
+ * Входной запрос {@link EquitySecurityNewAction}:
+ */ + @Test + void add() throws Exception { + //ARRANGE + EquitySecurityNewAction equitySecurityNewAction = new EquitySecurityNewAction(); + equitySecurityNewAction.setShareType("shType"); + equitySecurityNewAction.setLotSize(BigDecimal.valueOf(120.33)); + equitySecurityNewAction.setShortName("name"); + equitySecurityNewAction.setFullName("name 2"); + equitySecurityNewAction.setWorkflowStatus(Status.Active.getKey()); + equitySecurityNewAction.setInstrumentType("status T"); + equitySecurityNewAction.setSecuritySymbol("symbol1"); + equitySecurityNewAction.setLotSize(new BigDecimal("3.5")); + + //ACT and ASSERT + checkAddingByRestApi(REST_URL, equitySecurityNewAction); + checkSendedMessegeFromKafka(Consts.DESTINATION_EQUITY_SECURITY_NEW, equitySecurityNewAction); + } + + /** + * {@link CudEquitySecurityController#update(Long, EquitySecurityUpdateAction)}
+ * Тест проверяет получение сущности {@link EquitySecurityUpdateAction} по REST API и отправку в Apache Kafka.
+ * Входной запрос {@link EquitySecurityUpdateAction}:
+ */ + @Test + void update() throws Exception { + //ARRANGE + long id = currentId.getAndIncrement(); + EquitySecurityUpdateAction equitySecurityUpdateAction = new EquitySecurityUpdateAction(); + equitySecurityUpdateAction.setId(id); + equitySecurityUpdateAction.setShareType("shType"); + equitySecurityUpdateAction.setLotSize(BigDecimal.valueOf(120.33)); + equitySecurityUpdateAction.setShortName("name"); + equitySecurityUpdateAction.setFullName("name 2"); + equitySecurityUpdateAction.setWorkflowStatus(Status.Active.getKey()); + equitySecurityUpdateAction.setInstrumentType("status T"); + equitySecurityUpdateAction.setSecuritySymbol("symbol1"); + equitySecurityUpdateAction.setLotSize(new BigDecimal("3.5")); + EquitySecurity equitySecurity = getEquitySecurity(id); + + //ACT and ASSERT + checkUpdatingWithIdVolidationByRestApi(IMDGDistributedNames.Map_EquitySecurity, equitySecurity, + REST_URL, equitySecurityUpdateAction, id); + checkSendedMessegeFromKafka(Consts.DESTINATION_EQUITY_SECURITY_UPDATE, equitySecurityUpdateAction); + } + + /** + * {@link CudEquitySecurityController#delete(Long)}
+ * Тест проверяет получение id сущности {@link Long} по REST API и отправку в Apache Kafka.
+ * Входной запрос /securities/equity-securities/{@link Long}: - 0L
+ */ + @Test + void delete() throws Exception { + //ARRANGE + long id = currentId.getAndIncrement(); + CommonDeleteAction deleteAction = new CommonDeleteAction(); + deleteAction.setId(id); + EquitySecurity equitySecurity = getEquitySecurity(id); + + //ACT and ASSERT + checkDeletingWithIdVolidationByRestApi(IMDGDistributedNames.Map_MoneyMarketSecurity, equitySecurity, + REST_URL, id); + checkSendedMessegeFromKafka(Consts.DESTINATION_EQUITY_SECURITY_DELETE, deleteAction); + } + + /** + * {@link CudEquitySecurityController#getAll()}
+ * Тест проверяет получение запроса по REST API.
+ * Входной запрос /securities/equity-securities/
+ * Ответ CommonGetAllResponse
+ */ + @Test + void getAll() throws Exception { + //ARRANGE + EquitySecurity equitySecurity = getEquitySecurity(currentId.get()); + + //ACT and ASSERT + checkGettingAllFromRestApi(IMDGDistributedNames.Map_EquitySecurity, equitySecurity, REST_URL); + } + + private EquitySecurity getEquitySecurity(Long id) { + EquitySecurity equitySecurity = new EquitySecurity(); + equitySecurity.setId(id); + equitySecurity.setSecurityId(currentId.get()); + equitySecurity.setShareType("shType"); + equitySecurity.setLotSize(BigDecimal.valueOf(120.33)); + equitySecurity.setShortName("name"); + equitySecurity.setWorkflowStatus(Status.Active.getKey()); + equitySecurity.setFullName("name 2"); + return equitySecurity; + } +} \ No newline at end of file diff --git a/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/securities/CudFixedIncomeCashFlowControllerTest.java b/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/securities/CudFixedIncomeCashFlowControllerTest.java new file mode 100644 index 000000000..4cab2c42f --- /dev/null +++ b/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/securities/CudFixedIncomeCashFlowControllerTest.java @@ -0,0 +1,39 @@ +package ru.spcex.clearing.backendapi.controller.queue.securities; + +import org.junit.jupiter.api.Test; +import ru.clearing.classes.statics.data.instrument.issue.FixedIncomeCashFlow; +import ru.spcex.clearing.backendapi.controller.queue.AbstractControllerTest; +import ru.spcex.clearing.imdg.IMDGDistributedNames; + +import java.math.BigDecimal; +import java.time.LocalDate; + +class CudFixedIncomeCashFlowControllerTest extends AbstractControllerTest { + public static final String REST_URL = "/securities/fixed-income-cash-flow-securities/"; + + /** + * {@link CudFixedIncomeCashFlowController#getAll()}
+ * Тест проверяет получение запроса по REST API.
+ * Входной запрос /securities/fixed-income-cash-flow-securities/
+ * Ответ CommonGetAllResponse
+ */ + @Test + void getAll() throws Exception { + //ARRANGE + FixedIncomeCashFlow fixedIncomeCashFlow = getFixedIncomeCashFlow(currentId.get()); + + //ACT and ASSERT + checkGettingAllFromRestApi(IMDGDistributedNames.Map_FixedIncomeCashFlow, fixedIncomeCashFlow, REST_URL); + } + + private FixedIncomeCashFlow getFixedIncomeCashFlow(Long id) { + FixedIncomeCashFlow fixedIncomeCashFlow = new FixedIncomeCashFlow(); + fixedIncomeCashFlow.setId(id); + fixedIncomeCashFlow.setSecurityId(100L); + fixedIncomeCashFlow.setAccruedCoupon(BigDecimal.valueOf(120.33)); + fixedIncomeCashFlow.setNominalValue(BigDecimal.valueOf(130.33)); + fixedIncomeCashFlow.setNumber(2L); + fixedIncomeCashFlow.setValueDate(LocalDate.now()); + return fixedIncomeCashFlow; + } +} \ No newline at end of file diff --git a/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/securities/CudFixedIncomeSecurityControllerTest.java b/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/securities/CudFixedIncomeSecurityControllerTest.java new file mode 100644 index 000000000..c60a9b989 --- /dev/null +++ b/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/securities/CudFixedIncomeSecurityControllerTest.java @@ -0,0 +1,113 @@ +package ru.spcex.clearing.backendapi.controller.queue.securities; + +import org.junit.jupiter.api.Test; +import ru.clearing.classes.statics.data.instrument.issue.FixedIncomeSecurity; +import ru.spcex.clearing.backendapi.controller.queue.AbstractControllerTest; +import ru.spcex.clearing.backendapi.controller.request.cud.common.CommonDeleteAction; +import ru.spcex.clearing.backendapi.controller.request.cud.securities.FixedIncomeSecurityNewAction; +import ru.spcex.clearing.backendapi.controller.request.cud.securities.FixedIncomeSecurityUpdateAction; +import ru.spcex.clearing.imdg.IMDGDistributedNames; +import ru.spcex.clearing.platform.messaging.domain.Consts; +import ru.spcex.platform.enumeration.Status; + +import java.math.BigDecimal; + +class CudFixedIncomeSecurityControllerTest extends AbstractControllerTest { + public static final String REST_URL = "/securities/fixed-income-securities/"; + + /** + * {@link CudFixedIncomeSecurityController#add(FixedIncomeSecurityNewAction)}
+ * Тест проверяет получение сущности {@link FixedIncomeSecurityNewAction} по REST API и отправку в Apache Kafka.
+ * Входной запрос {@link FixedIncomeSecurityNewAction}:
+ */ + @Test + void add() throws Exception { + //ARRANGE + FixedIncomeSecurityNewAction fixedIncomeSecurityNewAction = new FixedIncomeSecurityNewAction(); + fixedIncomeSecurityNewAction.setBondType("bType"); + fixedIncomeSecurityNewAction.setLotSize(BigDecimal.valueOf(120.33)); + fixedIncomeSecurityNewAction.setShortName("name"); + fixedIncomeSecurityNewAction.setFullName("name 2"); + fixedIncomeSecurityNewAction.setWorkflowStatus(Status.Active.getKey()); + fixedIncomeSecurityNewAction.setInstrumentType("status T"); + fixedIncomeSecurityNewAction.setSecuritySymbol("symbol1"); + fixedIncomeSecurityNewAction.setLotSize(new BigDecimal("3.5")); + + //ACT and ASSERT + checkAddingByRestApi(REST_URL, fixedIncomeSecurityNewAction); + checkSendedMessegeFromKafka(Consts.DESTINATION_FIXED_INCOME_SECURITY_NEW, fixedIncomeSecurityNewAction); + } + + /** + * {@link CudFixedIncomeSecurityController#update(Long, FixedIncomeSecurityUpdateAction)}
+ * Тест проверяет получение сущности {@link FixedIncomeSecurityUpdateAction} по REST API и отправку в Apache Kafka.
+ * Входной запрос {@link FixedIncomeSecurityUpdateAction}:
+ */ + @Test + void update() throws Exception { + //ARRANGE + long id = currentId.getAndIncrement(); + FixedIncomeSecurityUpdateAction fixedIncomeSecurityUpdateAction = new FixedIncomeSecurityUpdateAction(); + fixedIncomeSecurityUpdateAction.setId(id); + fixedIncomeSecurityUpdateAction.setBondType("bType"); + fixedIncomeSecurityUpdateAction.setLotSize(BigDecimal.valueOf(120.33)); + fixedIncomeSecurityUpdateAction.setShortName("name"); + fixedIncomeSecurityUpdateAction.setFullName("name 2"); + fixedIncomeSecurityUpdateAction.setWorkflowStatus(Status.Active.getKey()); + fixedIncomeSecurityUpdateAction.setInstrumentType("status T"); + fixedIncomeSecurityUpdateAction.setSecuritySymbol("symbol1"); + fixedIncomeSecurityUpdateAction.setLotSize(new BigDecimal("3.5")); + FixedIncomeSecurity fixedIncomeSecurity = getFixedIncomeSecurity(id); + + //ACT and ASSERT + checkUpdatingWithIdVolidationByRestApi(IMDGDistributedNames.Map_FixedIncomeSecurity, fixedIncomeSecurity, + REST_URL, fixedIncomeSecurityUpdateAction, id); + checkSendedMessegeFromKafka(Consts.DESTINATION_FIXED_INCOME_SECURITY_UPDATE, fixedIncomeSecurityUpdateAction); + } + + /** + * {@link CudFixedIncomeSecurityController#delete(Long)}
+ * Тест проверяет получение id сущности {@link Long} по REST API и отправку в Apache Kafka.
+ * Входной запрос /securities/fixed-income-securities/{@link Long}: - 0L
+ */ + @Test + void delete() throws Exception { + //ARRANGE + long id = currentId.getAndIncrement(); + CommonDeleteAction deleteAction = new CommonDeleteAction(); + deleteAction.setId(id); + FixedIncomeSecurity fixedIncomeSecurity = getFixedIncomeSecurity(id); + + //ACT and ASSERT + checkDeletingWithIdVolidationByRestApi(IMDGDistributedNames.Map_MoneyMarketSecurity, fixedIncomeSecurity, + REST_URL, id); + checkSendedMessegeFromKafka(Consts.DESTINATION_FIXED_INCOME_SECURITY_DELETE, deleteAction); + } + + /** + * {@link CudFixedIncomeSecurityController#getAll()}
+ * Тест проверяет получение запроса по REST API.
+ * Входной запрос /securities/fixed-income-securities/
+ * Ответ CommonGetAllResponse
+ */ + @Test + void getAll() throws Exception { + //ARRANGE + FixedIncomeSecurity fixedIncomeSecurity = getFixedIncomeSecurity(currentId.get()); + + //ACT and ASSERT + checkGettingAllFromRestApi(IMDGDistributedNames.Map_FixedIncomeSecurity, fixedIncomeSecurity, REST_URL); + } + + private FixedIncomeSecurity getFixedIncomeSecurity(Long id) { + FixedIncomeSecurity fixedIncomeSecurity = new FixedIncomeSecurity(); + fixedIncomeSecurity.setId(id); + fixedIncomeSecurity.setSecurityId(currentId.get()); + fixedIncomeSecurity.setBondType("bType"); + fixedIncomeSecurity.setLotSize(BigDecimal.valueOf(120.33)); + fixedIncomeSecurity.setShortName("name"); + fixedIncomeSecurity.setWorkflowStatus(Status.Active.getKey()); + fixedIncomeSecurity.setFullName("name 2"); + return fixedIncomeSecurity; + } +} \ No newline at end of file diff --git a/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/securities/CudMoneyMarketSecurityControllerTest.java b/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/securities/CudMoneyMarketSecurityControllerTest.java index 13a606443..14414ea13 100644 --- a/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/securities/CudMoneyMarketSecurityControllerTest.java +++ b/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/securities/CudMoneyMarketSecurityControllerTest.java @@ -4,7 +4,6 @@ import org.junit.jupiter.api.Test; import ru.clearing.classes.statics.data.misc.MoneyMarketSecurity; import ru.spcex.clearing.backendapi.controller.queue.AbstractControllerTest; import ru.spcex.clearing.backendapi.controller.request.cud.common.CommonDeleteAction; -import ru.spcex.clearing.backendapi.controller.request.cud.schedule.PlannerTemplateNewAction; import ru.spcex.clearing.backendapi.controller.request.cud.securities.MoneyMarketSecurityNewAction; import ru.spcex.clearing.backendapi.controller.request.cud.securities.MoneyMarketSecurityUpdateAction; import ru.spcex.clearing.imdg.IMDGDistributedNames; @@ -19,8 +18,8 @@ class CudMoneyMarketSecurityControllerTest extends AbstractControllerTest { /** * {@link CudMoneyMarketSecurityController#add(MoneyMarketSecurityNewAction)}
- * Тест проверяет получение сущности {@link PlannerTemplateNewAction} по REST API и отправку в Apache Kafka.
- * Входной запрос {@link PlannerTemplateNewAction}:
+ * Тест проверяет получение сущности {@link MoneyMarketSecurityNewAction} по REST API и отправку в Apache Kafka.
+ * Входной запрос {@link MoneyMarketSecurityNewAction}:
*/ @Test void add() throws Exception { @@ -32,7 +31,8 @@ class CudMoneyMarketSecurityControllerTest extends AbstractControllerTest { moneyMarketSecurityNewAction.setNominalCurrency("nominal"); moneyMarketSecurityNewAction.setInstrumentType("status"); moneyMarketSecurityNewAction.setFullName("fname"); - moneyMarketSecurityNewAction.setSecuritySymbol("sname"); + moneyMarketSecurityNewAction.setShortName("shortName"); + moneyMarketSecurityNewAction.setSecuritySymbol("s-symbol"); moneyMarketSecurityNewAction.setLotSize(new BigDecimal("3.5")); //ACT and ASSERT diff --git a/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/utilities/CudKeyRateControllerTest.java b/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/utilities/CudKeyRateControllerTest.java index 2d402727e..384198de5 100644 --- a/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/utilities/CudKeyRateControllerTest.java +++ b/clearing-parent/backend-api/src/test/java/ru/spcex/clearing/backendapi/controller/queue/utilities/CudKeyRateControllerTest.java @@ -59,7 +59,7 @@ class CudKeyRateControllerTest extends AbstractControllerTest { /** * {@link CudKeyRateController#delete(Long)}
* Тест проверяет получение id сущности {@link Long} по REST API и отправку в Apache Kafka.
- * Входной запрос /securities/bank-accounts/{@link Long}: - 0L
+ * Входной запрос /utilities/key-rates/{@link Long}: - 0L
*/ @Test void delete() throws Exception { diff --git a/clearing-parent/backend-api/src/test/resources/meta.json b/clearing-parent/backend-api/src/test/resources/meta.json index 7e229363c..ae0b87f27 100644 --- a/clearing-parent/backend-api/src/test/resources/meta.json +++ b/clearing-parent/backend-api/src/test/resources/meta.json @@ -1,7205 +1,8829 @@ - - { - "version": "2.4.0.14", - - "enums": { - - "chargeDirection": { - - "name": "Направление начисления комиссии", - - "class": "ru.clearing.platform.dictionary.", - - "table": "charge_direction_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Направление комиссии","shortname": "Направление комиссии","type": 2,"length": 50 - } - ] - } - , - "chargeType": { - - "name": "Справочник типов комиссий", - - "class": "ru.clearing.platform.dictionary.", - - "table": "charge_type_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Тип комиссии","shortname": "Тип комиссии","type": 2,"length": 50 - } - ] - } - , - "courierType": { - - "name": "Способ доставки документа", - - "class": "ru.clearing.platform.dictionary.", - - "table": "courier_type_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Способ доставки","shortname": "Способ доставки","type": 2,"length": 50 - } - ] - } - , - "termType": { - - "name": "Справочник видов инструментов денежного рынка", - - "class": "com.spicex.dictionary.", - - "table": "term_type_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор записи","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Наименование","shortname": "Тип","type": 2,"length": 255 - } - ] - } - , - "task": { - - "name": "Справочник задач", - - "class": "com.spicex.dictionary.TaskDictionary", - - "table": "task_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор записи","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Задача","shortname": "Задача","type": 2,"length": 150 - } - ] - } - , - "taskStatus": { - - "name": "Справочник статусов задач", - - "class": "com.spicex.dictionary.TaskStatusDictionary", - - "table": "task_status_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор записи","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Статус","shortname": "Статус","type": 2,"length": 50 - } - ] - } - , - "dayStatus": { - - "name": "Справочник статусов дней", - - "class": "ru.clearing.platform.dictionary.DayStatusDictionary", - - "table": "day_status_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор записи","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Статус дня","shortname": "Статус","type": 2,"length": 50 - } - ] - } - , - "transactionStatus": { - - "name": "Справочник статусов транзакций", - - "class": "com.spicex.dictionary.TransactionStatusDictionary", - - "table": "transaction_status_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор записи","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Статус транзакции","shortname": "Статус","type": 2,"length": 50 - } - ] - } - , - "parent": { - - "name": "Справочник источников", - - "class": "com.spicex.dictionary.ParentDictionary", - - "table": "parent_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор записи","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Наименование","shortname": "Источник","type": 2,"length": 50 - } - ] - } - , - "clearingStatus": { - - "name": "Справочник результатов клиринга", - - "class": "com.spicex.dictionary.", - - "table": "clearing_status_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор записи","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Наименование","shortname": "Тип","type": 2,"length": 255 - } - ] - } - , - "workflowStatus": { - - "name": "Справочник статусов бизнес-процессов", - - "class": "com.spicex.dictionary.", - - "table": "workflow_status_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор записи","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Наименование","shortname": "Тип","type": 2,"length": 255 - } - ] - } - , - "accountStatus": { - - "name": "Справочник статусов счетов", - - "class": "com.spicex.dictionary.AccountStatus", - - "table": "account_status_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор записи","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Наименование","shortname": "Тип","type": 2,"length": 50 - } - ] - } - , - "allowed": { - - "name": "Справочник признаков допустимости использования объектов", - - "class": "com.spicex.platform.dictionary.AllowedDictionary", - - "table": "allowed_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Признак допустимости","shortname": "Допустимость","type": 2,"length": 50 - } - ] - } - , - "moneyFlowSide": { - - "name": "Направление заявки", - - "class": "ru.clearing.platform.dictionary.MoneyFlowSideDictionary", - - "table": "money_flow_side_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Значение","shortname": "Значение","type": 2,"length": 255 - } - ] - } - , - "inOutDirection": { - - "name": "Справочник значений направления денежного потока", - - "class": "ru.clearing.platform.dictionary.InOutDirectionDictionary", - - "table": "in_out_direction_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Значение","shortname": "Значение","type": 2,"length": 255 - } - ] - } - , - "statementType": { - - "name": "Справочник типов поступлений/списаний от ПРЦ", - - "class": "ru.clearing.platform.dictionary.StatementTypeDictionary", - - "table": "statement_type_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Значение","shortname": "Значение","type": 2,"length": 255 - } - ] - } - , - "operationType": { - - "name": "Справочник типов операций", - - "class": "ru.clearing.platform.dictionary.OperationTypeDictionary", - - "table": "operation_type_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Значение","shortname": "Значение","type": 2,"length": 255 - } - ] - } - , - "operationStatus": { - - "name": "Справочник статусов операций", - - "class": "ru.clearing.platform.dictionary.OperationStatusDictionary", - - "table": "operation_status_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Значение","shortname": "Значение","type": 2,"length": 255 - } - ] - } - , - "balanceAccountType": { - - "name": "Справочник типов лимитов", - - "class": "com.spicex.platform.dictionary.balanceAccountTypeDictionary", - - "table": "balance_account_type_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Тип лимитов","shortname": "Тип","type": 2,"length": 50 - } - ] - } - , - "countryCode": { - - "name": "Справочник кодов стран", - - "class": "ru.clearing.platform.dictionary.CountryCodeDictionary", - - "table": "country_code_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор записи","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Наименование","type": 2,"length": 255 - } - ] - } - , - "clearingCategory": { - - "name": "Справочник категорий участника клиринга", - - "class": "com.spicex.dictionary.ClearingMemberCategoryDictionary", - - "table": "clearing_category_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор записи","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Наименование","shortname": "Наименование","type": 2,"length": 255 - } - ] - } - , - "contactType": { - - "name": "Справочник типов контактов Компании", - - "class": "com.spicex.dictionary.", - - "table": "contact_type_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор записи","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Наименование","shortname": "Тип","type": 2,"length": 255 - } - ] - } - , - "corporationSoleType": { - - "name": "Единоличный исполнительный орган", - - "class": "com.spicex.dictionary.", - - "table": "corporation_sole_type_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор записи","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Наименование","shortname": "Наименование","type": 2,"length": 255 - } - ] - } - , - "connectionState": { - - "name": "Справочник состояний соединений", - - "class": "com.spicex.dictionary.ConnectionStateDictionary", - - "table": "connection_state_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор записи","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Наименование","shortname": "Состояние","type": 2,"length": 50 - } - ] - } - , - "documentType": { - - "name": "Справочник типов документов", - - "class": "com.spicex.dictionary.", - - "table": "document_type_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор записи","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Наименование","shortname": "Тип","type": 2,"length": 255 - } - ] - } - , - "legalKind": { - - "name": "Справочник видов субъекта", - - "class": "com.spicex.dictionary.", - - "table": "legal_kind_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор записи","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Наименование","shortname": "Вид","type": 2,"length": 255 - } - ] - } - , - "organizationType": { - - "name": "Справочник типов организаций", - - "class": "com.spicex.dictionary.", - - "table": "organization_type_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор записи","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Наименование","shortname": "Тип","type": 2,"length": 255 - } - ] - } - , - "companySymbol": { - - "name": "Справочник имен Компании", - - "class": "com.spicex.dictionary.", - - "logUpdates": "true", - - "table": "company_symbol_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор записи","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Наименование","shortname": "Полное имя","type": 2,"length": 255 - } - , - {"code": "shortname", - "name": "Краткое наименование","shortname": "Имя","type": 2,"length": 255 - } - ] - } - , - "companyRole": { - - "name": "Справочник ролей Компаний", - - "class": "com.spicex.dictionary.", - - "table": "company_role_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор записи","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Роль Участника","shortname": "Роль","type": 2,"length": 255 - } - ] - } - , - "userRole": { - - "name": "Роли пользователей", - - "class": "com.spicex.dictionary.UserRole", - - "table": "user_role_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор записи","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Роль пользователя","shortname": "Роль","type": 2,"length": 50 - } - ] - } - , - "accountType": { - - "name": "Справочник типов счетов", - - "class": "com.spicex.dictionary.AccountTypeDictionary", - - "table": "account_type_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор записи","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Наименование","shortname": "Наименование","type": 2,"length": 255 - } - ] - } - , - "instrumentType": { - - "name": "Справочник типов инструмента", - - "class": "com.spicex.dictionary.", - - "table": "instrument_type_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор записи","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Наименование","shortname": "Тип","type": 2,"length": 255 - } - ] - } - , - "currencyCode": { - - "name": "Справочник кодов валют", - - "class": "com.spicex.dictionary.", - - "table": "currency_code_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор записи","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Наименование","shortname": "Наименование","type": 2,"length": 255 - } - ] - } - , - "serviceStatus": { - - "name": "Справочник услуги", - - "class": "com.spicex.dictionary.", - - "table": "service_status_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор записи","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Наименование","shortname": "Наименование","type": 2,"length": 255 - } - ] - } - , - "service": { - - "name": "Справочник услуги", - - "class": "com.spicex.dictionary.", - - "table": "service_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор записи","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Наименование","shortname": "Наименование","type": 2,"length": 255 - } - ] - } - , - "serviceProduct": { - - "name": "Справочник продукта для услуги", - - "class": "com.spicex.dictionary.", - - "table": "service_product_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор записи","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Наименование","shortname": "Наименование","type": 2,"length": 255 - } - ] - } - , - "sector": { - - "name": "Справочник секций", - - "class": "com.spicex.dictionary.", - - "table": "sector_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор записи","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Наименование","shortname": "Наименование","type": 2,"length": 255 - } - ] - } - , - "resultStatus": { - - "name": "Статус обработки", - - "class": "com.spicex.dictionary.", - - "table": "result_status_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор записи","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Статус обработки","shortname": "Статус","type": 2,"length": 255 - } - ] - } - , - "errorCode": { - - "name": "Коды ошибок", - - "class": "com.spicex.dictionary.", - - "table": "error_code_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор записи","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Текст ошибки","shortname": "Ошибка","type": 2,"length": 255 - } - ] - } - , - "managementJournalStatus": { - - "name": "Справочник статусов журнала мониторинга и контроля", - - "class": "ru.clearing.platform.dictionary.managementJournalStatusDictionary", - - "table": "management_journal_status_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Статус сообщения","shortname": "Наименование","type": 2,"length": 50 - } - ] - } - , - "managementJournalType": { - - "name": "Справочник типов записей в журнале мониторинга и контроля", - - "class": "ru.clearing.platform.dictionary.managementJournalTypeDictionary", - - "table": "management_journal_type_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Тип записи","shortname": "Наименование","type": 2,"length": 50 - } - ] - } - , - "managementJournalPurpose": { - - "name": "Справочник целей записей в журнале мониторинга и контроля", - - "class": "ru.clearing.platform.dictionary.managementJournalPurposeDictionary", - - "table": "management_journal_purpose_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Тип записи","shortname": "Наименование","type": 2,"length": 50 - } - ] - } - , - "inOutSDfType": { - - "name": "Справочник типов входящих и исходящих записей", - - "class": "ru.clearing.platform.dictionary.inOutSDfTypeDictionary", - - "table": "in_out_s_df_type_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Тип записи","shortname": "Наименование","type": 2,"length": 50 - } - ] - } - , - "sessionStatus": { - - "name": "Справочник статусов клиринговой сессии", - - "class": "ru.clearing.platform.dictionary.SessionStatusDictionary", - - "table": "session_status_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Наименование","shortname": "Наименование","type": 2,"length": 50 - } - ] - } - , - "objectType": { - - "name": "Справочник типов объектов", - - "class": "ru.clearing.platform.dictionary.ObjectTypeDictionary", - - "table": "object_type_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Наименование","shortname": "Наименование","type": 2,"length": 50 - } - ] - } - , - "notificationStatus": { - - "name": "Справочник статусов сообщений", - - "class": "ru.clearing.platform.dictionary.NotificationStatusDictionary", - - "table": "notification_status_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Наименование","shortname": "Наименование","type": 2,"length": 50 - } - ] - } - , - "eventType": { - - "name": "Типы изменений записей", - - "class": "ru.clearing.platform.dictionary.EventTypeDictionary", - - "table": "event_type_dictionary", - - "fields": [ - {"code": "id", - "name": "Идентификатор","shortname": "ID","type": 1 - } - , - {"code": "code", - "name": "Код","shortname": "Код","type": 12 - } - , - {"code": "name", - "name": "Тип события","shortname": "Событие","type": 2,"length": 50 - } - ] - } - - } - - ,"objects": { - - "userCls": { - - "name": "Пользователь", - - "destination": "users", - - "class": "ru.clearing.classes.statics.data.user.User", - - "logUpdates": "true", - - "table": "user_cls", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "createdAt", - "field": "created","type": 4,"name": "Создано","shortname": "Создано","searchable": true,"sortable": true - } - , - {"code": "updatedAt", - "field": "updated","type": 4,"name": "Изменено","shortname": "Изменено","searchable": true,"sortable": true - } - , - {"code": "identifier", - "type": 2,"length": 250,"name": "Внешний идентификатор","shortname": "Идентификатор","searchable": true,"sortable": true,"visible": true - } - , - {"code": "name", - "type": 2,"length": 250,"name": "Имя и фамилия пользователя","shortname": "Имя и фамилия","searchable": true,"sortable": true,"visible": true - } - , - {"code": "firstName", - "type": 2,"length": 250,"name": "Имя пользователя","shortname": "Имя","searchable": true,"sortable": true,"visible": true - } - , - {"code": "lastName", - "type": 2,"length": 250,"name": "Фамилия пользователя","shortname": "Фамилия","searchable": true,"sortable": true,"visible": true - } - , - {"code": "middleName", - "type": 2,"length": 250,"name": "Отчество пользователя","shortname": "Отчество","searchable": true,"sortable": true,"visible": true - } - , - {"code": "email", - "type": 2,"length": 250,"name": "Email пользователя","shortname": "Email","searchable": true,"sortable": true,"visible": true - } - ] - ,"actions":[ - {"method":"put", - - "name": "Авторизация пользователя", - - "fields": [ - {"code": "userName", - "type": 2,"length": 255,"name": "Логин пользователя","required": true - } - , - {"code": "roles", - "type": 2,"length": 255,"name": "Роли пользователя","required": false - } - ] - } - ] - } - , - "userRoleSession": { - - "name": "Набор ролей", - - "destination": "user-role-sessions", - - "class": "ru.clearing.classes.statics.data.user.UserRoleSession", - - "table": "user_role_session", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "userId", - "type": 1,"name": "Идентификатор пользователя","shortname": "Пользователь","searchable": true,"sortable": true,"visible": true,"link": "userCls" - } - , - {"code": "userRole", - "type": 12,"name": "Идентификатор роли","shortname": "Роль","searchable": true,"sortable": true,"visible": true,"link": "userRole" - } - , - {"code": "companyId", - "type": 1,"name": "Идентификатор компании","shortname": "Компания","searchable": true,"sortable": true,"visible": true,"link": "company" - } - , - {"code": "status", - "type": 12,"name": "Статус","shortname": "Статус","searchable": true,"sortable": true,"link": "workflowStatus" - } - ] - - } - , - "userSettings": { - - "name": "Настройки пользователя", - - "destination": "utilities/user-settings", - - "class": "ru.clearing.classes.statics.data.user.UserSettings", - - "table": "user_settings", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "userId", - "type": 1,"name": "Пользователь","shortname": "Пользователь","searchable": true,"sortable": true,"visible": true,"link": "userCls" - } - , - {"code": "version", - "type": 2,"length": 50,"name": "Версия настроек пользователя","shortname": "Версия","searchable": false,"sortable": false,"visible": true - } - , - {"code": "json", - "type": 2,"length": 200000,"name": "Данные конфигурации","shortname": "Конфигурация","searchable": false,"sortable": false,"visible": true - } - ] - ,"actions":[ - {"method":"put", - - "name": "Изменение настроек пользователя", - - "fields": [ - {"code": "userId", - "type": 1,"name": "Пользователь","required": false,"link": "userCls" - } - , - {"code": "version", - "type": 2,"length": 50,"name": "Версия","required": false - } - , - {"code": "json", - "type": 2,"length": 200000,"name": "Настройки","required": false - } - ] - } - ] - } - , - "userConnect": { - - "name": "Активность пользователей в системе", - - "class": "ru.clearing.classes.statics.data.user.UserConnect", - - "logUpdates": "true", - - "table": "user_connect", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "createdAt", - "field": "created","type": 4,"name": "Создано","shortname": "Создано","searchable": true,"sortable": true - } - , - {"code": "updatedAt", - "field": "updated","type": 4,"name": "Изменено","shortname": "Изменено","searchable": true,"sortable": true - } - , - {"code": "userId", - "type": 1,"name": "Пользователь","shortname": "Пользователь","searchable": true,"sortable": true,"visible": true,"link": "userCls" - } - , - {"code": "connectionTime", - "type": 4,"name": "Последнее соединение","shortname": "Вход","searchable": true,"sortable": true - } - , - {"code": "disconnectionTime", - "type": 4,"name": "Разрыв соединения","shortname": "Выход","searchable": true,"sortable": true - } - , - {"code": "serverIp", - "type": 2,"name": "IP адрес сервера","shortname": "IP сервера","searchable": true,"sortable": true,"visible": true,"length": 250 - } - , - {"code": "clientIp", - "type": 2,"name": "IP адрес клиента","shortname": "IP клиента","searchable": true,"sortable": true,"visible": true,"length": 250 - } - , - {"code": "connectionState", - "type": 12,"name": "Статус соединения","shortname": "Статус","searchable": true,"sortable": true,"visible": true,"link": "connectionState" - } - , - {"code": "clearingDate", - "type": 6,"name": "Дата","shortname": "Дата","searchable": true,"sortable": true - } - , - {"code": "errorCode", - "type": 1,"name": "Код ошибки","shortname": "Код ошибки","searchable": true,"sortable": true,"link": "errorCode","linkCode": "code" - } - , - {"code": "errorText", - "type": 12,"name": "Полный текст ошибки","shortname": "Ошибка","searchable": true,"sortable": true,"link": "errorText","linkCode": "text" - } - ] - - } - , - "plannerTemplate": { - - "name": "Шаблон расписания операционного дня", - - "destination": "schedule/planner-templates", - - "class": "ru.clearing.classes.statics.data.scheduler.PlannerTemplate", - - "table": "planner_template", - - "fields": [ - {"code": "task", - "type": 12,"name": "Наименование задачи","shortname": "Задача","searchable": false,"sortable": false,"visible": true,"link": "task" - } - , - {"code": "taskTime", - "type": 5,"name": "Время задачи","shortname": "Время задачи","searchable": false,"sortable": false,"visible": true - } - , - {"code": "taskStatus", - "type": 12,"name": "Статус","shortname": "Статус","searchable": false,"sortable": true,"visible": true,"link": "taskStatus" - } - , - {"code": "companyId", - "type": 1,"name": "Компания","shortname": "Компания","searchable": false,"sortable": false,"visible": true,"link": "company","linkCode": "shortName" - } - , - {"code": "securityId", - "type": 1,"name": "Инструмент","shortname": "Инструмент","searchable": false,"sortable": true,"visible": true,"link": "moneyMarketSecurity","linkCode": "fullName" - } - , - {"code": "id", - "type": 1,"name": "Идентификатор","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "createdAt", - "field": "created","type": 4,"name": "Создано","shortname": "Создано","searchable": true,"sortable": true - } - , - {"code": "updatedAt", - "field": "updated","type": 4,"name": "Изменено","shortname": "Изменено","searchable": true,"sortable": true - } - ] - ,"actions":[ - {"method":"post", - - "name": "Новый шаблон расписания операционного дня", - - "fields": [ - {"code": "task", - "type": 12,"name": "Наименование задачи","shortname": "Задача","link": "task","required": true - } - , - {"code": "taskTime", - "type": 5,"name": "Время задачи","shortname": "Время задачи","required": true - } - , - {"code": "taskStatus", - "type": 12,"name": "Статус","shortname": "Статус","link": "taskStatus","required": true - } - , - {"code": "companyId", - "type": 1,"name": "Компания","shortname": "Компания","link": "company","linkCode": "shortName" - } - , - {"code": "securityId", - "type": 1,"name": "Инструмент","shortname": "Инструмент","link": "moneyMarketSecurity","linkCode": "fullName" - } - ] - } - , - {"method":"put", - - "name": "Изменение шаблона расписания операционного дня", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "plannerTemplate","linkCode": "id","required": true - } - , - {"code": "task", - "type": 12,"name": "Наименование задачи","shortname": "Задача","link": "task" - } - , - {"code": "taskTime", - "type": 5,"name": "Время задачи","shortname": "Время задачи" - } - , - {"code": "taskStatus", - "type": 12,"name": "Статус","shortname": "Статус","link": "taskStatus" - } - , - {"code": "companyId", - "type": 1,"name": "Компания","shortname": "Компания","link": "company","linkCode": "shortName" - } - , - {"code": "securityId", - "type": 1,"name": "Инструмент","shortname": "Инструмент","link": "moneyMarketSecurity","linkCode": "fullName" - } - ] - } - , - {"method":"delete", - - "name": "Удаление шаблона расписания операционного дня", - - "confirmation": "task,taskTime,taskStatus,companyId,securityId", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "plannerTemplate","linkCode": "id","required": true - } - ] - } - ] - } - , - "clearingCalendar": { - - "name": "Рабочие и нерабочие дни", - - "destination": "schedule/clearing-calendars", - - "class": "ru.clearing.classes.statics.data.scheduler.ClearingCalendar", - - "table": "clearing_calendar", - - "fields": [ - {"code": "clearingDate", - "type": 6,"name": "Дата","shortname": "Дата","searchable": false,"sortable": false,"visible": true - } - , - {"code": "companyId", - "type": 1,"name": "Компания","shortname": "Компания","searchable": false,"sortable": false,"visible": true,"link": "company","linkCode": "shortName" - } - , - {"code": "dayStatus", - "type": 12,"name": "Статус","shortname": "Статус","searchable": false,"sortable": true,"visible": true,"link": "dayStatus" - } - , - {"code": "id", - "type": 1,"name": "Идентификатор","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "createdAt", - "field": "created","type": 4,"name": "Создано","shortname": "Создано","searchable": true,"sortable": true - } - , - {"code": "updatedAt", - "field": "updated","type": 4,"name": "Изменено","shortname": "Изменено","searchable": true,"sortable": true - } - ] - ,"actions":[ - {"method":"post", - - "name": "Добавление записи в календарь", - - "fields": [ - {"code": "clearingDate", - "type": 6,"name": "Дата","shortname": "Дата","required": true - } - , - {"code": "dayStatus", - "type": 12,"name": "Статус","shortname": "Статус","link": "dayStatus","required": true - } - , - {"code": "companyId", - "type": 1,"name": "Компания","shortname": "Компания","link": "company","linkCode": "shortName" - } - ] - } - , - {"method":"put", - - "name": "Изменение записи в календаре", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "clearingCalendar","linkCode": "id","required": true - } - , - {"code": "clearingDate", - "type": 6,"name": "Дата","shortname": "Дата" - } - , - {"code": "dayStatus", - "type": 12,"name": "Статус","shortname": "Статус","link": "dayStatus" - } - , - {"code": "companyId", - "type": 1,"name": "Компания","shortname": "Компания","link": "company","linkCode": "shortName" - } - ] - } - , - {"method":"delete", - - "name": "Удаление записи из календаря", - - "confirmation": "clearingDate,dayStatus,companyId", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "clearingCalendar","linkCode": "id","required": true - } - ] - } - ] - } - , - "planner": { - - "name": "Расписание", - - "destination": "schedule/planners", - - "class": "ru.clearing.classes.statics.data.scheduler.Planner", - - "table": "planner", - - "fields": [ - {"code": "task", - "type": 12,"name": "Наименование задачи","shortname": "Задача","searchable": false,"sortable": false,"visible": true,"link": "task" - } - , - {"code": "taskTime", - "type": 5,"name": "Время задачи","shortname": "Время задачи","searchable": false,"sortable": false,"visible": true - } - , - {"code": "clearingDate", - "type": 6,"name": "Дата задачи","shortname": "Дата задачи","searchable": false,"sortable": false,"visible": true - } - , - {"code": "market", - "type": 12,"name": "Секция","shortname": "Секция","searchable": false,"sortable": false,"visible": true,"link": "market","linkCode": "name" - } - , - {"code": "taskStatus", - "type": 12,"name": "Статус","shortname": "Статус","searchable": false,"sortable": true,"visible": true,"link": "taskStatus" - } - , - {"code": "companyId", - "type": 1,"name": "Компания","shortname": "Компания","searchable": false,"sortable": false,"visible": true,"link": "company","linkCode": "shortName" - } - , - {"code": "securityId", - "type": 1,"name": "Инструмент","shortname": "Инструмент","searchable": false,"sortable": true,"visible": true,"link": "moneyMarketSecurity","linkCode": "fullName" - } - , - {"code": "id", - "type": 1,"name": "Идентификатор","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "createdAt", - "field": "created","type": 4,"name": "Создано","shortname": "Создано","searchable": true,"sortable": true - } - , - {"code": "updatedAt", - "field": "updated","type": 4,"name": "Изменено","shortname": "Изменено","searchable": true,"sortable": true - } - ] - ,"actions":[ - {"method":"post", - - "name": "Новое расписание", - - "fields": [ - {"code": "task", - "type": 12,"name": "Наименование задачи","shortname": "Задача","link": "task","required": true - } - , - {"code": "clearingDate", - "type": 6,"name": "Дата задачи","shortname": "Дата задачи","required": true - } - , - {"code": "taskTime", - "type": 5,"name": "Время задачи","shortname": "Время задачи","required": true - } - , - {"code": "market", - "type": 12,"name": "Секция","shortname": "Секция","link": "market","linkCode": "name" - } - , - {"code": "taskStatus", - "type": 12,"name": "Статус","shortname": "Статус","link": "taskStatus","required": true - } - , - {"code": "companyId", - "type": 1,"name": "Компания","shortname": "Компания","link": "company","linkCode": "shortName" - } - , - {"code": "securityId", - "type": 1,"name": "Инструмент","shortname": "Инструмент","link": "moneyMarketSecurity","linkCode": "fullName" - } - ] - } - , - {"method":"put", - - "name": "Изменение расписания", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "planner","required": true,"linkCode": "id" - } - , - {"code": "task", - "type": 12,"name": "Наименование задачи","shortname": "Задача","link": "task" - } - , - {"code": "taskTime", - "type": 5,"name": "Время задачи","shortname": "Время задачи" - } - , - {"code": "clearingDate", - "type": 6,"name": "Дата задачи","shortname": "Дата задачи" - } - , - {"code": "market", - "type": 12,"name": "Секция","shortname": "Секция","link": "market","linkCode": "name" - } - , - {"code": "taskStatus", - "type": 12,"name": "Статус","shortname": "Статус","link": "taskStatus" - } - , - {"code": "companyId", - "type": 1,"name": "Компания","shortname": "Компания","link": "company","linkCode": "shortName" - } - , - {"code": "securityId", - "type": 1,"name": "Инструмент","shortname": "Инструмент","link": "moneyMarketSecurity","linkCode": "fullName" - } - ] - } - , - {"method":"delete", - - "name": "Удаление расписания", - - "confirmation": "task,taskTime,clearingDate,market,taskStatus,companyId,securityId", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "planner","linkCode": "id","required": true - } - ] - } - ] - } - , - "plannerAllToday": { - - "name": "Расписание на текущий день", - - "destination": "schedule/planners-all-today", - - "class": "ru.clearing.classes.statics.data.scheduler.PlannerAllToday", - - "table": "planner_all_today", - - "fields": [ - {"code": "task", - "type": 12,"name": "Идентификатор задачи","shortname": "Задача","searchable": true,"sortable": true,"visible": true,"link": "task" - } - , - {"code": "taskTime", - "type": 5,"name": "Время","shortname": "Время","searchable": true,"sortable": true,"visible": true - } - , - {"code": "clearingDate", - "type": 6,"name": "Дата","shortname": "Дата","searchable": true,"sortable": true,"visible": true - } - , - {"code": "market", - "type": 12,"name": "Секция","shortname": "Секция","searchable": true,"sortable": true,"visible": true,"link": "market","linkCode": "name" - } - , - {"code": "taskStatus", - "type": 12,"name": "Статус","shortname": "Статус","searchable": true,"sortable": true,"visible": true,"link": "taskStatus" - } - , - {"code": "companyId", - "type": 1,"name": "Компания","shortname": "Компания","searchable": false,"sortable": false,"visible": true,"link": "company","linkCode": "shortName" - } - , - {"code": "securityId", - "type": 1,"name": "Инструмент","shortname": "Инструмент","searchable": true,"sortable": true,"visible": true,"link": "moneyMarketSecurity","linkCode": "fullName" - } - , - {"code": "parent", - "type": 12,"name": "Источник записи расписания","shortname": "Источник","searchable": true,"sortable": true,"link": "parent" - } - , - {"code": "parentId", - "type": 1,"name": "Идентификатор записи в таблице-источнике","shortname": "ID источника","searchable": false,"sortable": false - } - , - {"code": "id", - "type": 1,"name": "Идентификатор","shortname": "ID","searchable": true,"sortable": true - } - ] - - } - , - "launcher": { - - "name": "Запуск задачи", - - "destination": "launchers", - - "class": "ru.clearing.classes.statics.data.scheduler.Launcher", - - "table": "launcher", - - "fields": [ - {"code": "senderId", - "type": 1,"name": "Отправитель","shortname": "Отправитель","searchable": true,"sortable": true,"visible": true,"link": "userCls" - } - , - {"code": "task", - "type": 12,"name": "Задача","shortname": "Задача","searchable": true,"sortable": true,"visible": true,"link": "task" - } - , - {"code": "id", - "type": 1,"name": "Идентификатор","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "createdAt", - "field": "created","type": 4,"name": "Создано","shortname": "Создано","searchable": true,"sortable": true - } - , - {"code": "updatedAt", - "field": "updated","type": 4,"name": "Изменено","shortname": "Изменено","searchable": true,"sortable": true - } - ] - ,"actions":[ - {"method":"post", - - "destination": "GBAL", - - "group": "Обмен с расчетной организацией", - - "name": "Зачисление остатков (загрузка ДФ-01)", - - "fields": [] - } - , - {"method":"post", - - "destination": "ABLK", - - "group": "Обмен с расчетной организацией", - - "name": "Блокировка счета (загрузка ДФ-12)", - - "fields": [] - } - , - {"method":"post", - - "destination": "GALB", - - "group": "Обмен с расчетной организацией", - - "name": "Запрос остатков по всем счетам (экспорт ДФ-08)", - - "fields": [] - } - , - {"method":"post", - - "destination": "ADBL", - - "group": "Обмен с расчетной организацией", - - "name": "Дозачисление/списание остатков (загрузка ДФ-16)", - - "fields": [] - } - , - {"method":"post", - - "destination": "GBLD", - - "group": "Обмен с расчетной организацией", - - "name": "Поступление средств (загрузка ДФ-09)", - - "fields": [] - } - , - {"method":"post", - - "destination": "CORD", - - "group": "Обмен с расчетной организацией", - - "name": "Формирование сводного платежного поручения (экспорт ДФ-03/ДФ-11)", - - "fields": [] - } - , - {"method":"post", - - "destination": "CORC", - - "group": "Обмен с расчетной организацией", - - "name": "Получение подтверждения переводов (загрузка ДФ-04)", - - "fields": [] - } - , - {"method":"post", - - "destination": "CMBA", - - "group": "Обмен с расчетной организацией", - - "name": "Формирование распоряжения на перевод с ТБС (экспорт ДФ-11)", - - "fields": [] - } - , - {"method":"post", - - "destination": "GTRD", - - "group": "Обмен с Торговой системой", - - "name": "Получение сделок из Торговой системы", - - "fields": [] - } - , - {"method":"post", - - "destination": "GACA", - - "group": "Обмен с Торговой системой", - - "name": "Создание файла остатков CSV по клиринговым счетам", - - "fields": [] - } - , - {"method":"post", - - "destination": "GAIA", - - "group": "Обмен с Торговой системой", - - "name": "Создание файла остатков CSV по внутренним информационным счетам", - - "fields": [] - } - , - {"method":"post", - - "destination": "SCLR", - - "group": "Клиринг", - - "name": "Запуск клиринговой сессии", - - "confirmation": "companyId,securityId", - - "fields": [ - {"code": "companyId", - "type": 1,"name": "Инициатор","shortname": "Инициатор","link": "company","linkCode": "shortName" - } - , - {"code": "securityId", - "type": 1,"name": "Инструмент","shortname": "Инструмент","link": "moneyMarketSecurity","linkCode": "fullName" - } - ] - } - , - {"method":"post", - - "destination": "SPRC", - - "group": "Клиринг", - - "name": "Запуск преклиринга", - - "fields": [] - } - , - {"method":"post", - - "destination": "SPOC", - - "group": "Клиринг", - - "name": "Запуск постклиринга", - - "fields": [] - } - , - {"method":"post", - - "destination": "GVER", - - "group": "Клиринг", - - "name": "Запуск сверки", - - "fields": [] - } - , - {"method":"post", - - "destination": "GCMR", - - "group": "Клиринг", - - "name": "Формирование реестра участников клиринга", - - "fields": [] - } - , - {"method":"post", - - "destination": "GBRR", - - "group": "Клиринг", - - "name": "Формирование реестра остатков денежных средств", - - "fields": [] - } - , - {"method":"post", - - "destination": "GORR", - - "group": "Клиринг", - - "name": "Формирование реестра распоряжений, направленных расчетной организации", - - "fields": [] - } - , - {"method":"post", - - "destination": "GSRR", - - "group": "Клиринг", - - "name": "Формирование реестра отправленных отчетов", - - "fields": [] - } - , - {"method":"post", - - "destination": "GREP", - - "group": "Клиринг", - - "name": "Формирование отчетности", - - "fields": [] - } - ] - } - , - "company": { - - "name": "Компании", - - "destination": "companies", - - "class": "ru.clearing.classes.statics.data.company.Company", - - "logUpdates": "true", - - "table": "company", - - "fields": [ - {"code": "shortName", - "type": 2,"length": 255,"name": "Краткое наименование Компании","shortname": "Компания","searchable": true,"sortable": true,"visible": true - } - , - {"code": "fullName", - "type": 2,"length": 255,"name": "Полное наименование Компании","shortname": "Полное наименование","searchable": true,"sortable": true,"visible": true - } - , - {"code": "tradingCode", - "type": 2,"length": 255,"name": "Код участника торгов","shortname": "Торговый код","searchable": true,"sortable": true,"visible": true - } - , - {"code": "clearingCode", - "type": 2,"length": 255,"name": "Код участника клиринга","shortname": "Клиринговый код","searchable": true,"sortable": true,"visible": true - } - , - {"code": "registrationCode", - "type": 2,"length": 255,"name": "Регистрационный код участника","shortname": "Регистрационный код","searchable": true,"sortable": true,"visible": true - } - , - {"code": "workflowStatus", - "type": 12,"name": "Статус","shortname": "Статус","searchable": true,"sortable": true,"link": "workflowStatus" - } - , - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "createdAt", - "field": "created","type": 4,"name": "Дата и время создания записи","shortname": "Создано","searchable": true,"sortable": true - } - , - {"code": "updatedAt", - "field": "updated","type": 4,"name": "Дата и время изменения записи","shortname": "Изменено","searchable": true,"sortable": true - } - ] - ,"actions":[ - {"method":"delete", - - "name": "Удаление компании", - - "confirmation": "shortName,tradingCode", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "company","linkCode": "id","required": true - } - ] - } - ] - } - , - "companyInfo": { - - "name": "Профили Компаний", - - "destination": "company-infos", - - "class": "ru.clearing.classes.statics.data.profile.CompanyInfo", - - "logUpdates": "true", - - "table": "company_info", - - "fields": [ - {"code": "companyId", - "type": 1,"name": "Наименование Компании","shortname": "Компания","searchable": true,"sortable": true,"visible": true,"link": "company","linkCode": "shortName" - } - , - {"code": "corporationSoleType", - "type": 12,"name": "Единоличный исполнительный орган","shortname": "Исполнительный орган","searchable": true,"sortable": true,"visible": true,"link": "corporationSoleType" - } - , - {"code": "countryCode", - "type": 12,"name": "Юрисдикция","shortname": "Юрисдикция","searchable": true,"sortable": true,"visible": true,"link": "countryCode" - } - , - {"code": "description", - "type": 2,"length": 255,"name": "Описание Участника","shortname": "Описание","searchable": true,"sortable": true,"visible": true - } - , - {"code": "professionalSign", - "type": 12,"name": "Признак проф. Участника","shortname": "Проф. Участник","searchable": true,"sortable": true,"visible": true,"link": "allowed" - } - , - {"code": "legalKind", - "type": 12,"name": "Вид субъекта","shortname": "Юр. лицо/Физ. Лицо","searchable": true,"sortable": true,"visible": true,"link": "legalKind" - } - , - {"code": "organizationType", - "type": 12,"name": "Тип организации","shortname": "Тип организации","searchable": true,"sortable": true,"visible": true,"link": "organizationType" - } - , - {"code": "residence", - "type": 12,"name": "Резиденция","shortname": "Резиденция","searchable": true,"sortable": true,"visible": true,"link": "countryCode" - } - , - {"code": "shortNameEng", - "type": 2,"length": 255,"name": "Краткое наименование Компании на английском","shortname": "Краткое наименование на английском","searchable": true,"sortable": true,"visible": true - } - , - {"code": "fullNameEng", - "type": 2,"length": 255,"name": "Полное наименование Компании на английском","shortname": "Полное наименование на английском","searchable": true,"sortable": true,"visible": true - } - , - {"code": "shortName", - "type": 2,"length": 255,"name": "Краткое наименование Компании","shortname": "Краткое наименование","searchable": true,"sortable": true,"visible": true,"extends": "company" - } - , - {"code": "fullName", - "type": 2,"length": 255,"name": "Полное наименование Компании","shortname": "Полное наименование","searchable": true,"sortable": true,"visible": true,"extends": "company" - } - , - {"code": "tradingCode", - "type": 2,"length": 255,"name": "Код участника торгов","shortname": "Торговый код","searchable": true,"sortable": true,"visible": true,"extends": "company" - } - , - {"code": "clearingCode", - "type": 2,"length": 255,"name": "Код участника клиринга","shortname": "Клиринговый код","searchable": true,"sortable": true,"visible": true,"extends": "company" - } - , - {"code": "registrationCode", - "type": 2,"length": 255,"name": "Регистрационный код участника","shortname": "Регистрационный код","searchable": true,"sortable": true,"visible": true,"extends": "company" - } - , - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - ] - ,"actions":[ - {"method":"put", - - "name": "Изменение профиля компании", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "companyInfo","linkCode": "id","required": true - } - , - {"code": "corporationSoleType", - "type": 12,"name": "Единоличный исполнительный орган","shortname": "Исполнительный орган","link": "corporationSoleType" - } - , - {"code": "countryCode", - "type": 12,"name": "Юрисдикция","shortname": "Юрисдикция","link": "countryCode" - } - , - {"code": "description", - "type": 2,"name": "Описание","shortname": "Описание Участника" - } - , - {"code": "professionalSign", - "type": 12,"name": "Признак проф. Участника","shortname": "Признак проф. Участника","link": "allowed" - } - , - {"code": "legalKind", - "type": 12,"name": "Вид субъекта","shortname": "Юр. лицо/Физ. Лицо","link": "legalKind" - } - , - {"code": "organizationType", - "type": 12,"name": "Тип организации","shortname": "Тип организации","link": "organizationType" - } - , - {"code": "residence", - "type": 12,"name": "Резиденция","shortname": "Резиденция","link": "countryCode" - } - , - {"code": "shortNameEng", - "type": 2,"length": 255,"name": "Краткое наименование Компании на английском","shortname": "Краткое наименование на английском" - } - , - {"code": "fullNameEng", - "type": 2,"length": 255,"name": "Полное наименование Компании на английском","shortname": "Полное наименование на английском" - } - , - {"code": "shortName", - "type": 2,"length": 255,"name": "Краткое наименование Компании","shortname": "Краткое наименование" - } - , - {"code": "fullName", - "type": 2,"length": 255,"name": "Полное наименование Компании","shortname": "Полное наименование" - } - ] - } - ] - } - , - "clearingMemberCategory": { - - "name": "Категории Участника клиринга", - - "destination": "clearing-member-categories", - - "class": "ru.clearing.classes.statics.data.generated.ClearingMemberCategory", - - "table": "clearing_member_category", - - "fields": [ - {"code": "companyId", - "type": 1,"name": "Наименование Компании","shortname": "Компания","searchable": true,"sortable": true,"visible": true,"link": "company","linkCode": "shortName" - } - , - {"code": "clearingMemberCategory", - "type": 12,"name": "Категория участника клиринга","shortname": "Категория","searchable": true,"sortable": true,"visible": true,"link": "clearingCategory" - } - , - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - ] - ,"actions":[ - {"method":"post", - - "name": "Добавление категории участника клиринга", - - "fields": [ - {"code": "companyId", - "type": 1,"name": "Наименование Компании","shortname": "Компания","link": "company","linkCode": "shortName","required": true - } - , - {"code": "clearingMemberCategory", - "type": 12,"name": "Категория участника клиринга","shortname": "Категория","link": "clearingCategory","required": true - } - ] - } - , - {"method":"put", - - "name": "Изменение категории участника клиринга", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "clearingCategory","linkCode": "id","required": true - } - , - {"code": "clearingMemberCategory", - "type": 12,"name": "Категория участника клиринга","shortname": "Категория","link": "clearingCategory" - } - ] - } - , - {"method":"delete", - - "name": "Удаление категории участника клиринга", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "clearingCategory","linkCode": "id","required": true - } - ] - } - ] - } - , - "contact": { - - "name": "Контакты Компании", - - "destination": "contacts", - - "class": "ru.clearing.classes.statics.data.profile.Contact", - - "table": "contact", - - "fields": [ - {"code": "companyId", - "type": 1,"name": "Наименование Компании","shortname": "Компания","searchable": true,"sortable": true,"visible": true,"link": "company","linkCode": "shortName" - } - , - {"code": "contactType", - "type": 12,"name": "Наименование справочника","shortname": "Тип контакта","searchable": true,"sortable": true,"visible": true,"link": "contactType" - } - , - {"code": "contactValue", - "type": 2,"length": 255,"name": "Значение справочника","shortname": "Значение","searchable": true,"sortable": true,"visible": true - } - , - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - ] - ,"actions":[ - {"method":"put", - - "name": "Изменение контактов компании", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "contact","linkCode": "id","required": true - } - , - {"code": "contactType", - "type": 12,"name": "Наименование справочника","shortname": "Тип контакта","link": "contactType" - } - , - {"code": "contactValue", - "type": 2,"length": 255,"name": "Значение справочника","shortname": "Значение" - } - ] - } - ] - } - , - "profileDocument": { - - "name": "Досье Компании", - - "destination": "profile-documents", - - "class": "ru.clearing.classes.statics.data.profile.ProfileDocument", - - "table": "profile_document", - - "fields": [ - {"code": "companyId", - "type": 1,"name": "Наименование Компании","shortname": "Компания","searchable": true,"sortable": true,"visible": true,"link": "company","linkCode": "shortName" - } - , - {"code": "documentType", - "type": 12,"name": "Тип документа","shortname": "Тип документа","searchable": true,"sortable": true,"visible": true,"link": "documentType" - } - , - {"code": "issueDate", - "type": 6,"name": "Дата выдачи","shortname": "Дата выдачи","searchable": true,"sortable": true - } - , - {"code": "issuePlace", - "type": 2,"length": 255,"name": "Место выдачи","shortname": "Место выдачи","searchable": true,"sortable": true,"visible": true - } - , - {"code": "issuer", - "type": 2,"length": 255,"name": "Кем выдан","shortname": "Кем выдан","searchable": true,"sortable": true,"visible": true - } - , - {"code": "issuerCode", - "type": 2,"length": 255,"name": "Код выдавшего органа","shortname": "Код выдавшего органа","searchable": true,"sortable": true,"visible": true - } - , - {"code": "name", - "type": 2,"length": 255,"name": "Наименование","shortname": "Наименование","searchable": true,"sortable": true,"visible": true - } - , - {"code": "number", - "type": 2,"length": 255,"name": "Номер документа","shortname": "Номер","searchable": true,"sortable": true,"visible": true - } - , - {"code": "place", - "type": 2,"length": 255,"name": "Место","shortname": "Место","searchable": true,"sortable": true,"visible": true - } - , - {"code": "validFromDate", - "type": 6,"name": "Дата начала срока действия","shortname": "Дата начала срока действия","searchable": true,"sortable": true - } - , - {"code": "validToDate", - "type": 6,"name": "Дата окончания срока действия","shortname": "Дата окончания срока действия","searchable": true,"sortable": true - } - , - {"code": "link", - "type": 2,"length": 255,"name": "Ссылка на документ","shortname": "Ссылка на документ","searchable": true,"sortable": true,"visible": true - } - , - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - ] - ,"actions":[ - {"method":"post", - - "name": "Добавление документов", - - "confirmation": "number,companyId", - - "fields": [ - {"code": "companyId", - "type": 1,"name": "Наименование Компании","shortname": "Компании","link": "company","linkCode": "shortName","required": true - } - , - {"code": "documentType", - "type": 12,"name": "Тип документа","shortname": "Тип документа","link": "documentType","required": true - } - , - {"code": "issueDate", - "type": 6,"name": "Дата выдачи","shortname": "Дата выдачи","required": true - } - , - {"code": "issuePlace", - "type": 2,"length": 255,"name": "Место выдачи","shortname": "Место выдачи","required": true - } - , - {"code": "issuer", - "type": 2,"length": 255,"name": "Кем выдан","shortname": "Кем выдан","required": true - } - , - {"code": "issuerCode", - "type": 2,"length": 255,"name": "Код выдавшего органа","shortname": "Код выдавшего органа","required": true - } - , - {"code": "name", - "type": 2,"length": 255,"name": "Наименование","shortname": "Наименование","required": true - } - , - {"code": "number", - "type": 2,"length": 255,"name": "Номер документа","shortname": "Номер документа","required": true - } - , - {"code": "place", - "type": 2,"length": 255,"name": "Место","shortname": "Место","required": true - } - , - {"code": "validFromDate", - "type": 6,"name": "Дата начала срока действия","shortname": "Дата начала срока действия","required": true - } - , - {"code": "validToDate", - "type": 6,"name": "Дата окончания срока действия","shortname": "Дата окончания срока действия","required": true - } - , - {"code": "link", - "type": 2,"length": 255,"name": "Ссылка на документ","shortname": "Ссылка на документ" - } - ] - } - ] - } - , - "companySymbols": { - - "name": "Реквизиты Компании", - - "destination": "company-symbols", - - "class": "ru.clearing.classes.statics.data.company.CompanySymbols", - - "table": "company_symbols", - - "fields": [ - {"code": "companyId", - "type": 1,"name": "Наименование Компании","shortname": "Компания","searchable": true,"sortable": true,"visible": true,"link": "company","linkCode": "shortName" - } - , - {"code": "companySymbol", - "type": 12,"name": "Справочник","shortname": "Тип реквизита","searchable": true,"sortable": true,"visible": true,"link": "companySymbol","linkCode": "shortName" - } - , - {"code": "companySymbolValue", - "type": 2,"length": 255,"name": "Значение справочника","shortname": "Значение","searchable": true,"sortable": true,"visible": true - } - , - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - ] - ,"actions":[ - {"method":"put", - - "name": "Изменение реквизитов компании", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "companySymbols","linkCode": "id","required": true - } - , - {"code": "companySymbol", - "type": 12,"name": "Справочник","shortname": "Тип реквизита","link": "companySymbol" - } - , - {"code": "companySymbolValue", - "type": 2,"length": 255,"name": "Значение справочника","shortname": "Значение" - } - ] - } - ] - } - , - "clearmemberRegister": { - - "name": "Реестр участников клиринга", - - "destination": "clearmember-registers", - - "serviceProduct": "MKR", - - "class": "ru.clearing.classes.statics.data.misc.ClearMemberRegister", - - "table": "clearmember_register", - - "fields": [ - {"code": "tradingCode", - "type": 2,"length": 255,"name": "Код участника торгов","shortname": "Торговый код","searchable": true,"sortable": true,"visible": true - } - , - {"code": "clearingCode", - "type": 2,"length": 255,"name": "Код участника клиринга","shortname": "Клиринговый код","searchable": true,"sortable": true,"visible": true - } - , - {"code": "fullName", - "type": 2,"length": 255,"name": "Полное наименование участника клиринга","shortname": "Полное наименование","searchable": true,"sortable": true,"visible": true - } - , - {"code": "shortName", - "type": 2,"length": 255,"name": "Краткое наименование участника клиринга","shortname": "Краткое наименование","searchable": true,"sortable": true,"visible": true - } - , - {"code": "categoryList", - "type": 12,"name": "Категория участника клиринга","shortname": "Категория","searchable": true,"sortable": true,"visible": true,"link": "clearingCategory" - } - , - {"code": "corporationSole", - "type": 12,"name": "Единоличный исполнительный орган","shortname": "Исполнительный орган","searchable": true,"sortable": true,"visible": true,"link": "corporationSoleType" - } - , - {"code": "account", - "type": 2,"length": 50,"name": "Счета","shortname": "Счет","searchable": true,"sortable": true,"visible": true - } - , - {"code": "bank", - "type": 1,"name": "Наименование банка","shortname": "Банк","searchable": true,"sortable": true,"visible": true,"link": "bankAccount" - } - , - {"code": "bankName", - "type": 2,"length": 255,"name": "Наименование банка","shortname": "Банк","searchable": true,"sortable": true,"visible": true - } - , - {"code": "inn", - "type": 2,"length": 255,"name": "Идентификационный номер налогоплательщика (ИНН)","shortname": "ИНН","searchable": true,"sortable": true,"visible": true - } - , - {"code": "bic", - "type": 2,"length": 255,"name": "Банковский идентификационный код (БИК)","shortname": "БИК","searchable": true,"sortable": true,"visible": true - } - , - {"code": "ogrn", - "type": 2,"length": 255,"name": "Основной государственный регистрационный номер","shortname": "ОГРН","searchable": true,"sortable": true,"visible": true - } - , - {"code": "cpp", - "type": 2,"length": 255,"name": "Код причины постановки (КПП)","shortname": "КПП","searchable": true,"sortable": true,"visible": true - } - , - {"code": "ocpo", - "type": 2,"length": 255,"name": "Код в Общероссийском классификаторе предприятий","shortname": "ОКПО","searchable": true,"sortable": true,"visible": true - } - , - {"code": "contractNumber", - "type": 2,"name": "Номер договора","shortname": "Договор","searchable": true,"sortable": true,"visible": true,"length": 255 - } - , - {"code": "contractDate", - "type": 6,"name": "Дата выдачи","shortname": "Выдача","searchable": true,"sortable": true - } - , - {"code": "registrationDate", - "type": 6,"name": "Дата регистрации","shortname": "Регистрация","searchable": true,"sortable": true,"visible": true - } - , - {"code": "systemDate", - "type": 6,"name": "Системная дата","shortname": "Системная дата","searchable": true,"sortable": true - } - , - {"code": "accessDate", - "type": 4,"name": "Дата допуска к КО","shortname": "Допуска к КО","searchable": true,"sortable": true - } - , - {"code": "suspentionDate", - "type": 4,"name": "Дата приостановления","shortname": "Приостановлено","searchable": true,"sortable": true - } - , - {"code": "reopeningDate", - "type": 4,"name": "Дата возобновления","shortname": "Возобновлено","searchable": true,"sortable": true - } - , - {"code": "closeDate", - "type": 4,"name": "Дата прекращения","shortname": "Прекращено","searchable": true,"sortable": true - } - , - {"code": "exclusionDate", - "type": 4,"name": "Дата исключения из реестра","shortname": "Исключено из реестра","searchable": true,"sortable": true - } - , - {"code": "address", - "type": 2,"length": 255,"name": "Адрес местонахождения","shortname": "Адрес","searchable": true,"sortable": true,"visible": true - } - , - {"code": "email", - "type": 2,"length": 255,"name": "Электронная почта","shortname": "Почта","searchable": true,"sortable": true,"visible": true - } - , - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "createdAt", - "field": "created","type": 4,"name": "Дата и время создания записи","shortname": "Создано","searchable": true,"sortable": true - } - , - {"code": "updatedAt", - "field": "updated","type": 4,"name": "Дата и время изменения записи","shortname": "Изменено","searchable": true,"sortable": true - } - ] - - } - , - "clearmemberRegisterChange": { - - "name": "Журнал изменений информации участников клиринга", - - "table": "clearmember_register_change", - - "fields": [ - {"code": "date", - "type": 4,"name": "Дата и время изменения записи","shortname": "Изменено","searchable": true,"sortable": true,"ignore": true - } - , - {"code": "clearingCode", - "type": 2,"length": 255,"name": "Код участника клиринга","shortname": "Клиринговый код","searchable": true,"sortable": true,"visible": true - } - , - {"code": "comment", - "type": 2,"length": 255,"name": "Комментарий","shortname": "Комментарий","searchable": true,"sortable": true,"visible": true - } - ] - - } - , - "keyRate": { - - "name": "Ключевая ставка ЦБ", - - "destination": "utilities/key-rates", - - "class": "ru.clearing.classes.statics.data.misc.KeyRate", - - "table": "key_rate", - - "fields": [ - {"code": "rate", - "type": 10,"name": "Ключевая ставка ЦБ","shortname": "Ставка","searchable": true,"sortable": true,"visible": true - } - , - {"code": "startDate", - "type": 6,"name": "Дата начала действия ключевой ставки","shortname": "Начальная дата","searchable": true,"sortable": true,"visible": true - } - , - {"code": "endDate", - "type": 6,"name": "Дата окончания действия ключевой ставки","shortname": "Конечная дата","searchable": true,"sortable": true,"visible": true - } - , - {"code": "document", - "type": 2,"length": 255,"name": "Документ ЦБ, регламентирующий установку величины ключевой ставки","shortname": "Документ ЦБ","searchable": true,"sortable": true,"visible": true - } - , - {"code": "workflowStatus", - "type": 12,"name": "Статус","shortname": "Статус","searchable": true,"sortable": true,"visible": true,"link": "workflowStatus" - } - , - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - ] - ,"actions":[ - {"method":"post", - - "name": "Добавление ключевой ставки ЦБ", - - "fields": [ - {"code": "rate", - "type": 10,"name": "Ключевая ставка ЦБ","shortname": "Ставка","required": true - } - , - {"code": "startDate", - "type": 6,"name": "Дата начала действия ключевой ставки","shortname": "Начальная дата","required": true - } - , - {"code": "endDate", - "type": 6,"name": "Дата окончания действия ключевой ставки","shortname": "Конечная дата","required": true - } - , - {"code": "document", - "type": 2,"length": 255,"name": "Документ ЦБ","shortname": "Документ ЦБ","required": true - } - ] - } - , - {"method":"put", - - "name": "Изменение ключевой ставки ЦБ", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "keyRate","linkCode": "id","required": true - } - , - {"code": "rate", - "type": 10,"name": "Ключевая ставка ЦБ","shortname": "Ставка" - } - , - {"code": "startDate", - "type": 6,"name": "Дата начала действия ключевой ставки","shortname": "Начальная дата" - } - , - {"code": "endDate", - "type": 6,"name": "Дата окончания действия ключевой ставки","shortname": "Конечная дата" - } - , - {"code": "document", - "type": 2,"length": 255,"name": "Документ ЦБ","shortname": "Документ ЦБ" - } - ] - } - , - {"method":"delete", - - "name": "Удаление ключевой ставки ЦБ", - - "confirmation": "rate,document", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "keyRate","linkCode": "id","required": true - } - ] - } - ] - } - , - "companyRoleSet": { - - "name": "Таблица ролей Компании", - - "destination": "company-role-sets", - - "class": "ru.clearing.classes.statics.data.company.CompanyRoleSet", - - "table": "company_role_set", - - "fields": [ - {"code": "companyId", - "type": 1,"name": "Список ролей Компании","shortname": "Роли Компании","searchable": true,"sortable": true,"visible": true,"link": "company","linkCode": "shortName" - } - , - {"code": "roleId", - "type": 1,"name": "Значение справочника","shortname": "Значение","searchable": true,"sortable": true,"visible": true,"link": "companyRole" - } - , - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - ] - - } - , - "account": { - - "name": "Счета", - - "destination": "accounting/accounts", - - "class": "ru.clearing.classes.statics.data.account.Account", - - "logUpdates": "true", - - "table": "account", - - "fields": [ - {"code": "account", - "type": 2,"length": 50,"name": "Номер счета","shortname": "Счёт","searchable": true,"sortable": true,"visible": true - } - , - {"code": "accountType", - "type": 12,"name": "Тип счета","shortname": "Тип","searchable": true,"sortable": true,"visible": true,"link": "accountType" - } - , - {"code": "relationId", - "type": 1,"name": "Договорные отношения","shortname": "Договор","searchable": true,"sortable": true,"visible": true,"link": "relation","ignore": true - } - , - {"code": "accountStatus", - "type": 12,"name": "Статус","shortname": "Статус","searchable": true,"sortable": true,"visible": true,"link": "accountStatus" - } - , - {"code": "processingSign", - "type": 12,"name": "Признак обработки счета","shortname": "Обработка счета","searchable": true,"sortable": true,"visible": true,"link": "allowed" - } - , - {"code": "companyId", - "type": 1,"name": "Компания","shortname": "Компания","searchable": true,"sortable": true,"visible": true,"link": "company","linkCode": "shortName" - } - , - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "createdAt", - "field": "created","type": 4,"name": "Дата и время создания записи","shortname": "Создано","searchable": true,"sortable": true - } - , - {"code": "updatedAt", - "field": "updated","type": 4,"name": "Дата и время изменения записи","shortname": "Изменено","searchable": true,"sortable": true - } - ] - - } - , - "relation": { - - "name": "Договорные отношения", - - "destination": "relations", - - "class": "ru.clearing.classes.statics.data.company.relation.Relation", - - "logUpdates": "true", - - "table": "relation", - - "fields": [ - {"code": "consumerId", - "type": 1,"name": "Компания пользователя услуги","shortname": "Потребитель","searchable": true,"sortable": true,"visible": true,"link": "company" - } - , - {"code": "supplierId", - "type": 1,"name": "Компания поставщика услуги","shortname": "Поставщик","searchable": true,"sortable": true,"visible": true,"link": "company" - } - , - {"code": "serviceStatus", - "type": 12,"name": "Статус","shortname": "Статус","searchable": true,"sortable": true,"visible": true,"link": "serviceStatus" - } - , - {"code": "service", - "type": 12,"name": "Наименование услуги","shortname": "Услуга","searchable": true,"sortable": true,"visible": true,"link": "service" - } - , - {"code": "serviceProduct", - "type": 12,"name": "Наименование продукта","shortname": "Продукт","searchable": true,"sortable": true,"visible": true,"link": "serviceProduct" - } - , - {"code": "comment", - "type": 2,"length": 255,"name": "Текст причины","shortname": "Причина","searchable": true,"sortable": true,"visible": true - } - , - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "createdAt", - "field": "created","type": 4,"name": "Дата и время создания записи","shortname": "Создано","searchable": true,"sortable": true - } - , - {"code": "updatedAt", - "field": "updated","type": 4,"name": "Дата и время изменения записи","shortname": "Изменено","searchable": true,"sortable": true - } - ] - ,"actions":[ - {"method":"put", - - "name": "Изменение статуса договорных отношений", - - "confirmation": "serviceStatus,comment", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "relation","linkCode": "id","required": true - } - , - {"code": "serviceStatus", - "type": 12,"name": "Наименование статуса","shortname": "Статус","link": "serviceStatus","required": true - } - , - {"code": "comment", - "type": 2,"length": 255,"name": "Текст причины","shortname": "Причина" - } - ] - } - ] - } - , - "bankAccount": { - - "name": "Банковские реквизиты для перечисления денежных средств", - - "destination": "securities/bank-accounts", - - "class": "ru.clearing.classes.statics.data.account.BankAccount", - - "logUpdates": "true", - - "table": "bank_account", - - "fields": [ - {"code": "accountId", - "type": 1,"name": "Номер счета","shortname": "Счет","searchable": true,"sortable": true,"link": "account","ignore": true - } - , - {"code": "bankIdentificationCode", - "type": 2,"length": 255,"name": "Банковский идентификационный код (БИК)","shortname": "БИК","searchable": true,"sortable": true,"visible": true - } - , - {"code": "bankName", - "type": 2,"length": 255,"name": "Наименование банка","shortname": "Наименование","searchable": true,"sortable": true,"visible": true - } - , - {"code": "correspondentAccount", - "type": 2,"length": 255,"name": "Корреспондентский счет","shortname": "Корр. счет","searchable": true,"sortable": true,"visible": true - } - , - {"code": "correspondentAccountName", - "type": 2,"length": 255,"name": "Наименование корреспондентского счета","shortname": "Наименование корр. счета","searchable": true,"sortable": true,"visible": true - } - , - {"code": "currency", - "type": 12,"name": "Валюты","shortname": "Валюта","searchable": true,"sortable": true,"visible": true,"link": "currencyCode","linkCode": "code" - } - , - {"code": "destination", - "type": 2,"length": 255,"name": "Назначение платежа","shortname": "Назначение платежа","searchable": true,"sortable": true,"visible": true - } - , - {"code": "iban", - "type": 2,"length": 255,"name": "Международный номер банковского счета","shortname": "Международный номер банковского счета","searchable": true,"sortable": true,"visible": true - } - , - {"code": "internationalTransferSign", - "type": 12,"name": "Доступность международных переводов","shortname": "Доступность международных переводов","searchable": true,"sortable": true,"visible": true,"link": "allowed" - } - , - {"code": "swiftCode", - "type": 2,"length": 255,"name": "Код SWIFT","shortname": "SWIFT","searchable": true,"sortable": true,"visible": true - } - , - {"code": "taxpayerIdentificationNumber", - "type": 2,"length": 255,"name": "Идентификационный номер налогоплательщика (ИНН)","shortname": "ИНН","searchable": true,"sortable": true,"visible": true - } - , - {"code": "taxRegistrationReasonCode", - "type": 2,"length": 255,"name": "Код причины постановки (КПП)","shortname": "КПП","searchable": true,"sortable": true,"visible": true - } - , - {"code": "account", - "type": 2,"length": 50,"name": "Номер счета","shortname": "Счет","searchable": true,"sortable": true,"visible": true - } - , - {"code": "companyId", - "type": 1,"name": "Компания","shortname": "Компания","searchable": true,"sortable": true,"visible": true,"link": "company","linkCode": "shortName" - } - , - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - ] - ,"actions":[ - {"method":"post", - - "name": "Банковские реквизиты для перечисления денежных средств", - - "confirmation": "currency,bankIdentificationCode,bankName,correspondentAccount,correspondentAccountName,taxpayerIdentificationNumber,taxRegistrationReasonCode,account,destination", - - "fields": [ - {"code": "currency", - "type": 12,"name": "Валюта","shortname": "Валюта","required": true,"link": "currencyCode","linkCode": "code" - } - , - {"code": "bankIdentificationCode", - "type": 2,"length": 255,"name": "Банковский идентификационный код (БИК)","shortname": "БИК","required": true - } - , - {"code": "bankName", - "type": 2,"length": 255,"name": "Наименование банка","shortname": "Наименование","required": true - } - , - {"code": "correspondentAccount", - "type": 2,"length": 255,"name": "Корреспондентский счет","shortname": "Корр. счет" - } - , - {"code": "correspondentAccountName", - "type": 2,"length": 255,"name": "Наименование корреспондентского счета","shortname": "Наименование корр. счета" - } - , - {"code": "taxpayerIdentificationNumber", - "type": 2,"length": 255,"name": "Идентификационный номер налогоплательщика (ИНН)","shortname": "ИНН" - } - , - {"code": "taxRegistrationReasonCode", - "type": 2,"length": 255,"name": "Код причины постановки (КПП)","shortname": "КПП" - } - , - {"code": "account", - "type": 2,"length": 50,"name": "Номер счета","shortname": "Счет","required": true - } - , - {"code": "destination", - "type": 2,"length": 255,"name": "Назначение платежа","shortname": "Назначение платежа","required": true - } - , - {"code": "companyId", - "type": 1,"name": "Компания","shortname": "Компания","link": "company","linkCode": "shortName","required": true - } - ] - } - , - {"method":"put", - - "name": "Изменение банковских реквизитов для перечисления денежных средств", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "bankAccount","linkCode": "id","required": true - } - , - {"code": "bankIdentificationCode", - "type": 2,"length": 255,"name": "Банковский идентификационный код (БИК)","shortname": "БИК" - } - , - {"code": "bankName", - "type": 2,"length": 255,"name": "Наименование банка","shortname": "Наименование" - } - , - {"code": "correspondentAccount", - "type": 2,"length": 255,"name": "Корреспондентский счет","shortname": "Корр. счет" - } - , - {"code": "correspondentAccountName", - "type": 2,"length": 255,"name": "Наименование корреспондентского счета","shortname": "Наименование корр. счета" - } - , - {"code": "currency", - "type": 12,"name": "Валюта","shortname": "Валюта","link": "currencyCode","linkCode": "code" - } - , - {"code": "destination", - "type": 2,"length": 255,"name": "Назначение платежа","shortname": "Назначение платежа" - } - , - {"code": "taxpayerIdentificationNumber", - "type": 2,"length": 255,"name": "Идентификационный номер налогоплательщика (ИНН)","shortname": "ИНН" - } - , - {"code": "taxRegistrationReasonCode", - "type": 2,"length": 255,"name": "Код причины постановки (КПП)","shortname": "КПП" - } - , - {"code": "account", - "type": 2,"length": 50,"name": "Номер счета","shortname": "Счет" - } - ] - } - , - {"method":"delete", - - "name": "Удаление банковских реквизитов для перечисления денежных средств", - - "confirmation": "currency,bankIdentificationCode,correspondentAccount,taxpayerIdentificationNumber,taxRegistrationReasonCode,account", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "bankAccount","linkCode": "id","required": true - } - ] - } - ] - } - , - "informationAccount": { - - "name": "Информационные счета", - - "destination": "securities/information-accounts", - - "class": "ru.clearing.classes.statics.data.account.InformationAccount", - - "logUpdates": "true", - - "table": "information_account", - - "fields": [ - {"code": "accountId", - "type": 1,"name": "Информационный счет","shortname": "Информационный счет","searchable": true,"sortable": true,"visible": true,"link": "account","linkCode": "account" - } - , - {"code": "clearingAccountId", - "type": 1,"name": "Аналитический счет","shortname": "Аналитический счет","searchable": true,"sortable": true,"visible": true,"link": "account","linkCode": "account" - } - , - {"code": "companyId", - "type": 1,"name": "Компания","shortname": "Компания","searchable": true,"sortable": true,"visible": true,"link": "company","linkCode": "shortName" - } - , - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - ] - - } - , - "accountRouting": { - - "name": "Маршрутизация счета", - - "class": "ru.clearing.classes.statics.data.account.AccountRouting", - - "logUpdates": "true", - - "table": "account_routing", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "destinationId", - "type": 1,"name": "Счет-назначение (зачисления)","shortname": "Зачисления","searchable": true,"sortable": true,"visible": true,"link": "account" - } - , - {"code": "relationId", - "type": 1,"name": "Договорные отношения","shortname": "Договор","searchable": true,"sortable": true,"visible": true,"link": "relation" - } - , - {"code": "sourceId", - "type": 1,"name": "Счет-источник (списания)","shortname": "Списания","searchable": true,"sortable": true,"visible": true,"link": "account" - } - ] - - } - , - "security": { - - "name": "Инструменты", - - "destination": "securities", - - "class": "ru.clearing.classes.statics.data.security.Security", - - "logUpdates": "true", - - "table": "security", - - "fields": [ - {"code": "instrumentType", - "type": 12,"name": "Наименование типа инструмента","shortname": "Тип инструмента","searchable": true,"sortable": true,"visible": true,"link": "instrumentType" - } - , - {"code": "issuerId", - "type": 1,"name": "Наименование эмитента","shortname": "Эмитент","searchable": true,"sortable": true,"link": "company" - } - , - {"code": "shortName", - "type": 2,"name": "Краткое наименование инструмента","shortname": "Краткое наименование","searchable": true,"sortable": true,"length": 255,"visible": true - } - , - {"code": "fullName", - "type": 2,"name": "Полное наименование инструмента","shortname": "Наименование","searchable": true,"sortable": true,"length": 255,"visible": true - } - , - {"code": "shortNameEng", - "type": 2,"name": "Краткое наименование инструмента на английском","shortname": "Краткое наименование на английском","searchable": true,"sortable": true,"length": 255,"visible": true - } - , - {"code": "fullNameEng", - "type": 2,"name": "Полное наименование инструмента на английском","shortname": "Наименование на английском","searchable": true,"sortable": true,"length": 255,"visible": true - } - , - {"code": "securitySymbol", - "type": 2,"name": "Код инструмента","shortname": "Код","searchable": true,"sortable": true,"length": 255,"visible": true - } - , - {"code": "workflowStatus", - "type": 12,"name": "Наименование статуса","shortname": "Статус","searchable": true,"sortable": true,"visible": true,"link": "workflowStatus" - } - , - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "createdAt", - "field": "created","type": 4,"name": "Дата и время создания записи","shortname": "Создано","searchable": true,"sortable": true - } - , - {"code": "updatedAt", - "field": "updated","type": 4,"name": "Дата и время изменения записи","shortname": "Изменено","searchable": true,"sortable": true - } - ] - - } - , - "currency": { - - "name": "Инструменты Валюты", - - "destination": "currencies", - - "class": "ru.clearing.classes.statics.data.misc.Currency", - - "logUpdates": "true", - - "table": "currency", - - "fields": [ - {"code": "countryCode", - "type": 12,"name": "Код страны","shortname": "Страна","searchable": true,"sortable": true,"visible": true,"link": "countryCode" - } - , - {"code": "currencyCode", - "type": 12,"name": "Код валюты","shortname": "Валюта","searchable": true,"sortable": true,"visible": true,"link": "currencyCode","linkCode": "code" - } - , - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - ] - - } - , - "moneyMarketSecurity": { - - "name": "Инструменты Денежного рынка", - - "destination": "securities/money-securities", - - "class": "ru.clearing.classes.statics.data.misc.MoneyMarketSecurity", - - "logUpdates": "true", - - "table": "money_market_security", - - "fields": [ - {"code": "securityId", - "type": 1,"name": "Наименование инструмента","shortname": "Инструмент","searchable": true,"sortable": true,"link": "security","linkCode": "fullName" - } - , - {"code": "description", - "type": 2,"length": 255,"name": "Описание","shortname": "Описание","searchable": true,"sortable": false - } - , - {"code": "startDate", - "type": 6,"name": "Дата начала действия","shortname": "Начальная дата","searchable": true,"sortable": true - } - , - {"code": "endDate", - "type": 6,"name": "Дата окончания действия","shortname": "Конечная дата","searchable": true,"sortable": true - } - , - {"code": "nominalValue", - "field": "nominalValue","type": 11,"name": "Номинал","shortname": "Номинал","searchable": true,"sortable": true - } - , - {"code": "nominalCurrency", - "type": 12,"name": "Валюта номинала","shortname": "Валюта номинала","searchable": true,"sortable": true,"link": "currencyCode","linkCode": "code" - } - , - {"code": "instrumentType", - "type": 12,"name": "Наименование типа инструмента","shortname": "Тип инструмента","searchable": true,"sortable": true,"visible": true,"link": "instrumentType","extends": "security" - } - , - {"code": "fullName", - "type": 2,"name": "Полное наименование инструмента","shortname": "Наименование","searchable": true,"sortable": true,"length": 255,"visible": true,"extends": "security" - } - , - {"code": "securitySymbol", - "type": 2,"name": "Код инструмента","shortname": "Код","searchable": true,"sortable": true,"length": 255,"visible": true,"extends": "security" - } - , - {"code": "termType", - "type": 12,"name": "Наименование вида инструмента","shortname": "Вид инструмента","searchable": true,"sortable": true,"visible": false,"link": "termType","ignore": true - } - , - {"code": "lotSize", - "field": "securityId","type": 11,"name": "Размер лота","shortname": "Размер лота","searchable": true,"sortable": true,"visible": true,"linkKeyCode": "securityId","linkCode": "lotSize","link": "listing" - } - , - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - ] - ,"actions":[ - {"method":"post", - - "name": "Добавление инструмента", - - "fields": [ - {"code": "securitySymbol", - "type": 2,"name": "Код инструмента","shortname": "Код","length": 255,"required": true - } - , - {"code": "fullName", - "type": 2,"name": "Полное наименование инструмента","shortname": "Наименование","length": 255,"required": true - } - , - {"code": "instrumentType", - "type": 12,"name": "Наименование типа инструмента","shortname": "Тип инструмента","required": true,"link": "instrumentType" - } - , - {"code": "lotSize", - "type": 11,"name": "Размер лота","shortname": "Лот","required": true - } - , - {"code": "nominalValue", - "field": "nominalValue","type": 11,"name": "Номинал","shortname": "Номинал","required": true - } - , - {"code": "nominalCurrency", - "type": 12,"name": "Валюта номинала","shortname": "Валюта номинала","required": true,"link": "currencyCode","linkCode": "code" - } - , - {"code": "startDate", - "type": 6,"name": "Дата начала действия","shortname": "Начальная дата","required": true - } - , - {"code": "endDate", - "type": 6,"name": "Дата окончания действия","shortname": "Конечная дата","required": true - } - ] - } - , - {"method":"put", - - "name": "Изменение инструмента", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "moneyMarketSecurity","linkCode": "id","required": true - } - , - {"code": "fullName", - "type": 2,"name": "Полное наименование инструмента","shortname": "Наименование","length": 255 - } - , - {"code": "instrumentType", - "type": 12,"name": "Наименование типа инструмента","shortname": "Тип инструмента","link": "instrumentType" - } - , - {"code": "lotSize", - "type": 11,"name": "Размер лота","shortname": "Лот" - } - , - {"code": "nominalValue", - "field": "nominalValue","type": 11,"name": "Номинал","shortname": "Номинал" - } - , - {"code": "nominalCurrency", - "type": 12,"name": "Валюта номинала","shortname": "Валюта номинала","link": "currencyCode","linkCode": "code" - } - , - {"code": "startDate", - "type": 6,"name": "Дата начала действия","shortname": "Начальная дата" - } - , - {"code": "endDate", - "type": 6,"name": "Дата окончания действия","shortname": "Конечная дата" - } - ] - } - , - {"method":"delete", - - "name": "Удаление инструмента", - - "confirmation": "securitySymbol,fullName", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "moneyMarketSecurity","linkCode": "id","required": true - } - ] - } - ] - } - , - "listing": { - - "name": "Листинг инструментов", - - "destination": "listings", - - "class": "ru.clearing.classes.statics.data.misc.Listing", - - "logUpdates": "true", - - "table": "listing", - - "fields": [ - {"code": "securityId", - "type": 1,"name": "Наименование инструмента","shortname": "Инструмент","searchable": true,"sortable": true,"link": "security","linkCode": "fullName" - } - , - {"code": "lotSize", - "type": 11,"name": "Размер лота","shortname": "Размер лота","searchable": true,"sortable": true - } - , - {"code": "market", - "type": 12,"name": "Секция","shortname": "Секция","searchable": true,"sortable": true,"link": "market","linkCode": "name" - } - , - {"code": "symbolCode", - "type": 2,"length": 255,"name": "Код инструмента на торговой площадке","shortname": "Код инструмента на торговой площадке","searchable": true,"sortable": true - } - , - {"code": "symbolName", - "type": 2,"length": 255,"name": "Название инструмента на торговой площадке","shortname": "Название инструмента на торговой площадке","searchable": true,"sortable": true - } - , - {"code": "tradingCurrency", - "type": 12,"name": "Наименование кода валюты расчета","shortname": "Валюта","searchable": true,"sortable": true,"visible": true,"link": "currencyCode","linkCode": "code" - } - , - {"code": "workflowStatus", - "type": 12,"name": "Наименование статуса листинга в системе","shortname": "Статус","searchable": true,"sortable": true,"visible": true,"link": "workflowStatus" - } - , - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "createdAt", - "field": "created","type": 4,"name": "Дата и время создания записи","shortname": "Создано","searchable": true,"sortable": true,"ignore": true - } - , - {"code": "updatedAt", - "field": "updated","type": 4,"name": "Дата и время изменения записи","shortname": "Изменено","searchable": true,"sortable": true,"ignore": true - } - ] - - } - , - "market": { - - "name": "Торговые секции", - - "destination": "markets", - - "class": "ru.clearing.classes.statics.data.misc.Market", - - "logUpdates": "true", - - "table": "market", - - "fields": [ - {"code": "description", - "type": 2,"length": 255,"name": "Описание","shortname": "Описание","searchable": true,"sortable": true - } - , - {"code": "exchangeId", - "type": 1,"name": "Наименование площадки","shortname": "Площадка","searchable": true,"sortable": true,"link": "company" - } - , - {"code": "name", - "type": 2,"length": 255,"name": "Наименование","shortname": "Наименование","searchable": true,"sortable": true - } - , - {"code": "code", - "type": 12,"name": "Секция","shortname": "Секция","searchable": true,"sortable": true - } - , - {"code": "settlementCurrency", - "type": 12,"name": "Валютный код расчетов","shortname": "Валюта расчёта","searchable": true,"sortable": true,"visible": true,"link": "currencyCode","linkCode": "code" - } - , - {"code": "sector", - "type": 12,"name": "Наименование секции","shortname": "Секция","searchable": true,"sortable": true,"visible": true,"link": "sector" - } - , - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "createdAt", - "field": "created","type": 4,"name": "Дата и время создания записи","shortname": "Создано","searchable": true,"sortable": true,"ignore": true - } - , - {"code": "updatedAt", - "field": "updated","type": 4,"name": "Дата и время изменения записи","shortname": "Изменено","searchable": true,"sortable": true,"ignore": true - } - ] - - } - , - "accountBalance": { - - "name": "Информация об остатках ден. средств", - - "destination": "account-balances", - - "class": "ru.clearing.classes.statics.data.account.AccountBalance", - - "logUpdates": "true", - - "table": "account_balance", - - "fields": [ - {"code": "companyId", - "type": 1,"name": "Наименование участника","shortname": "Участник","searchable": true,"sortable": true,"link": "company","linkCode": "shortName","ignore": true - } - , - {"code": "shortName", - "type": 2,"name": "Короткое наименование Участника","shortname": "Участник","searchable": true,"sortable": true,"visible": true,"length": 255 - } - , - {"code": "currencyCode", - "type": 12,"name": "Код валюты","shortname": "Валюта","searchable": true,"sortable": true,"visible": true,"link": "currencyCode","linkCode": "code" - } - , - {"code": "accountId", - "type": 1,"name": "Наименование счета","shortname": "Счет","searchable": true,"sortable": true,"link": "account","ignore": true - } - , - {"code": "account", - "type": 2,"length": 50,"name": "Наименование счета","shortname": "Счет","searchable": true,"sortable": true,"visible": true - } - , - {"code": "accountType", - "type": 12,"name": "Тип счета","shortname": "Тип счета","searchable": true,"sortable": true,"link": "accountType" - } - , - {"code": "openBalanceAmount", - "type": 10,"name": "Начальная сумма после расчетной организации","shortname": "Начальный баланс","searchable": true,"sortable": true,"visible": true - } - , - {"code": "startBalanceAmount", - "type": 10,"name": "Начальная сумма остатков ден. средств на начало работы","shortname": "Стартовый баланс","searchable": true,"sortable": true - } - , - {"code": "closeBalanceAmount", - "type": 10,"name": "Конечная сумма остатков ден. средств на счете","shortname": "Конечный баланс","searchable": true,"sortable": true - } - , - {"code": "tradeBalanceAmount", - "type": 10,"name": "Регистр «Денежные средства Участника клиринга – блокированные»","shortname": "Регистр блокированные","searchable": true,"sortable": true - } - , - {"code": "freeBalanceAmount", - "type": 10,"name": "Регистр «Денежные средства Участника клиринга – свободные»","shortname": "Регистр свободные","searchable": true,"sortable": true,"visible": true - } - , - {"code": "balanceAmount", - "type": 10,"name": "Денежные средства Участника клиринга, зарезервированные на торги","shortname": "Регистр торги","searchable": true,"sortable": true,"visible": true - } - , - {"code": "changeBalanceAmount", - "type": 10,"name": "Сумма изменения остатков ден. средств на счете","shortname": "Баланс изменений","searchable": true,"sortable": true - } - , - {"code": "creditAmount", - "type": 10,"name": "Зачисления","shortname": "Зачисления","searchable": true,"sortable": true - } - , - {"code": "debitAmount", - "type": 10,"name": "Списания","shortname": "Списания","searchable": true,"sortable": true - } - , - {"code": "clearingDate", - "type": 6,"name": "Дата расчета","shortname": "Дата расчета","searchable": true,"sortable": true,"visible": true - } - , - {"code": "tradingCode", - "type": 2,"name": "Торговый код Участника","shortname": "Торговый код","searchable": true,"sortable": true,"visible": true,"length": 255 - } - , - {"code": "fullName", - "type": 2,"name": "Полное наименование Участника","shortname": "Наименование участника","searchable": true,"sortable": true,"visible": true,"length": 255 - } - , - {"code": "balanceAccountType", - "type": 12,"name": "Тип баланса","shortname": "Тип баланса","searchable": true,"sortable": true,"link": "balanceAccountType" - } - , - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "createdAt", - "field": "created","type": 4,"name": "Дата и время создания записи","shortname": "Создано","searchable": true,"sortable": true,"ignore": true - } - , - {"code": "updatedAt", - "field": "updated","type": 4,"name": "Дата и время изменения записи","shortname": "Изменено","searchable": true,"sortable": true,"ignore": true - } - ] - - } - , - "balanceRegister": { - - "name": "Реестр остатков денежных средств", - - "destination": "balance-registers", - - "class": "ru.clearing.classes.statics.data.misc.BalanceRegister", - - "table": "balance_register", - - "fields": [ - {"code": "sDf01Date", - "type": 4,"name": "Дата создания записи в S_DF01","shortname": "Дата создания записи в S_DF01","searchable": true,"sortable": true - } - , - {"code": "currencyCode", - "type": 12,"name": "Код валюты","shortname": "Валюта","link": "currencyCode" - } - , - {"code": "setHouseName", - "type": 2,"length": 255,"name": "Наименование РО","shortname": "Наименование РО","searchable": true,"sortable": true,"visible": true - } - , - {"code": "account", - "type": 2,"length": 50,"name": "Номер торгового/клирингового счета","shortname": "Номер торгового/клирингового счета","searchable": true,"sortable": true,"visible": true - } - , - {"code": "infoAccount", - "type": 2,"length": 50,"name": "Номер счета внутреннего учета СПВБ","shortname": "Номер счета внутреннего учета СПВБ","searchable": true,"sortable": true,"visible": true - } - , - {"code": "remainderSum", - "type": 10,"name": "Остаток денежных средст","shortname": "Остаток","searchable": true,"sortable": true - } - , - {"code": "blockedSum", - "type": 10,"name": "Сумма блокированных денежных средств","shortname": "Блокированные","searchable": true,"sortable": true - } - , - {"code": "unblockedSum", - "type": 10,"name": "Сумма свободных денежных средств","shortname": "Свободные","searchable": true,"sortable": true - } - , - {"code": "inn", - "type": 2,"length": 255,"name": "Идентификационный номер налогоплательщика (ИНН)","shortname": "ИНН","searchable": true,"sortable": true,"visible": true - } - , - {"code": "market", - "type": 1,"name": "Сегмент рынка","shortname": "Сегмент рынка","searchable": true,"sortable": true,"visible": true,"link": "market","linkCode": "name" - } - , - {"code": "fullName", - "type": 2,"length": 255,"name": "Наименование Участника Клиринга","shortname": "Участник Клиринга","searchable": true,"sortable": true,"visible": true - } - , - {"code": "typeRemains", - "type": 12,"name": "Тип остатка","shortname": "Тип остатка","searchable": true,"sortable": true,"visible": true - } - , - {"code": "docNumber", - "type": 2,"length": 255,"name": "Номер документа","shortname": "Номер","searchable": true,"sortable": true,"visible": true - } - , - {"code": "companyId", - "type": 1,"name": "Компания","shortname": "Компания","searchable": false,"sortable": false,"visible": true,"link": "company","linkCode": "shortName" - } - , - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "createdAt", - "field": "created","type": 4,"name": "Дата и время создания записи","shortname": "Создано","searchable": true,"sortable": true - } - , - {"code": "updatedAt", - "field": "updated","type": 4,"name": "Дата и время изменения записи","shortname": "Изменено","searchable": true,"sortable": true - } - ] - - } - , - "managementJournal": { - - "name": "Журнал мониторинга и контроля", - - "destination": "management-journals", - - "class": "ru.clearing.classes.statics.data.journal.ManagementJournal", - - "table": "management_journal", - - "fields": [ - {"code": "companyId", - "type": 1,"name": "Участник","shortname": "Участник","searchable": true,"sortable": true,"visible": true,"link": "company","linkCode": "shortName" - } - , - {"code": "userId", - "type": 1,"name": "Автор сообщения","shortname": "Сотрудник","searchable": true,"sortable": true,"visible": true,"link": "userCls" - } - , - {"code": "managementJournalType", - "type": 12,"name": "Тип мониторинга","shortname": "Тип","searchable": true,"sortable": true,"visible": true,"link": "managementJournalType" - } - , - {"code": "managementJournalPurpose", - "type": 12,"name": "Цель мониторинга","shortname": "Цель","searchable": true,"sortable": true,"visible": true,"link": "managementJournalPurpose" - } - , - {"code": "managementJournalStatus", - "type": 12,"name": "Статус","shortname": "Статус","searchable": true,"sortable": true,"visible": true,"link": "managementJournalStatus" - } - , - {"code": "text", - "type": 2,"name": "Сообщение","shortname": "Сообщение","searchable": true,"visible": true,"sortable": true,"length": 4096 - } - , - {"code": "changeAccessSign", - "type": 12,"name": "Признак изменения доступа","shortname": "Изменение доступа","searchable": true,"sortable": true,"visible": true,"link": "allowed" - } - , - {"code": "changeDataSign", - "type": 12,"name": "Признак изменения данных","shortname": "Изменение данных","searchable": true,"sortable": true,"visible": true,"link": "allowed" - } - , - {"code": "eventDate", - "type": 4,"name": "Дата события ЕГРЮЛ","shortname": "Дата события","searchable": true,"sortable": true - } - , - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "createdAt", - "field": "created","type": 4,"name": "Создано","shortname": "Создано","searchable": true,"sortable": true - } - , - {"code": "updatedAt", - "field": "updated","type": 4,"name": "Изменено","shortname": "Изменено","searchable": true,"sortable": true - } - ] - - } - , - "inDocumentJournal": { - - "name": "Журнал входящих документов", - - "destination": "in-document-journals", - - "class": "ru.clearing.classes.statics.data.journal.InDocumentJournal", - - "table": "in_document_journal", - - "fields": [ - {"code": "registrationDate", - "type": 6,"name": "Дата регистрации","shortname": "Дата","searchable": true,"sortable": true,"visible": true - } - , - {"code": "registrationTime", - "type": 5,"name": "Время регистрации","shortname": "Время","searchable": true,"sortable": true,"visible": true - } - , - {"code": "registrationNumber", - "type": 1,"name": "Регистационный номер","shortname": "Регистационный номер","searchable": true,"sortable": true,"visible": true - } - , - {"code": "documentName", - "type": 2,"length": 255,"name": "Наименование документа","shortname": "Документ","searchable": true,"sortable": true,"visible": true - } - , - {"code": "sender", - "type": 2,"length": 255,"name": "Полное наименование отправителя","shortname": "Отправителя","searchable": true,"sortable": true,"visible": true - } - , - {"code": "quantity", - "type": 1,"name": "Количествово экземпляров","shortname": "Кол-во экз.","searchable": true,"sortable": true,"visible": true - } - , - {"code": "clearingCode", - "type": 2,"length": 255,"name": "Код Участника Клиринга","shortname": "Код УК","searchable": true,"sortable": true,"visible": true - } - , - {"code": "courierType", - "type": 12,"name": "Способ отправки","shortname": "Способ отправки","searchable": true,"sortable": true,"visible": true,"link": "courierType" - } - , - {"code": "emailDate", - "type": 6,"name": "Дата отправки электронной почтой","shortname": "Дата отправки эл. почтой","searchable": true,"sortable": true,"visible": true - } - , - {"code": "amount", - "type": 11,"name": "Сумма","shortname": "Сумма","searchable": true,"sortable": true,"visible": true - } - , - {"code": "dossierNumber", - "type": 2,"length": 50,"name": "Номер дела","shortname": "Дело №","searchable": true,"sortable": true,"visible": true - } - , - {"code": "comment", - "type": 2,"length": 255,"name": "Комментарий","shortname": "Комментарий","searchable": true,"sortable": true,"visible": true - } - , - {"code": "receiptDate", - "type": 6,"name": "Дата получения оригинала","shortname": "Дата получения","searchable": true,"sortable": true,"visible": true - } - , - {"code": "resultStatus", - "type": 12,"name": "Статус загрузки документа","shortname": "Статус","searchable": true,"sortable": true,"visible": true,"link": "resultStatus" - } - , - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "№п/п","searchable": true,"sortable": true - } - ] - - } - , - "outDocumentJournal": { - - "name": "Журнал исходящих документов", - - "destination": "out-document-journals", - - "class": "ru.clearing.classes.statics.data.journal.OutDocumentJournal", - - "table": "out_document_journal", - - "fields": [ - {"code": "registrationDate", - "type": 6,"name": "Дата регистрации","shortname": "Дата","searchable": true,"sortable": true,"visible": true - } - , - {"code": "registrationTime", - "type": 5,"name": "Время регистрации","shortname": "Время","searchable": true,"sortable": true,"visible": true - } - , - {"code": "registrationNumber", - "type": 1,"name": "Регистационный номер","shortname": "Регистационный номер","searchable": true,"sortable": true,"visible": true - } - , - {"code": "documentName", - "type": 2,"length": 255,"name": "Наименование документа","shortname": "Документ","searchable": true,"sortable": true,"visible": true - } - , - {"code": "addressee", - "type": 2,"length": 255,"name": "Полное наименование получателя","shortname": "Получатель","searchable": true,"sortable": true,"visible": true - } - , - {"code": "quantity", - "type": 1,"name": "Количествово экземпляров","shortname": "Кол-во экз.","searchable": true,"sortable": true,"visible": true - } - , - {"code": "clearingCode", - "type": 2,"length": 255,"name": "Код Участника Клиринга","shortname": "Код УК","searchable": true,"sortable": true,"visible": true - } - , - {"code": "courierType", - "type": 12,"name": "Способ отправки","shortname": "Способ отправки","searchable": true,"sortable": true,"visible": true,"link": "courierType" - } - , - {"code": "emailDate", - "type": 6,"name": "Дата отправки электронной почтой","shortname": "Дата отправки эл. почтой","searchable": true,"sortable": true,"visible": true - } - , - {"code": "amount", - "type": 11,"name": "Сумма","shortname": "Сумма","searchable": true,"sortable": true,"visible": true - } - , - {"code": "dossierNumber", - "type": 2,"length": 50,"name": "Номер дела","shortname": "Дело №","searchable": true,"sortable": true,"visible": true - } - , - {"code": "postDate", - "type": 6,"name": "Дата почтового отправления","shortname": "Дата отправления","searchable": true,"sortable": true,"visible": true - } - , - {"code": "resultStatus", - "type": 12,"name": "Статус выгрузки документа","shortname": "Статус","searchable": true,"sortable": true,"visible": true,"link": "resultStatus" - } - , - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "№п/п","searchable": true,"sortable": true - } - ] - - } - , - "executionDeposit": { - - "name": "Сделки", - - "destination": "execution-deposits", - - "class": "ru.clearing.classes.statics.data.execution.ExecutionDeposit", - - "table": "execution_deposit", - - "fields": [ - {"code": "exchangeExecutionId", - "type": 1,"name": "Идентификационный номер сделки в Торговой системе","shortname": "Номер сделки","visible": true,"searchable": true,"sortable": true - } - , - {"code": "exchangeExecutionTime", - "type": 4,"name": "Время заключения сделки в Торговой системе","shortname": "Время заключения сделки","visible": true,"searchable": true,"sortable": true - } - , - {"code": "tradingDate", - "type": 6,"name": "Дата заключения сделки","shortname": "Дата заключения сделки","visible": true,"searchable": true,"sortable": true - } - , - {"code": "accountId", - "type": 1,"name": "Торговый счет","shortname": "Счет","visible": true,"searchable": true,"sortable": true,"link": "account","linkCode": "account" - } - , - {"code": "market", - "type": 12,"name": "Секция финансового инструмента","shortname": "Секция","visible": true,"searchable": true,"sortable": true,"link": "market","linkCode": "name" - } - , - {"code": "price", - "type": 10,"name": "Ставка по депозиту","shortname": "Ставка, %","visible": true,"searchable": true,"sortable": true - } - , - {"code": "lots", - "type": 11,"name": "Количество лотов","shortname": "Лоты","visible": true,"searchable": true,"sortable": true - } - , - {"code": "quantity", - "type": 11,"name": "Количество штук","shortname": "Штуки","visible": false,"searchable": true,"sortable": true - } - , - {"code": "firstLegAmount", - "type": 11,"name": "Объем сделки","shortname": "Объем","visible": true,"searchable": true,"sortable": true - } - , - {"code": "secondLegAmount", - "type": 11,"name": "Объем возврата","shortname": "Объем возврата","visible": false,"searchable": true,"sortable": true - } - , - {"code": "interestAmount", - "type": 11,"name": "Объем процентов","shortname": "Проценты","visible": false,"searchable": true,"sortable": true - } - , - {"code": "side", - "type": 12,"name": "Направление сделки","shortname": "Направление","visible": true,"searchable": true,"sortable": true,"link": "moneyFlowSide" - } - , - {"code": "settlementCurrency", - "type": 12,"name": "Валюта расчетов по инструменту","shortname": "Валюта","visible": true,"searchable": true,"sortable": true,"link": "currencyCode","linkCode": "code" - } - , - {"code": "companyId", - "type": 1,"name": "Название компании","shortname": "Компания","visible": true,"searchable": true,"sortable": true,"link": "company","linkCode": "shortName" - } - , - {"code": "duration", - "type": 1,"name": "Срок, дней","shortname": "Срок","visible": true,"searchable": true,"sortable": true - } - , - {"code": "firstLegSettlementDate", - "type": 6,"name": "Дата размещения","shortname": "Дата размещения","visible": true,"searchable": true,"sortable": true - } - , - {"code": "secondLegSettlementDate", - "type": 6,"name": "Дата возврата","shortname": "Дата возврата","visible": true,"searchable": true,"sortable": true - } - , - {"code": "firstLegSettlementCode", - "type": 6,"name": "Код расчетов при размещении","shortname": "Код расчетов при размещении","visible": false,"searchable": true,"sortable": true,"ignore": true - } - , - {"code": "secondLegSettlementCode", - "type": 6,"name": "Код расчетов при возврате","shortname": "Код расчетов","visible": false,"searchable": true,"sortable": true,"ignore": true - } - , - {"code": "securityFullName", - "type": 2,"length": 255,"name": "Наименование инструмента","shortname": "Инструмент","visible": true,"searchable": true,"sortable": true - } - , - {"code": "securitySymbol", - "type": 2,"length": 255,"name": "Код инструмента в Торговой Системе","shortname": "Код инструмента","visible": true,"searchable": true,"sortable": true - } - , - {"code": "securityId", - "type": 1,"name": "Финансовый инструмент","shortname": "Код биржевого инструмента / товара","searchable": true,"sortable": true,"link": "moneyMarketSecurity","linkCode": "securitySymbol","ignore": true - } - , - {"code": "counterPartyId", - "type": 1,"name": "Имя компании-партнера, с которым заключена сделка","shortname": "Партнер","visible": false,"searchable": true,"sortable": true,"link": "company" - } - , - {"code": "coverageStatus", - "type": 12,"name": "Cтатус достаточности обеспечения","shortname": "Обеспеченность","searchable": true,"sortable": true,"link": "allowed" - } - , - {"code": "sessionId", - "type": 1,"name": "Наименование сессии","shortname": "Сессия","visible": true,"searchable": true,"sortable": true,"link": "moneyMarketSession" - } - , - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","visible": false,"searchable": true,"sortable": true - } - , - {"code": "createdAt", - "field": "created","type": 5,"name": "Время регистрации сделки","shortname": "Время сделки","visible": false,"searchable": true,"sortable": true - } - , - {"code": "updatedAt", - "field": "updated","type": 5,"name": "Время изменения сделки","shortname": "Время изменения","visible": false,"searchable": true,"sortable": true - } - , - {"code": "clearingDate", - "type": 6,"name": "Дата клиринга","shortname": "Дата клиринга","visible": false,"searchable": true,"sortable": true - } - ] - - } - , - "dealRegister": { - - "name": "Реестр сделок", - - "destination": "deal-registers", - - "class": "ru.clearing.classes.statics.data.register.DealRegister", - - "table": "deal_register", - - "fields": [ - {"code": "executionId", - "type": 1,"name": "Идентификационный номер сделки в Клиринговой системе","shortname": "Номер сделки КС","visible": false,"searchable": true,"sortable": true - } - , - {"code": "exchangeExecutionId", - "type": 1,"name": "Идентификационный номер сделки в Торговой системе","shortname": "Номер сделки","visible": true,"searchable": true,"sortable": true - } - , - {"code": "exchangeExecutionTime", - "type": 4,"name": "Время заключения сделки в Торговой системе","shortname": "Время заключения сделки","visible": true,"searchable": true,"sortable": true - } - , - {"code": "tradingDate", - "type": 6,"name": "Дата заключения сделки","shortname": "Дата заключения сделки","visible": true,"searchable": true,"sortable": true - } - , - {"code": "account", - "type": 2,"length": 50,"name": "Торговый счет","shortname": "Счет","visible": true,"searchable": true,"sortable": true - } - , - {"code": "market", - "type": 12,"name": "Секция финансового инструмента","shortname": "Секция","visible": true,"searchable": true,"sortable": true,"link": "market","linkCode": "name" - } - , - {"code": "price", - "type": 10,"name": "Ставка по депозиту","shortname": "Ставка, %","visible": true,"searchable": true,"sortable": true - } - , - {"code": "amount", - "type": 11,"name": "Сумма сделки","shortname": "Сумма сделки","visible": true,"searchable": true,"sortable": true - } - , - {"code": "side", - "type": 12,"name": "Направление сделки","shortname": "Направление","visible": true,"searchable": true,"sortable": true,"link": "moneyFlowSide" - } - , - {"code": "settlementCurrency", - "type": 12,"name": "Валюта расчетов по инструменту","shortname": "Валюта","visible": true,"searchable": true,"sortable": true,"link": "currencyCode","linkCode": "code" - } - , - {"code": "companyId", - "type": 1,"name": "Название компании","shortname": "Компания","visible": true,"searchable": true,"sortable": true,"link": "company","linkCode": "shortName" - } - , - {"code": "firstLegSettlementDate", - "type": 6,"name": "Дата размещения","shortname": "Дата размещения","visible": true,"searchable": true,"sortable": true - } - , - {"code": "secondLegSettlementDate", - "type": 6,"name": "Дата возврата","shortname": "Дата возврата","visible": true,"searchable": true,"sortable": true - } - , - {"code": "securityFullName", - "type": 2,"length": 255,"name": "Наименование инструмента","shortname": "Инструмент","visible": true,"searchable": true,"sortable": true - } - , - {"code": "securitySymbol", - "type": 2,"length": 255,"name": "Код инструмента в Торговой Системе","shortname": "Код инструмента","visible": true,"searchable": true,"sortable": true - } - , - {"code": "securityId", - "type": 1,"name": "Финансовый инструмент","shortname": "Код биржевого инструмента / товара","searchable": true,"sortable": true,"link": "moneyMarketSecurity","linkCode": "securitySymbol","ignore": true - } - , - {"code": "counterPartyId", - "type": 1,"name": "Имя компании-партнера, с которым заключена сделка","shortname": "Партнер","visible": false,"searchable": true,"sortable": true,"link": "company" - } - , - {"code": "coverageStatus", - "type": 12,"name": "Cтатус достаточности обеспечения","shortname": "Обеспеченность","searchable": true,"sortable": true,"link": "allowed" - } - , - {"code": "sessionId", - "type": 1,"name": "Наименование сессии","shortname": "Сессия","visible": true,"searchable": true,"sortable": true,"link": "moneyMarketSession" - } - , - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","visible": false,"searchable": true,"sortable": true - } - , - {"code": "createdAt", - "type": 5,"name": "Время регистрации","shortname": "Время регистрации","visible": false,"searchable": true,"sortable": true - } - , - {"code": "updatedAt", - "type": 5,"name": "Время изменения","shortname": "Время изменения","visible": false,"searchable": true,"sortable": true - } - , - {"code": "clearingDate", - "type": 6,"name": "Дата клиринга","shortname": "Дата клиринга","visible": false,"searchable": true,"sortable": true - } - ] - - } - , - "admittedDealRegister": { - - "name": "Реестр сделок, допущенных к клирингу", - - "destination": "admitted-deal-registers", - - "class": "ru.clearing.classes.statics.data.register.AdmittedDealRegister", - - "table": "admitted_deal_register", - - "fields": [ - {"code": "executionId", - "type": 1,"name": "Идентификационный номер сделки в Клиринговой системе","shortname": "Номер сделки КС","visible": false,"searchable": true,"sortable": true - } - , - {"code": "companyFullName", - "type": 2,"length": 255,"name": "Наименование биржи","shortname": "Наименование биржи","searchable": true,"sortable": true,"visible": true - } - , - {"code": "tradingDate", - "type": 6,"name": "Дата заключения сделки","shortname": "Дата заключения сделки","visible": true,"searchable": true,"sortable": true - } - , - {"code": "exchangeExecutionId", - "type": 1,"name": "Идентификационный номер сделки в Торговой системе","shortname": "Номер сделки","visible": true,"searchable": true,"sortable": true - } - , - {"code": "exchangeExecutionTime", - "type": 4,"name": "Время заключения сделки в Торговой системе","shortname": "Время заключения сделки","visible": true,"searchable": true,"sortable": true - } - , - {"code": "securitySymbol", - "type": 2,"length": 255,"name": "Финансовый инструмент","shortname": "Код биржевого инструмента / товара","visible": true,"searchable": true,"sortable": true - } - , - {"code": "securityFullName", - "type": 2,"length": 255,"name": "Наименование инструмента","shortname": "Инструмент","visible": false,"searchable": true,"sortable": true - } - , - {"code": "sellerFullName", - "type": 2,"length": 255,"name": "Наименование продавца","shortname": "Наименование продавца","searchable": true,"sortable": true,"visible": true - } - , - {"code": "sellerClearingCode", - "type": 2,"length": 255,"name": "Код продавца","shortname": "Код продавца","searchable": true,"sortable": true,"visible": true - } - , - {"code": "sellerAccount", - "type": 2,"length": 50,"name": "Счет продавца","shortname": "Счет продавца","searchable": true,"sortable": true,"visible": true - } - , - {"code": "buyerFullName", - "type": 2,"length": 255,"name": "Наименование покупателя","shortname": "Наименование покупателя","searchable": true,"sortable": true,"visible": true - } - , - {"code": "buyerClearingCode", - "type": 2,"length": 255,"name": "Код покупателя","shortname": "Код покупателя","searchable": true,"sortable": true,"visible": true - } - , - {"code": "buyerAccount", - "type": 2,"length": 50,"name": "Счет покупателя","shortname": "Счет покупателя","searchable": true,"sortable": true,"visible": true - } - , - {"code": "amount", - "type": 11,"name": "Сумма сделки","shortname": "Сумма сделки","visible": true,"searchable": true,"sortable": true - } - , - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","visible": false,"searchable": true,"sortable": true - } - , - {"code": "createdAt", - "field": "created","type": 5,"name": "Время регистрации","shortname": "Время регистрации","visible": false,"searchable": true,"sortable": true - } - , - {"code": "updatedAt", - "field": "updated","type": 5,"name": "Время изменения","shortname": "Время изменения","visible": false,"searchable": true,"sortable": true - } - , - {"code": "clearingDate", - "type": 6,"name": "Дата клиринга","shortname": "Дата клиринга","visible": false,"searchable": true,"sortable": true - } - ] - - } - , - "coveredDealRegister": { - - "name": "Реестр сделок, прошедших процедуру контроля обеспечения", - - "destination": "covered-deal-registers", - - "class": "ru.clearing.classes.statics.data.register.CoveredDealRegister", - - "table": "covered_deal_register", - - "fields": [ - {"code": "executionId", - "type": 1,"name": "Идентификационный номер сделки в Клиринговой системе","shortname": "Номер сделки КС","visible": false,"searchable": true,"sortable": true - } - , - {"code": "companyFullName", - "type": 2,"length": 255,"name": "Наименование биржи","shortname": "Наименование биржи","searchable": true,"sortable": true,"visible": true - } - , - {"code": "tradingDate", - "type": 6,"name": "Дата заключения сделки","shortname": "Дата заключения сделки","visible": true,"searchable": true,"sortable": true - } - , - {"code": "exchangeExecutionId", - "type": 1,"name": "Идентификационный номер сделки в Торговой системе","shortname": "Номер сделки","visible": true,"searchable": true,"sortable": true - } - , - {"code": "exchangeExecutionTime", - "type": 4,"name": "Время заключения сделки в Торговой системе","shortname": "Время заключения сделки","visible": true,"searchable": true,"sortable": true - } - , - {"code": "securitySymbol", - "type": 2,"length": 255,"name": "Финансовый инструмент","shortname": "Код биржевого инструмента / товара","visible": true,"searchable": true,"sortable": true - } - , - {"code": "securityFullName", - "type": 2,"length": 255,"name": "Наименование инструмента","shortname": "Инструмент","visible": false,"searchable": true,"sortable": true - } - , - {"code": "sellerFullName", - "type": 2,"length": 255,"name": "Наименование продавца","shortname": "Наименование продавца","searchable": true,"sortable": true,"visible": true - } - , - {"code": "sellerClearingCode", - "type": 2,"length": 255,"name": "Код продавца","shortname": "Код продавца","searchable": true,"sortable": true,"visible": true - } - , - {"code": "sellerAccount", - "type": 2,"length": 50,"name": "Счет продавца","shortname": "Счет продавца","searchable": true,"sortable": true,"visible": true - } - , - {"code": "buyerFullName", - "type": 2,"length": 255,"name": "Наименование покупателя","shortname": "Наименование покупателя","searchable": true,"sortable": true,"visible": true - } - , - {"code": "buyerClearingCode", - "type": 2,"length": 255,"name": "Код покупателя","shortname": "Код покупателя","searchable": true,"sortable": true,"visible": true - } - , - {"code": "buyerAccount", - "type": 2,"length": 50,"name": "Счет покупателя","shortname": "Счет покупателя","searchable": true,"sortable": true,"visible": true - } - , - {"code": "amount", - "type": 11,"name": "Сумма сделки","shortname": "Сумма сделки","visible": true,"searchable": true,"sortable": true - } - , - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","visible": false,"searchable": true,"sortable": true - } - , - {"code": "createdAt", - "field": "created","type": 5,"name": "Время регистрации","shortname": "Время регистрации","visible": false,"searchable": true,"sortable": true - } - , - {"code": "updatedAt", - "field": "updated","type": 5,"name": "Время изменения","shortname": "Время изменения","visible": false,"searchable": true,"sortable": true - } - , - {"code": "clearingDate", - "type": 6,"name": "Дата клиринга","shortname": "Дата клиринга","visible": false,"searchable": true,"sortable": true - } - ] - - } - , - "uncoveredDealRegister": { - - "name": "Реестр сделок, не прошедших процедуру контроля обеспечения", - - "destination": "uncovered-deal-registers", - - "class": "ru.clearing.classes.statics.data.register.UncoveredDealRegister", - - "table": "uncovered_deal_register", - - "fields": [ - {"code": "executionId", - "type": 1,"name": "Идентификационный номер сделки в Клиринговой системе","shortname": "Номер сделки КС","visible": false,"searchable": true,"sortable": true - } - , - {"code": "companyFullName", - "type": 2,"length": 255,"name": "Наименование биржи","shortname": "Наименование биржи","searchable": true,"sortable": true,"visible": true - } - , - {"code": "tradingDate", - "type": 6,"name": "Дата заключения сделки","shortname": "Дата заключения сделки","visible": true,"searchable": true,"sortable": true - } - , - {"code": "exchangeExecutionId", - "type": 1,"name": "Идентификационный номер сделки в Торговой системе","shortname": "Номер сделки","visible": true,"searchable": true,"sortable": true - } - , - {"code": "exchangeExecutionTime", - "type": 4,"name": "Время заключения сделки в Торговой системе","shortname": "Время заключения сделки","visible": true,"searchable": true,"sortable": true - } - , - {"code": "securitySymbol", - "type": 2,"length": 255,"name": "Финансовый инструмент","shortname": "Код биржевого инструмента / товара","visible": true,"searchable": true,"sortable": true - } - , - {"code": "securityFullName", - "type": 2,"length": 255,"name": "Наименование инструмента","shortname": "Инструмент","visible": false,"searchable": true,"sortable": true - } - , - {"code": "sellerFullName", - "type": 2,"length": 255,"name": "Наименование продавца","shortname": "Наименование продавца","searchable": true,"sortable": true,"visible": true - } - , - {"code": "sellerClearingCode", - "type": 2,"length": 255,"name": "Код продавца","shortname": "Код продавца","searchable": true,"sortable": true,"visible": true - } - , - {"code": "sellerAccount", - "type": 2,"length": 50,"name": "Счет продавца","shortname": "Счет продавца","searchable": true,"sortable": true,"visible": true - } - , - {"code": "buyerFullName", - "type": 2,"length": 255,"name": "Наименование покупателя","shortname": "Наименование покупателя","searchable": true,"sortable": true,"visible": true - } - , - {"code": "buyerClearingCode", - "type": 2,"length": 255,"name": "Код покупателя","shortname": "Код покупателя","searchable": true,"sortable": true,"visible": true - } - , - {"code": "buyerAccount", - "type": 2,"length": 50,"name": "Счет покупателя","shortname": "Счет покупателя","searchable": true,"sortable": true,"visible": true - } - , - {"code": "amount", - "type": 11,"name": "Сумма сделки","shortname": "Сумма сделки","visible": true,"searchable": true,"sortable": true - } - , - {"code": "resultStatus", - "type": 12,"name": "Результат клиринга","shortname": "Результат клиринга","visible": true,"searchable": true,"sortable": true,"link": "resultStatus" - } - , - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","visible": false,"searchable": true,"sortable": true - } - , - {"code": "createdAt", - "field": "created","type": 5,"name": "Время регистрации","shortname": "Время регистрации","visible": false,"searchable": true,"sortable": true - } - , - {"code": "updatedAt", - "field": "updated","type": 5,"name": "Время изменения","shortname": "Время изменения","visible": false,"searchable": true,"sortable": true - } - , - {"code": "clearingDate", - "type": 6,"name": "Дата клиринга","shortname": "Дата клиринга","visible": false,"searchable": true,"sortable": true - } - ] - - } - , - "reportRegister": { - - "name": "Реестр отправленных отчетов", - - "destination": "report-registers", - - "class": "ru.clearing.classes.statics.data.register.ReportRegister", - - "table": "report_register", - - "fields": [ - {"code": "companyFullName", - "type": 2,"length": 255,"name": "Наименование участника","shortname": "Участник","searchable": true,"sortable": true - } - , - {"code": "clearingCode", - "type": 2,"length": 255,"name": "Код клиринга","shortname": "Код участника","searchable": true,"sortable": true - } - , - {"code": "sessionId", - "type": 1,"name": "Сессия","shortname": "Сессия","visible": true,"searchable": true,"sortable": true,"link": "moneyMarketSession" - } - , - {"code": "comment", - "type": 2,"name": "Комментарий","shortname": "Основание","searchable": true,"sortable": true,"length": 255 - } - , - {"code": "name", - "type": 2,"length": 255,"name": "Наименование","shortname": "Наименование","visible": false,"searchable": true,"sortable": true - } - , - {"code": "quantity", - "type": 1,"name": "Количество записей","shortname": "Количество","visible": false,"searchable": true,"sortable": true - } - , - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","visible": false,"searchable": true,"sortable": true - } - , - {"code": "createdAt", - "field": "created","type": 5,"name": "Время регистрации","shortname": "Время","visible": true,"searchable": true,"sortable": true - } - , - {"code": "updatedAt", - "field": "updated","type": 5,"name": "Время изменения","shortname": "Время изменения","visible": false,"searchable": true,"sortable": true - } - , - {"code": "clearingDate", - "type": 6,"name": "Дата клиринга","shortname": "Дата клиринга","visible": false,"searchable": true,"sortable": true - } - ] - - } - , - "contractRegister": { - - "name": "Журнал регистрации договоров", - - "destination": "contract-registers", - - "class": "ru.clearing.classes.statics.data.register.ContractRegister", - - "table": "contract_register", - - "fields": [ - {"code": "name", - "type": 2,"length": 255,"name": "Наименование документа","shortname": "Наименование","searchable": true,"sortable": true,"visible": true - } - , - {"code": "number", - "type": 2,"length": 255,"name": "Номер документа","shortname": "Номер","searchable": true,"sortable": true,"visible": true - } - , - {"code": "issueDate", - "type": 6,"name": "Дата составления","shortname": "Дата выдачи","searchable": true,"sortable": true - } - , - {"code": "companyFullName", - "type": 1,"name": "Наименование лица","shortname": "Компания","searchable": true,"sortable": true,"visible": true - } - , - {"code": "companyId", - "type": 1,"name": "Наименование Компании","shortname": "Компания","searchable": true,"sortable": true,"visible": true,"link": "company","linkCode": "shortName" - } - , - {"code": "documentType", - "type": 12,"name": "Наименование типа документа","shortname": "Тип документа","searchable": true,"sortable": true,"visible": true,"link": "documentType" - } - , - {"code": "issuePlace", - "type": 2,"length": 255,"name": "Место выдачи","shortname": "Место выдачи","searchable": true,"sortable": true,"visible": true - } - , - {"code": "issuer", - "type": 2,"length": 255,"name": "Кем выдан","shortname": "Кем выдан","searchable": true,"sortable": true,"visible": true - } - , - {"code": "issuerCode", - "type": 2,"length": 255,"name": "Код выдавшего органа","shortname": "Код выдавшего органа","searchable": true,"sortable": true,"visible": true - } - , - {"code": "place", - "type": 2,"length": 255,"name": "Место","shortname": "Место","searchable": true,"sortable": true,"visible": true - } - , - {"code": "validFromDate", - "type": 6,"name": "Дата начала срока действия","shortname": "Дата начала срока действия","searchable": true,"sortable": true - } - , - {"code": "validToDate", - "type": 6,"name": "Дата окончания срока действия","shortname": "Дата окончания срока действия","searchable": true,"sortable": true - } - , - {"code": "closeDate", - "type": 6,"name": "Дата расторжения","shortname": "Дата расторжения","searchable": true,"sortable": true - } - , - {"code": "comment", - "type": 2,"length": 255,"name": "Место","shortname": "Место","searchable": true,"sortable": true,"visible": true - } - , - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","visible": false,"searchable": true,"sortable": true - } - , - {"code": "createdAt", - "type": 5,"name": "Дата и время регистрации документа","shortname": "Время сделки","visible": true,"searchable": true,"sortable": true - } - , - {"code": "updatedAt", - "type": 5,"name": "Время изменения сделки","shortname": "Время изменения","visible": false,"searchable": true,"sortable": true - } - ] - - } - , - "orderRegister": { - - "name": "Реестр распоряжений, направленных расчетной организации", - - "destination": "order-registers", - - "class": "ru.clearing.classes.statics.data.register.OrderRegister", - - "table": "order_register", - - "fields": [ - {"code": "creditLegAccount", - "type": 2,"lenght": "50","name": "Счет отправителя","shortname": "Счет отправителя","searchable": true,"sortable": true,"visible": true - } - , - {"code": "creditLegAmount", - "type": 10,"name": "Сумма отправителя","shortname": "Сумма отправителя","searchable": true,"sortable": true,"visible": true - } - , - {"code": "creditLegCurrencyCode", - "type": 12,"name": "Код валюты отправителя","shortname": "Валюта отправителя","searchable": true,"sortable": true,"visible": true,"link": "currency" - } - , - {"code": "creditLegDirection", - "type": 1,"name": "Направление отправителя","shortname": "Направление","searchable": true,"sortable": true,"visible": true,"link": "inOutDirection" - } - , - {"code": "debitLegAccount", - "type": 2,"lenght": "50","name": "Счет получателя","shortname": "Счет получателя","searchable": true,"sortable": true,"visible": true - } - , - {"code": "sender", - "type": 2,"length": 255,"name": "Отправитель","shortname": "Отправитель","searchable": true,"sortable": true,"visible": true - } - , - {"code": "addressee", - "type": 2,"length": 255,"name": "Получатель","shortname": "Получатель","searchable": true,"sortable": true,"visible": true - } - , - {"code": "documentNumber", - "type": 2,"length": 255,"name": "Номер документа в сторонней системе","shortname": "Номер РО","searchable": true,"sortable": true - } - , - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "createdAt", - "field": "created","type": 4,"name": "Дата и время создания записи","shortname": "Создано","searchable": true,"sortable": true,"ignore": true - } - , - {"code": "updatedAt", - "field": "updated","type": 4,"name": "Дата и время изменения записи","shortname": "Изменено","searchable": true,"sortable": true,"ignore": true - } - , - {"code": "clearingDate", - "type": 6,"name": "Дата расчета","shortname": "Дата расчета","searchable": true,"sortable": true,"visible": true - } - ] - - } - , - "liabilitiesClaimsMoney": { - - "name": "Требования и обязательства денежных средств", - - "destination": "liabilities-claims-money", - - "class": "ru.clearing.classes.statics.data.liabilities.LiabilitiesClaimsMoney", - - "table": "liabilities_claims_money", - - "fields": [ - {"code": "companyId", - "type": 1,"name": "Наименование участника","shortname": "Участник","searchable": true,"sortable": true,"link": "company","linkCode": "shortName","ignore": true - } - , - {"code": "shortName", - "type": 2,"name": "Короткое наименование Участника","shortname": "Участник","searchable": true,"sortable": true,"length": 255,"visible": true - } - , - {"code": "accountId", - "type": 1,"name": "Наименование счета","shortname": "Счет","searchable": true,"sortable": true,"link": "account","ignore": true - } - , - {"code": "account", - "type": 2,"length": 50,"name": "Наименование счета","shortname": "Счет","searchable": true,"sortable": true,"visible": true - } - , - {"code": "accountType", - "type": 12,"name": "Тип счета","shortname": "Тип счета","searchable": true,"sortable": true,"link": "accountType" - } - , - {"code": "currency", - "type": 12,"name": "Код валюты","shortname": "Валюта","searchable": true,"sortable": true,"visible": true,"link": "currencyCode","linkCode": "code" - } - , - {"code": "liabilitiesAmount", - "type": 11,"name": "Регистр «Обязательства по денежным средствам, сформированные по результатам собственных сделок Участника клиринга», исключая проценты","shortname": "Сумма обязательств","searchable": true,"sortable": true,"visible": true - } - , - {"code": "claimsAmount", - "type": 11,"name": "Сумма требований, исключая проценты","shortname": "Сумма требований","searchable": true,"sortable": true,"visible": true - } - , - {"code": "settlementDate", - "type": 6,"name": "Дата расчета","shortname": "Дата расчета","searchable": true,"sortable": true,"visible": true - } - , - {"code": "tradingDate", - "type": 6,"name": "Дата торгов","shortname": "Дата торгов","searchable": true,"sortable": true - } - , - {"code": "tradingCode", - "type": 2,"name": "Торговый код Участника","shortname": "Торговый код","searchable": true,"sortable": true,"length": 255,"visible": true - } - , - {"code": "fullName", - "type": 2,"name": "Полное наименование Участника","shortname": "Наименование участника","searchable": true,"sortable": true,"length": 255,"visible": true - } - , - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "createdAt", - "field": "created","type": 4,"name": "Дата и время создания записи","shortname": "Создано","searchable": true,"sortable": true,"ignore": true - } - , - {"code": "updatedAt", - "field": "updated","type": 4,"name": "Дата и время изменения записи","shortname": "Изменено","searchable": true,"sortable": true,"ignore": true - } - , - {"code": "clearingDate", - "type": 6,"name": "Дата клиринга","shortname": "Дата клиринга","searchable": true,"sortable": true - } - ] - - } - , - "liabilitiesClaimsAssets": { - - "name": "Требования и обязательства финансовых активов", - - "destination": "liabilities-claims-assets", - - "class": "ru.clearing.classes.statics.data.liabilities.LiabilitiesClaimsAssets", - - "table": "liabilities_claims_assets", - - "fields": [ - {"code": "companyId", - "type": 1,"name": "Наименование участника","shortname": "Участник","searchable": true,"sortable": true,"link": "company","linkCode": "shortName","ignore": true - } - , - {"code": "shortName", - "type": 2,"name": "Короткое наименование Участника","shortname": "Участник","searchable": true,"sortable": true,"length": 255,"visible": true - } - , - {"code": "accountId", - "type": 1,"name": "Наименование счета","shortname": "Счет","searchable": true,"sortable": true,"link": "account","ignore": true - } - , - {"code": "account", - "type": 2,"length": 50,"name": "Наименование счета","shortname": "Счет","searchable": true,"sortable": true,"visible": true - } - , - {"code": "accountType", - "type": 12,"name": "Тип счета","shortname": "Тип счета","searchable": true,"sortable": true,"link": "accountType" - } - , - {"code": "currency", - "type": 12,"name": "Код валюты","shortname": "Валюта","searchable": true,"sortable": true,"visible": true,"link": "currencyCode","linkCode": "code" - } - , - {"code": "settlementDate", - "type": 6,"name": "Дата расчета","shortname": "Дата расчета","searchable": true,"sortable": true,"visible": true - } - , - {"code": "liabilitiesQuantity", - "type": 10,"name": "Сумма обязательств","shortname": "Сумма обязательств","searchable": true,"sortable": true,"visible": true - } - , - {"code": "claimsQuantity", - "type": 10,"name": "Сумма требований","shortname": "Сумма требований","searchable": true,"sortable": true,"visible": true - } - , - {"code": "contract", - "type": 2,"name": "Номер договора","shortname": "Номер договора","searchable": true,"sortable": true,"length": 255,"visible": true - } - , - {"code": "securityId", - "type": 1,"name": "Инструмент","shortname": "Инструмент","searchable": true,"sortable": true,"visible": true,"link": "moneyMarketSecurity","linkCode": "fullName" - } - , - {"code": "tradingDate", - "type": 6,"name": "Дата торгов","shortname": "Дата торгов","searchable": true,"sortable": true - } - , - {"code": "refundDate", - "type": 6,"name": "Дата возврата","shortname": "Дата возврата","searchable": true,"sortable": true,"visible": true - } - , - {"code": "price", - "type": 10,"name": "Ставка по депозиту","shortname": "Ставка,%","searchable": true,"sortable": true,"visible": true - } - , - {"code": "tradingCode", - "type": 2,"name": "Торговый код Участника","shortname": "Торговый код","searchable": true,"sortable": true,"length": 255,"visible": true - } - , - {"code": "clearingCode", - "type": 2,"name": "Клиринговый код Участника","shortname": "Клиринговый код","searchable": true,"sortable": true,"length": 255,"visible": true - } - , - {"code": "comment", - "type": 2,"name": "Комментарий","shortname": "Комментарий","searchable": true,"sortable": true,"length": 255 - } - , - {"code": "fullName", - "type": 2,"name": "Полное наименование Участника","shortname": "Наименование участника","searchable": true,"sortable": true,"length": 255,"visible": true - } - , - {"code": "parentId", - "type": 1,"name": "Запись основного договора без разделения","shortname": "Родительский договор","searchable": true,"sortable": true - } - , - {"code": "liabilitiesClaimsMoneyId", - "type": 1,"name": "Регистры денежных средств","shortname": "Регистры денег","searchable": true,"sortable": true,"link": "liabilitiesClaimsMoney" - } - , - {"code": "clearingStatus", - "type": 1,"name": "Статус клиринга","shortname": "Статус клиринга","searchable": true,"sortable": true,"link": "clearingStatus","ignore": true - } - , - {"code": "paymentId", - "type": 1,"name": "Платеж","shortname": "Платеж","searchable": true,"sortable": true - } - , - {"code": "refundPaymentId", - "type": 1,"name": "Обратный платежа","shortname": "Обратный платеж","searchable": true,"sortable": true - } - , - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "createdAt", - "field": "created","type": 4,"name": "Дата и время создания записи","shortname": "Создано","searchable": true,"sortable": true,"ignore": true - } - , - {"code": "updatedAt", - "field": "updated","type": 4,"name": "Дата и время изменения записи","shortname": "Изменено","searchable": true,"sortable": true,"ignore": true - } - , - {"code": "clearingDate", - "type": 6,"name": "Дата клиринга","shortname": "Дата клиринга","searchable": true,"sortable": true - } - ] - - } - , - "statement": { - - "name": "Денежные средства от расчетной организации", - - "destination": "statements", - - "class": "ru.clearing.classes.statics.data.statement.Statement", - - "table": "statement", - - "fields": [ - {"code": "addresseeId", - "type": 1,"name": "Наименование участника получателя","shortname": "Получатель","searchable": true,"sortable": true,"link": "company" - } - , - {"code": "senderId", - "type": 1,"name": "Наименование участника отправителя","shortname": "Отправитель","searchable": true,"sortable": true,"link": "company" - } - , - {"code": "statementType", - "type": 12,"name": "Тип поступления средств","shortname": "Тип поступления средств","searchable": true,"sortable": true,"link": "statementType" - } - , - {"code": "comment", - "type": 2,"length": 255,"name": "Комментарий","shortname": "Основание","searchable": true,"sortable": true - } - , - {"code": "accountId", - "type": 1,"name": "Наименование счета","shortname": "Счет","searchable": true,"sortable": true,"link": "account" - } - , - {"code": "account", - "type": 2,"length": 50,"name": "Наименование счета","shortname": "Счет","searchable": true,"sortable": true - } - , - {"code": "inOutDirection", - "type": 12,"name": "Направление","shortname": "Направление","searchable": true,"sortable": true,"link": "inOutDirection" - } - , - {"code": "settlementDate", - "type": 6,"name": "Дата расчетов","shortname": "Дата расчетов","searchable": true,"sortable": true - } - , - {"code": "amount", - "type": 11,"name": "Объем","shortname": "Объем","searchable": true,"sortable": true - } - , - {"code": "cashMovementCurrencyCode", - "type": 12,"name": "Код валюты","shortname": "Валюта","searchable": true,"sortable": true,"visible": true,"link": "currency" - } - , - {"code": "operationStatus", - "type": 12,"name": "Cтатус обработки","shortname": "Статус","searchable": true,"sortable": true,"link": "operationStatus" - } - , - {"code": "errorCode", - "type": 12,"name": "Код ошибки","shortname": "Код ошибки","searchable": true,"sortable": true,"link": "errorCode","linkCode": "code" - } - , - {"code": "errorText", - "type": 12,"name": "Полный текст ошибки","shortname": "Ошибка","searchable": true,"sortable": true,"link": "errorText","linkCode": "text" - } - , - {"code": "inSDfId", - "type": 1,"name": "Запись, инициировавшая изменения этой таблицы","shortname": "Входящая запись","searchable": true,"sortable": true,"ignore": true - } - , - {"code": "outSDfId", - "type": 1,"name": "Запись, сформированная в результате изменения этой таблицы","shortname": "Исходящая запись","searchable": true,"sortable": true,"ignore": true - } - , - {"code": "inOutSDfType", - "type": 12,"name": "Типы входящей и исходящей записей","shortname": "Типы входящей и исходящей записей","searchable": true,"sortable": true,"ignore": true,"link": "inOutSDfType" - } - , - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "createdAt", - "field": "created","type": 4,"name": "Дата и время создания записи","shortname": "Создано","searchable": true,"sortable": true,"ignore": true - } - , - {"code": "updatedAt", - "field": "updated","type": 4,"name": "Дата и время изменения записи","shortname": "Изменено","searchable": true,"sortable": true,"ignore": true - } - , - {"code": "clearingDate", - "type": 6,"name": "Дата расчета","shortname": "Дата расчета","searchable": true,"sortable": true,"visible": true - } - ] - - } - , - "tradeSettlement": { - - "name": "Проводки на базе сделок торговой системы", - - "class": "", - - "table": "trade_settlement", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "addresseeId", - "type": 1,"name": "Идентификатор участника получателя","shortname": "Получатель","searchable": true,"sortable": true,"link": "company" - } - , - {"code": "senderId", - "type": 1,"name": "Идентификатор участника отправителя","shortname": "Отправитель","searchable": true,"sortable": true,"link": "company" - } - , - {"code": "createdAt", - "field": "created","type": 4,"name": "Дата и время создания записи","shortname": "Создано","searchable": true,"sortable": true,"ignore": true - } - , - {"code": "updatedAt", - "field": "updated","type": 4,"name": "Дата и время изменения записи","shortname": "Изменено","searchable": true,"sortable": true,"ignore": true - } - , - {"code": "clearingDate", - "type": 6,"name": "Дата расчета","shortname": "Дата расчета","searchable": true,"sortable": true,"visible": true - } - , - {"code": "amount", - "type": 11,"name": "Объем","shortname": "Объем","searchable": true,"sortable": true - } - , - {"code": "currencyCode", - "type": 12,"name": "Код валюты","shortname": "Валюта","searchable": true,"sortable": true,"visible": true,"link": "currency" - } - , - {"code": "inOutDirection", - "type": 1,"name": "Направление","shortname": "Направление","searchable": true,"sortable": true,"link": "inOutDirection" - } - , - {"code": "accountId", - "type": 1,"name": "Идентификатор счета","shortname": "Идентификатор счета","searchable": true,"sortable": true,"link": "account" - } - , - {"code": "account", - "type": 2,"length": 50,"name": "Счет","shortname": "Счет","searchable": true,"sortable": true - } - , - {"code": "operationStatus", - "type": 12,"name": "Cтатус обработки","shortname": "Статус","searchable": true,"sortable": true,"link": "operationStatus" - } - ] - - } - , - "operation": { - - "name": "Проводки", - - "class": "", - - "table": "operation", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "addresseeId", - "type": 1,"name": "Идентификатор участника получателя","shortname": "Получатель","searchable": true,"sortable": true,"link": "company" - } - , - {"code": "senderId", - "type": 1,"name": "Идентификатор участника отправителя","shortname": "Отправитель","searchable": true,"sortable": true,"link": "company" - } - , - {"code": "createdAt", - "field": "created","type": 4,"name": "Дата и время создания записи","shortname": "Создано","searchable": true,"sortable": true,"ignore": true - } - , - {"code": "updatedAt", - "field": "updated","type": 4,"name": "Дата и время изменения записи","shortname": "Изменено","searchable": true,"sortable": true,"ignore": true - } - , - {"code": "clearingDate", - "type": 6,"name": "Дата расчета","shortname": "Дата расчета","searchable": true,"sortable": true,"visible": true - } - , - {"code": "operationTypeId", - "type": 1,"name": "Тип проводки","shortname": "Тип","searchable": true,"sortable": true,"link": "operationType" - } - , - {"code": "operationStatus", - "type": 12,"name": "Cтатус обработки","shortname": "Статус","searchable": true,"sortable": true,"link": "operationStatus" - } - ] - - } - , - "paymentInstruction": { - - "name": "Платежные поручения", - - "destination": "payment-instructions", - - "class": "ru.clearing.classes.statics.data.payment.PaymentInstruction", - - "table": "payment_instruction", - - "fields": [ - {"code": "senderId", - "type": 1,"name": "Наименование участника отправителя","shortname": "Отправитель","searchable": true,"sortable": true,"link": "company","linkCode": "shortName","visible": true - } - , - {"code": "addresseeId", - "type": 1,"name": "Наименование участника получателя","shortname": "Получатель","searchable": true,"sortable": true,"link": "company","linkCode": "shortName","visible": true - } - , - {"code": "adresseeBic", - "type": 2,"length": 255,"name": "Банковский идентификационный код (БИК) получателя","shortname": "БИК получателя","searchable": true,"sortable": true - } - , - {"code": "payeeBankName", - "type": 2,"length": 255,"name": "Наименование банка отправителя","shortname": "Банк отправителя","searchable": true,"sortable": true - } - , - {"code": "payeeBic", - "type": 2,"length": 255,"name": "Банковский идентификационный код (БИК) отправителя","shortname": "БИК отправителя","searchable": true,"sortable": true - } - , - {"code": "addresseeBankName", - "type": 2,"length": 255,"name": "Наименование банка получателя","shortname": "Банк получателя","searchable": true,"sortable": true - } - , - {"code": "paymentDate", - "type": 4,"name": "Дата и время платежа","shortname": "Дата и время платежа","searchable": true,"sortable": true,"ignore": true - } - , - {"code": "paymentPurpose", - "type": 2,"length": 255,"name": "Назначение платежа","shortname": "Назначение","searchable": true,"sortable": true,"visible": true - } - , - {"code": "settlementDate", - "type": 6,"name": "Дата расчетов","shortname": "Дата расчетов","searchable": true,"sortable": true,"visible": true - } - , - {"code": "creditLeg_amount", - "field": "creditLegAmount","type": 10,"name": "Сумма отправителя","shortname": "Сумма отправителя","searchable": true,"sortable": true,"visible": true - } - , - {"code": "debitLeg_amount", - "field": "debitLegAmount","type": 10,"name": "Сумма получателя","shortname": "Сумма получателя","searchable": true,"sortable": true,"visible": true - } - , - {"code": "creditLeg_accountId", - "field": "creditLegAccountId","type": 1,"name": "Наименование счета отправителя","shortname": "Счет отправителя","searchable": true,"sortable": true,"link": "account","ignore": true - } - , - {"code": "credit_csAccount", - "field": "creditCsAccount","type": 2,"length": 255,"name": "Корреспондентский счет отправителя","shortname": "Корр. счет отправителя","searchable": true,"sortable": true,"ignore": true - } - , - {"code": "creditLeg_account", - "field": "creditLegAccount","type": 2,"length": 50,"name": "Счет отправителя","shortname": "Счет отправителя","searchable": true,"sortable": true,"visible": true - } - , - {"code": "debitLeg_accountId", - "field": "debitLegAccountId","type": 1,"name": "Наименование счета получателя","shortname": "Счет получателя","searchable": true,"sortable": true,"link": "account","ignore": true - } - , - {"code": "debit_csAccount", - "field": "debitCsAccount","type": 2,"length": 255,"name": "Корреспондентский счет получателя","shortname": "Корр. счет получателя","searchable": true,"sortable": true,"ignore": true - } - , - {"code": "debitLeg_account", - "field": "debitLegAccount","type": 2,"length": 50,"name": "Счет получателя","shortname": "Счет получателя","searchable": true,"sortable": true,"visible": true - } - , - {"code": "creditLeg_direction", - "field": "creditLegDirection","type": 1,"name": "Направление отправителя","shortname": "Направление отправителя","searchable": true,"sortable": true,"link": "inOutDirection","ignore": true - } - , - {"code": "debitLeg_direction", - "field": "debitLegDirection","type": 1,"name": "Направление получателя","shortname": "Направление получателя","searchable": true,"sortable": true,"link": "inOutDirection","ignore": true - } - , - {"code": "creditLeg_currencyCode", - "field": "creditLegCurrencyCode","type": 12,"name": "Код валюты отправителя","shortname": "Валюта отправителя","searchable": true,"sortable": true,"link": "currency" - } - , - {"code": "debitLeg_currencyCode", - "field": "debitLegCurrencyCode","type": 12,"name": "Код валюты получателя","shortname": "Валюта получателя","searchable": true,"sortable": true,"link": "currency" - } - , - {"code": "transactionStatus", - "type": 12,"name": "Cтатус транзакции","shortname": "Статус","searchable": true,"sortable": true,"visible": true,"link": "transactionStatus","ignore": true - } - , - {"code": "documentNumber", - "type": 2,"length": 255,"name": "Номер документа в сторонней системе","shortname": "Номер РО","searchable": true,"sortable": true - } - , - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "updatedAt", - "field": "updated","type": 4,"name": "Дата и время изменения записи","shortname": "Изменено","searchable": true,"sortable": true,"ignore": true - } - , - {"code": "createdAt", - "field": "created","type": 4,"name": "Дата и время создания записи","shortname": "Создано","searchable": true,"sortable": true,"ignore": true - } - , - {"code": "clearingDate", - "type": 6,"name": "Дата расчета","shortname": "Дата расчета","searchable": true,"sortable": true,"ignore": true - } - ] - - } - , - "marketData": { - - "name": "Итоги торгов", - - "class": "ru.clearing.classes.TransactionData.Execution.MarketData", - - "table": "market_data", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","visible": false,"searchable": true,"sortable": true - } - , - {"code": "securitiesDepositId", - "type": 1,"name": "Биржевой код инструмента","shortname": "Инструмент","visible": true,"searchable": true,"sortable": true,"link": "moneyMarketSecurity","linkCode": "fullName" - } - , - {"code": "companyName", - "type": 2,"length": 255,"name": "Инициатор торгов","shortname": "Инициатор","visible": false,"searchable": true,"sortable": true - } - , - {"code": "market", - "type": 12,"name": "Секция","shortname": "Секция","visible": true,"searchable": true,"sortable": true,"link": "market","linkCode": "name" - } - , - {"code": "counterPartyNum", - "type": 1,"name": "Количество участников, заключивших сделки","shortname": "Участников","visible": true,"searchable": true,"sortable": true - } - , - {"code": "tradesNum", - "type": 1,"name": "Количество сделок","shortname": "Сделок","visible": true,"searchable": true,"sortable": true - } - , - {"code": "amount", - "type": 11,"name": "Объем сделок, руб","shortname": "Объем сделок","visible": true,"searchable": true,"sortable": true - } - , - {"code": "openPrice", - "type": 10,"name": "Откр.","shortname": "Откр.,%","visible": true,"searchable": true,"sortable": true - } - , - {"code": "maxPrice", - "type": 10,"name": "Макс.","shortname": "Макс.,%","visible": true,"searchable": true,"sortable": true - } - , - {"code": "minPrice", - "type": 10,"name": "Мин.","shortname": "Мин.,%","visible": true,"searchable": true,"sortable": true - } - , - {"code": "closePrice", - "type": 10,"name": "Закр.","shortname": "Закр.,%","visible": true,"searchable": true,"sortable": true - } - , - {"code": "avgPrice", - "type": 10,"name": "Ср.взв.","shortname": "Ср.взв.,%","visible": true,"searchable": true,"sortable": true - } - , - {"code": "duration", - "type": 3,"name": "Срок, дней","shortname": "Срок","searchable": true,"sortable": true - } - , - {"code": "createdAt", - "type": 5,"name": "Время регистрации сделки","shortname": "Время сделки","visible": true,"searchable": true,"sortable": true - } - , - {"code": "updatedAt", - "type": 5,"name": "Время изменения сделки","shortname": "Время изменения","visible": false,"searchable": true,"sortable": true - } - , - {"code": "tradingDate", - "type": 6,"name": "Дата торгов","shortname": "Дата торгов","visible": false,"searchable": true,"sortable": true - } - ] - - } - , - "chargeTariff": { - - "name": "Тарифы комиссий", - - "logUpdates": "true", - - "table": "charge_tariff", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "market", - "type": 12,"name": "Секция","shortname": "Секция","searchable": true,"sortable": true,"visible": true,"link": "market","linkCode": "name" - } - , - {"code": "clearingMemberCategory", - "type": 12,"name": "Категория участника клиринга","shortname": "Категория","searchable": true,"sortable": true,"visible": true,"link": "clearingCategory" - } - , - {"code": "chargeTypeId", - "type": 1,"name": "Тип комиссии","shortname": "Тип комиссии","searchable": true,"sortable": true,"link": "chargeType","visible": true - } - , - {"code": "chargeRate", - "type": 10,"name": "Ставка комиссионного сбора","shortname": "Ставка комиссионного сбора","searchable": true,"sortable": true,"visible": true - } - , - {"code": "currency", - "type": 1,"name": "Валюта начисления комиссии","shortname": "Валюта комиссии","searchable": true,"sortable": true,"visible": true,"link": "currencyCode","linkCode": "code" - } - , - {"code": "validFromDate", - "type": 6,"name": "Дата начала срока действия","shortname": "Дата начала срока действия","searchable": true,"sortable": true - } - , - {"code": "validToDate", - "type": 6,"name": "Дата окончания срока действия","shortname": "Дата окончания срока действия","searchable": true,"sortable": true - } - , - {"code": "createdAt", - "field": "created","type": 4,"name": "Создано","shortname": "Создано","searchable": true,"sortable": true - } - , - {"code": "updatedAt", - "field": "updated","type": 4,"name": "Изменено","shortname": "Изменено","searchable": true,"sortable": true - } - ] - - } - , - "individualChargeTariff": { - - "name": "Индивидуальные тарифы комиссий для Участника", - - "logUpdates": "true", - - "table": "individual_charge_tariff", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "companyId", - "type": 1,"name": "Участник","shortname": "Участник","searchable": true,"sortable": true,"link": "company","linkCode": "shortName" - } - , - {"code": "market", - "type": 12,"name": "Секция","shortname": "Секция","searchable": true,"sortable": true,"visible": true,"link": "market","linkCode": "name" - } - , - {"code": "clearingMemberCategory", - "type": 12,"name": "Категория участника клиринга","shortname": "Категория","searchable": true,"sortable": true,"visible": true,"link": "clearingCategory" - } - , - {"code": "chargeTypeId", - "type": 1,"name": "Тип комиссии","shortname": "Тип комиссии","searchable": true,"sortable": true,"link": "chargeType","visible": true - } - , - {"code": "chargeRate", - "type": 10,"name": "Ставка комиссионного сбора","shortname": "Ставка комиссионного сбора","searchable": true,"sortable": true,"visible": true - } - , - {"code": "currency", - "type": 1,"name": "Валюта начисления комиссии","shortname": "Валюта комиссии","searchable": true,"sortable": true,"visible": true,"link": "currencyCode","linkCode": "code" - } - , - {"code": "validFromDate", - "type": 6,"name": "Дата начала срока действия","shortname": "Дата начала срока действия","searchable": true,"sortable": true - } - , - {"code": "validToDate", - "type": 6,"name": "Дата окончания срока действия","shortname": "Дата окончания срока действия","searchable": true,"sortable": true - } - , - {"code": "createdAt", - "field": "created","type": 4,"name": "Создано","shortname": "Создано","searchable": true,"sortable": true - } - , - {"code": "updatedAt", - "field": "updated","type": 4,"name": "Изменено","shortname": "Изменено","searchable": true,"sortable": true - } - ] - - } - , - "companyTariff": { - - "name": "Тарифы комиссий в разрезе Участника", - - "class": "", - - "table": "company_tariff", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "market", - "type": 12,"name": "Секция","shortname": "Секция","searchable": true,"sortable": true,"visible": true,"link": "market","linkCode": "name" - } - , - {"code": "clearingMemberCategory", - "type": 12,"name": "Категория участника клиринга","shortname": "Категория","searchable": true,"sortable": true,"visible": true,"link": "clearingCategory" - } - , - {"code": "fullName", - "type": 2,"name": "Полное наименование Участника","shortname": "Наименование участника","searchable": true,"sortable": true,"visible": true,"length": 255,"link": "company","linkCode": "fullName" - } - , - {"code": "contract", - "type": 2,"name": "Номер договора","shortname": "Номер договора","searchable": true,"sortable": true,"visible": true,"length": 255 - } - , - {"code": "chargeTypeId", - "type": 1,"name": "Тип комиссии","shortname": "Тип комиссии","searchable": true,"sortable": true,"link": "chargeType","visible": true - } - , - {"code": "chargeRate", - "type": 10,"name": "Ставка комиссионного сбора","shortname": "Ставка комиссионного сбора","searchable": true,"sortable": true,"visible": true - } - , - {"code": "currency", - "type": 1,"name": "Валюта начисления комиссии","shortname": "Валюта комиссии","searchable": true,"sortable": true,"visible": true,"link": "currencyCode","linkCode": "code" - } - , - {"code": "validFromDate", - "type": 6,"name": "Дата начала срока действия","shortname": "Дата начала срока действия","searchable": true,"sortable": true - } - , - {"code": "validToDate", - "type": 6,"name": "Дата окончания срока действия","shortname": "Дата окончания срока действия","searchable": true,"sortable": true - } - , - {"code": "createdAt", - "field": "created","type": 4,"name": "Создано","shortname": "Создано","searchable": true,"sortable": true - } - , - {"code": "updatedAt", - "field": "updated","type": 4,"name": "Изменено","shortname": "Изменено","searchable": true,"sortable": true - } - , - {"code": "companyId", - "type": 1,"name": "Участник","shortname": "Участник","searchable": true,"sortable": true,"link": "company","linkCode": "shortName" - } - ] - - } - , - "errorText": { - - "name": "Полные тексты ошибок", - - "destination": "error-texts", - - "class": "ru.clearing.classes.statics.data.messages.ErrorText", - - "table": "error_text", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "createdAt", - "field": "created","type": 4,"name": "Дата и время создания записи","shortname": "Создано","searchable": true,"sortable": true,"ignore": true - } - , - {"code": "updatedAt", - "field": "updated","type": 4,"name": "Дата и время изменения записи","shortname": "Изменено","searchable": true,"sortable": true,"ignore": true - } - , - {"code": "errorCode", - "type": 12,"name": "Код ошибки","shortname": "Код","searchable": true,"sortable": true,"visible": true,"link": "errorCode" - } - , - {"code": "text", - "type": 2,"length": 255,"name": "Полный текст ошибки","shortname": "Ошибка","searchable": true,"sortable": true,"visible": true - } - , - {"code": "userId", - "type": 1,"name": "Автор сообщения","shortname": "Сотрудник","searchable": true,"sortable": true,"visible": true,"link": "userCls","ignore": true - } - , - {"code": "clearingDate", - "type": 6,"name": "Текущая дата","shortname": "Дата","visible": false,"searchable": true,"sortable": true,"ignore": true - } - ] - - } - , - "sDf01": { - - "name": "ДФ-01 Информация о денежных средствах, находящихся на торговых банковских счетах Участников клиринга", - - "class": "ru.clearing.classes.statics.data.sdf.SDf01", - - "table": "s_df_01", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "curr_code", - "type": 2,"length": 12,"name": "Код валюты","shortname": "Код валюты","searchable": true,"sortable": true,"visible": true - } - , - {"code": "account", - "type": 2,"length": 35,"name": "Код счета участника клиринга","shortname": "Счет УК","searchable": true,"sortable": true - } - , - {"code": "remainder", - "type": 2,"length": 22,"name": "Остаток денежных средств","shortname": "Остаток денежных средств","searchable": true,"sortable": true - } - , - {"code": "deal", - "type": 2,"length": 10,"name": "Биржевой код участника клиринга","shortname": "Биржевой код УК","searchable": true,"sortable": true,"visible": true - } - , - {"code": "acc_code", - "type": 2,"length": 5,"name": "Не используется в Системе","shortname": "Не используется","searchable": true,"sortable": true - } - , - {"code": "dat", - "type": 2,"length": 8,"name": "Дата расчетов","shortname": "Дата расчетов","searchable": true,"sortable": true - } - , - {"code": "market", - "type": 2,"length": 1,"name": "Биржевая секция","shortname": "Биржевая секция","searchable": true,"sortable": true - } - , - {"code": "acc_name", - "type": 2,"length": 30,"name": "Наименование участника клиринга","shortname": "Наименование УК","searchable": true,"sortable": true - } - , - {"code": "acc_type", - "type": 2,"length": 2,"name": "Признак счета","shortname": "Признак счета","searchable": true,"sortable": true - } - , - {"code": "sumengage", - "type": 2,"length": 22,"name": "Не используется в Системе","shortname": "Не используется","searchable": true,"sortable": true - } - , - {"code": "sumunblock", - "type": 2,"length": 22,"name": "Не используется в Системе","shortname": "Не используется","searchable": true,"sortable": true - } - , - {"code": "file_type", - "type": 2,"length": 1,"name": "Не используется в Системе","shortname": "Не используется","searchable": true,"sortable": true - } - , - {"code": "fileName", - "type": 2,"length": 255,"name": "Наименование входящего файла","shortname": "Наименование файла","searchable": true,"sortable": true - } - , - {"code": "generationTime", - "type": 4,"name": "Дата и время обработки файла","shortname": "Дата и время обработки","searchable": true,"sortable": true - } - , - {"code": "generationId", - "type": 1,"name": "Идентификатор взаимодействия","shortname": "ID взаимодействия","searchable": true,"sortable": true - } - ] - - } - , - "sDf02": { - - "name": "ДФ-02 Уведомление об исполнении операции загрузки денежных средств или уведомление об ошибке", - - "class": "ru.clearing.classes.statics.data.sdf.SDf02", - - "table": "s_df_02", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "curr_code", - "type": 2,"length": 12,"name": "Код валюты","shortname": "Код валюты","searchable": true,"sortable": true,"visible": true - } - , - {"code": "account", - "type": 2,"length": 35,"name": "Код счета участника клиринга","shortname": "Счет УК","searchable": true,"sortable": true - } - , - {"code": "remainder", - "type": 2,"length": 22,"name": "Остаток денежных средств","shortname": "Остаток денежных средств","searchable": true,"sortable": true - } - , - {"code": "deal", - "type": 2,"length": 10,"name": "Биржевой код участника клиринга","shortname": "Биржевой код УК","searchable": true,"sortable": true,"visible": true - } - , - {"code": "acc_code", - "type": 2,"length": 5,"name": "Не используется в Системе","shortname": "Не используется","searchable": true,"sortable": true - } - , - {"code": "dat", - "type": 2,"length": 8,"name": "Дата расчетов","shortname": "Дата расчетов","searchable": true,"sortable": true - } - , - {"code": "market", - "type": 2,"length": 1,"name": "Биржевая секция","shortname": "Биржевая секция","searchable": true,"sortable": true - } - , - {"code": "acc_name", - "type": 2,"length": 30,"name": "Наименование участника клиринга","shortname": "Наименование УК","searchable": true,"sortable": true - } - , - {"code": "acc_type", - "type": 2,"length": 2,"name": "Признак счета","shortname": "Признак счета","searchable": true,"sortable": true - } - , - {"code": "sumengage", - "type": 2,"length": 22,"name": "Не используется в Системе","shortname": "Не используется","searchable": true,"sortable": true - } - , - {"code": "sumunblock", - "type": 2,"length": 22,"name": "Не используется в Системе","shortname": "Не используется","searchable": true,"sortable": true - } - , - {"code": "file_type", - "type": 2,"length": 1,"name": "Не используется в Системе","shortname": "Не используется","searchable": true,"sortable": true - } - , - {"code": "result", - "type": 2,"length": 3,"name": "Результат обработки каждой записи исходного файла ДФ-01","shortname": "Результат обработки ДФ-01","searchable": true,"sortable": true - } - , - {"code": "generationTime", - "type": 4,"name": "Дата и время создания записи","shortname": "Дата и время создания","searchable": true,"sortable": true - } - , - {"code": "generationId", - "type": 1,"name": "Идентификатор взаимодействия","shortname": "ID взаимодействия","searchable": true,"sortable": true - } - , - {"code": "inSDf01Id", - "type": 1,"name": "Идентификатор соответствующей записи из таблицы-источника","shortname": "Входящая запись","searchable": true,"sortable": true - } - ] - - } - , - "sDf03": { - - "name": "ДФ-03 Сводное платежное поручение", - - "class": "ru.clearing.classes.statics.data.sdf.SDf03", - - "table": "s_df_03", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "seg_type", - "type": 2,"length": 1,"name": "Код инициатора в КС","shortname": "Инициатор в КС","searchable": true,"sortable": true - } - , - {"code": "doc_type", - "type": 2,"lenght": "4","name": "Тип документа","shortname": "Тип документа","searchable": true,"sortable": true - } - , - {"code": "docnm_ref", - "type": 2,"length": 16,"name": "Ссылочный номер документа у отправителя","shortname": "Номер документа у отправителя","searchable": true,"sortable": true - } - , - {"code": "docnmprev", - "type": 2,"length": 16,"name": "Ссылка на предшестввующий документ","shortname": "Предшествующий документ","searchable": true,"sortable": true - } - , - {"code": "priority", - "type": 2,"length": 1,"name": "Приоритет скорости отправления сообщения","shortname": "Приоритет отправки","searchable": true,"sortable": true - } - , - {"code": "sbankcode", - "type": 2,"length": 12,"name": "Код банка-плательщика","shortname": "Банк-плательщик","searchable": true,"sortable": true - } - , - {"code": "c_acc_deb", - "type": 2,"length": 35,"name": "Счет по дебету","shortname": "Счет по дебету","searchable": true,"sortable": true - } - , - {"code": "sbanknam1", - "type": 2,"length": 35,"name": "Наименование банка-плательщика","shortname": "Наименование банка-плательщика","searchable": true,"sortable": true - } - , - {"code": "sbanknam2", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "sbanknam3", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "sbanknam4", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "sbanknam5", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "rbankcode", - "type": 2,"length": 12,"name": "Код банка-получателя","shortname": "Код банка-получателя","searchable": true,"sortable": true - } - , - {"code": "c_acc_cred", - "type": 2,"length": 35,"name": "Счет по кредиту","shortname": "","searchable": true,"sortable": true - } - , - {"code": "rbanknam1", - "type": 2,"length": 35,"name": "Наименование банка-получателя","shortname": "Наименование банка-получателя","searchable": true,"sortable": true - } - , - {"code": "rbanknam2", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "rbanknam3", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "rbanknam4", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "rbanknam5", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "pay_date", - "type": 2,"lenght": "8","name": "Платеж-дата","shortname": "Платеж-дата","searchable": true,"sortable": true - } - , - {"code": "ext_date", - "type": 2,"lenght": "8","name": "Дата по выписке","shortname": "Дата по выписке","searchable": true,"sortable": true - } - , - {"code": "pay_val", - "type": 2,"length": 12,"name": "Валюта платежа","shortname": "Валюта","searchable": true,"sortable": true - } - , - {"code": "sum_deb", - "type": 2,"lenght": "22","name": "Сумма дебет ","shortname": "Сумма дебет","searchable": true,"sortable": true - } - , - {"code": "sclientn1", - "type": 2,"length": 35,"name": "Наименование клиента-плательщика","shortname": "Наименование клиента-плательщика","searchable": true,"sortable": true - } - , - {"code": "sclientn2", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "sclientn3", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "sclientn4", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "sc_code", - "type": 2,"length": 12,"name": "Код клиента-плательщика","shortname": "Код клиента-плательщика","searchable": true,"sortable": true - } - , - {"code": "acc_deb", - "type": 2,"length": 35,"name": "Счет клиента-плательщика(дебет)","shortname": "Счет клиента-плательщика(дебет)","searchable": true,"sortable": true - } - , - {"code": "rclientn1", - "type": 2,"length": 35,"name": "Наименование клиента-получателя","shortname": "Наименование клиента-получателя","searchable": true,"sortable": true - } - , - {"code": "rclientn2", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "rclientn3", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "rclientn4", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "acc_kr_1", - "type": 2,"length": 35,"name": "Счет кредит","shortname": "Счет кредит","searchable": true,"sortable": true - } - , - {"code": "acc_kr_2", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "sp_code", - "type": 2,"length": 2,"name": "Код назначения платежа","shortname": "Код назначения платежа","searchable": true,"sortable": true - } - , - {"code": "specif_1", - "type": 2,"length": 35,"name": "Назначение платежа","shortname": "Назначение платежа","searchable": true,"sortable": true - } - , - {"code": "specif_2", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "specif_3", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "specif_4", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "specif_5", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "specif_6", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "send_type", - "type": 2,"length": 10,"name": "Тип отправления плат. поручения","shortname": "Тип отправления плат. поручения","searchable": true,"sortable": true - } - , - {"code": "servdate", - "type": 2,"length": 8,"name": "Дата получения товара, оказания услуг в плат. поручении","shortname": "Дата получения товара","searchable": true,"sortable": true - } - , - {"code": "doc_result", - "type": 2,"length": 2,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "imp_result", - "type": 2,"length": 3,"name": "Результат приема","shortname": "Результат приема","searchable": true,"sortable": true - } - , - {"code": "generationTime", - "type": 4,"name": "Дата и время создания записи","shortname": "Дата и время создания","searchable": true,"sortable": true - } - , - {"code": "generationId", - "type": 1,"name": "Идентификатор взаимодействия","shortname": "ID взаимодействия","searchable": true,"sortable": true - } - , - {"code": "paymentInstructionId", - "type": 1,"name": "Идентификатор соответствующей записи из таблицы-источника","shortname": "Входящая запись","searchable": true,"sortable": true,"link": "paymentInstruction" - } - ] - - } - , - "sDf04": { - - "name": "ДФ-04 Подтверждение переводов из Расчетной организации для СПВБ", - - "class": "ru.clearing.classes.statics.data.sdf.SDf04", - - "table": "s_df_04", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "seg_type", - "type": 2,"length": 1,"name": "Код инициатора в КС","shortname": "Инициатор в КС","searchable": true,"sortable": true - } - , - {"code": "doc_type", - "type": 2,"lenght": "4","name": "Тип документа","shortname": "Тип документа","searchable": true,"sortable": true - } - , - {"code": "docnm_ref", - "type": 2,"length": 16,"name": "Ссылочный номер документа у отправителя","shortname": "Номер документа у отправителя","searchable": true,"sortable": true - } - , - {"code": "docnmprev", - "type": 2,"length": 16,"name": "Ссылка на предшестввующий документ","shortname": "Предшествующий документ","searchable": true,"sortable": true - } - , - {"code": "priority", - "type": 2,"length": 1,"name": "Приоритет скорости отправления сообщения","shortname": "Приоритет отправки","searchable": true,"sortable": true - } - , - {"code": "sbankcode", - "type": 2,"length": 12,"name": "Код банка-плательщика","shortname": "Банк-плательщик","searchable": true,"sortable": true - } - , - {"code": "c_acc_deb", - "type": 2,"length": 35,"name": "Счет по дебету","shortname": "Счет по дебету","searchable": true,"sortable": true - } - , - {"code": "sbanknam1", - "type": 2,"length": 35,"name": "Наименование банка-плательщика","shortname": "Наименование банка-плательщика","searchable": true,"sortable": true - } - , - {"code": "sbanknam2", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "sbanknam3", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "sbanknam4", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "sbanknam5", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "rbankcode", - "type": 2,"length": 12,"name": "Код банка-получателя","shortname": "Код банка-получателя","searchable": true,"sortable": true - } - , - {"code": "c_acc_cred", - "type": 2,"length": 35,"name": "Счет по кредиту","shortname": "","searchable": true,"sortable": true - } - , - {"code": "rbanknam1", - "type": 2,"length": 35,"name": "Наименование банка-получателя","shortname": "Наименование банка-получателя","searchable": true,"sortable": true - } - , - {"code": "rbanknam2", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "rbanknam3", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "rbanknam4", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "rbanknam5", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "pay_date", - "type": 2,"lenght": "8","name": "Платеж-дата","shortname": "Платеж-дата","searchable": true,"sortable": true - } - , - {"code": "ext_date", - "type": 2,"lenght": "8","name": "Дата по выписке","shortname": "Дата по выписке","searchable": true,"sortable": true - } - , - {"code": "pay_val", - "type": 2,"length": 12,"name": "Валюта платежа","shortname": "Валюта","searchable": true,"sortable": true - } - , - {"code": "sum_deb", - "type": 2,"lenght": "22","name": "Сумма дебет ","shortname": "Сумма дебет","searchable": true,"sortable": true - } - , - {"code": "sclientn1", - "type": 2,"length": 35,"name": "Наименование клиента-плательщика","shortname": "Наименование клиента-плательщика","searchable": true,"sortable": true - } - , - {"code": "sclientn2", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "sclientn3", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "sclientn4", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "sc_code", - "type": 2,"length": 12,"name": "Код клиента-плательщика","shortname": "Код клиента-плательщика","searchable": true,"sortable": true - } - , - {"code": "acc_deb", - "type": 2,"length": 35,"name": "Счет клиента-плательщика(дебет)","shortname": "Счет клиента-плательщика(дебет)","searchable": true,"sortable": true - } - , - {"code": "rclientn1", - "type": 2,"length": 35,"name": "Наименование клиента-получателя","shortname": "Наименование клиента-получателя","searchable": true,"sortable": true - } - , - {"code": "rclientn2", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "rclientn3", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "rclientn4", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "acc_kr_1", - "type": 2,"length": 35,"name": "Счет кредит","shortname": "Счет кредит","searchable": true,"sortable": true - } - , - {"code": "acc_kr_2", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "sp_code", - "type": 2,"length": 2,"name": "Код назначения платежа","shortname": "Код назначения платежа","searchable": true,"sortable": true - } - , - {"code": "specif_1", - "type": 2,"length": 35,"name": "Назначение платежа","shortname": "Назначение платежа","searchable": true,"sortable": true - } - , - {"code": "specif_2", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "specif_3", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "specif_4", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "specif_5", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "specif_6", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "send_type", - "type": 2,"length": 10,"name": "Тип отправления плат. поручения","shortname": "Тип отправления плат. поручения","searchable": true,"sortable": true - } - , - {"code": "servdate", - "type": 2,"length": 8,"name": "Дата получения товара, оказания услуг в плат. поручении","shortname": "Дата получения товара","searchable": true,"sortable": true - } - , - {"code": "doc_result", - "type": 2,"length": 2,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "imp_result", - "type": 2,"length": 3,"name": "Результат приема","shortname": "Результат приема","searchable": true,"sortable": true - } - , - {"code": "fileName", - "field": "file_name","type": 2,"length": 255,"name": "Наименование входящего файла","shortname": "Наименование файла","searchable": true,"sortable": true - } - , - {"code": "generationTime", - "type": 4,"name": "Дата и время обработки файла","shortname": "Дата и время обработки","searchable": true,"sortable": true - } - , - {"code": "generationId", - "type": 1,"name": "Идентификатор взаимодействия","shortname": "ID взаимодействия","searchable": true,"sortable": true - } - ] - - } - , - "sDf05": { - - "name": "ДФ-05 Уведомление о завершении расчетов в ПРЦ", - - "class": "ru.clearing.classes.statics.data.sdf.SDf05", - - "table": "s_df_05", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "tp", - "type": 10,"name": "Тип документа","shortname": "Тип документа","searchable": true,"sortable": true - } - , - {"code": "dt", - "type": 6,"name": "Дата завершения расчетов","shortname": "Дата завершения расчетов","searchable": true,"sortable": true - } - , - {"code": "tm", - "type": 5,"name": "Время завершения расчетов","shortname": "Время завершения расчетов","searchable": true,"sortable": true - } - , - {"code": "pr", - "type": 2,"length": 1,"name": "Результат обработки запроса","shortname": "Результат обработки запроса","searchable": true,"sortable": true - } - , - {"code": "generationTime", - "type": 4,"name": "Дата и время создания записи","shortname": "Дата и время создания","searchable": true,"sortable": true - } - , - {"code": "generationId", - "type": 1,"name": "Идентификатор взаимодействия","shortname": "ID взаимодействия","searchable": true,"sortable": true - } - ] - - } - , - "sDf08": { - - "name": "ДФ-08 Запрос остатков по всем счетам", - - "class": "ru.clearing.classes.statics.data.sdf.SDf08", - - "table": "s_df_08", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "number", - "type": 2,"length": 10,"name": "Номер запроса остатков по счетам","shortname": "Номер запроса","searchable": true,"sortable": true,"visible": true - } - , - {"code": "datetime", - "type": 2,"length": 13,"name": "Дата и время сообщения","shortname": "Дата и время сообщения","searchable": true,"sortable": true - } - , - {"code": "generationTime", - "type": 4,"name": "Дата и время создания записи","shortname": "Дата и время создания","searchable": true,"sortable": true - } - , - {"code": "generationId", - "type": 1,"name": "Идентификатор взаимодействия","shortname": "ID взаимодействия","searchable": true,"sortable": true - } - ] - - } - , - "sDf09": { - - "name": "ДФ-09 Уведомление о поступлении средств на клиринговый счет", - - "class": "ru.clearing.classes.statics.data.sdf.SDf09", - - "table": "s_df_09", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "account", - "type": 2,"length": 20,"name": "Номер счета участника торгов","shortname": "Номер счета участника торгов","searchable": true,"sortable": true - } - , - {"code": "sum", - "type": 10,"name": "Сумма платежного документа (операции)","shortname": "Сумма платежного документа","searchable": true,"sortable": true - } - , - {"code": "market", - "type": 2,"length": 1,"name": "Код сегмента рынка","shortname": "Код сегмента рынка","searchable": true,"sortable": true - } - , - {"code": "type", - "type": 2,"length": 1,"name": "Код типа платежного документа (операции)","shortname": "Код типа платежного документа","searchable": true,"sortable": true - } - , - {"code": "number", - "type": 10,"name": "Номер платежного документа (операции)","shortname": "Номер запроса","searchable": true,"sortable": true - } - , - {"code": "inn", - "field": "inn","type": 10,"name": "ИНН","shortname": "ИНН","searchable": true,"sortable": true,"visible": true - } - , - {"code": "fileName", - "type": 2,"length": 255,"name": "Наименование входящего файла","shortname": "Наименование файла","searchable": true,"sortable": true - } - , - {"code": "generationTime", - "type": 4,"name": "Дата и время обработки файла","shortname": "Дата и время обработки","searchable": true,"sortable": true - } - , - {"code": "generationId", - "type": 1,"name": "Идентификатор взаимодействия","shortname": "ID взаимодействия","searchable": true,"sortable": true - } - ] - - } - , - "sDf10": { - - "name": "ДФ-10 Подтверждение о загрузке по поступлению на клиринговый счет", - - "class": "ru.clearing.classes.statics.data.sdf.SDf10", - - "table": "s_df_10", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "account", - "type": 2,"length": 20,"name": "Номер счета участника торгов","shortname": "Номер счета участника торгов","searchable": true,"sortable": true - } - , - {"code": "sum", - "type": 10,"name": "Сумма платежного документа (операции)","shortname": "Сумма платежного документа","searchable": true,"sortable": true - } - , - {"code": "market", - "type": 2,"length": 1,"name": "Код сегмента рынка","shortname": "Код сегмента рынка","searchable": true,"sortable": true - } - , - {"code": "type", - "type": 2,"length": 1,"name": "Код типа платежного документа (операции)","shortname": "Код типа платежного документа","searchable": true,"sortable": true - } - , - {"code": "number", - "type": 10,"name": "Номер платежного документа (операции)","shortname": "Номер запроса","searchable": true,"sortable": true - } - , - {"code": "inn", - "type": 10,"name": "ИНН","shortname": "ИНН","searchable": true,"sortable": true,"visible": true - } - , - {"code": "result", - "type": 2,"length": 3,"name": "Результат приема","shortname": "Результат приема","searchable": true,"sortable": true - } - , - {"code": "generationTime", - "type": 4,"name": "Дата и время создания записи","shortname": "Дата и время создания","searchable": true,"sortable": true - } - , - {"code": "generationId", - "type": 1,"name": "Идентификатор взаимодействия","shortname": "ID взаимодействия","searchable": true,"sortable": true - } - , - {"code": "inSDf09Id", - "type": 1,"name": "Идентификатор соответствующей записи из таблицы-источника","shortname": "Входящая запись","searchable": true,"sortable": true - } - ] - - } - , - "sDf11": { - - "name": "ДФ-11 Из КС в ПРЦ Платежное распоряжение на перевод средств с ТБС Участника на КС Инициатора", - - "class": "ru.clearing.classes.statics.data.sdf.SDf11", - - "table": "s_df_11", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "seg_type", - "type": 2,"length": 1,"name": "Код инициатора в КС","shortname": "Инициатор в КС","searchable": true,"sortable": true - } - , - {"code": "doc_type", - "type": 2,"lenght": "4","name": "Тип документа","shortname": "Тип документа","searchable": true,"sortable": true - } - , - {"code": "docnm_ref", - "type": 2,"length": 16,"name": "Ссылочный номер документа у отправителя","shortname": "Номер документа у отправителя","searchable": true,"sortable": true - } - , - {"code": "docnmprev", - "type": 2,"length": 16,"name": "Ссылка на предшестввующий документ","shortname": "Предшествующий документ","searchable": true,"sortable": true - } - , - {"code": "priority", - "type": 2,"length": 1,"name": "Приоритет скорости отправления сообщения","shortname": "Приоритет отправки","searchable": true,"sortable": true - } - , - {"code": "sbankcode", - "type": 2,"length": 12,"name": "Код банка-плательщика","shortname": "Банк-плательщик","searchable": true,"sortable": true - } - , - {"code": "c_acc_deb", - "type": 2,"length": 35,"name": "Счет по дебету","shortname": "Счет по дебету","searchable": true,"sortable": true - } - , - {"code": "sbanknam1", - "type": 2,"length": 35,"name": "Наименование банка-плательщика","shortname": "Наименование банка-плательщика","searchable": true,"sortable": true - } - , - {"code": "sbanknam2", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "sbanknam3", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "sbanknam4", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "sbanknam5", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "rbankcode", - "type": 2,"length": 12,"name": "Код банка-получателя","shortname": "Код банка-получателя","searchable": true,"sortable": true - } - , - {"code": "c_acc_cred", - "type": 2,"length": 35,"name": "Счет по кредиту","shortname": "","searchable": true,"sortable": true - } - , - {"code": "rbanknam1", - "type": 2,"length": 35,"name": "Наименование банка-получателя","shortname": "Наименование банка-получателя","searchable": true,"sortable": true - } - , - {"code": "rbanknam2", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "rbanknam3", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "rbanknam4", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "rbanknam5", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "pay_date", - "type": 2,"lenght": "8","name": "Платеж-дата","shortname": "Платеж-дата","searchable": true,"sortable": true - } - , - {"code": "ext_date", - "type": 2,"lenght": "8","name": "Дата по выписке","shortname": "Дата по выписке","searchable": true,"sortable": true - } - , - {"code": "pay_val", - "type": 2,"length": 12,"name": "Валюта платежа","shortname": "Валюта","searchable": true,"sortable": true - } - , - {"code": "sum_deb", - "type": 2,"lenght": "22","name": "Сумма дебет ","shortname": "Сумма дебет","searchable": true,"sortable": true - } - , - {"code": "sclientn1", - "type": 2,"length": 35,"name": "Наименование клиента-плательщика","shortname": "Наименование клиента-плательщика","searchable": true,"sortable": true - } - , - {"code": "sclientn2", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "sclientn3", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "sclientn4", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "sc_code", - "type": 2,"length": 12,"name": "Код клиента-плательщика","shortname": "Код клиента-плательщика","searchable": true,"sortable": true - } - , - {"code": "acc_deb", - "type": 2,"length": 35,"name": "Счет клиента-плательщика(дебет)","shortname": "Счет клиента-плательщика(дебет)","searchable": true,"sortable": true - } - , - {"code": "rclientn1", - "type": 2,"length": 35,"name": "Наименование клиента-получателя","shortname": "Наименование клиента-получателя","searchable": true,"sortable": true - } - , - {"code": "rclientn2", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "rclientn3", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "rclientn4", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "acc_kr_1", - "type": 2,"length": 35,"name": "Счет кредит","shortname": "Счет кредит","searchable": true,"sortable": true - } - , - {"code": "acc_kr_2", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "sp_code", - "type": 2,"length": 2,"name": "Код назначения платежа","shortname": "Код назначения платежа","searchable": true,"sortable": true - } - , - {"code": "specif_1", - "type": 2,"length": 35,"name": "Назначение платежа","shortname": "Назначение платежа","searchable": true,"sortable": true - } - , - {"code": "specif_2", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "specif_3", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "specif_4", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "specif_5", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "specif_6", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "send_type", - "type": 2,"length": 10,"name": "Тип отправления плат. поручения","shortname": "Тип отправления плат. поручения","searchable": true,"sortable": true - } - , - {"code": "servdate", - "type": 2,"length": 8,"name": "Дата получения товара, оказания услуг в плат. поручении","shortname": "Дата получения товара","searchable": true,"sortable": true - } - , - {"code": "doc_result", - "type": 2,"length": 2,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "generationTime", - "type": 4,"name": "Дата и время создания записи","shortname": "Дата и время создания","searchable": true,"sortable": true - } - , - {"code": "generationId", - "type": 1,"name": "Идентификатор взаимодействия","shortname": "ID взаимодействия","searchable": true,"sortable": true - } - , - {"code": "paymentInstructionId", - "type": 1,"name": "Идентификатор соответствующей записи из таблицы-источника","shortname": "Входящая запись","searchable": true,"sortable": true,"link": "paymentInstruction" - } - ] - - } - , - "sDf12": { - - "name": "ДФ-12 Из ПРЦ в КС Информация о блокировке/разблокировке/закрытии ТБС УК", - - "class": "ru.clearing.classes.statics.data.sdf.SDf12", - - "table": "s_df_12", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "account", - "type": 2,"length": 25,"name": "Код счета участника клиринга","shortname": "Код счета УК","searchable": true,"sortable": true,"visible": true - } - , - {"code": "deal", - "type": 2,"length": 4,"name": "Биржевой код участника клиринга","shortname": "Биржевой код УК","searchable": true,"sortable": true,"visible": true - } - , - {"code": "status", - "type": 3,"name": "Статус счета","shortname": "Статус","searchable": true,"sortable": true,"visible": true - } - , - {"code": "fileName", - "type": 2,"length": 255,"name": "Наименование входящего файла","shortname": "Наименование файла","searchable": true,"sortable": true - } - , - {"code": "generationTime", - "type": 4,"name": "Дата и время обработки файла","shortname": "Дата и время обработки","searchable": true,"sortable": true - } - , - {"code": "generationId", - "type": 1,"name": "Идентификатор взаимодействия","shortname": "ID взаимодействия","searchable": true,"sortable": true - } - ] - - } - , - "sDf13": { - - "name": "ДФ-13 Вывод свободных средств для инициаторов категории В с клирингового счета 30414/7 - платежное поручение АО СПВБ на вывод средств из РО", - - "class": "ru.clearing.classes.statics.data.sdf.SDf13", - - "table": "s_df_13", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "seg_type", - "type": 2,"length": 1,"name": "Код инициатора в КС","shortname": "Инициатор в КС","searchable": true,"sortable": true - } - , - {"code": "doc_type", - "type": 2,"lenght": "4","name": "Тип документа","shortname": "Тип документа","searchable": true,"sortable": true - } - , - {"code": "docnm_ref", - "type": 2,"length": 16,"name": "Ссылочный номер документа у отправителя","shortname": "Номер документа у отправителя","searchable": true,"sortable": true - } - , - {"code": "docnmprev", - "type": 2,"length": 16,"name": "Ссылка на предшестввующий документ","shortname": "Предшествующий документ","searchable": true,"sortable": true - } - , - {"code": "priority", - "type": 2,"length": 1,"name": "Приоритет скорости отправления сообщения","shortname": "Приоритет отправки","searchable": true,"sortable": true - } - , - {"code": "sbankcode", - "type": 2,"length": 12,"name": "Код банка-плательщика","shortname": "Банк-плательщик","searchable": true,"sortable": true - } - , - {"code": "c_acc_deb", - "type": 2,"length": 35,"name": "Кор счет банка - плательщика в системе - акт.","shortname": "Кор счет банка - плательщика","searchable": true,"sortable": true - } - , - {"code": "sbanknam1", - "type": 2,"length": 35,"name": "Наименование банка-плательщика","shortname": "Наименование банка-плательщика","searchable": true,"sortable": true - } - , - {"code": "sbanknam2", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "sbanknam3", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "sbanknam4", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "sbanknam5", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "rbankcode", - "type": 2,"length": 12,"name": "Код банка-получателя","shortname": "Код банка-получателя","searchable": true,"sortable": true - } - , - {"code": "c_acc_cred", - "type": 2,"length": 35,"name": "Кор счет банка - получателя в системе - акт. ","shortname": "Кор счет банка - получателя","searchable": true,"sortable": true - } - , - {"code": "rbanknam1", - "type": 2,"length": 35,"name": "Наименование банка-получателя","shortname": "Наименование банка-получателя","searchable": true,"sortable": true - } - , - {"code": "op_type", - "type": 2,"length": 2,"name": "Вид операции","shortname": "Вид операции","searchable": true,"sortable": true - } - , - {"code": "op_order", - "type": 2,"length": 1,"name": "Очередность платежа","shortname": "Очередность платежа","searchable": true,"sortable": true - } - , - {"code": "rbanknam4", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "rbanknam5", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "pay_date", - "type": 2,"lenght": "8","name": "Платеж-дата","shortname": "Платеж-дата","searchable": true,"sortable": true - } - , - {"code": "ext_date", - "type": 2,"lenght": "8","name": "Дата по выписке","shortname": "Дата по выписке","searchable": true,"sortable": true - } - , - {"code": "pay_val", - "type": 2,"length": 12,"name": "Валюта платежа","shortname": "Валюта","searchable": true,"sortable": true - } - , - {"code": "sum_deb", - "type": 2,"lenght": "22","name": "Сумма дебет ","shortname": "Сумма дебет","searchable": true,"sortable": true - } - , - {"code": "sclientn1", - "type": 2,"length": 35,"name": "Наименование клиента-плательщика","shortname": "Наименование клиента-плательщика","searchable": true,"sortable": true - } - , - {"code": "inn_deb", - "type": 2,"length": 12,"name": "ИНН клиента-плательщика","shortname": "ИНН клиента-плательщика","searchable": true,"sortable": true - } - , - {"code": "kpp_deb", - "type": 2,"length": 9,"name": "КПП клиента-плательщика","shortname": "КПП клиента-плательщика","searchable": true,"sortable": true - } - , - {"code": "sclientn4", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "sc_code", - "type": 2,"length": 12,"name": "Код клиента-плательщика","shortname": "Код клиента-плательщика","searchable": true,"sortable": true - } - , - {"code": "acc_deb", - "type": 2,"length": 35,"name": "Счет клиента-плательщика(дебет)","shortname": "Счет клиента-плательщика(дебет)","searchable": true,"sortable": true - } - , - {"code": "rclientn1", - "type": 2,"length": 35,"name": "Наименование клиента-получателя","shortname": "Наименование клиента-получателя","searchable": true,"sortable": true - } - , - {"code": "inn_cred", - "type": 2,"length": 12,"name": "ИНН клиента-получателя","shortname": "ИНН клиента-получателя","searchable": true,"sortable": true - } - , - {"code": "kpp_cred", - "type": 2,"length": 9,"name": "КПП клиента-получателя","shortname": "КПП клиента-получателя","searchable": true,"sortable": true - } - , - {"code": "rclientn4", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "acc_kr_1", - "type": 2,"length": 35,"name": "Счет получателя","shortname": "Счет получателя","searchable": true,"sortable": true - } - , - {"code": "acc_kr_2", - "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "sp_code", - "type": 2,"length": 2,"name": "Код назначения платежа","shortname": "Код назначения платежа","searchable": true,"sortable": true - } - , - {"code": "specif_1", - "type": 2,"length": 35,"name": "Назначение платежа","shortname": "Назначение платежа","searchable": true,"sortable": true - } - , - {"code": "specif_2", - "type": 2,"length": 35,"name": "Назначение платежа","shortname": "Назначение платежа","searchable": true,"sortable": true - } - , - {"code": "specif_3", - "type": 2,"length": 35,"name": "Назначение платежа","shortname": "Назначение платежа","searchable": true,"sortable": true - } - , - {"code": "specif_4", - "type": 2,"length": 35,"name": "Назначение платежа","shortname": "Назначение платежа","searchable": true,"sortable": true - } - , - {"code": "specif_5", - "type": 2,"length": 35,"name": "Назначение платежа","shortname": "Назначение платежа","searchable": true,"sortable": true - } - , - {"code": "specif_6", - "type": 2,"length": 35,"name": "Назначение платежа","shortname": "Назначение платежа","searchable": true,"sortable": true - } - , - {"code": "send_type", - "type": 2,"length": 10,"name": "Вид платежа","shortname": "Вид платежа","searchable": true,"sortable": true - } - , - {"code": "servdate", - "type": 2,"length": 8,"name": "Дата получения товара, оказания услуг в плат. поручении","shortname": "Дата получения товара","searchable": true,"sortable": true - } - , - {"code": "doc_result", - "type": 2,"length": 2,"name": "","shortname": "","searchable": true,"sortable": true - } - , - {"code": "generationTime", - "type": 4,"name": "Дата и время создания записи","shortname": "Дата и время создания","searchable": true,"sortable": true - } - , - {"code": "generationId", - "type": 1,"name": "Идентификатор взаимодействия","shortname": "ID взаимодействия","searchable": true,"sortable": true - } - ] - - } - , - "sDf16": { - - "name": "ДФ-16 Формат запроса по возврату депозита или дозачисление/списание денежных средств", - - "class": "ru.clearing.classes.statics.data.sdf.SDf16", - - "table": "s_df_16", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "account", - "type": 2,"length": 20,"name": "Номер счета участника торгов","shortname": "Номер счета участника торгов","searchable": true,"sortable": true - } - , - {"code": "sum", - "type": 10,"name": "Сумма платежного документа (операции)","shortname": "Сумма платежного документа","searchable": true,"sortable": true - } - , - {"code": "market", - "type": 2,"length": 1,"name": "Код сегмента рынка","shortname": "Код сегмента рынка","searchable": true,"sortable": true - } - , - {"code": "type", - "type": 2,"length": 1,"name": "Код типа платежного документа (операции)","shortname": "Код типа платежного документа","searchable": true,"sortable": true - } - , - {"code": "inn", - "field": "inn","type": 10,"name": "ИНН","shortname": "ИНН","searchable": true,"sortable": true,"visible": true - } - , - {"code": "bic", - "field": "bic","type": 10,"name": "БИК","shortname": "БИК","searchable": true,"sortable": true,"visible": true - } - , - {"code": "spec", - "field": "spec","type": 2,"length": 255,"name": "Назначение","shortname": "Назначение","searchable": true,"sortable": true - } - , - {"code": "number", - "type": 10,"name": "Номер платежного документа (операции)","shortname": "Номер платежного документа","searchable": true,"sortable": true - } - , - {"code": "fileName", - "type": 2,"length": 255,"name": "Наименование входящего файла","shortname": "Наименование файла","searchable": true,"sortable": true - } - , - {"code": "generationTime", - "type": 4,"name": "Дата и время обработки файла","shortname": "Дата и время обработки","searchable": true,"sortable": true - } - , - {"code": "generationId", - "type": 1,"name": "Идентификатор взаимодействия","shortname": "ID взаимодействия","searchable": true,"sortable": true - } - ] - - } - , - "sDf17": { - - "name": "ДФ-17 Формат ответа на запрос по возврату депозита или дозачисление/списание денежных средств", - - "class": "ru.clearing.classes.statics.data.sdf.SDf17", - - "table": "s_df_17", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "account", - "type": 2,"length": 20,"name": "Номер счета участника торгов","shortname": "Номер счета участника торгов","searchable": true,"sortable": true - } - , - {"code": "sum", - "type": 10,"name": "Сумма платежного документа (операции)","shortname": "Сумма платежного документа","searchable": true,"sortable": true - } - , - {"code": "market", - "type": 2,"length": 1,"name": "Код сегмента рынка","shortname": "Код сегмента рынка","searchable": true,"sortable": true - } - , - {"code": "type", - "type": 2,"length": 1,"name": "Код типа платежного документа (операции)","shortname": "Код типа платежного документа","searchable": true,"sortable": true - } - , - {"code": "inn", - "type": 10,"name": "ИНН","shortname": "ИНН","searchable": true,"sortable": true,"visible": true - } - , - {"code": "bic", - "type": 10,"name": "БИК","shortname": "БИК","searchable": true,"sortable": true,"visible": true - } - , - {"code": "spec", - "type": 2,"length": 255,"name": "Назначение","shortname": "Назначение","searchable": true,"sortable": true - } - , - {"code": "number", - "type": 10,"name": "Номер платежного документа (операции)","shortname": "Номер платежного документа","searchable": true,"sortable": true - } - , - {"code": "result", - "type": 10,"name": "Код завершения операции","shortname": "Код завершения операции","searchable": true,"sortable": true - } - , - {"code": "generationTime", - "type": 4,"name": "Дата и время создания записи","shortname": "Дата и время создания","searchable": true,"sortable": true - } - , - {"code": "generationId", - "type": 1,"name": "Идентификатор взаимодействия","shortname": "ID взаимодействия","searchable": true,"sortable": true - } - , - {"code": "inSDf16Id", - "type": 1,"name": "Идентификатор соответствующей записи из таблицы-источника","shortname": "Входящая запись","searchable": true,"sortable": true - } - ] - - } - , - "sDf18": { - - "name": "ДФ-18 Из КС в ПРЦ Квитанция о получении информации о состоянии счета (блокировка/разблокировка/закрытие)", - - "class": "ru.clearing.classes.statics.data.sdf.SDf18", - - "table": "s_df_18", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "account", - "type": 2,"length": 25,"name": "Код счета участника клиринга","shortname": "Код счета УК","searchable": true,"sortable": true,"visible": true - } - , - {"code": "deal", - "type": 2,"length": 4,"name": "Биржевой код участника клиринга","shortname": "Биржевой код УК","searchable": true,"sortable": true,"visible": true - } - , - {"code": "status", - "type": 3,"name": "Статус счета","shortname": "Статус","searchable": true,"sortable": true,"visible": true - } - , - {"code": "result", - "type": 10,"name": "Код завершения операции","shortname": "Код завершения операции","searchable": true,"sortable": true - } - , - {"code": "generationTime", - "type": 4,"name": "Дата и время создания записи","shortname": "Дата и время создания","searchable": true,"sortable": true - } - , - {"code": "generationId", - "type": 1,"name": "Идентификатор взаимодействия","shortname": "ID взаимодействия","searchable": true,"sortable": true - } - , - {"code": "inSDf12Id", - "type": 1,"name": "Идентификатор соответствующей записи из таблицы-источника","shortname": "Входящая запись","searchable": true,"sortable": true - } - ] - - } - , - "s_trade": { - - "name": "Сделки из Торговой системы", - - "class": "ru.clearing.classes.statics.data.misc.STrade", - - "table": "s_trade", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "trade_num", - "type": 1,"name": "Номер сделки","shortname": "Номер сделки","searchable": true,"sortable": true - } - , - {"code": "sec_code", - "type": 2,"length": 255,"name": "Код ценной бумаги","shortname": "Код ценной бумаги","searchable": true,"sortable": true - } - , - {"code": "trade_date_time", - "type": 4,"name": "Дата-время сделки","shortname": "Дата-время сделки","searchable": true,"sortable": true - } - , - {"code": "settle_date", - "type": 6,"name": "Плановая дата исполнения сделки","shortname": "Плановая дата исполнения сделки","searchable": true,"sortable": true - } - , - {"code": "price", - "type": 10,"name": "Цена сделки","shortname": "Цена сделки","searchable": true,"sortable": true - } - , - {"code": "value", - "type": 11,"name": "Сумма сделки","shortname": "Сумма сделки","searchable": true,"sortable": true - } - , - {"code": "qty", - "type": 11,"name": "Количество лотов по сделке","shortname": "Количество лотов по сделке","searchable": true,"sortable": true - } - , - {"code": "accruedint", - "type": 10,"name": "НКД за 1 ценную бумагу","shortname": "НКД за 1 ценную бумагу","searchable": true,"sortable": true - } - , - {"code": "firm_id", - "type": 2,"length": 255,"name": "ID клиента в КС","shortname": "ID клиента в КС","searchable": true,"sortable": true - } - , - {"code": "client_code", - "type": 2,"length": 255,"name": "Код участника торгов = Код участника клиринга = Код участника расчетов","shortname": "Участник","searchable": true,"sortable": true - } - , - {"code": "exchange_commission", - "type": 11,"name": "Комиссия по сделке","shortname": "Комиссия","searchable": true,"sortable": true - } - , - {"code": "class_code", - "type": 2,"length": 255,"name": "Код класса сделки из новой ТС","shortname": "Код класса сделки","searchable": true,"sortable": true - } - , - {"code": "operation", - "type": 2,"length": 255,"name": "Тип плеча (Купля/Продажа)","shortname": "Тип плеча","searchable": true,"sortable": true - } - , - {"code": "issue_account", - "type": 2,"length": 50,"name": "Счет для учета ценной бумаги","shortname": "Счет для учета ценной бумаги","searchable": true,"sortable": true - } - , - {"code": "money_account", - "type": 2,"length": 50,"name": "Счет для учета денежных средств","shortname": "Счет для учета денежных средств","searchable": true,"sortable": true - } - , - {"code": "trade_type", - "type": 2,"length": 50,"name": "Первичное размещение/торги","shortname": "Первичное размещение/торги","searchable": true,"sortable": true - } - , - {"code": "days_to_mat_date", - "type": 1,"name": "Количество дней до погашения","shortname": "Количество дней до погашения","searchable": true,"sortable": true - } - , - {"code": "collateral", - "type": 2,"length": 50,"name": "Признак залога (не используется)","shortname": "Признак залога (не используется)","searchable": true,"sortable": true - } - , - {"code": "settle_code", - "type": 2,"length": 50,"name": "Код периода сделки из новой ТС","shortname": "Код периода сделки из новой ТС","searchable": true,"sortable": true - } - ] - - } - , - "notification": { - - "name": "Сообщения", - - "destination": "notifications", - - "class": "ru.clearing.classes.statics.data.misc.Notification", - - "logUpdates": "true", - - "table": "notification", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "createdAt", - "field": "created","type": 4,"name": "Дата и время создания записи","shortname": "Создано","searchable": true,"sortable": true,"ignore": true - } - , - {"code": "updatedAt", - "field": "updated","type": 4,"name": "Дата и время изменения записи","shortname": "Изменено","searchable": true,"sortable": true,"ignore": true - } - , - {"code": "clearingDate", - "type": 6,"name": "Дата","shortname": "Дата","searchable": true,"sortable": true,"visible": true - } - , - {"code": "senderId", - "type": 1,"name": "Идентификатор участника отправителя","shortname": "Отправитель","searchable": true,"sortable": true,"link": "company" - } - , - {"code": "addresseeId", - "type": 1,"name": "Идентификатор участника получателя","shortname": "Получатель","searchable": true,"sortable": true,"link": "company" - } - , - {"code": "objectType", - "type": 12,"name": "Тип объекта","shortname": "Объект","searchable": true,"sortable": true,"link": "objectType" - } - , - {"code": "objectId", - "type": 4,"name": "Идентификатор объекта","shortname": "ID объекта","searchable": true,"sortable": true - } - , - {"code": "notificationStatus", - "type": 12,"name": "Статус сообщения","shortname": "Статус","searchable": true,"sortable": true,"visible": true,"link": "notificationStatus" - } - ] - ,"actions":[ - {"method":"put", - - "name": "Изменение статуса сообщения", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "notification","linkCode": "id","required": true - } - , - {"code": "notificationStatus", - "type": 12,"name": "Статус сообщения","shortname": "Статус","link": "notificationStatus","required": true - } - ] - } - ] - } - , - "verificationResult": { - - "name": "Результаты сверки", - - "destination": "verification-results", - - "class": "ru.clearing.classes.statics.data.clearing.VerificationResult", - - "table": "verification_result", - - "fields": [ - {"code": "clearingCode", - "type": 2,"length": 255,"name": "Код участника клиринга","shortname": "Клиринговый код","searchable": true,"sortable": true,"visible": true - } - , - {"code": "accountId", - "type": 1,"name": "Счет УК, по которому проводится сверка","shortname": "Счет УК","searchable": true,"sortable": true - } - , - {"code": "inSum", - "type": 11,"name": "Входящая сумма остатков","shortname": "Остатки","visible": true,"searchable": true,"sortable": true - } - , - {"code": "outIntSum", - "type": 11,"name": "Исходящая сумма остатков, полученная в КС","shortname": "Остатки, полученные в КС","visible": true,"searchable": true,"sortable": true - } - , - {"code": "outExtSum", - "type": 11,"name": "Исходящая сумма остатков из отчета ПРЦ","shortname": "Остатки, полученные из ПРЦ","visible": true,"searchable": true,"sortable": true - } - , - {"code": "diffSum", - "type": 11,"name": "Сумма расхождений","shortname": "Сумма расхождений","visible": true,"searchable": true,"sortable": true - } - , - {"code": "generationId", - "type": 1,"name": "Идентификатор взаимодействия","shortname": "ID взаимодействия","searchable": true,"sortable": true - } - , - {"code": "generationStatus", - "type": 12,"name": "Общий статус сверки","shortname": "Статус","searchable": true,"sortable": true,"visible": true,"link": "resultStatus" - } - , - {"code": "resultStatus", - "type": 12,"name": "Статус сверки","shortname": "Статус","searchable": true,"sortable": true,"visible": true,"link": "resultStatus" - } - , - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "createdAt", - "type": 4,"name": "Дата и время создания записи","shortname": "Создано","searchable": true,"sortable": true,"ignore": true - } - , - {"code": "updatedAt", - "type": 4,"name": "Дата и время изменения записи","shortname": "Изменено","searchable": true,"sortable": true,"ignore": true - } - ] - - } - , - "session": { - - "name": "Клиринговая сессия", - - "class": "ru.clearing.classes.statics.data.misc.Session", - - "logUpdates": "true", - - "table": "session", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "createdAt", - "field": "created","type": 4,"name": "Дата и время создания записи","shortname": "Создано","searchable": true,"sortable": true,"ignore": true - } - , - {"code": "updatedAt", - "field": "updated","type": 4,"name": "Дата и время изменения записи","shortname": "Изменено","searchable": true,"sortable": true,"ignore": true - } - , - {"code": "clearingDate", - "type": 6,"name": "Дата","shortname": "Дата","searchable": true,"sortable": true,"visible": true - } - , - {"code": "sessionStatus", - "type": 12,"name": "Статус клиринговой сессии","shortname": "Статус","searchable": true,"sortable": true,"visible": true,"link": "sessionStatus" - } - ] - - } - , - "moneyMarketSession": { - - "name": "Сессия денежного рынка", - - "class": "com.spicex.TransactionData.Session", - - "logUpdates": "true", - - "table": "money_market_session", - - "fields": [ - {"code": "id", - "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true - } - , - {"code": "clearingDate", - "type": 6,"name": "Дата","shortname": "Дата","searchable": true,"sortable": true,"visible": true,"extends": "session" - } - , - {"code": "sessionStatus", - "type": 12,"name": "Статус клиринговой сессии","shortname": "Статус","searchable": true,"sortable": true,"visible": true,"link": "sessionStatus","extends": "session" - } - , - {"code": "companyId", - "type": 1,"name": "Наименование инициатора торгов","shortname": "Инициатор","visible": false,"searchable": true,"sortable": true,"link": "company","linkCode": "shortName" - } - , - {"code": "securityId", - "type": 1,"name": "Наименование инструмента","shortname": "Инструмент","searchable": false,"sortable": true,"visible": true,"link": "moneyMarketSecurity","linkCode": "fullName" - } - , - {"code": "userId", - "type": 1,"name": "Наименование пользователя","shortname": "Пользователь","searchable": true,"sortable": true,"visible": true,"link": "userCls" - } - ] - - } - - } - - ,"views": { - - } - - ,"types": [ - - { - "code": "identity", - - "id": "1" - , - "name": "Идентификатор" - , - "type": "bigint" - , - "javatype": "Long" - - } - , - { - "code": "string", - - "id": "2" - , - "name": "Строка" - , - "type": "varchar" - , - "javatype": "String" - - } - , - { - "code": "long", - - "id": "3" - , - "name": "Целый" - , - "type": "bigint" - , - "javatype": "Long" - - } - , - { - "code": "dateTime", - - "id": "4" - , - "name": "Дата и время" - , - "type": "timestamp" - , - "javatype": "Instant" - - } - , - { - "code": "time", - - "id": "5" - , - "name": "Время" - , - "type": "time" - , - "javatype": "LocalTime" - - } - , - { - "code": "date", - - "id": "6" - , - "name": "Дата" - , - "type": "date" - , - "javatype": "LocalDate" - - } - , - { - "code": "array", - - "id": "7" - , - "name": "Массив" - , - "type": "json" - , - "javatype": "String" - - } - , - { - "code": "object", - - "id": "8" - , - "name": "Объект" - , - "type": "jsonb" - , - "javatype": "String" - - } - , - { - "code": "boolean", - - "id": "9" - , - "name": "Булевый" - , - "type": "boolean" - , - "javatype": "Boolean" - - } - , - { - "code": "double", - - "id": "10" - , - "name": "Число с точкой" - , - "type": "numeric(72,18)" - , - "javatype": "BigDecimal" - - } - , - { - "code": "amount", - - "id": "11" - , - "name": "Объем из числа с точкой" - , - "type": "numeric(72,2)" - , - "javatype": "BigDecimal" - - } - , - { - "code": "code", - - "id": "12" - , - "name": "Код 4 символа" - , - "type": "varchar(4)" - , - "javatype": "String" - - } - - ] - - } + + { + "version": "3.5.0.18", + + "enums": { + + "allowed": { + + "name": "Справочник признаков допустимости использования объектов", + + "class": "com.spicex.platform.dictionary.AllowedDictionary", + + "table": "allowed_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Признак допустимости","shortname": "Допустимость","type": 2,"length": 50 + } + ] + } + , + "workflowStatus": { + + "name": "Справочник статусов бизнес-процессов", + + "class": "com.spicex.dictionary.WorkflowStatusDictionary", + + "table": "workflow_status_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Наименование","shortname": "Тип","type": 2,"length": 255 + } + ] + } + , + "errorCode": { + + "name": "Коды ошибок", + + "class": "com.spicex.dictionary.ErrorCodeDictionary", + + "table": "error_code_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Текст ошибки","shortname": "Ошибка","type": 2,"length": 255 + } + ] + } + , + "countryCode": { + + "name": "Справочник кодов стран", + + "class": "ru.clearing.platform.dictionary.CountryCodeDictionary", + + "table": "country_code_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Наименование","type": 2,"length": 255 + } + ] + } + , + "section": { + + "name": "Справочник секций", + + "class": "com.spicex.dictionary.SectionDictionary", + + "table": "section_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Наименование","shortname": "Наименование","type": 2,"length": 255 + } + ] + } + , + "userRole": { + + "name": "Роли пользователей", + + "class": "com.spicex.dictionary.UserRoleDictionary", + + "table": "user_role_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Роль пользователя","shortname": "Роль","type": 2,"length": 50 + } + ] + } + , + "connectionState": { + + "name": "Справочник состояний соединений", + + "class": "com.spicex.dictionary.ConnectionStateDictionary", + + "table": "connection_state_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Наименование","shortname": "Состояние","type": 2,"length": 50 + } + ] + } + , + "legalKind": { + + "name": "Справочник видов субъекта", + + "class": "com.spicex.dictionary.LegalKindDictionary", + + "table": "legal_kind_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Наименование","shortname": "Вид","type": 2,"length": 255 + } + ] + } + , + "organizationType": { + + "name": "Справочник типов организаций", + + "class": "com.spicex.dictionary.OrganizationTypeDictionary", + + "table": "organization_type_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Наименование","shortname": "Тип","type": 2,"length": 255 + } + ] + } + , + "corporationSoleType": { + + "name": "Справочник единоличных исполнительных органов", + + "class": "com.spicex.dictionary.CorporationSoleTypeDictionary", + + "table": "corporation_sole_type_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Наименование","shortname": "Наименование","type": 2,"length": 255 + } + ] + } + , + "clearingCategory": { + + "name": "Справочник категорий участника клиринга", + + "class": "com.spicex.dictionary.ClearingCategoryDictionary", + + "table": "clearing_category_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Наименование","shortname": "Наименование","type": 2,"length": 255 + } + ] + } + , + "contactType": { + + "name": "Справочник типов контактов компании", + + "class": "com.spicex.dictionary.ContactTypeDictionary", + + "table": "contact_type_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Наименование","shortname": "Тип","type": 2,"length": 255 + } + ] + } + , + "documentType": { + + "name": "Справочник типов документов", + + "class": "com.spicex.dictionary.DocumentTypeDictionary", + + "table": "document_type_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Наименование","shortname": "Тип","type": 2,"length": 255 + } + ] + } + , + "companySymbol": { + + "name": "Справочник имен компании", + + "class": "com.spicex.dictionary.CompanySymbolDictionary", + + "logUpdates": "true", + + "table": "company_symbol_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Наименование","shortname": "Полное имя","type": 2,"length": 255 + } + , + {"code": "shortname", + "name": "Краткое наименование","shortname": "Имя","type": 2,"length": 255 + } + ] + } + , + "companyRole": { + + "name": "Справочник ролей компаний", + + "class": "com.spicex.dictionary.CompanyRoleDictionary", + + "table": "company_role_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Роль Участника","shortname": "Роль","type": 2,"length": 255 + } + ] + } + , + "currencyCode": { + + "name": "Справочник кодов валют", + + "class": "com.spicex.dictionary.CurrencyCodeDictionary", + + "table": "currency_code_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Наименование","shortname": "Наименование","type": 2,"length": 255 + } + ] + } + , + "instrumentType": { + + "name": "Справочник типов инструментов", + + "class": "com.spicex.dictionary.InstrumentTypeDictionary", + + "table": "instrument_type_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Наименование","shortname": "Тип","type": 2,"length": 255 + } + ] + } + , + "termType": { + + "name": "Справочник видов инструментов Денежного рынка", + + "class": "com.spicex.dictionary.TermTypeDictionary", + + "table": "term_type_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Наименование","shortname": "Тип","type": 2,"length": 255 + } + ] + } + , + "shareType": { + + "name": "Справочник типов акций", + + "class": "com.spicex.dictionary.ShareTypeDictionary", + + "table": "share_type_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код акции","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Наименование","shortname": "Тип","type": 2,"length": 255 + } + ] + } + , + "bondType": { + + "name": "Справочник типов облигаций", + + "class": "com.spicex.dictionary.BondTypeDictionary", + + "table": "bond_type_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код облигации","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Наименование","shortname": "Тип","type": 2,"length": 255 + } + ] + } + , + "tradingClearingRegistryType": { + + "name": "Справочник типов торгово-клиринговых регистров", + + "class": "com.spicex.dictionary.TradingClearingRegistryTypeDictionary", + + "table": "trading_clearing_registry_type_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Наименование","shortname": "Наименование","type": 2,"length": 255 + } + ] + } + , + "tradingClearingRegistryLevel": { + + "name": "Справочник уровней торгово-клиринговых регистров", + + "class": "com.spicex.dictionary.TradingClearingRegistryLevelDictionary", + + "table": "trading_clearing_registry_level_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Наименование","shortname": "Наименование","type": 2,"length": 255 + } + ] + } + , + "tradingClearingRegistryPurpose": { + + "name": "Справочник областей применения", + + "class": "com.spicex.dictionary.TradingClearingRegistryPurposeDictionary", + + "table": "trading_clearing_registry_purpose_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Наименование","shortname": "Наименование","type": 2,"length": 255 + } + ] + } + , + "service": { + + "name": "Справочник услуг", + + "class": "com.spicex.dictionary.ServiceDictionary", + + "table": "service_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Наименование","shortname": "Наименование","type": 2,"length": 255 + } + ] + } + , + "serviceStatus": { + + "name": "Справочник статусов услуг", + + "class": "com.spicex.dictionary.ServiceStatusDictionary", + + "table": "service_status_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Наименование","shortname": "Наименование","type": 2,"length": 255 + } + ] + } + , + "serviceProduct": { + + "name": "Справочник продуктов для услуг", + + "class": "com.spicex.dictionary.ServiceProductDictionary", + + "table": "service_product_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Наименование","shortname": "Наименование","type": 2,"length": 255 + } + ] + } + , + "registryDesignation": { + + "name": "Справочник символов регистров - назначения", + + "class": "com.spicex.dictionary.RegistryDesignationDictionary", + + "table": "registry_designation_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Наименование","shortname": "Наименование","type": 2,"length": 255 + } + ] + } + , + "registryInstrumentType": { + + "name": "Справочник символов регистров - инструменты", + + "class": "com.spicex.dictionary.RegistryInstrumentTypeDictionary", + + "table": "registry_instrument_type_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Наименование","shortname": "Наименование","type": 2,"length": 255 + } + ] + } + , + "registryCapacity": { + + "name": "Справочник символов регистров - источники средств", + + "class": "com.spicex.dictionary.RegistryCapacityDictionary", + + "table": "registry_capacity_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Наименование","shortname": "Наименование","type": 2,"length": 255 + } + ] + } + , + "registryUnit": { + + "name": "Справочник символов регистров - части регистров", + + "class": "com.spicex.dictionary.RegistryUnitDictionary", + + "table": "registry_unit_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Наименование","shortname": "Наименование","type": 2,"length": 255 + } + ] + } + , + "registryCode": { + + "name": "Справочник кодов регистров", + + "class": "com.spicex.dictionary.RegistryCodeDictionary", + + "table": "registry_code_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Наименование","shortname": "Наименование","type": 2,"length": 255 + } + ] + } + , + "registryStatus": { + + "name": "Справочник статусов регистров", + + "class": "com.spicex.dictionary.RegistryStatusDictionary", + + "table": "registry_status_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Наименование","shortname": "Наименование","type": 2,"length": 255 + } + ] + } + , + "balanceDimension": { + + "name": "Справочник размерностей балансов", + + "class": "ru.clearing.platform.dictionary.BalanceDimensionDictionary", + + "table": "balance_dimention_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Размерность баланса","shortname": "Размерность","type": 2,"length": 50 + } + ] + } + , + "accountType": { + + "name": "Справочник типов счетов", + + "class": "com.spicex.dictionary.AccountTypeDictionary", + + "table": "account_type_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Наименование","shortname": "Наименование","type": 2,"length": 255 + } + ] + } + , + "depoAccountType": { + + "name": "Справочник типов депозитарных счетов", + + "class": "com.spicex.dictionary.DepoAccountTypeDictionary", + + "table": "depo_account_type_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Наименование","shortname": "Наименование","type": 2,"length": 255 + } + ] + } + , + "clearingAccountType": { + + "name": "Справочник типов клиринговых счетов", + + "class": "com.spicex.dictionary.ClearingAccountTypeDictionary", + + "table": "clearing_account_type_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Наименование","shortname": "Наименование","type": 2,"length": 255 + } + ] + } + , + "task": { + + "name": "Справочник задач", + + "class": "com.spicex.dictionary.TaskDictionary", + + "table": "task_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Задача","shortname": "Задача","type": 2,"length": 150 + } + ] + } + , + "taskStatus": { + + "name": "Справочник статусов задач", + + "class": "com.spicex.dictionary.TaskStatusDictionary", + + "table": "task_status_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Статус задачи","shortname": "Статус","type": 2,"length": 50 + } + ] + } + , + "dayStatus": { + + "name": "Справочник статусов дней", + + "class": "ru.clearing.platform.dictionary.DayStatusDictionary", + + "table": "day_status_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Статус дня","shortname": "Статус","type": 2,"length": 50 + } + ] + } + , + "parent": { + + "name": "Справочник источников", + + "class": "com.spicex.dictionary.ParentDictionary", + + "table": "parent_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Наименование","shortname": "Источник","type": 2,"length": 50 + } + ] + } + , + "chargeDirection": { + + "name": "Направление начисления комиссии", + + "class": "ru.clearing.platform.dictionary.ChargeDirectionDictionary", + + "table": "charge_direction_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Направление комиссии","shortname": "Направление комиссии","type": 2,"length": 50 + } + ] + } + , + "chargeType": { + + "name": "Справочник типов комиссий", + + "class": "ru.clearing.platform.dictionary.ChargeTypeDictionary", + + "table": "charge_type_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Тип комиссии","shortname": "Тип комиссии","type": 2,"length": 50 + } + ] + } + , + "courierType": { + + "name": "Способ доставки документа", + + "class": "ru.clearing.platform.dictionary.CourierTypeDictionary", + + "table": "courier_type_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Способ доставки","shortname": "Способ доставки","type": 2,"length": 50 + } + ] + } + , + "transactionStatus": { + + "name": "Справочник статусов транзакций", + + "class": "com.spicex.dictionary.TransactionStatusDictionary", + + "table": "transaction_status_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Статус транзакции","shortname": "Статус","type": 2,"length": 50 + } + ] + } + , + "clearingStatus": { + + "name": "Справочник результатов клиринга", + + "class": "com.spicex.dictionary.ClearingStatusDictionary", + + "table": "clearing_status_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Наименование","shortname": "Тип","type": 2,"length": 255 + } + ] + } + , + "moneyFlowSide": { + + "name": "Направление заявки", + + "class": "ru.clearing.platform.dictionary.MoneyFlowSideDictionary", + + "table": "money_flow_side_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Значение","shortname": "Значение","type": 2,"length": 255 + } + ] + } + , + "inOutDirection": { + + "name": "Справочник значений направления денежного потока", + + "class": "ru.clearing.platform.dictionary.InOutDirectionDictionary", + + "table": "in_out_direction_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Значение","shortname": "Значение","type": 2,"length": 255 + } + ] + } + , + "statementType": { + + "name": "Справочник типов поступлений/списаний от ПРЦ", + + "class": "ru.clearing.platform.dictionary.StatementTypeDictionary", + + "table": "statement_type_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Значение","shortname": "Значение","type": 2,"length": 255 + } + ] + } + , + "operationType": { + + "name": "Справочник типов операций", + + "class": "ru.clearing.platform.dictionary.OperationTypeDictionary", + + "table": "operation_type_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Значение","shortname": "Значение","type": 2,"length": 255 + } + ] + } + , + "operationStatus": { + + "name": "Справочник статусов операций", + + "class": "ru.clearing.platform.dictionary.OperationStatusDictionary", + + "table": "operation_status_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Значение","shortname": "Значение","type": 2,"length": 255 + } + ] + } + , + "balanceAccountType": { + + "name": "Справочник типов лимитов", + + "class": "com.spicex.platform.dictionary.balanceAccountTypeDictionary", + + "table": "balance_account_type_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Тип лимитов","shortname": "Тип","type": 2,"length": 50 + } + ] + } + , + "resultStatus": { + + "name": "Статус обработки", + + "class": "com.spicex.dictionary.ResultStatusDictionary", + + "table": "result_status_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор записи","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Статус обработки","shortname": "Статус","type": 2,"length": 255 + } + ] + } + , + "managementJournalStatus": { + + "name": "Справочник статусов журнала мониторинга и контроля", + + "class": "ru.clearing.platform.dictionary.managementJournalStatusDictionary", + + "table": "management_journal_status_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Статус сообщения","shortname": "Наименование","type": 2,"length": 50 + } + ] + } + , + "managementJournalType": { + + "name": "Справочник типов записей в журнале мониторинга и контроля", + + "class": "ru.clearing.platform.dictionary.managementJournalTypeDictionary", + + "table": "management_journal_type_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Тип записи","shortname": "Наименование","type": 2,"length": 50 + } + ] + } + , + "managementJournalPurpose": { + + "name": "Справочник целей записей в журнале мониторинга и контроля", + + "class": "ru.clearing.platform.dictionary.managementJournalPurposeDictionary", + + "table": "management_journal_purpose_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Тип записи","shortname": "Наименование","type": 2,"length": 50 + } + ] + } + , + "inOutSDfType": { + + "name": "Справочник типов входящих и исходящих записей", + + "class": "ru.clearing.platform.dictionary.inOutSDfTypeDictionary", + + "table": "in_out_s_df_type_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Тип записи","shortname": "Наименование","type": 2,"length": 50 + } + ] + } + , + "sessionStatus": { + + "name": "Справочник статусов клиринговой сессии", + + "class": "ru.clearing.platform.dictionary.SessionStatusDictionary", + + "table": "session_status_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Наименование","shortname": "Наименование","type": 2,"length": 50 + } + ] + } + , + "objectType": { + + "name": "Справочник типов объектов", + + "class": "ru.clearing.platform.dictionary.ObjectTypeDictionary", + + "table": "object_type_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Наименование","shortname": "Наименование","type": 2,"length": 50 + } + ] + } + , + "notificationStatus": { + + "name": "Справочник статусов сообщений", + + "class": "ru.clearing.platform.dictionary.NotificationStatusDictionary", + + "table": "notification_status_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Наименование","shortname": "Наименование","type": 2,"length": 50 + } + ] + } + , + "eventType": { + + "name": "Типы изменений записей", + + "class": "ru.clearing.platform.dictionary.EventTypeDictionary", + + "table": "event_type_dictionary", + + "fields": [ + {"code": "id", + "name": "Идентификатор","shortname": "ID","type": 1 + } + , + {"code": "code", + "name": "Код","shortname": "Код","type": 12 + } + , + {"code": "name", + "name": "Тип события","shortname": "Событие","type": 2,"length": 50 + } + ] + } + + } + + ,"objects": { + + "userCls": { + + "name": "Пользователь", + + "destination": "users", + + "class": "ru.clearing.classes.statics.data.user.User", + + "logUpdates": "true", + + "table": "user_cls", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "createdAt", + "field": "created","type": 4,"webtype": "5","dbname": "Дата-время создания записи","name": "Время создания записи","shortname": "Создано","searchable": true,"sortable": true + } + , + {"code": "updatedAt", + "field": "updated","type": 4,"webtype": "5","dbname": "Дата-время изменения записи","name": "Время изменения записи","shortname": "Изменено","searchable": true,"sortable": true + } + , + {"code": "identifier", + "type": 2,"length": 250,"name": "Внешний идентификатор","shortname": "Идентификатор","searchable": true,"sortable": true,"visible": true + } + , + {"code": "name", + "type": 2,"length": 250,"name": "Имя и фамилия пользователя","shortname": "Имя и фамилия","searchable": true,"sortable": true,"visible": true + } + , + {"code": "firstName", + "type": 2,"length": 250,"name": "Имя пользователя","shortname": "Имя","searchable": true,"sortable": true,"visible": true + } + , + {"code": "lastName", + "type": 2,"length": 250,"name": "Фамилия пользователя","shortname": "Фамилия","searchable": true,"sortable": true,"visible": true + } + , + {"code": "middleName", + "type": 2,"length": 250,"name": "Отчество пользователя","shortname": "Отчество","searchable": true,"sortable": true,"visible": true + } + , + {"code": "email", + "type": 2,"length": 250,"name": "Email пользователя","shortname": "Email","searchable": true,"sortable": true,"visible": true + } + ] + ,"actions":[ + {"method":"put", + + "name": "Авторизация пользователя", + + "fields": [ + {"code": "userName", + "type": 2,"length": 255,"name": "Логин пользователя","required": true + } + , + {"code": "roles", + "type": 2,"length": 255,"name": "Роли пользователя","required": false + } + ] + } + ] + } + , + "userRoleSession": { + + "name": "Набор ролей", + + "destination": "user-role-sessions", + + "class": "ru.clearing.classes.statics.data.user.UserRoleSession", + + "table": "user_role_session", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "userId", + "type": 1,"dbname": "Идентификатор пользователя","name": "Имя и фамилия пользователя","shortname": "Пользователь","searchable": true,"sortable": true,"visible": true,"link": "userCls" + } + , + {"code": "userRole", + "type": 12,"dbname": "Код роли пользователя","name": "Роль пользователя","shortname": "Роль","searchable": true,"sortable": true,"visible": true,"link": "userRole" + } + , + {"code": "companyId", + "type": 1,"dbname": "Идентификатор компании","name": "Наименование компании","shortname": "Компания","searchable": true,"sortable": true,"visible": true,"link": "company" + } + , + {"code": "status", + "type": 12,"dbname": "Код статуса","name": "Наименование статуса","shortname": "Статус","searchable": true,"sortable": true,"link": "workflowStatus" + } + ] + + } + , + "userSettings": { + + "name": "Настройки пользователя", + + "destination": "utilities/user-settings", + + "class": "ru.clearing.classes.statics.data.user.UserSettings", + + "table": "user_settings", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "userId", + "type": 1,"dbname": "Идентификатор пользователя","name": "Имя и фамилия пользователя","shortname": "Пользователь","searchable": true,"sortable": true,"visible": true,"link": "userCls" + } + , + {"code": "version", + "type": 2,"length": 50,"name": "Версия настроек пользователя","shortname": "Версия","searchable": false,"sortable": false,"visible": true + } + , + {"code": "json", + "type": 2,"length": 200000,"name": "Данные конфигурации","shortname": "Настройки","searchable": false,"sortable": false,"visible": true + } + ] + ,"actions":[ + {"method":"put", + + "name": "Изменение настроек пользователя", + + "fields": [ + {"code": "userId", + "type": 1,"name": "Имя и фамилия пользователя","shortname": "Пользователь","required": false,"link": "userCls" + } + , + {"code": "version", + "type": 2,"length": 50,"name": "Версия настроек пользователя","shortname": "Версия","required": false + } + , + {"code": "json", + "type": 2,"length": 200000,"name": "Данные конфигурации","shortname": "Настройки","required": false + } + ] + } + ] + } + , + "userConnect": { + + "name": "Активность пользователей в системе", + + "class": "ru.clearing.classes.statics.data.user.UserConnect", + + "logUpdates": "true", + + "table": "user_connect", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "createdAt", + "field": "created","type": 4,"webtype": "5","dbname": "Дата-время создания записи","name": "Время создания записи","shortname": "Создано","searchable": true,"sortable": true + } + , + {"code": "updatedAt", + "field": "updated","type": 4,"webtype": "5","dbname": "Дата-время изменения записи","name": "Время изменения записи","shortname": "Изменено","searchable": true,"sortable": true + } + , + {"code": "userId", + "type": 1,"dbname": "Идентификатор пользователя","name": "Имя и фамилия пользователя","shortname": "Пользователь","searchable": true,"sortable": true,"visible": true,"link": "userCls" + } + , + {"code": "connectionTime", + "type": 4,"name": "Последнее соединение","shortname": "Вход","searchable": true,"sortable": true + } + , + {"code": "disconnectionTime", + "type": 4,"name": "Разрыв соединения","shortname": "Выход","searchable": true,"sortable": true + } + , + {"code": "serverIp", + "type": 2,"length": 250,"name": "IP адрес сервера","shortname": "IP сервера","searchable": true,"sortable": true,"visible": true + } + , + {"code": "clientIp", + "type": 2,"length": 250,"name": "IP адрес клиента","shortname": "IP клиента","searchable": true,"sortable": true,"visible": true + } + , + {"code": "connectionState", + "type": 12,"dbname": "Код статуса соединения","name": "Статус соединения","shortname": "Статус","searchable": true,"sortable": true,"visible": true,"link": "connectionState" + } + , + {"code": "clearingDate", + "type": 6,"name": "Дата","shortname": "Дата","searchable": true,"sortable": true + } + , + {"code": "errorCodeId", + "type": 1,"name": "Код ошибки","shortname": "Код ошибки","searchable": true,"sortable": true,"link": "errorCode","linkCode": "code" + } + , + {"code": "errorTextId", + "type": 1,"dbname": "Идентификатор полного текста ошибки","name": "Полный текст ошибки","shortname": "Ошибка","searchable": true,"sortable": true,"link": "errorText","linkCode": "text" + } + ] + + } + , + "company": { + + "name": "Компании", + + "destination": "companies", + + "class": "ru.clearing.classes.statics.data.company.Company", + + "logUpdates": "true", + + "table": "company", + + "fields": [ + {"code": "shortName", + "type": 2,"length": 255,"name": "Краткое наименование компании","shortname": "Компания","searchable": true,"sortable": true,"visible": true + } + , + {"code": "fullName", + "type": 2,"length": 255,"name": "Полное наименование компании","shortname": "Полное наименование","searchable": true,"sortable": true,"visible": true + } + , + {"code": "tradingCode", + "type": 2,"length": 255,"name": "Код участника торгов","shortname": "Биржевой код","searchable": true,"sortable": true,"visible": true + } + , + {"code": "clearingCode", + "type": 2,"length": 255,"name": "Код участника клиринга","shortname": "Клиринговый код","searchable": true,"sortable": true,"visible": true + } + , + {"code": "registrationCode", + "type": 2,"length": 255,"name": "Регистрационный код участника","shortname": "Регистрационный код","searchable": true,"sortable": true,"visible": true + } + , + {"code": "companySymbol", + "field": "id","type": 12,"name": "Тип реквизита","shortname": "Тип реквизита","searchable": true,"sortable": true,"visible": true,"linkKeyCode": "companyId","linkCode": "companySymbol","link": "companySymbols","extends": "companySymbols" + } + , + {"code": "companySymbolValue", + "field": "id","type": 2,"length": 255,"name": "Значение реквизита","shortname": "Значение реквизита","searchable": true,"sortable": true,"visible": true,"linkKeyCode": "companyId","linkCode": "companySymbolValue","link": "companySymbols","extends": "companySymbols" + } + , + {"code": "workflowStatus", + "type": 12,"dbname": "Код статуса","name": "Наименование статуса","shortname": "Статус","searchable": true,"sortable": true,"link": "workflowStatus" + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "createdAt", + "field": "created","type": 4,"webtype": "5","dbname": "Дата-время создания записи","name": "Время создания записи","shortname": "Создано","searchable": true,"sortable": true + } + , + {"code": "updatedAt", + "field": "updated","type": 4,"webtype": "5","dbname": "Дата-время изменения записи","name": "Время изменения записи","shortname": "Изменено","searchable": true,"sortable": true + } + ] + ,"actions":[ + {"method":"post", + + "name": "Добавление компании", + + "confirmation": "shortName,tradingCode,companySymbol,companySymbolValue,workflowStatus", + + "fields": [ + {"code": "shortName", + "type": 2,"length": 255,"name": "Краткое наименование компании","shortname": "Компания","required": true + } + , + {"code": "fullName", + "type": 2,"length": 255,"name": "Полное наименование компании","shortname": "Полное наименование" + } + , + {"code": "companySymbol", + "type": 12,"name": "Тип реквизита","shortname": "Тип реквизита","required": true,"link": "companySymbol" + } + , + {"code": "companySymbolValue", + "type": 2,"length": 255,"name": "Значение реквизита","shortname": "Значение реквизита","required": true + } + , + {"code": "workflowStatus", + "type": 12,"name": "Наименование статуса","shortname": "Статус","link": "workflowStatus","required": true + } + ] + } + , + {"method":"delete", + + "name": "Блокировка компании", + + "confirmation": "shortName,tradingCode", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "company","linkCode": "id","required": true + } + ] + } + ] + } + , + "companyInfo": { + + "name": "Профили компаний", + + "destination": "company-infos", + + "class": "ru.clearing.classes.statics.data.profile.CompanyInfo", + + "logUpdates": "true", + + "table": "company_info", + + "fields": [ + {"code": "companyId", + "type": 1,"dbname": "Идентификатор компании","name": "Наименование компании","shortname": "Компания","searchable": true,"sortable": true,"visible": true,"link": "company","linkCode": "shortName" + } + , + {"code": "corporationSoleType", + "type": 12,"dbname": "Код единоличного исполнительного органа","name": "Единоличный исполнительный орган","shortname": "Исполнительный орган","searchable": true,"sortable": true,"visible": true,"link": "corporationSoleType" + } + , + {"code": "countryCode", + "type": 12,"dbname": "Код юрисдикции","name": "Юрисдикция","shortname": "Юрисдикция","searchable": true,"sortable": true,"visible": true,"link": "countryCode" + } + , + {"code": "description", + "type": 2,"length": 255,"name": "Описание компании","shortname": "Описание","searchable": true,"sortable": true,"visible": true + } + , + {"code": "professionalSign", + "type": 12,"dbname": "Код признака профессионального участника","name": "Признак профессионального участника","shortname": "Проф. участник","searchable": true,"sortable": true,"visible": true,"link": "allowed" + } + , + {"code": "legalKind", + "type": 12,"dbname": "Код вида субъекта","name": "Вид субъекта","shortname": "Юр. лицо/Физ. лицо","searchable": true,"sortable": true,"visible": true,"link": "legalKind" + } + , + {"code": "organizationType", + "type": 12,"dbname": "Код типа организации","name": "Тип организации","shortname": "Тип организации","searchable": true,"sortable": true,"visible": true,"link": "organizationType" + } + , + {"code": "residence", + "type": 12,"dbname": "Код резиденции","name": "Резиденция","shortname": "Резиденция","searchable": true,"sortable": true,"visible": true,"link": "countryCode" + } + , + {"code": "shortNameEng", + "type": 2,"length": 255,"name": "Краткое наименование компании на английском","shortname": "Краткое наименование на английском","searchable": true,"sortable": true,"visible": true + } + , + {"code": "fullNameEng", + "type": 2,"length": 255,"name": "Полное наименование компании на английском","shortname": "Полное наименование на английском","searchable": true,"sortable": true,"visible": true + } + , + {"code": "shortName", + "type": 2,"length": 255,"name": "Краткое наименование компании","shortname": "Краткое наименование","searchable": true,"sortable": true,"visible": true,"extends": "company" + } + , + {"code": "fullName", + "type": 2,"length": 255,"name": "Полное наименование компании","shortname": "Полное наименование","searchable": true,"sortable": true,"visible": true,"extends": "company" + } + , + {"code": "tradingCode", + "type": 2,"length": 255,"name": "Код участника торгов","shortname": "Биржевой код","searchable": true,"sortable": true,"visible": true,"extends": "company" + } + , + {"code": "clearingCode", + "type": 2,"length": 255,"name": "Код участника клиринга","shortname": "Клиринговый код","searchable": true,"sortable": true,"visible": true,"extends": "company" + } + , + {"code": "registrationCode", + "type": 2,"length": 255,"name": "Регистрационный код участника","shortname": "Регистрационный код","searchable": true,"sortable": true,"visible": true,"extends": "company" + } + , + {"code": "workflowStatus", + "type": 12,"name": "Наименование статуса","shortname": "Статус","searchable": true,"sortable": true,"link": "workflowStatus","extends": "company" + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + ] + ,"actions":[ + {"method":"put", + + "name": "Изменение профиля компании", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "companyInfo","linkCode": "id","required": true + } + , + {"code": "shortName", + "type": 2,"length": 255,"name": "Краткое наименование компании","shortname": "Краткое наименование" + } + , + {"code": "fullName", + "type": 2,"length": 255,"name": "Полное наименование компании","shortname": "Полное наименование" + } + , + {"code": "countryCode", + "type": 12,"name": "Юрисдикция","shortname": "Юрисдикция","link": "countryCode" + } + , + {"code": "corporationSoleType", + "type": 12,"name": "Единоличный исполнительный орган","shortname": "Исполнительный орган","link": "corporationSoleType" + } + , + {"code": "legalKind", + "type": 12,"name": "Вид субъекта","shortname": "Юр. лицо/Физ. лицо","link": "legalKind" + } + , + {"code": "organizationType", + "type": 12,"name": "Тип организации","shortname": "Тип организации","link": "organizationType" + } + , + {"code": "residence", + "type": 12,"name": "Резиденция","shortname": "Резиденция","link": "countryCode" + } + , + {"code": "fullNameEng", + "type": 2,"length": 255,"name": "Полное наименование компании на английском","shortname": "Полное наименование на английском" + } + , + {"code": "shortNameEng", + "type": 2,"length": 255,"name": "Краткое наименование компании на английском","shortname": "Краткое наименование на английском" + } + , + {"code": "professionalSign", + "type": 12,"name": "Признак профессионального участника","shortname": "Проф. участника","link": "allowed" + } + , + {"code": "description", + "type": 2,"length": 255,"name": "Описание компании","shortname": "Описание компании" + } + , + {"code": "workflowStatus", + "type": 12,"name": "Наименование статуса","shortname": "Статус","link": "workflowStatus" + } + ] + } + ] + } + , + "clearingMemberCategory": { + + "name": "Категории участника клиринга", + + "destination": "clearing-member-categories", + + "class": "ru.clearing.classes.statics.data.company.ClearingMemberCategory", + + "logUpdates": "true", + + "table": "clearing_member_category", + + "fields": [ + {"code": "companyId", + "type": 1,"dbname": "Идентификатор компании","name": "Наименование компании","shortname": "Компания","searchable": true,"sortable": true,"visible": true,"link": "company","linkCode": "shortName" + } + , + {"code": "clearingMemberCategory", + "type": 12,"dbname": "Код категории участника клиринга","name": "Категория участника клиринга","shortname": "Категория","searchable": true,"sortable": true,"visible": true,"link": "clearingCategory" + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + ] + ,"actions":[ + {"method":"post", + + "name": "Добавление категории участника клиринга", + + "fields": [ + {"code": "companyId", + "type": 1,"name": "Наименование компании","shortname": "Компания","link": "company","linkCode": "shortName","required": true + } + , + {"code": "clearingMemberCategory", + "type": 12,"name": "Категория участника клиринга","shortname": "Категория","link": "clearingCategory","required": true + } + ] + } + , + {"method":"put", + + "name": "Изменение категорий участника клиринга", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "clearingCategory","linkCode": "id","required": true + } + , + {"code": "clearingMemberCategory", + "type": 12,"name": "Категория участника клиринга","shortname": "Категория","link": "clearingCategory" + } + ] + } + , + {"method":"delete", + + "name": "Удаление категории участника клиринга", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "clearingCategory","linkCode": "id","required": true + } + ] + } + ] + } + , + "contact": { + + "name": "Контакты компании", + + "destination": "contacts", + + "class": "ru.clearing.classes.statics.data.profile.Contact", + + "table": "contact", + + "fields": [ + {"code": "companyId", + "type": 1,"dbname": "Идентификатор компании","name": "Наименование компании","shortname": "Компания","searchable": true,"sortable": true,"visible": true,"link": "company","linkCode": "shortName" + } + , + {"code": "contactType", + "type": 12,"dbname": "Код типа контакта","name": "Наименование типа контакта","shortname": "Тип контакта","searchable": true,"sortable": true,"visible": true,"link": "contactType" + } + , + {"code": "contactValue", + "type": 2,"length": 255,"name": "Значение контакта","shortname": "Значение","searchable": true,"sortable": true,"visible": true + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + ] + ,"actions":[ + {"method":"put", + + "name": "Изменение контакта компании", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "contact","linkCode": "id","required": true + } + , + {"code": "contactType", + "type": 12,"name": "Наименование типа контакта","shortname": "Тип контакта","link": "contactType" + } + , + {"code": "contactValue", + "type": 2,"length": 255,"name": "Значение контакта","shortname": "Значение" + } + ] + } + ] + } + , + "profileDocument": { + + "name": "Досье компании", + + "destination": "profile-documents", + + "class": "ru.clearing.classes.statics.data.profile.ProfileDocument", + + "logUpdates": "true", + + "table": "profile_document", + + "fields": [ + {"code": "companyId", + "type": 1,"dbname": "Идентификатор компании","name": "Наименование компании","shortname": "Компания","searchable": true,"sortable": true,"visible": true,"link": "company","linkCode": "shortName" + } + , + {"code": "documentType", + "type": 12,"dbname": "Код типа документа","name": "Наименование типа документа","shortname": "Тип документа","searchable": true,"sortable": true,"visible": true,"link": "documentType" + } + , + {"code": "issueDate", + "type": 6,"name": "Дата выдачи","shortname": "Дата выдачи","searchable": true,"sortable": true + } + , + {"code": "issuePlace", + "type": 2,"length": 255,"name": "Место выдачи","shortname": "Место выдачи","searchable": true,"sortable": true,"visible": true + } + , + {"code": "issuer", + "type": 2,"length": 255,"name": "Кем выдан","shortname": "Кем выдан","searchable": true,"sortable": true,"visible": true + } + , + {"code": "issuerCode", + "type": 2,"length": 255,"name": "Код выдавшего органа","shortname": "Выдавший орган","searchable": true,"sortable": true,"visible": true + } + , + {"code": "name", + "type": 2,"length": 255,"name": "Наименование документа","shortname": "Документ","searchable": true,"sortable": true,"visible": true + } + , + {"code": "number", + "type": 2,"length": 255,"name": "Номер документа","shortname": "Номер","searchable": true,"sortable": true,"visible": true + } + , + {"code": "place", + "type": 2,"length": 255,"name": "Место","shortname": "Место","searchable": true,"sortable": true,"visible": true + } + , + {"code": "validFromDate", + "type": 6,"name": "Дата начала срока действия","shortname": "Начало","searchable": true,"sortable": true + } + , + {"code": "validToDate", + "type": 6,"name": "Дата окончания срока действия","shortname": "Окончание","searchable": true,"sortable": true + } + , + {"code": "link", + "type": 2,"length": 255,"name": "Ссылка на документ","shortname": "Ссылка на документ","searchable": true,"sortable": true,"visible": true + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + ] + ,"actions":[ + {"method":"post", + + "name": "Добавление документа", + + "confirmation": "documentType,number,companyId", + + "fields": [ + {"code": "companyId", + "type": 1,"name": "Наименование компании","shortname": "Компании","link": "company","linkCode": "shortName","required": true,"enabled": false + } + , + {"code": "documentType", + "type": 12,"name": "Наименование типа документа","shortname": "Тип документа","link": "documentType","required": true + } + , + {"code": "issueDate", + "type": 6,"name": "Дата выдачи","shortname": "Дата выдачи","required": true + } + , + {"code": "issuePlace", + "type": 2,"length": 255,"name": "Место выдачи","shortname": "Место выдачи","required": true + } + , + {"code": "issuer", + "type": 2,"length": 255,"name": "Кем выдан","shortname": "Кем выдан","required": true + } + , + {"code": "issuerCode", + "type": 2,"length": 255,"name": "Код выдавшего органа","shortname": "Выдавший орган","required": true + } + , + {"code": "name", + "type": 2,"length": 255,"name": "Наименование документа","shortname": "Документ","required": true + } + , + {"code": "number", + "type": 2,"length": 255,"name": "Номер документа","shortname": "Номер","required": true + } + , + {"code": "place", + "type": 2,"length": 255,"name": "Место","shortname": "Место","required": true + } + , + {"code": "validFromDate", + "type": 6,"name": "Дата начала срока действия","shortname": "Начало","required": true + } + , + {"code": "validToDate", + "type": 6,"name": "Дата окончания срока действия","shortname": "Окончание","required": true + } + , + {"code": "link", + "type": 2,"length": 255,"name": "Ссылка на документ","shortname": "Ссылка на документ" + } + ] + } + , + {"method":"put", + + "name": "Изменение документа", + + "confirmation": "documentType,number,companyId", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "profileDocument","linkCode": "id","required": true + } + , + {"code": "companyId", + "type": 1,"name": "Наименование компании","shortname": "Компании","link": "company","linkCode": "shortName","enabled": false + } + , + {"code": "documentType", + "type": 12,"name": "Наименование типа документа","shortname": "Тип документа","link": "documentType" + } + , + {"code": "issueDate", + "type": 6,"name": "Дата выдачи","shortname": "Дата выдачи" + } + , + {"code": "issuePlace", + "type": 2,"length": 255,"name": "Место выдачи","shortname": "Место выдачи" + } + , + {"code": "issuer", + "type": 2,"length": 255,"name": "Кем выдан","shortname": "Кем выдан" + } + , + {"code": "issuerCode", + "type": 2,"length": 255,"name": "Код выдавшего органа","shortname": "Выдавший орган" + } + , + {"code": "name", + "type": 2,"length": 255,"name": "Наименование документа","shortname": "Документ" + } + , + {"code": "number", + "type": 2,"length": 255,"name": "Номер документа","shortname": "Номер" + } + , + {"code": "place", + "type": 2,"length": 255,"name": "Место","shortname": "Место" + } + , + {"code": "validFromDate", + "type": 6,"name": "Дата начала срока действия","shortname": "Начало" + } + , + {"code": "validToDate", + "type": 6,"name": "Дата окончания срока действия","shortname": "Окончание" + } + , + {"code": "link", + "type": 2,"length": 255,"name": "Ссылка на документ","shortname": "Ссылка на документ" + } + ] + } + , + {"method":"delete", + + "name": "Удаление документа", + + "confirmation": "documentType,number,companyId", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "profileDocument","linkCode": "id","required": true + } + ] + } + ] + } + , + "companySymbols": { + + "name": "Реквизиты компании", + + "destination": "company-symbols", + + "class": "ru.clearing.classes.statics.data.company.CompanySymbols", + + "logUpdates": "true", + + "table": "company_symbols", + + "fields": [ + {"code": "companyId", + "type": 1,"dbname": "Идентификатор компании","name": "Наименование компании","shortname": "Компания","searchable": true,"sortable": true,"visible": true,"link": "company","linkCode": "shortName" + } + , + {"code": "companySymbol", + "type": 12,"dbname": "Код типа реквизита","name": "Наименование типа реквизита","shortname": "Тип реквизита","searchable": true,"sortable": true,"visible": true,"link": "companySymbol","linkCode": "shortName" + } + , + {"code": "companySymbolValue", + "type": 2,"length": 255,"name": "Значение реквизита","shortname": "Значение","searchable": true,"sortable": true,"visible": true + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + ] + ,"actions":[ + {"method":"put", + + "name": "Изменение реквизитов компании", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "companySymbols","linkCode": "id","required": true + } + , + {"code": "companySymbol", + "type": 12,"name": "Наименование типа реквизита","shortname": "Тип реквизита","link": "companySymbol" + } + , + {"code": "companySymbolValue", + "type": 2,"length": 255,"name": "Значение реквизита","shortname": "Значение" + } + ] + } + ] + } + , + "companyRoleSet": { + + "name": "Таблица ролей компании", + + "destination": "company-role-sets", + + "class": "ru.clearing.classes.statics.data.company.CompanyRoleSet", + + "table": "company_role_set", + + "fields": [ + {"code": "companyId", + "type": 1,"dbname": "Идентификатор компании","name": "Наименование компании","shortname": "Компания","searchable": true,"sortable": true,"visible": true,"link": "company","linkCode": "shortName" + } + , + {"code": "companyRole", + "type": 12,"dbname": "Код роли компании","name": "Наименование роли компании","shortname": "Роль","searchable": true,"sortable": true,"visible": true,"link": "companyRole" + } + , + {"code": "workflowStatus", + "type": 12,"dbname": "Код статуса","name": "Наименование статуса","shortname": "Статус","searchable": true,"sortable": true,"link": "workflowStatus" + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + ] + + } + , + "security": { + + "name": "Инструменты", + + "destination": "securities", + + "class": "ru.clearing.classes.statics.data.security.Security", + + "logUpdates": "true", + + "table": "security", + + "fields": [ + {"code": "instrumentType", + "type": 12,"dbname": "Код типа инструмента","name": "Наименование типа инструмента","shortname": "Тип инструмента","searchable": true,"sortable": true,"visible": true,"link": "instrumentType" + } + , + {"code": "issuerId", + "type": 1,"dbname": "Идентификатор эмитента","name": "Наименование эмитента","shortname": "Эмитент","searchable": true,"sortable": true,"link": "company" + } + , + {"code": "shortName", + "type": 2,"length": 255,"name": "Краткое наименование инструмента","shortname": "Краткое наименование","searchable": true,"sortable": true,"visible": true + } + , + {"code": "fullName", + "type": 2,"length": 255,"name": "Полное наименование инструмента","shortname": "Наименование","searchable": true,"sortable": true,"visible": true + } + , + {"code": "shortNameEng", + "type": 2,"length": 255,"name": "Краткое наименование инструмента на английском","shortname": "Краткое наименование на английском","searchable": true,"sortable": true,"visible": true + } + , + {"code": "fullNameEng", + "type": 2,"length": 255,"name": "Полное наименование инструмента на английском","shortname": "Наименование на английском","searchable": true,"sortable": true,"visible": true + } + , + {"code": "securitySymbol", + "type": 2,"length": 255,"name": "Код инструмента","shortname": "Код","searchable": true,"sortable": true,"visible": true + } + , + {"code": "isin", + "type": 2,"length": 50,"name": "Наименование инструмента ISIN","shortname": "ISIN","searchable": true,"sortable": true,"visible": true + } + , + {"code": "workflowStatus", + "type": 12,"dbname": "Код статуса","name": "Наименование статуса","shortname": "Статус","searchable": true,"sortable": true,"visible": true,"link": "workflowStatus" + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "uuid", + "type": 2,"length": 255,"name": "Идентификатор во внешней системе","shortname": "Внешний ID","searchable": true,"sortable": true + } + , + {"code": "createdAt", + "field": "created","type": 4,"webtype": "5","dbname": "Дата-время создания записи","name": "Время создания записи","shortname": "Создано","searchable": true,"sortable": true + } + , + {"code": "updatedAt", + "field": "updated","type": 4,"webtype": "5","dbname": "Дата-время изменения записи","name": "Время изменения записи","shortname": "Изменено","searchable": true,"sortable": true + } + ] + + } + , + "currency": { + + "name": "Валюты", + + "destination": "currencies", + + "class": "ru.clearing.classes.statics.data.misc.Currency", + + "logUpdates": "true", + + "table": "currency", + + "fields": [ + {"code": "countryCode", + "type": 12,"dbname": "Код страны","name": "Наименование страны","shortname": "Страна","searchable": true,"sortable": true,"visible": true,"link": "countryCode" + } + , + {"code": "currencyCode", + "type": 12,"dbname": "Код валюты","name": "Код валюты","shortname": "Валюта","searchable": true,"sortable": true,"visible": true,"link": "currencyCode","linkCode": "code" + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + ] + + } + , + "moneyMarketSecurity": { + + "name": "Инструменты Денежного рынка", + + "destination": "securities/money-securities", + + "class": "ru.clearing.classes.statics.data.misc.MoneyMarketSecurity", + + "logUpdates": "true", + + "table": "money_market_security", + + "fields": [ + {"code": "securityId", + "type": 1,"dbname": "Идентификатор инструмента","name": "Наименование инструмента","shortname": "Инструмент","searchable": true,"sortable": true,"link": "security","linkCode": "shortName" + } + , + {"code": "description", + "type": 2,"length": 255,"name": "Описание","shortname": "Описание","searchable": true,"sortable": false + } + , + {"code": "startDate", + "type": 6,"name": "Дата начала действия","shortname": "Дата начала","searchable": true,"sortable": true + } + , + {"code": "endDate", + "type": 6,"name": "Дата окончания действия","shortname": "Дата окончания","searchable": true,"sortable": true + } + , + {"code": "nominalValue", + "type": 10,"name": "Номинал","shortname": "Номинал","searchable": true,"sortable": true + } + , + {"code": "nominalCurrency", + "type": 12,"dbname": "Код валюты номинала","name": "Наименование валюты номинала","shortname": "Валюта номинала","searchable": true,"sortable": true,"link": "currencyCode","linkCode": "code" + } + , + {"code": "instrumentType", + "type": 12,"dbname": "Код типа инструмента","name": "Наименование типа инструмента","shortname": "Тип инструмента","searchable": true,"sortable": true,"visible": true,"link": "instrumentType","extends": "security" + } + , + {"code": "shortName", + "type": 2,"length": 255,"name": "Краткое наименование инструмента","shortname": "Краткое наименование","searchable": true,"sortable": true,"visible": true,"extends": "security" + } + , + {"code": "fullName", + "type": 2,"length": 255,"name": "Полное наименование инструмента","shortname": "Наименование","searchable": true,"sortable": true,"visible": true,"extends": "security" + } + , + {"code": "securitySymbol", + "type": 2,"length": 255,"name": "Код инструмента","shortname": "Код","searchable": true,"sortable": true,"visible": true,"extends": "security" + } + , + {"code": "termType", + "type": 12,"dbname": "Код вида инструмента","name": "Наименование вида инструмента","shortname": "Вид инструмента","searchable": true,"sortable": true,"visible": false,"link": "termType" + } + , + {"code": "lotSize", + "field": "securityId","type": 11,"name": "Размер лота","shortname": "Лот","searchable": true,"sortable": true,"visible": true,"linkKeyCode": "securityId","linkCode": "lotSize","link": "listing","extends": "listing" + } + , + {"code": "issuerId", + "type": 1,"dbname": "Идентификатор эмитента","name": "Наименование эмитента","shortname": "Эмитент","searchable": true,"sortable": true,"link": "company","extends": "security" + } + , + {"code": "shortNameEng", + "type": 2,"length": 255,"name": "Краткое наименование инструмента на английском","shortname": "Краткое наименование на английском","searchable": true,"sortable": true,"visible": true,"extends": "security" + } + , + {"code": "fullNameEng", + "type": 2,"length": 255,"name": "Полное наименование инструмента на английском","shortname": "Наименование на английском","searchable": true,"sortable": true,"visible": true,"extends": "security" + } + , + {"code": "isin", + "type": 2,"length": 50,"name": "Наименование инструмента ISIN","shortname": "ISIN","searchable": true,"sortable": true,"visible": true,"extends": "security" + } + , + {"code": "workflowStatus", + "type": 12,"dbname": "Код статуса","name": "Наименование статуса","shortname": "Статус","searchable": true,"sortable": true,"visible": true,"link": "workflowStatus","extends": "security" + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + ] + ,"actions":[ + {"method":"post", + + "name": "Добавление инструмента", + + "confirmation": "securitySymbol,shortName,fullName,lotSize,nominalValue,nominalCurrency,startDate,endDate,termType", + + "fields": [ + {"code": "securitySymbol", + "type": 2,"length": 255,"name": "Код инструмента","shortname": "Код","required": true + } + , + {"code": "shortName", + "type": 2,"length": 255,"name": "Краткое наименование инструмента","shortname": "Краткое наименование","required": true + } + , + {"code": "fullName", + "type": 2,"length": 255,"name": "Полное наименование инструмента","shortname": "Наименование" + } + , + {"code": "lotSize", + "type": 11,"name": "Размер лота","shortname": "Лот","required": true + } + , + {"code": "nominalValue", + "type": 10,"name": "Номинал","shortname": "Номинал","required": true + } + , + {"code": "nominalCurrency", + "type": 12,"name": "Наименование валюты номинала","shortname": "Валюта номинала","link": "currencyCode","linkCode": "code","required": true + } + , + {"code": "startDate", + "type": 6,"name": "Дата начала действия","shortname": "Дата начала","required": true + } + , + {"code": "endDate", + "type": 6,"name": "Дата окончания действия","shortname": "Дата окончания","required": true + } + , + {"code": "termType", + "type": 12,"name": "Наименование вида инструмента","shortname": "Вид инструмента","link": "termType","required": true + } + , + {"code": "description", + "type": 2,"length": 255,"name": "Описание","shortname": "Описание" + } + , + {"code": "issuerId", + "type": 1,"name": "Наименование эмитента","shortname": "Эмитент","link": "company" + } + , + {"code": "shortNameEng", + "type": 2,"length": 255,"name": "Краткое наименование инструмента на английском","shortname": "Краткое название на английском" + } + , + {"code": "fullNameEng", + "type": 2,"length": 255,"name": "Полное наименование инструмента на английском","shortname": "Наименование на английском" + } + , + {"code": "isin", + "type": 2,"length": 50,"name": "Наименование инструмента ISIN","shortname": "ISIN" + } + , + {"code": "workflowStatus", + "type": 12,"name": "Наименование статуса","shortname": "Статус","link": "workflowStatus" + } + , + {"code": "instrumentType", + "type": 12,"name": "Наименование типа инструмента","shortname": "Тип инструмента","link": "instrumentType","required": true,"visible": false + } + ] + } + , + {"method":"put", + + "name": "Изменение инструмента", + + "confirmation": "securitySymbol,shortName,fullName,lotSize,nominalValue,nominalCurrency,startDate,endDate,termType", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "moneyMarketSecurity","linkCode": "id","required": true + } + , + {"code": "securitySymbol", + "type": 2,"length": 255,"name": "Код инструмента","shortname": "Код","enabled": false + } + , + {"code": "shortName", + "type": 2,"length": 255,"name": "Краткое наименование инструмента","shortname": "Краткое наименование" + } + , + {"code": "fullName", + "type": 2,"length": 255,"name": "Полное наименование инструмента","shortname": "Наименование" + } + , + {"code": "lotSize", + "type": 11,"name": "Размер лота","shortname": "Лот" + } + , + {"code": "nominalValue", + "type": 10,"name": "Номинал","shortname": "Номинал" + } + , + {"code": "nominalCurrency", + "type": 12,"name": "Наименование валюты номинала","shortname": "Валюта номинала","link": "currencyCode","linkCode": "code" + } + , + {"code": "startDate", + "type": 6,"name": "Дата начала действия","shortname": "Дата начала","enabled": false + } + , + {"code": "endDate", + "type": 6,"name": "Дата окончания действия","shortname": "Дата окончания" + } + , + {"code": "termType", + "type": 12,"name": "Наименование вида инструмента","shortname": "Вид инструмента","link": "termType" + } + , + {"code": "description", + "type": 2,"length": 255,"name": "Описание","shortname": "Описание" + } + , + {"code": "issuerId", + "type": 1,"name": "Наименование эмитента","shortname": "Эмитент","link": "company" + } + , + {"code": "shortNameEng", + "type": 2,"length": 255,"name": "Краткое наименование инструмента на английском","shortname": "Краткое название на английском" + } + , + {"code": "fullNameEng", + "type": 2,"length": 255,"name": "Полное наименование инструмента на английском","shortname": "Наименование на английском" + } + , + {"code": "isin", + "type": 2,"length": 50,"name": "Наименование инструмента ISIN","shortname": "ISIN" + } + , + {"code": "workflowStatus", + "type": 12,"name": "Наименование статуса","shortname": "Статус","link": "workflowStatus" + } + , + {"code": "instrumentType", + "type": 12,"name": "Наименование типа инструмента","shortname": "Тип инструмента","link": "instrumentType","visible": false + } + ] + } + , + {"method":"delete", + + "name": "Блокировка инструмента", + + "confirmation": "securitySymbol,shortName", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "moneyMarketSecurity","linkCode": "id","required": true + } + ] + } + ] + } + , + "equitySecurity": { + + "name": "Акции", + + "destination": "securities/equity-securities", + + "class": "ru.clearing.classes.statics.data.instrument.issue.EquitySecurity", + + "logUpdates": "true", + + "table": "equity_security", + + "fields": [ + {"code": "securityId", + "type": 1,"dbname": "Идентификатор инструмента","name": "Наименование инструмента","shortname": "Инструмент","searchable": true,"sortable": true,"link": "security","linkCode": "shortName" + } + , + {"code": "shortName", + "type": 2,"length": 255,"name": "Краткое наименование инструмента","shortname": "Краткое наименование","searchable": true,"sortable": true,"visible": true,"extends": "security" + } + , + {"code": "securitySymbol", + "type": 2,"length": 255,"name": "Код инструмента","shortname": "Код","searchable": true,"sortable": true,"visible": true,"extends": "security" + } + , + {"code": "fullName", + "type": 2,"length": 255,"name": "Полное наименование инструмента","shortname": "Наименование","searchable": true,"sortable": true,"visible": true,"extends": "security" + } + , + {"code": "isin", + "type": 2,"length": 50,"name": "Наименование инструмента ISIN","shortname": "ISIN","searchable": true,"sortable": true,"visible": true,"extends": "security" + } + , + {"code": "instrumentType", + "type": 12,"dbname": "Код типа инструмента","name": "Наименование типа инструмента","shortname": "Тип инструмента","searchable": true,"sortable": true,"visible": true,"link": "instrumentType","extends": "security" + } + , + {"code": "shareType", + "type": 12,"dbname": "Код типа акции","name": "Наименование типа акции","shortname": "Тип акции","searchable": true,"sortable": true,"visible": true,"link": "shareType" + } + , + {"code": "lotSize", + "field": "securityId","type": 11,"name": "Размер лота","shortname": "Лот","searchable": true,"sortable": true,"visible": true,"linkKeyCode": "securityId","linkCode": "lotSize","link": "listing","extends": "listing" + } + , + {"code": "issuerId", + "type": 1,"dbname": "Идентификатор эмитента","name": "Наименование эмитента","shortname": "Эмитент","searchable": true,"sortable": true,"link": "company","extends": "security" + } + , + {"code": "shortNameEng", + "type": 2,"length": 255,"name": "Краткое наименование инструмента на английском","shortname": "Краткое наименование на английском","searchable": true,"sortable": true,"visible": true,"extends": "security" + } + , + {"code": "fullNameEng", + "type": 2,"length": 255,"name": "Полное наименование инструмента на английском","shortname": "Наименование на английском","searchable": true,"sortable": true,"visible": true,"extends": "security" + } + , + {"code": "workflowStatus", + "type": 12,"dbname": "Код статуса","name": "Наименование статуса","shortname": "Статус","searchable": true,"sortable": true,"visible": true,"link": "workflowStatus","extends": "security" + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + ] + ,"actions":[ + {"method":"post", + + "name": "Добавление акции", + + "confirmation": "securitySymbol,shortName,fullName,isin,shareType,lotSize", + + "fields": [ + {"code": "securitySymbol", + "type": 2,"length": 255,"name": "Код инструмента","shortname": "Код","required": true + } + , + {"code": "shortName", + "type": 2,"length": 255,"name": "Краткое наименование инструмента","shortname": "Краткое наименование","required": true + } + , + {"code": "fullName", + "type": 2,"length": 255,"name": "Полное наименование инструмента","shortname": "Наименование" + } + , + {"code": "isin", + "type": 2,"length": 50,"name": "Наименование инструмента ISIN","shortname": "ISIN" + } + , + {"code": "shareType", + "type": 12,"dbname": "Код типа акции","name": "Наименование типа акции","shortname": "Тип акции","link": "shareType" + } + , + {"code": "lotSize", + "type": 11,"name": "Размер лота","shortname": "Лот","required": true + } + , + {"code": "issuerId", + "type": 1,"name": "Наименование эмитента","shortname": "Эмитент","link": "company" + } + , + {"code": "shortNameEng", + "type": 2,"length": 255,"name": "Краткое наименование инструмента на английском","shortname": "Краткое название на английском" + } + , + {"code": "fullNameEng", + "type": 2,"length": 255,"name": "Полное наименование инструмента на английском","shortname": "Наименование на английском" + } + , + {"code": "workflowStatus", + "type": 12,"name": "Наименование статуса","shortname": "Статус","link": "workflowStatus" + } + , + {"code": "instrumentType", + "type": 12,"name": "Наименование типа инструмента","shortname": "Тип инструмента","link": "instrumentType","required": true,"visible": false + } + ] + } + , + {"method":"put", + + "name": "Изменение акции", + + "confirmation": "securitySymbol,shortName,fullName,isin,shareType,lotSize", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "equitySecurity","linkCode": "id","required": true + } + , + {"code": "securitySymbol", + "type": 2,"length": 255,"name": "Код инструмента","shortname": "Код","enabled": false + } + , + {"code": "shortName", + "type": 2,"length": 255,"name": "Краткое наименование инструмента","shortname": "Краткое наименование" + } + , + {"code": "fullName", + "type": 2,"length": 255,"name": "Полное наименование инструмента","shortname": "Наименование" + } + , + {"code": "isin", + "type": 2,"length": 50,"name": "Наименование инструмента ISIN","shortname": "ISIN" + } + , + {"code": "shareType", + "type": 12,"dbname": "Код типа акции","name": "Наименование типа акции","shortname": "Тип акции","link": "shareType" + } + , + {"code": "lotSize", + "type": 11,"name": "Размер лота","shortname": "Лот" + } + , + {"code": "issuerId", + "type": 1,"name": "Наименование эмитента","shortname": "Эмитент","link": "company" + } + , + {"code": "shortNameEng", + "type": 2,"length": 255,"name": "Краткое наименование инструмента на английском","shortname": "Краткое название на английском" + } + , + {"code": "fullNameEng", + "type": 2,"length": 255,"name": "Полное наименование инструмента на английском","shortname": "Наименование на английском" + } + , + {"code": "workflowStatus", + "type": 12,"name": "Наименование статуса","shortname": "Статус","link": "workflowStatus" + } + , + {"code": "instrumentType", + "type": 12,"name": "Наименование типа инструмента","shortname": "Тип инструмента","link": "instrumentType","visible": false + } + ] + } + , + {"method":"delete", + + "name": "Блокировка акции", + + "confirmation": "securitySymbol,shortName", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "equitySecurity","linkCode": "id","required": true + } + ] + } + ] + } + , + "fixedIncomeSecurity": { + + "name": "Облигации", + + "destination": "securities/fixed-income-securities", + + "class": "ru.clearing.classes.statics.data.instrument.issue.FixedIncomeSecurity", + + "logUpdates": "true", + + "table": "fixed_income_security", + + "fields": [ + {"code": "securityId", + "type": 1,"dbname": "Идентификатор инструмента","name": "Наименование инструмента","shortname": "Инструмент","searchable": true,"sortable": true,"link": "security","linkCode": "shortName" + } + , + {"code": "shortName", + "type": 2,"length": 255,"name": "Краткое наименование инструмента","shortname": "Краткое наименование","searchable": true,"sortable": true,"visible": true,"extends": "security" + } + , + {"code": "securitySymbol", + "type": 2,"length": 255,"name": "Код инструмента","shortname": "Код","searchable": true,"sortable": true,"visible": true,"extends": "security" + } + , + {"code": "fullName", + "type": 2,"length": 255,"name": "Полное наименование инструмента","shortname": "Наименование","searchable": true,"sortable": true,"visible": true,"extends": "security" + } + , + {"code": "isin", + "type": 2,"length": 50,"name": "Наименование инструмента ISIN","shortname": "ISIN","searchable": true,"sortable": true,"visible": true,"extends": "security" + } + , + {"code": "instrumentType", + "type": 12,"dbname": "Код типа инструмента","name": "Наименование типа инструмента","shortname": "Тип инструмента","searchable": true,"sortable": true,"visible": true,"link": "instrumentType","extends": "security" + } + , + {"code": "bondType", + "type": 12,"dbname": "Код типа облигации","name": "Наименование типа облигации","shortname": "Тип облигации","searchable": true,"sortable": true,"visible": true,"link": "bondType" + } + , + {"code": "maturityDate", + "type": 6,"name": "Дата погашения","shortname": "Погашение","searchable": true,"sortable": true + } + , + {"code": "nominalValue", + "type": 10,"name": "Номинал","shortname": "Номинал","searchable": true,"sortable": true + } + , + {"code": "nominalCurrency", + "type": 12,"dbname": "Код валюты номинала","name": "Наименование валюты номинала","shortname": "Валюта номинала","searchable": true,"sortable": true,"link": "currencyCode" + } + , + {"code": "coupon", + "type": 10,"name": "Купон","shortname": "Купон","searchable": true,"sortable": true + } + , + {"code": "couponFrequency", + "type": 3,"name": "Длительность купона","shortname": "Длительность","searchable": true,"sortable": true + } + , + {"code": "lotSize", + "field": "securityId","type": 11,"name": "Размер лота","shortname": "Лот","searchable": true,"sortable": true,"visible": true,"linkKeyCode": "securityId","linkCode": "lotSize","link": "listing","extends": "listing" + } + , + {"code": "issuerId", + "type": 1,"dbname": "Идентификатор эмитента","name": "Наименование эмитента","shortname": "Эмитент","searchable": true,"sortable": true,"link": "company","extends": "security" + } + , + {"code": "shortNameEng", + "type": 2,"length": 255,"name": "Краткое наименование инструмента на английском","shortname": "Краткое наименование на английском","searchable": true,"sortable": true,"visible": true,"extends": "security" + } + , + {"code": "fullNameEng", + "type": 2,"length": 255,"name": "Полное наименование инструмента на английском","shortname": "Наименование на английском","searchable": true,"sortable": true,"visible": true,"extends": "security" + } + , + {"code": "workflowStatus", + "type": 12,"dbname": "Код статуса","name": "Наименование статуса","shortname": "Статус","searchable": true,"sortable": true,"visible": true,"link": "workflowStatus","extends": "security" + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + ] + ,"actions":[ + {"method":"post", + + "name": "Добавление облигации", + + "confirmation": "securitySymbol,shortName,fullName,isin,bondType,lotSize,nominalValue,nominalCurrency", + + "fields": [ + {"code": "securitySymbol", + "type": 2,"length": 255,"name": "Код инструмента","shortname": "Код","required": true + } + , + {"code": "shortName", + "type": 2,"length": 255,"name": "Краткое наименование инструмента","shortname": "Краткое наименование","required": true + } + , + {"code": "fullName", + "type": 2,"length": 255,"name": "Полное наименование инструмента","shortname": "Наименование" + } + , + {"code": "isin", + "type": 2,"length": 50,"name": "Наименование инструмента ISIN","shortname": "ISIN" + } + , + {"code": "bondType", + "type": 12,"dbname": "Код типа облигации","name": "Наименование типа облигации","shortname": "Тип облигации","link": "bondType" + } + , + {"code": "lotSize", + "type": 11,"name": "Размер лота","shortname": "Лот","required": true + } + , + {"code": "nominalValue", + "type": 10,"name": "Номинал","shortname": "Номинал" + } + , + {"code": "nominalCurrency", + "type": 12,"name": "Наименование валюты номинала","shortname": "Валюта номинала","link": "currencyCode","linkCode": "code" + } + , + {"code": "maturityDate", + "type": 6,"name": "Дата погашения","shortname": "Погашение" + } + , + {"code": "coupon", + "type": 10,"name": "Купон","shortname": "Купон" + } + , + {"code": "couponFrequency", + "type": 3,"name": "Длительность купона","shortname": "Длительность" + } + , + {"code": "issuerId", + "type": 1,"name": "Наименование эмитента","shortname": "Эмитент","link": "company" + } + , + {"code": "shortNameEng", + "type": 2,"length": 255,"name": "Краткое наименование инструмента на английском","shortname": "Краткое название на английском" + } + , + {"code": "fullNameEng", + "type": 2,"length": 255,"name": "Полное наименование инструмента на английском","shortname": "Наименование на английском" + } + , + {"code": "workflowStatus", + "type": 12,"name": "Наименование статуса","shortname": "Статус","link": "workflowStatus" + } + , + {"code": "instrumentType", + "type": 12,"name": "Наименование типа инструмента","shortname": "Тип инструмента","link": "instrumentType","required": true,"visible": false + } + ] + } + , + {"method":"put", + + "name": "Изменение облигации", + + "confirmation": "securitySymbol,shortName,fullName,isin,bondType,lotSize,nominalValue,nominalCurrency", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "fixedIncomeSecurity","linkCode": "id","required": true + } + , + {"code": "securitySymbol", + "type": 2,"length": 255,"name": "Код инструмента","shortname": "Код","enabled": false + } + , + {"code": "shortName", + "type": 2,"length": 255,"name": "Краткое наименование инструмента","shortname": "Краткое наименование" + } + , + {"code": "fullName", + "type": 2,"length": 255,"name": "Полное наименование инструмента","shortname": "Наименование" + } + , + {"code": "isin", + "type": 2,"length": 50,"name": "Наименование инструмента ISIN","shortname": "ISIN" + } + , + {"code": "bondType", + "type": 12,"dbname": "Код типа облигации","name": "Наименование типа облигации","shortname": "Тип облигации","link": "bondType" + } + , + {"code": "lotSize", + "type": 11,"name": "Размер лота","shortname": "Лот" + } + , + {"code": "nominalValue", + "type": 10,"name": "Номинал","shortname": "Номинал" + } + , + {"code": "nominalCurrency", + "type": 12,"name": "Наименование валюты номинала","shortname": "Валюта номинала","link": "currencyCode","linkCode": "code" + } + , + {"code": "maturityDate", + "type": 6,"name": "Дата погашения","shortname": "Погашение" + } + , + {"code": "coupon", + "type": 10,"name": "Купон","shortname": "Купон" + } + , + {"code": "couponFrequency", + "type": 3,"name": "Длительность купона","shortname": "Длительность" + } + , + {"code": "issuerId", + "type": 1,"name": "Наименование эмитента","shortname": "Эмитент","link": "company" + } + , + {"code": "shortNameEng", + "type": 2,"length": 255,"name": "Краткое наименование инструмента на английском","shortname": "Краткое название на английском" + } + , + {"code": "fullNameEng", + "type": 2,"length": 255,"name": "Полное наименование инструмента на английском","shortname": "Наименование на английском" + } + , + {"code": "workflowStatus", + "type": 12,"name": "Наименование статуса","shortname": "Статус","link": "workflowStatus" + } + , + {"code": "instrumentType", + "type": 12,"name": "Наименование типа инструмента","shortname": "Тип инструмента","link": "instrumentType","visible": false + } + ] + } + , + {"method":"delete", + + "name": "Блокировка облигации", + + "confirmation": "securitySymbol,shortName", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "fixedIncomeSecurity","linkCode": "id","required": true + } + ] + } + ] + } + , + "fixedIncomeCashFlow": { + + "name": "Выплаты по купонам", + + "destination": "securities/fixed-income-cash-flows", + + "class": "ru.clearing.classes.statics.data.instrument.issue.FixedIncomeCashFlow", + + "logUpdates": "true", + + "table": "fixed_income_cash_flow", + + "fields": [ + {"code": "securityId", + "type": 1,"dbname": "Идентификатор инструмента","name": "Наименование инструмента","shortname": "Инструмент","searchable": true,"sortable": true,"link": "security","linkCode": "shortName" + } + , + {"code": "accruedCoupon", + "type": 11,"name": "Купон","shortname": "Купон","searchable": true,"sortable": true,"visible": true + } + , + {"code": "nominalValue", + "type": 10,"name": "Номинал","shortname": "Номинал","searchable": true,"sortable": true + } + , + {"code": "number", + "type": 3,"name": "Номер купона","shortname": "Номер","searchable": true,"sortable": true,"visible": true + } + , + {"code": "valueDate", + "type": 6,"name": "Дата выплаты купона","shortname": "Выплата","searchable": true,"sortable": true,"visible": true + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + ] + + } + , + "couponPeriod": { + + "name": "Купонное расписание", + + "destination": "securities/coupon-periods", + + "class": "ru.clearing.classes.statics.data.instrument.issue.CouponPeriod", + + "logUpdates": "true", + + "table": "coupon_period", + + "fields": [ + {"code": "securityId", + "type": 1,"dbname": "Идентификатор инструмента","name": "Наименование инструмента","shortname": "Инструмент","searchable": true,"sortable": true,"link": "security","linkCode": "shortName" + } + , + {"code": "couponRate", + "type": 11,"name": "Купонная ставка","shortname": "Ставка","searchable": true,"sortable": true,"visible": true + } + , + {"code": "number", + "type": 3,"name": "Номер купона","shortname": "Номер","searchable": true,"sortable": true,"visible": true + } + , + {"code": "periodEndDate", + "type": 6,"name": "Начало периода действия","shortname": "Начало","searchable": true,"sortable": true,"visible": true + } + , + {"code": "periodStartDate", + "type": 6,"name": "Окончание периода действия","shortname": "Окончание","searchable": true,"sortable": true,"visible": true + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + ] + + } + , + "listing": { + + "name": "Листинг инструментов", + + "destination": "listings", + + "class": "ru.clearing.classes.statics.data.misc.Listing", + + "logUpdates": "true", + + "table": "listing", + + "fields": [ + {"code": "securityId", + "type": 1,"dbname": "Идентификатор инструмента","name": "Наименование инструмента","shortname": "Инструмент","searchable": true,"sortable": true,"link": "security","linkCode": "shortName" + } + , + {"code": "lotSize", + "type": 11,"name": "Размер лота","shortname": "Лот","searchable": true,"sortable": true + } + , + {"code": "market", + "type": 12,"dbname": "Код торговой секции","name": "Наименование торговой секции","shortname": "Секция","searchable": true,"sortable": true,"link": "market","linkCode": "name" + } + , + {"code": "symbolCode", + "type": 2,"length": 255,"name": "Код инструмента на торговой площадке","shortname": "Код инструмента на торговой площадке","searchable": true,"sortable": true + } + , + {"code": "symbolName", + "type": 2,"length": 255,"name": "Наименование инструмента на торговой площадке","shortname": "Инструмент на торговой площадке","searchable": true,"sortable": true + } + , + {"code": "tradingCurrency", + "type": 12,"dbname": "Код валюты расчета","name": "Наименование валюты расчета","shortname": "Валюта","searchable": true,"sortable": true,"visible": true,"link": "currencyCode","linkCode": "code" + } + , + {"code": "workflowStatus", + "type": 12,"dbname": "Код статуса листинга в системе","name": "Наименование статуса листинга в системе","shortname": "Статус","searchable": true,"sortable": true,"visible": true,"link": "workflowStatus" + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "createdAt", + "field": "created","type": 4,"webtype": "5","dbname": "Дата-время создания записи","name": "Время создания записи","shortname": "Создано","searchable": true,"sortable": true,"ignore": true + } + , + {"code": "updatedAt", + "field": "updated","type": 4,"webtype": "5","dbname": "Дата-время изменения записи","name": "Время изменения записи","shortname": "Изменено","searchable": true,"sortable": true,"ignore": true + } + ] + + } + , + "market": { + + "name": "Торговые секции", + + "destination": "markets", + + "class": "ru.clearing.classes.statics.data.misc.Market", + + "logUpdates": "true", + + "table": "market", + + "fields": [ + {"code": "description", + "type": 2,"length": 255,"name": "Описание","shortname": "Описание","searchable": true,"sortable": true + } + , + {"code": "exchangeId", + "type": 1,"dbname": "Идентификатор площадки","name": "Наименование площадки","shortname": "Площадка","searchable": true,"sortable": true,"link": "company" + } + , + {"code": "name", + "type": 2,"length": 255,"name": "Наименование рынка","shortname": "Рынок","searchable": true,"sortable": true + } + , + {"code": "code", + "type": 12,"name": "Код рынка","shortname": "Код","searchable": true,"sortable": true + } + , + {"code": "settlementCurrency", + "type": 12,"dbname": "Код валюты расчета","name": "Наименование валюты расчета","shortname": "Валюта","searchable": true,"sortable": true,"visible": true,"link": "currencyCode","linkCode": "code" + } + , + {"code": "section", + "type": 12,"dbname": "Код секции","name": "Наименование секции","shortname": "Секция","searchable": true,"sortable": true,"visible": true,"link": "section" + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "createdAt", + "field": "created","type": 4,"webtype": "5","dbname": "Дата-время создания записи","name": "Время создания записи","shortname": "Создано","searchable": true,"sortable": true,"ignore": true + } + , + {"code": "updatedAt", + "field": "updated","type": 4,"webtype": "5","dbname": "Дата-время изменения записи","name": "Время изменения записи","shortname": "Изменено","searchable": true,"sortable": true,"ignore": true + } + ] + + } + , + "errorText": { + + "name": "Полные тексты ошибок", + + "destination": "error-texts", + + "class": "ru.clearing.classes.statics.data.messages.ErrorText", + + "table": "error_text", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "createdAt", + "field": "created","type": 4,"webtype": "5","dbname": "Дата-время создания записи","name": "Время создания записи","shortname": "Создано","searchable": true,"sortable": true,"ignore": true + } + , + {"code": "updatedAt", + "field": "updated","type": 4,"webtype": "5","dbname": "Дата-время изменения записи","name": "Время изменения записи","shortname": "Изменено","searchable": true,"sortable": true,"ignore": true + } + , + {"code": "errorCodeId", + "type": 1,"dbname": "Идентификатор кода ошибки","name": "Код ошибки","shortname": "Код","searchable": true,"sortable": true,"visible": true,"link": "errorCode" + } + , + {"code": "text", + "type": 2,"length": 255,"name": "Полный текст ошибки","shortname": "Ошибка","searchable": true,"sortable": true,"visible": true + } + , + {"code": "userId", + "type": 1,"dbname": "Идентификатор автора сообщения","name": "Автор сообщения","shortname": "Сотрудник","searchable": true,"sortable": true,"visible": true,"link": "userCls","ignore": true + } + , + {"code": "clearingDate", + "type": 6,"name": "Текущая дата","shortname": "Дата","visible": false,"searchable": true,"sortable": true,"ignore": true + } + ] + + } + , + "clientCode": { + + "name": "Коды клиентов компании", + + "destination": "client-codes", + + "class": "ru.clearing.classes.statics.data.account.ClientCode", + + "logUpdates": "true", + + "table": "client_сode", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "companyId", + "type": 1,"dbname": "Идентификатор компании","name": "Наименование компании","shortname": "Компания","searchable": true,"sortable": true,"visible": true,"link": "company","linkCode": "shortName" + } + , + {"code": "code", + "type": 2,"length": 255,"name": "Код клиента","shortname": "Код клиента","searchable": true,"sortable": true,"visible": true + } + , + {"code": "tradingClearingRegistryId", + "type": 1,"dbname": "Идентификатор торгово-клирингового регистра","name": "Торгово-клиринговый регистр","shortname": "ТКР","searchable": true,"sortable": true,"link": "tradingClearingRegistry","linkCode": "code" + } + , + {"code": "moneyAccountId", + "type": 1,"dbname": "Идентификатор денежного счета","name": "Номер денежного счета","shortname": "Денежный счет","searchable": true,"sortable": true,"link": "account","linkCode": "account" + } + , + {"code": "depoAccountId", + "type": 1,"dbname": "Идентификатор депозитарного счета","name": "Номер депозитарного счета","shortname": "Депозитарный счет","searchable": true,"sortable": true,"link": "account","linkCode": "account" + } + , + {"code": "status", + "type": 12,"dbname": "Код статуса","name": "Наименование статуса","shortname": "Статус","searchable": true,"sortable": true,"link": "workflowStatus" + } + , + {"code": "createdAt", + "field": "created","type": 4,"webtype": "5","dbname": "Дата-время создания записи","name": "Время создания записи","shortname": "Создано","searchable": true,"sortable": true + } + , + {"code": "updatedAt", + "field": "updated","type": 4,"webtype": "5","dbname": "Дата-время изменения записи","name": "Время изменения записи","shortname": "Изменено","searchable": true,"sortable": true + } + ] + ,"actions":[ + {"method":"post", + + "name": "Добавление кода клиента", + + "confirmation": "companyId,code,tradingClearingRegistryId,moneyAccountId,depoAccountId,status", + + "fields": [ + {"code": "companyId", + "type": 1,"name": "Наименование компании","shortname": "Компания","link": "company","linkCode": "shortName","required": true,"enabled": false + } + , + {"code": "code", + "type": 2,"length": 255,"name": "Код клиента","shortname": "Код клиента","required": true + } + , + {"code": "tradingClearingRegistryId", + "type": 1,"name": "Торгово-клиринговый регистр","shortname": "ТКР","link": "tradingClearingRegistry","linkCode": "code" + } + , + {"code": "moneyAccountId", + "type": 1,"name": "Номер денежного счета","shortname": "Денежный счет","link": "account","linkCode": "account" + } + , + {"code": "depoAccountId", + "type": 1,"name": "Номер депозитарного счета","shortname": "Депозитарный счет","link": "account","linkCode": "account" + } + , + {"code": "status", + "type": 12,"name": "Наименование статуса","shortname": "Статус","link": "workflowStatus" + } + ] + } + , + {"method":"put", + + "name": "Изменение кода клиента", + + "confirmation": "companyId,code,tradingClearingRegistryId,moneyAccountId,depoAccountId,status", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "clientCode","linkCode": "id","required": true + } + , + {"code": "companyId", + "type": 1,"name": "Наименование компании","shortname": "Компания","link": "company","linkCode": "shortName","enabled": false + } + , + {"code": "code", + "type": 2,"length": 255,"name": "Код клиента","shortname": "Код клиента" + } + , + {"code": "tradingClearingRegistryId", + "type": 1,"name": "Торгово-клиринговый регистр","shortname": "ТКР","link": "tradingClearingRegistry","linkCode": "code" + } + , + {"code": "moneyAccountId", + "type": 1,"name": "Номер денежного счета","shortname": "Денежный счет","link": "account","linkCode": "account" + } + , + {"code": "depoAccountId", + "type": 1,"name": "Номер депозитарного счета","shortname": "Депозитарный счет","link": "account","linkCode": "account" + } + , + {"code": "status", + "type": 12,"name": "Наименование статуса","shortname": "Статус","link": "workflowStatus" + } + ] + } + , + {"method":"delete", + + "name": "Блокировка кода клиента", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "clientCode","linkCode": "id","required": true + } + ] + } + ] + } + , + "tradingClearingRegistry": { + + "name": "Торгово-клиринговый регистр", + + "destination": "trading-clearing-registries", + + "class": "ru.clearing.classes.statics.data.registry.TradingClearingRegistry", + + "logUpdates": "true", + + "table": "trading_clearing_registry", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "companyId", + "type": 1,"dbname": "Идентификатор компании","name": "Наименование компании","shortname": "Компания","searchable": true,"sortable": true,"visible": true,"link": "company","linkCode": "shortName" + } + , + {"code": "code", + "type": 2,"length": 255,"name": "Код торгово-клирингового регистра","shortname": "Код ТКР","searchable": true,"sortable": true,"visible": true + } + , + {"code": "moneyAccountId", + "type": 1,"dbname": "Идентификатор денежного счета","name": "Номер денежного счета","shortname": "Денежный счет","searchable": true,"sortable": true,"link": "account" + } + , + {"code": "depoAaccountId", + "type": 1,"dbname": "Идентификатор депозитарного счета","name": "Номер депозитарного счета","shortname": "Депозитарный счет","searchable": true,"sortable": true,"link": "account" + } + , + {"code": "tradingClearingRegistryType", + "type": 12,"dbname": "Код торгово-клирингового регистра","name": "Тип торгово-клирингового регистра","shortname": "Тип ТКР","searchable": true,"sortable": true,"link": "tradingClearingRegistryType" + } + , + {"code": "tradingClearingRegistryLevel", + "type": 12,"dbname": "Код торгово-клирингового регистра","name": "Уровень торгово-клирингового регистра","shortname": "Уровень ТКР","searchable": true,"sortable": true,"visible": false,"link": "tradingClearingRegistryLevel" + } + , + {"code": "tradingClearingRegistryPurpose", + "type": 12,"dbname": "Код области применения","name": "Область применения","shortname": "Область","searchable": true,"sortable": true,"link": "tradingClearingRegistryPurpose" + } + , + {"code": "status", + "type": 12,"dbname": "Код статуса","name": "Наименование статуса","shortname": "Статус","searchable": true,"sortable": true,"link": "serviceStatus" + } + , + {"code": "createdAt", + "field": "created","type": 4,"webtype": "5","dbname": "Дата-время создания записи","name": "Время создания записи","shortname": "Создано","searchable": true,"sortable": true,"ignore": true + } + , + {"code": "updatedAt", + "field": "updated","type": 4,"webtype": "5","dbname": "Дата-время изменения записи","name": "Время изменения записи","shortname": "Изменено","searchable": true,"sortable": true,"ignore": true + } + ] + + } + , + "registry": { + + "name": "Регистр активов, обязательств и требований УК", + + "destination": "registries", + + "class": "ru.clearing.classes.statics.data.registry.Registry", + + "logUpdates": "true", + + "table": "registry", + + "fields": [ + {"code": "companyId", + "type": 1,"dbname": "Идентификатор участника","name": "Наименование участника","shortname": "Участник","searchable": true,"sortable": true,"visible": true,"link": "company" + } + , + {"code": "tradingCode", + "type": 2,"length": 255,"name": "Торговый код участника","shortname": "Торговый код","searchable": true,"sortable": true,"visible": true + } + , + {"code": "clearingCode", + "type": 2,"length": 255,"name": "Клиринговый код участника","shortname": "Клиринговый код","searchable": true,"sortable": true,"visible": true + } + , + {"code": "shortName", + "type": 2,"length": 255,"name": "Краткое наименование компании","shortname": "Компания","searchable": true,"sortable": true,"visible": true + } + , + {"code": "fullName", + "type": 2,"length": 255,"name": "Полное наименование участника","shortname": "Наименование участника","searchable": true,"sortable": true,"visible": true + } + , + {"code": "accountId", + "type": 1,"dbname": "Идентификатор счета","name": "Номер счета","shortname": "Счет","searchable": true,"sortable": true,"link": "account","ignore": true + } + , + {"code": "accountType", + "type": 12,"dbname": "Код типа счета","name": "Тип счета","shortname": "Тип счета","searchable": true,"sortable": true,"link": "accountType" + } + , + {"code": "account", + "type": 2,"length": 50,"name": "Номер счета","shortname": "Счет","searchable": true,"sortable": true,"visible": true + } + , + {"code": "registryDesignation", + "type": 12,"dbname": "Код назначения","name": "Назначение","shortname": "Назначение","searchable": true,"sortable": true,"link": "registryDesignation" + } + , + {"code": "registryInstrumentType", + "type": 12,"dbname": "Код типа инструмента","name": "Тип инструмента","shortname": "Тип инструмента","searchable": true,"sortable": true,"link": "registryInstrumentType" + } + , + {"code": "registryCapacity", + "type": 12,"dbname": "Код принадлежности регистра","name": "Принадлежность регистра","shortname": "Принадлежность","searchable": true,"sortable": true,"visible": true,"link": "registryCapacity" + } + , + {"code": "registryUnit", + "type": 12,"dbname": "Код части регистра","name": "Часть регистра","shortname": "Часть регистра","searchable": true,"sortable": true,"link": "registryUnit" + } + , + {"code": "registryCode", + "type": 12,"dbname": "Код регистра","name": "Описание регистра","shortname": "Код регистра","searchable": true,"sortable": true,"link": "registryCode","linkCode": "code" + } + , + {"code": "tradingClearingRegistryId", + "type": 1,"dbname": "Идентификатор торгово-клирингового регистра","name": "Торгово-клиринговый регистр","shortname": "Торгово-клиринговый регистр","searchable": true,"sortable": true,"link": "tradingClearingRegistry","ignore": true + } + , + {"code": "tradingClearingRegistry", + "type": 2,"length": 50,"name": "Торгово-клиринговый регистр","shortname": "Торгово-клиринговый регистр","searchable": true,"sortable": true + } + , + {"code": "registryStatus", + "type": 12,"dbname": "Код статуса","name": "Наименование статуса","shortname": "Статус","searchable": true,"sortable": true,"link": "registryStatus" + } + , + {"code": "securityId", + "type": 1,"dbname": "Идентификатор инструмента","name": "Наименование инструмента","shortname": "Инструмент","searchable": false,"sortable": true,"visible": true,"link": "security","linkCode": "shortName" + } + , + {"code": "balance", + "type": 10,"name": "Текущий баланс","shortname": "Баланс","searchable": true,"sortable": true,"visible": true + } + , + {"code": "openBalance", + "type": 10,"name": "Начальная сумма после расчетной организации","shortname": "Начальный баланс","searchable": true,"sortable": true,"visible": true + } + , + {"code": "closeBalance", + "type": 10,"name": "Конечная сумма остатков ден. средств на счете","shortname": "Конечный баланс","searchable": true,"sortable": true,"visible": true + } + , + {"code": "credit", + "type": 10,"name": "Зачисления","shortname": "Зачисления","searchable": true,"sortable": true,"visible": true + } + , + {"code": "debit", + "type": 10,"name": "Списания","shortname": "Списания","searchable": true,"sortable": true,"visible": true + } + , + {"code": "settledCredit", + "type": 10,"name": "Зачисления по расчетам","shortname": "Зачисления","searchable": true,"sortable": true,"visible": true + } + , + {"code": "settledDebit", + "type": 10,"name": "Списания по расчетам","shortname": "Списания","searchable": true,"sortable": true,"visible": true + } + , + {"code": "checkBalance", + "type": 10,"name": "Сверочный баланс","shortname": "Сверочный баланс","searchable": true,"sortable": true,"visible": true + } + , + {"code": "diffBalance", + "type": 10,"name": "Расхождение в балансе","shortname": "Расхождения","searchable": true,"sortable": true,"visible": true + } + , + {"code": "planBalance", + "type": 10,"name": "Плановый баланс","shortname": "Плановый баланс","searchable": true,"sortable": true,"visible": true + } + , + {"code": "balanceDimension", + "type": 12,"dbname": "Код единицы измерения","name": "Наименование единицы измерения","shortname": "Единица измерения","searchable": true,"sortable": true,"link": "balanceDimension" + } + , + {"code": "settlementDate", + "type": 6,"name": "Дата расчета","shortname": "Расчет","searchable": true,"sortable": true + } + , + {"code": "settlementCode", + "type": 2,"length": 12,"name": "Код расчетов при размещении","shortname": "Код расчетов при размещении","searchable": true,"sortable": true,"visible": false,"ignore": true + } + , + {"code": "tradingDate", + "type": 6,"name": "Дата торгов","shortname": "Торгов","searchable": true,"sortable": true + } + , + {"code": "clearingDate", + "type": 6,"name": "Дата клиринга","shortname": "Клиринг","searchable": true,"sortable": true + } + , + {"code": "refundDate", + "type": 6,"name": "Дата возврата депозита","shortname": "Возврат депозита","searchable": true,"sortable": true + } + , + {"code": "valueDate", + "type": 6,"name": "Дата оплаты вклада депозита","shortname": "Дата вклада","searchable": true,"sortable": true + } + , + {"code": "price", + "type": 10,"name": "Ставка по депозиту","shortname": "Ставка","visible": true,"searchable": true,"sortable": true + } + , + {"code": "contract", + "type": 2,"length": 255,"name": "Продукт","shortname": "Продукт","searchable": true,"sortable": true,"visible": true + } + , + {"code": "counterPartyId", + "type": 1,"dbname": "Идентификатор компании-партнера","name": "Наименование компании-партнера, с которым заключена сделка","shortname": "Партнер","visible": false,"searchable": true,"sortable": true,"link": "company" + } + , + {"code": "comment", + "type": 2,"length": 255,"name": "Комментарий","shortname": "Комментарий","searchable": true,"sortable": true + } + , + {"code": "parentId", + "type": 1,"dbname": "Идентификатор родительского депозита","name": "Родительский депозит","shortname": "Депозит","searchable": false,"sortable": false + } + , + {"code": "groupId", + "type": 1,"dbname": "Идентификатор группы связанных регистров","name": "Идентификатор группы","shortname": "Группа","searchable": false,"sortable": false + } + , + {"code": "sessionId", + "type": 1,"dbname": "Идентификатор клиринговой сессии","name": "Клиринговая сессия","shortname": "Сессия","visible": true,"searchable": true,"sortable": true,"link": "session" + } + , + {"code": "paymentId", + "type": 1,"dbname": "Идентификатор платежа","name": "Платеж","shortname": "Платеж","searchable": true,"sortable": true + } + , + {"code": "refundPaymentId", + "type": 1,"dbname": "Идентификатор обратного платежа","name": "Обратный платежа","shortname": "Обратный платеж","searchable": true,"sortable": true + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "createdAt", + "field": "created","type": 4,"name": "Дата и время создания записи","shortname": "Создано","searchable": true,"sortable": true,"ignore": true + } + , + {"code": "updatedAt", + "field": "updated","type": 4,"name": "Дата и время изменения записи","shortname": "Изменено","searchable": true,"sortable": true,"ignore": true + } + ] + + } + , + "account": { + + "name": "Счета", + + "destination": "accounting/accounts", + + "class": "ru.clearing.classes.statics.data.account.Account", + + "logUpdates": "true", + + "table": "account", + + "fields": [ + {"code": "account", + "type": 2,"length": 50,"name": "Номер счета","shortname": "Счет","searchable": true,"sortable": true,"visible": true + } + , + {"code": "accountType", + "type": 12,"dbname": "Код типа счета","name": "Наименование типа счета","shortname": "Тип","searchable": true,"sortable": true,"visible": true,"link": "accountType" + } + , + {"code": "relationId", + "type": 1,"dbname": "Идентификатор договорных отношений","name": "Договорные отношения","shortname": "Договор","searchable": true,"sortable": true,"visible": true,"link": "relation","ignore": true + } + , + {"code": "status", + "type": 12,"dbname": "Код статуса","name": "Наименование статуса","shortname": "Статус","searchable": true,"sortable": true,"visible": true,"link": "serviceStatus" + } + , + {"code": "processingSign", + "type": 12,"dbname": "Код признака обработки счета","name": "Признак обработки счета","shortname": "Обработка счета","searchable": true,"sortable": true,"visible": true,"link": "allowed" + } + , + {"code": "companyId", + "type": 1,"dbname": "Идентификатор компании","name": "Наименование компании","shortname": "Компания","searchable": true,"sortable": true,"visible": true,"link": "company","linkCode": "shortName" + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "createdAt", + "field": "created","type": 4,"webtype": "5","dbname": "Дата-время создания записи","name": "Время создания записи","shortname": "Создано","searchable": true,"sortable": true + } + , + {"code": "updatedAt", + "field": "updated","type": 4,"webtype": "5","dbname": "Дата-время изменения записи","name": "Время изменения записи","shortname": "Изменено","searchable": true,"sortable": true + } + ] + + } + , + "relation": { + + "name": "Доступ в секцию", + + "destination": "relations", + + "class": "ru.clearing.classes.statics.data.company.relation.Relation", + + "logUpdates": "true", + + "table": "relation", + + "fields": [ + {"code": "consumerId", + "type": 1,"dbname": "Идентификатор компании пользователя услуги","name": "Наименование компании пользователя услуги","shortname": "Потребитель","searchable": true,"sortable": true,"visible": true,"link": "company" + } + , + {"code": "supplierId", + "type": 1,"dbname": "Идентификатор компании поставщика услуги","name": "Наименование компании поставщика услуги","shortname": "Поставщик","searchable": true,"sortable": true,"visible": true,"link": "company" + } + , + {"code": "serviceStatus", + "type": 12,"dbname": "Код статуса","name": "Наименование статуса","shortname": "Статус","searchable": true,"sortable": true,"visible": true,"link": "serviceStatus" + } + , + {"code": "service", + "type": 12,"dbname": "Код услуги","name": "Наименование услуги","shortname": "Услуга","searchable": true,"sortable": true,"visible": true,"link": "service" + } + , + {"code": "serviceProduct", + "type": 12,"dbname": "Код продукта","name": "Наименование продукта","shortname": "Продукт","searchable": true,"sortable": true,"visible": true,"link": "serviceProduct" + } + , + {"code": "comment", + "type": 2,"length": 255,"name": "Текст причины","shortname": "Причина","searchable": true,"sortable": true,"visible": true + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "createdAt", + "field": "created","type": 4,"webtype": "5","dbname": "Дата-время создания записи","name": "Время создания записи","shortname": "Создано","searchable": true,"sortable": true + } + , + {"code": "updatedAt", + "field": "updated","type": 4,"webtype": "5","dbname": "Дата-время изменения записи","name": "Время изменения записи","shortname": "Изменено","searchable": true,"sortable": true + } + ] + ,"actions":[ + {"method":"put", + + "name": "Изменение статуса договорных отношений", + + "confirmation": "serviceStatus,comment", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "relation","linkCode": "id","required": true + } + , + {"code": "serviceStatus", + "type": 12,"name": "Наименование статуса","shortname": "Статус","link": "serviceStatus","required": true + } + , + {"code": "comment", + "type": 2,"length": 255,"name": "Текст причины","shortname": "Причина" + } + ] + } + ] + } + , + "bankAccount": { + + "name": "Счета вывода средств из ПРЦ", + + "destination": "accounting/bank-accounts", + + "class": "ru.clearing.classes.statics.data.account.BankAccount", + + "logUpdates": "true", + + "table": "bank_account", + + "fields": [ + {"code": "accountId", + "type": 1,"dbname": "Идентификатор счета","name": "Номер счета","shortname": "Счет","searchable": true,"sortable": true,"link": "account","ignore": true + } + , + {"code": "bankIdentificationCode", + "type": 2,"length": 255,"name": "Банковский идентификационный код (БИК)","shortname": "БИК","searchable": true,"sortable": true,"visible": true + } + , + {"code": "bankName", + "type": 2,"length": 255,"name": "Наименование банка","shortname": "Наименование","searchable": true,"sortable": true,"visible": true + } + , + {"code": "correspondentAccount", + "type": 2,"length": 255,"name": "Корреспондентский счет","shortname": "Корр. счет","searchable": true,"sortable": true,"visible": true + } + , + {"code": "correspondentAccountName", + "type": 2,"length": 255,"name": "Наименование корреспондентского счета","shortname": "Наименование корр. счета","searchable": true,"sortable": true,"visible": true + } + , + {"code": "currency", + "type": 12,"dbname": "Код валюты","name": "Код валюты","shortname": "Валюта","searchable": true,"sortable": true,"visible": true,"link": "currencyCode","linkCode": "code" + } + , + {"code": "destination", + "type": 2,"length": 255,"name": "Назначение платежа","shortname": "Назначение платежа","searchable": true,"sortable": true,"visible": true + } + , + {"code": "iban", + "type": 2,"length": 255,"name": "Международный номер банковского счета","shortname": "Международный номер банковского счета","searchable": true,"sortable": true,"visible": true + } + , + {"code": "internationalTransferSign", + "type": 12,"dbname": "Код доступности международных переводов","name": "Доступность международных переводов","shortname": "Международные переводы","searchable": true,"sortable": true,"visible": true,"link": "allowed" + } + , + {"code": "swiftCode", + "type": 2,"length": 255,"name": "Код SWIFT","shortname": "SWIFT","searchable": true,"sortable": true,"visible": true + } + , + {"code": "taxpayerIdentificationNumber", + "type": 2,"length": 255,"name": "Идентификационный номер налогоплательщика (ИНН)","shortname": "ИНН","searchable": true,"sortable": true,"visible": true + } + , + {"code": "taxRegistrationReasonCode", + "type": 2,"length": 255,"name": "Код причины постановки (КПП)","shortname": "КПП","searchable": true,"sortable": true,"visible": true + } + , + {"code": "account", + "type": 2,"length": 50,"name": "Номер счета","shortname": "Счет","searchable": true,"sortable": true,"visible": true + } + , + {"code": "companyId", + "type": 1,"dbname": "Идентификатор компании","name": "Наименование компании","shortname": "Компания","searchable": true,"sortable": true,"visible": true,"link": "company","linkCode": "shortName" + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + ] + ,"actions":[ + {"method":"post", + + "name": "Добавление счета вывода средств из ПРЦ", + + "confirmation": "currency,bankIdentificationCode,bankName,correspondentAccount,correspondentAccountName,taxpayerIdentificationNumber,taxRegistrationReasonCode,account,destination", + + "fields": [ + {"code": "currency", + "type": 12,"name": "Код валюты","shortname": "Валюта","required": true,"link": "currencyCode","linkCode": "code" + } + , + {"code": "bankIdentificationCode", + "type": 2,"length": 255,"name": "Банковский идентификационный код (БИК)","shortname": "БИК","required": true + } + , + {"code": "bankName", + "type": 2,"length": 255,"name": "Наименование банка","shortname": "Наименование","required": true + } + , + {"code": "correspondentAccount", + "type": 2,"length": 255,"name": "Корреспондентский счет","shortname": "Корр. счет" + } + , + {"code": "correspondentAccountName", + "type": 2,"length": 255,"name": "Наименование корреспондентского счета","shortname": "Наименование корр. счета" + } + , + {"code": "taxpayerIdentificationNumber", + "type": 2,"length": 255,"name": "Идентификационный номер налогоплательщика (ИНН)","shortname": "ИНН" + } + , + {"code": "taxRegistrationReasonCode", + "type": 2,"length": 255,"name": "Код причины постановки (КПП)","shortname": "КПП" + } + , + {"code": "account", + "type": 2,"length": 50,"name": "Номер счета","shortname": "Счет","required": true + } + , + {"code": "destination", + "type": 2,"length": 255,"name": "Назначение платежа","shortname": "Назначение платежа","required": true + } + , + {"code": "companyId", + "type": 1,"name": "Компания","shortname": "Компания","link": "company","linkCode": "shortName","required": true + } + ] + } + , + {"method":"put", + + "name": "Изменение счета вывода средств из ПРЦ", + + "confirmation": "currency,bankIdentificationCode,bankName,correspondentAccount,correspondentAccountName,taxpayerIdentificationNumber,taxRegistrationReasonCode,account,destination", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "bankAccount","linkCode": "id","required": true + } + , + {"code": "bankIdentificationCode", + "type": 2,"length": 255,"name": "Банковский идентификационный код (БИК)","shortname": "БИК" + } + , + {"code": "bankName", + "type": 2,"length": 255,"name": "Наименование банка","shortname": "Наименование" + } + , + {"code": "correspondentAccount", + "type": 2,"length": 255,"name": "Корреспондентский счет","shortname": "Корр. счет" + } + , + {"code": "correspondentAccountName", + "type": 2,"length": 255,"name": "Наименование корреспондентского счета","shortname": "Наименование корр. счета" + } + , + {"code": "currency", + "type": 12,"name": "Код валюты","shortname": "Валюта","link": "currencyCode","linkCode": "code" + } + , + {"code": "destination", + "type": 2,"length": 255,"name": "Назначение платежа","shortname": "Назначение платежа" + } + , + {"code": "taxpayerIdentificationNumber", + "type": 2,"length": 255,"name": "Идентификационный номер налогоплательщика (ИНН)","shortname": "ИНН" + } + , + {"code": "taxRegistrationReasonCode", + "type": 2,"length": 255,"name": "Код причины постановки (КПП)","shortname": "КПП" + } + , + {"code": "account", + "type": 2,"length": 50,"name": "Номер счета","shortname": "Счет" + } + ] + } + , + {"method":"delete", + + "name": "Блокировка счета вывода средств из ПРЦ", + + "confirmation": "currency,bankIdentificationCode,correspondentAccount,taxpayerIdentificationNumber,taxRegistrationReasonCode,account", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "bankAccount","linkCode": "id","required": true + } + ] + } + ] + } + , + "informationAccount": { + + "name": "Регистры", + + "destination": "accounting/information-accounts", + + "class": "ru.clearing.classes.statics.data.account.InformationAccount", + + "logUpdates": "true", + + "table": "information_account", + + "fields": [ + {"code": "accountId", + "type": 1,"dbname": "Идентификатор информационного счета","name": "Номер информационного счета","shortname": "Информационный счет","searchable": true,"sortable": true,"visible": true,"link": "account","linkCode": "account" + } + , + {"code": "clearingAccountId", + "type": 1,"dbname": "Идентификатор аналитического счета","name": "Номер аналитического счета","shortname": "Аналитический счет","searchable": true,"sortable": true,"visible": true,"link": "account","linkCode": "account" + } + , + {"code": "companyId", + "type": 1,"dbname": "Идентификатор компании","name": "Наименование компании","shortname": "Компания","searchable": true,"sortable": true,"visible": true,"link": "company","linkCode": "shortName" + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + ] + + } + , + "depoAccount": { + + "name": "Депозитарные счета", + + "destination": "accounting/depo-accounts", + + "class": "ru.clearing.classes.statics.data.account.DepoAccount", + + "logUpdates": "true", + + "table": "depo_account", + + "fields": [ + {"code": "accountId", + "type": 1,"dbname": "Идентификатор счета","name": "Номер счета","shortname": "Счет","searchable": true,"sortable": true,"visible": true,"link": "account","linkCode": "account" + } + , + {"code": "depoAccountType", + "type": 12,"dbname": "Код типа счета","name": "Наименование типа счета","shortname": "Тип","searchable": true,"sortable": true,"visible": true,"link": "depoAccountType" + } + , + {"code": "companyId", + "type": 1,"dbname": "Идентификатор компании","name": "Наименование компании","shortname": "Компания","searchable": true,"sortable": true,"visible": true,"link": "company","linkCode": "shortName" + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + ] + + } + , + "clearingAccount": { + + "name": "Торгово-Банковские счета", + + "destination": "accounting/clearing-accounts", + + "class": "ru.clearing.classes.statics.data.account.ClearingAccount", + + "logUpdates": "true", + + "table": "clearing_account", + + "fields": [ + {"code": "accountId", + "type": 1,"dbname": "Идентификатор счета","name": "Номер счета","shortname": "Счет","searchable": true,"sortable": true,"visible": true,"link": "account","linkCode": "account" + } + , + {"code": "clearingAccountType", + "type": 12,"dbname": "Код типа счета","name": "Наименование типа счета","shortname": "Тип","searchable": true,"sortable": true,"visible": true,"link": "clearingAccountType" + } + , + {"code": "companyId", + "type": 1,"dbname": "Идентификатор компании","name": "Наименование компании","shortname": "Компания","searchable": true,"sortable": true,"visible": true,"link": "company","linkCode": "shortName" + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + ] + + } + , + "sDf51": { + + "name": "ДФ-51 Запрос остатков по всем счетам", + + "class": "ru.clearing.classes.statics.data.sdf.SDf51", + + "table": "s_df_51", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "number", + "type": 2,"length": 10,"name": "Номер запроса остатков по счетам","shortname": "Номер запроса","searchable": true,"sortable": true,"visible": true + } + , + {"code": "datetime", + "type": 2,"length": 13,"name": "Дата и время сообщения","shortname": "Дата и время сообщения","searchable": true,"sortable": true + } + , + {"code": "generationTime", + "type": 4,"name": "Дата и время создания записи","shortname": "Дата и время создания","searchable": true,"sortable": true + } + , + {"code": "generationId", + "type": 1,"name": "Идентификатор взаимодействия","shortname": "ID взаимодействия","searchable": true,"sortable": true + } + ] + + } + , + "sDf52": { + + "name": "ДФ-52 Из ПРЦ в КС Информация о состоянии счета (блокировка/разблокировка/закрытие/открытие)", + + "class": "ru.clearing.classes.statics.data.sdf.SDf52", + + "table": "s_df_52", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "account", + "type": 2,"length": 25,"name": "Код счета участника клиринга","shortname": "Код счета УК","searchable": true,"sortable": true,"visible": true + } + , + {"code": "acc_name", + "type": 2,"length": 30,"name": "Наименование участника клиринга","shortname": "Наименование УК","searchable": true,"sortable": true,"visible": true + } + , + {"code": "deal", + "type": 2,"length": 4,"name": "Биржевой код участника клиринга","shortname": "Биржевой код УК","searchable": true,"sortable": true,"visible": true + } + , + {"code": "date", + "type": 2,"lenght": "8","name": "Дата изменения состояния счета","shortname": "Дата изменения состояния счета","searchable": true,"sortable": true + } + , + {"code": "status", + "type": 3,"name": "Статус счета","shortname": "Статус","searchable": true,"sortable": true,"visible": true + } + , + {"code": "fileName", + "type": 2,"length": 255,"name": "Наименование входящего файла","shortname": "Наименование файла","searchable": true,"sortable": true + } + , + {"code": "generationTime", + "type": 4,"name": "Дата и время обработки файла","shortname": "Дата и время обработки","searchable": true,"sortable": true + } + , + {"code": "generationId", + "type": 1,"name": "Идентификатор взаимодействия","shortname": "ID взаимодействия","searchable": true,"sortable": true + } + ] + + } + , + "sDf53": { + + "name": "ДФ-53 Квитанция о получении информации о состоянии счета (блокировка/разблокировка/закрытие/открытие)", + + "class": "ru.clearing.classes.statics.data.sdf.SDf53", + + "table": "s_df_53", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "account", + "type": 2,"length": 25,"name": "Код счета участника клиринга","shortname": "Код счета УК","searchable": true,"sortable": true,"visible": true + } + , + {"code": "deal", + "type": 2,"length": 4,"name": "Биржевой код участника клиринга","shortname": "Биржевой код УК","searchable": true,"sortable": true,"visible": true + } + , + {"code": "status", + "type": 3,"name": "Статус счета","shortname": "Статус","searchable": true,"sortable": true,"visible": true + } + , + {"code": "result", + "type": 10,"name": "Код завершения операции","shortname": "Код завершения операции","searchable": true,"sortable": true + } + , + {"code": "generationTime", + "type": 4,"name": "Дата и время создания записи","shortname": "Дата и время создания","searchable": true,"sortable": true + } + , + {"code": "generationId", + "type": 1,"name": "Идентификатор взаимодействия","shortname": "ID взаимодействия","searchable": true,"sortable": true + } + , + {"code": "inSDfId", + "type": 1,"name": "Идентификатор соответствующей записи из таблицы-источника","shortname": "Входящая запись","searchable": true,"sortable": true + } + ] + + } + , + "plannerTemplate": { + + "name": "Шаблон расписания операционного дня", + + "destination": "schedule/planner-templates", + + "class": "ru.clearing.classes.statics.data.scheduler.PlannerTemplate", + + "table": "planner_template", + + "fields": [ + {"code": "task", + "type": 12,"dbname": "Код задачи","name": "Наименование задачи","shortname": "Задача","searchable": false,"sortable": false,"visible": true,"link": "task" + } + , + {"code": "taskTime", + "type": 5,"name": "Время задачи","shortname": "Время задачи","searchable": false,"sortable": false,"visible": true + } + , + {"code": "taskStatus", + "type": 12,"dbname": "Код статуса","name": "Наименование статуса","shortname": "Статус","searchable": false,"sortable": true,"visible": true,"link": "taskStatus" + } + , + {"code": "companyId", + "type": 1,"dbname": "Идентификатор компании","name": "Наименование компании","shortname": "Компания","searchable": false,"sortable": false,"visible": true,"link": "company","linkCode": "shortName" + } + , + {"code": "securityId", + "type": 1,"dbname": "Идентификатор инструмента","name": "Наименование инструмента","shortname": "Инструмент","searchable": false,"sortable": true,"visible": true,"link": "security","linkCode": "shortName" + } + , + {"code": "id", + "type": 1,"name": "Идентификатор","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "createdAt", + "field": "created","type": 4,"webtype": "5","dbname": "Дата-время создания записи","name": "Время создания записи","shortname": "Создано","searchable": true,"sortable": true + } + , + {"code": "updatedAt", + "field": "updated","type": 4,"webtype": "5","dbname": "Дата-время изменения записи","name": "Время изменения записи","shortname": "Изменено","searchable": true,"sortable": true + } + ] + ,"actions":[ + {"method":"post", + + "name": "Новый шаблон расписания операционного дня", + + "fields": [ + {"code": "task", + "type": 12,"name": "Наименование задачи","shortname": "Задача","link": "task","required": true + } + , + {"code": "taskTime", + "type": 5,"name": "Время задачи","shortname": "Время задачи","required": true + } + , + {"code": "taskStatus", + "type": 12,"name": "Наименование статуса","shortname": "Статус","link": "taskStatus","required": true + } + , + {"code": "companyId", + "type": 1,"name": "Наименование компании","shortname": "Компания","link": "company","linkCode": "shortName" + } + , + {"code": "securityId", + "type": 1,"name": "Наименование инструмента","shortname": "Инструмент","link": "security","linkCode": "shortName" + } + ] + } + , + {"method":"put", + + "name": "Изменение шаблона расписания операционного дня", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "plannerTemplate","linkCode": "id","required": true + } + , + {"code": "task", + "type": 12,"name": "Наименование задачи","shortname": "Задача","link": "task" + } + , + {"code": "taskTime", + "type": 5,"name": "Время задачи","shortname": "Время задачи" + } + , + {"code": "taskStatus", + "type": 12,"name": "Наименование статуса","shortname": "Статус","link": "taskStatus" + } + , + {"code": "companyId", + "type": 1,"name": "Наименование компании","shortname": "Компания","link": "company","linkCode": "shortName" + } + , + {"code": "securityId", + "type": 1,"name": "Наименование инструмента","shortname": "Инструмент","link": "security","linkCode": "shortName" + } + ] + } + , + {"method":"delete", + + "name": "Блокировка шаблона расписания операционного дня", + + "confirmation": "task,taskTime,taskStatus,companyId,securityId", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "plannerTemplate","linkCode": "id","required": true + } + ] + } + ] + } + , + "clearingCalendar": { + + "name": "Рабочие и нерабочие дни", + + "destination": "schedule/clearing-calendars", + + "class": "ru.clearing.classes.statics.data.scheduler.ClearingCalendar", + + "table": "clearing_calendar", + + "fields": [ + {"code": "clearingDate", + "type": 6,"name": "Дата","shortname": "Дата","searchable": false,"sortable": false,"visible": true + } + , + {"code": "companyId", + "type": 1,"dbname": "Идентификатор компании","name": "Наименование компании","shortname": "Компания","searchable": false,"sortable": false,"visible": true,"link": "company","linkCode": "shortName" + } + , + {"code": "dayStatus", + "type": 12,"dbname": "Код статуса","name": "Статус","shortname": "Статус","searchable": false,"sortable": true,"visible": true,"link": "dayStatus" + } + , + {"code": "id", + "type": 1,"name": "Идентификатор","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "createdAt", + "field": "created","type": 4,"webtype": "5","dbname": "Дата-время создания записи","name": "Время создания записи","shortname": "Создано","searchable": true,"sortable": true + } + , + {"code": "updatedAt", + "field": "updated","type": 4,"webtype": "5","dbname": "Дата-время изменения записи","name": "Время изменения записи","shortname": "Изменено","searchable": true,"sortable": true + } + ] + ,"actions":[ + {"method":"post", + + "name": "Добавление записи в календарь", + + "fields": [ + {"code": "clearingDate", + "type": 6,"name": "Дата","shortname": "Дата","required": true + } + , + {"code": "dayStatus", + "type": 12,"name": "Статус","shortname": "Статус","link": "dayStatus","required": true + } + , + {"code": "companyId", + "type": 1,"name": "Наименование компании","shortname": "Компания","link": "company","linkCode": "shortName" + } + ] + } + , + {"method":"put", + + "name": "Изменение записи в календаре", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "clearingCalendar","linkCode": "id","required": true + } + , + {"code": "clearingDate", + "type": 6,"name": "Дата","shortname": "Дата" + } + , + {"code": "dayStatus", + "type": 12,"name": "Статус","shortname": "Статус","link": "dayStatus" + } + , + {"code": "companyId", + "type": 1,"name": "Наименование компании","shortname": "Компания","link": "company","linkCode": "shortName" + } + ] + } + , + {"method":"delete", + + "name": "Блокировка записи в календаре", + + "confirmation": "clearingDate,dayStatus,companyId", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "clearingCalendar","linkCode": "id","required": true + } + ] + } + ] + } + , + "planner": { + + "name": "Расписание", + + "destination": "schedule/planners", + + "class": "ru.clearing.classes.statics.data.scheduler.Planner", + + "table": "planner", + + "fields": [ + {"code": "task", + "type": 12,"dbname": "Код задачи","name": "Наименование задачи","shortname": "Задача","searchable": false,"sortable": false,"visible": true,"link": "task" + } + , + {"code": "taskTime", + "type": 5,"name": "Время задачи","shortname": "Время задачи","searchable": false,"sortable": false,"visible": true + } + , + {"code": "clearingDate", + "type": 6,"name": "Дата задачи","shortname": "Дата задачи","searchable": false,"sortable": false,"visible": true + } + , + {"code": "market", + "type": 12,"dbname": "Код секции","name": "Секция","shortname": "Секция","searchable": false,"sortable": false,"visible": true,"link": "market","linkCode": "name" + } + , + {"code": "taskStatus", + "type": 12,"dbname": "Код статуса","name": "Наименование статуса","shortname": "Статус","searchable": false,"sortable": true,"visible": true,"link": "taskStatus" + } + , + {"code": "companyId", + "type": 1,"dbname": "Идентификатор компании","name": "Наименование компании","shortname": "Компания","searchable": false,"sortable": false,"visible": true,"link": "company","linkCode": "shortName" + } + , + {"code": "securityId", + "type": 1,"dbname": "Идентификатор инструмента","name": "Наименование инструмента","shortname": "Инструмент","searchable": false,"sortable": true,"visible": true,"link": "security","linkCode": "shortName" + } + , + {"code": "id", + "type": 1,"name": "Идентификатор","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "createdAt", + "field": "created","type": 4,"webtype": "5","dbname": "Дата-время создания записи","name": "Время создания записи","shortname": "Создано","searchable": true,"sortable": true + } + , + {"code": "updatedAt", + "field": "updated","type": 4,"webtype": "5","dbname": "Дата-время изменения записи","name": "Время изменения записи","shortname": "Изменено","searchable": true,"sortable": true + } + ] + ,"actions":[ + {"method":"post", + + "name": "Новое расписание", + + "fields": [ + {"code": "task", + "type": 12,"name": "Наименование задачи","shortname": "Задача","link": "task","required": true + } + , + {"code": "clearingDate", + "type": 6,"name": "Дата задачи","shortname": "Дата задачи","required": true + } + , + {"code": "taskTime", + "type": 5,"name": "Время задачи","shortname": "Время задачи","required": true + } + , + {"code": "market", + "type": 12,"name": "Секция","shortname": "Секция","link": "market","linkCode": "name" + } + , + {"code": "taskStatus", + "type": 12,"name": "Наименование статуса","shortname": "Статус","link": "taskStatus","required": true + } + , + {"code": "companyId", + "type": 1,"name": "Наименование компании","shortname": "Компания","link": "company","linkCode": "shortName" + } + , + {"code": "securityId", + "type": 1,"name": "Наименование инструмента","shortname": "Инструмент","link": "security","linkCode": "shortName" + } + ] + } + , + {"method":"put", + + "name": "Изменение расписания", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "planner","required": true,"linkCode": "id" + } + , + {"code": "task", + "type": 12,"name": "Наименование задачи","shortname": "Задача","link": "task" + } + , + {"code": "taskTime", + "type": 5,"name": "Время задачи","shortname": "Время задачи" + } + , + {"code": "clearingDate", + "type": 6,"name": "Дата задачи","shortname": "Дата задачи" + } + , + {"code": "market", + "type": 12,"name": "Секция","shortname": "Секция","link": "market","linkCode": "name" + } + , + {"code": "taskStatus", + "type": 12,"name": "Наименование статуса","shortname": "Статус","link": "taskStatus" + } + , + {"code": "companyId", + "type": 1,"name": "Наименование компании","shortname": "Компания","link": "company","linkCode": "shortName" + } + , + {"code": "securityId", + "type": 1,"name": "Наименование инструмента","shortname": "Инструмент","link": "security","linkCode": "shortName" + } + ] + } + , + {"method":"delete", + + "name": "Блокировка расписания", + + "confirmation": "task,taskTime,clearingDate,market,taskStatus,companyId,securityId", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "planner","linkCode": "id","required": true + } + ] + } + ] + } + , + "plannerAllToday": { + + "name": "Расписание на текущий день", + + "destination": "schedule/planners-all-today", + + "class": "ru.clearing.classes.statics.data.scheduler.PlannerAllToday", + + "table": "planner_all_today", + + "fields": [ + {"code": "task", + "type": 12,"dbname": "Код задачи","name": "Наименование задачи","shortname": "Задача","searchable": true,"sortable": true,"visible": true,"link": "task" + } + , + {"code": "taskTime", + "type": 5,"name": "Время","shortname": "Время","searchable": true,"sortable": true,"visible": true + } + , + {"code": "clearingDate", + "type": 6,"name": "Дата","shortname": "Дата","searchable": true,"sortable": true,"visible": true + } + , + {"code": "market", + "type": 12,"dbname": "Код секции","name": "Наименование секции","shortname": "Секция","searchable": true,"sortable": true,"visible": true,"link": "market","linkCode": "name" + } + , + {"code": "taskStatus", + "type": 12,"dbname": "Код статуса","name": "Наименование статуса","shortname": "Статус","searchable": true,"sortable": true,"visible": true,"link": "taskStatus" + } + , + {"code": "companyId", + "type": 1,"dbname": "Идентификатор компании","name": "Наименование компании","shortname": "Компания","searchable": false,"sortable": false,"visible": true,"link": "company","linkCode": "shortName" + } + , + {"code": "securityId", + "type": 1,"dbname": "Идентификатор инструмента","name": "Наименование инструмента","shortname": "Инструмент","searchable": true,"sortable": true,"visible": true,"link": "security","linkCode": "shortName" + } + , + {"code": "parent", + "type": 12,"dbname": "Код источника записи расписания","name": "Источник записи расписания","shortname": "Источник","searchable": true,"sortable": true,"link": "parent" + } + , + {"code": "parentId", + "type": 1,"name": "Идентификатор записи в таблице-источнике","shortname": "ID источника","searchable": false,"sortable": false + } + , + {"code": "id", + "type": 1,"name": "Идентификатор","shortname": "ID","searchable": true,"sortable": true + } + ] + + } + , + "launcher": { + + "name": "Запуск задачи", + + "destination": "launchers", + + "class": "ru.clearing.classes.statics.data.scheduler.Launcher", + + "table": "launcher", + + "fields": [ + {"code": "senderId", + "type": 1,"dbname": "Идентификатор отправителя","name": "Наименование отправителя","shortname": "Отправитель","searchable": true,"sortable": true,"visible": true,"link": "userCls" + } + , + {"code": "task", + "type": 12,"dbname": "Код задачи","name": "Наименование задачи","shortname": "Задача","searchable": true,"sortable": true,"visible": true,"link": "task" + } + , + {"code": "id", + "type": 1,"name": "Идентификатор","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "createdAt", + "field": "created","type": 4,"webtype": "5","dbname": "Дата-время создания записи","name": "Время создания записи","shortname": "Создано","searchable": true,"sortable": true + } + , + {"code": "updatedAt", + "field": "updated","type": 4,"webtype": "5","dbname": "Дата-время изменения записи","name": "Время изменения записи","shortname": "Изменено","searchable": true,"sortable": true + } + ] + ,"actions":[ + {"method":"post", + + "destination": "GBAL", + + "group": "Обмен с расчетной организацией", + + "name": "Зачисление остатков (загрузка ДФ-57 и ДФ-01)", + + "fields": [] + } + , + {"method":"post", + + "destination": "ABLK", + + "group": "Обмен с расчетной организацией", + + "name": "Блокировка счета (загрузка ДФ-12)", + + "fields": [] + } + , + {"method":"post", + + "destination": "GALB", + + "group": "Обмен с расчетной организацией", + + "name": "Запрос остатков по всем счетам (экспорт ДФ-08)", + + "fields": [] + } + , + {"method":"post", + + "destination": "ADBL", + + "group": "Обмен с расчетной организацией", + + "name": "Дозачисление/списание остатков (загрузка ДФ-16)", + + "fields": [] + } + , + {"method":"post", + + "destination": "CORD", + + "group": "Обмен с расчетной организацией", + + "name": "Формирование сводного платежного поручения (экспорт ДФ-03/ДФ-11)", + + "fields": [] + } + , + {"method":"post", + + "destination": "CORC", + + "group": "Обмен с расчетной организацией", + + "name": "Получение подтверждения переводов (загрузка ДФ-04)", + + "fields": [] + } + , + {"method":"post", + + "destination": "CMBA", + + "group": "Обмен с расчетной организацией", + + "name": "Формирование распоряжения на перевод с ТБС (экспорт ДФ-11)", + + "fields": [] + } + , + {"method":"post", + + "destination": "GTRD", + + "group": "Обмен с Торговой системой", + + "name": "Получение сделок из Торговой системы", + + "fields": [] + } + , + {"method":"post", + + "destination": "GACA", + + "group": "Обмен с Торговой системой", + + "name": "Создание файла остатков CSV по клиринговым счетам", + + "fields": [] + } + , + {"method":"post", + + "destination": "GAIA", + + "group": "Обмен с Торговой системой", + + "name": "Создание файла остатков CSV по внутренним информационным счетам", + + "fields": [] + } + , + {"method":"post", + + "destination": "SCLR", + + "group": "Клиринг", + + "name": "Запуск клиринговой сессии", + + "confirmation": "companyId,securityId", + + "fields": [ + {"code": "companyId", + "type": 1,"name": "Наименование инициатора","shortname": "Инициатор","link": "company","linkCode": "shortName" + } + , + {"code": "securityId", + "type": 1,"name": "Наименование инструмента","shortname": "Инструмент","link": "security","linkCode": "shortName" + } + ] + } + , + {"method":"post", + + "destination": "SPRC", + + "group": "Клиринг", + + "name": "Запуск преклиринга", + + "fields": [] + } + , + {"method":"post", + + "destination": "SPOC", + + "group": "Клиринг", + + "name": "Запуск постклиринга", + + "fields": [] + } + , + {"method":"post", + + "destination": "GVER", + + "group": "Клиринг", + + "name": "Запуск сверки", + + "fields": [] + } + , + {"method":"post", + + "destination": "GCMR", + + "group": "Клиринг", + + "name": "Формирование реестра участников клиринга", + + "fields": [] + } + , + {"method":"post", + + "destination": "GBRR", + + "group": "Клиринг", + + "name": "Формирование реестра остатков денежных средств", + + "fields": [] + } + , + {"method":"post", + + "destination": "GORR", + + "group": "Клиринг", + + "name": "Формирование реестра распоряжений, направленных расчетной организации", + + "fields": [] + } + , + {"method":"post", + + "destination": "GSRR", + + "group": "Клиринг", + + "name": "Формирование реестра отправленных отчетов", + + "fields": [] + } + , + {"method":"post", + + "destination": "GREP", + + "group": "Клиринг", + + "name": "Формирование отчетности", + + "fields": [] + } + , + {"method":"post", + + "destination": "LIMM", + + "group": "Обмен с Торговой системой", + + "name": "Выгрузка в торговую систему остатков секции МКР", + + "fields": [] + } + , + {"method":"post", + + "destination": "LIMF", + + "group": "Обмен с Торговой системой", + + "name": "Выгрузка в торговую систему остатков Фондовой секции", + + "fields": [] + } + , + {"method":"post", + + "destination": "LIQU", + + "group": "Клиринг", + + "name": "иквидационная сессия по обязательтсвам участника", + + "fields": [] + } + , + {"method":"post", + + "destination": "STRM", + + "group": "Клиринг", + + "name": "Начало торговой сессии секции МКР", + + "fields": [] + } + , + {"method":"post", + + "destination": "ETRM", + + "group": "Клиринг", + + "name": "Завершение торговой сессии секции МКР", + + "fields": [] + } + , + {"method":"post", + + "destination": "SIPO", + + "group": "Клиринг", + + "name": "Начало торговой сессии по первичным торгам", + + "fields": [] + } + , + {"method":"post", + + "destination": "EIPO", + + "group": "Клиринг", + + "name": "Завершение торговой сессии по первичным торгам", + + "fields": [] + } + , + {"method":"post", + + "destination": "STRF", + + "group": "Клиринг", + + "name": "Начало торговой сессии по вторичным торгам", + + "fields": [] + } + , + {"method":"post", + + "destination": "ETRF", + + "group": "Клиринг", + + "name": "Завершение торговой сессии по вторичным торгам", + + "fields": [] + } + , + {"method":"post", + + "destination": "RCHK", + + "group": "Клиринг", + + "name": "Запрос на сверку активов", + + "fields": [] + } + , + {"method":"post", + + "destination": "GRYT", + + "group": "Клиринг", + + "name": "Сформировать регистр на текущий день", + + "fields": [] + } + , + {"method":"post", + + "destination": "GRRT", + + "group": "Клиринг", + + "name": "Сформировать реестр на текущий день", + + "fields": [] + } + ] + } + , + "clearmemberRegister": { + + "name": "Реестр участников клиринга", + + "destination": "clearmember-registers", + + "serviceProduct": "MKR", + + "class": "ru.clearing.classes.statics.data.misc.ClearMemberRegister", + + "table": "clearmember_register", + + "fields": [ + {"code": "tradingCode", + "type": 2,"length": 255,"name": "Код участника торгов","shortname": "Торговый код","searchable": true,"sortable": true,"visible": true + } + , + {"code": "clearingCode", + "type": 2,"length": 255,"name": "Код участника клиринга","shortname": "Клиринговый код","searchable": true,"sortable": true,"visible": true + } + , + {"code": "fullName", + "type": 2,"length": 255,"name": "Полное наименование участника клиринга","shortname": "Полное наименование","searchable": true,"sortable": true,"visible": true + } + , + {"code": "shortName", + "type": 2,"length": 255,"name": "Краткое наименование участника клиринга","shortname": "Краткое наименование","searchable": true,"sortable": true,"visible": true + } + , + {"code": "categoryList", + "type": 12,"name": "Категория участника клиринга","shortname": "Категория","searchable": true,"sortable": true,"visible": true,"link": "clearingCategory" + } + , + {"code": "corporationSole", + "type": 12,"name": "Единоличный исполнительный орган","shortname": "Исполнительный орган","searchable": true,"sortable": true,"visible": true,"link": "corporationSoleType" + } + , + {"code": "account", + "type": 2,"length": 50,"name": "Счета","shortname": "Счет","searchable": true,"sortable": true,"visible": true + } + , + {"code": "bank", + "type": 1,"name": "Наименование банка","shortname": "Банк","searchable": true,"sortable": true,"visible": true,"link": "bankAccount" + } + , + {"code": "bankName", + "type": 2,"length": 255,"name": "Наименование банка","shortname": "Банк","searchable": true,"sortable": true,"visible": true + } + , + {"code": "inn", + "type": 2,"length": 255,"name": "Идентификационный номер налогоплательщика (ИНН)","shortname": "ИНН","searchable": true,"sortable": true,"visible": true + } + , + {"code": "bic", + "type": 2,"length": 255,"name": "Банковский идентификационный код (БИК)","shortname": "БИК","searchable": true,"sortable": true,"visible": true + } + , + {"code": "ogrn", + "type": 2,"length": 255,"name": "Основной государственный регистрационный номер","shortname": "ОГРН","searchable": true,"sortable": true,"visible": true + } + , + {"code": "cpp", + "type": 2,"length": 255,"name": "Код причины постановки (КПП)","shortname": "КПП","searchable": true,"sortable": true,"visible": true + } + , + {"code": "ocpo", + "type": 2,"length": 255,"name": "Код в Общероссийском классификаторе предприятий","shortname": "ОКПО","searchable": true,"sortable": true,"visible": true + } + , + {"code": "contractNumber", + "type": 2,"name": "Номер договора","shortname": "Договор","searchable": true,"sortable": true,"visible": true,"length": 255 + } + , + {"code": "contractDate", + "type": 6,"name": "Дата выдачи","shortname": "Выдача","searchable": true,"sortable": true + } + , + {"code": "registrationDate", + "type": 6,"name": "Дата регистрации","shortname": "Регистрация","searchable": true,"sortable": true,"visible": true + } + , + {"code": "systemDate", + "type": 6,"name": "Системная дата","shortname": "Системная дата","searchable": true,"sortable": true + } + , + {"code": "accessDate", + "type": 4,"name": "Дата допуска к КО","shortname": "Допуска к КО","searchable": true,"sortable": true + } + , + {"code": "suspentionDate", + "type": 4,"name": "Дата приостановления","shortname": "Приостановлено","searchable": true,"sortable": true + } + , + {"code": "reopeningDate", + "type": 4,"name": "Дата возобновления","shortname": "Возобновлено","searchable": true,"sortable": true + } + , + {"code": "closeDate", + "type": 4,"name": "Дата прекращения","shortname": "Прекращено","searchable": true,"sortable": true + } + , + {"code": "exclusionDate", + "type": 4,"name": "Дата исключения из реестра","shortname": "Исключено из реестра","searchable": true,"sortable": true + } + , + {"code": "address", + "type": 2,"length": 255,"name": "Адрес местонахождения","shortname": "Адрес","searchable": true,"sortable": true,"visible": true + } + , + {"code": "email", + "type": 2,"length": 255,"name": "Электронная почта","shortname": "Почта","searchable": true,"sortable": true,"visible": true + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "createdAt", + "field": "created","type": 4,"name": "Дата и время создания записи","shortname": "Создано","searchable": true,"sortable": true + } + , + {"code": "updatedAt", + "field": "updated","type": 4,"name": "Дата и время изменения записи","shortname": "Изменено","searchable": true,"sortable": true + } + ] + + } + , + "clearmemberRegisterChange": { + + "name": "Журнал изменений информации участников клиринга", + + "table": "clearmember_register_change", + + "fields": [ + {"code": "date", + "type": 4,"name": "Дата и время изменения записи","shortname": "Изменено","searchable": true,"sortable": true,"ignore": true + } + , + {"code": "clearingCode", + "type": 2,"length": 255,"name": "Код участника клиринга","shortname": "Клиринговый код","searchable": true,"sortable": true,"visible": true + } + , + {"code": "comment", + "type": 2,"length": 255,"name": "Комментарий","shortname": "Комментарий","searchable": true,"sortable": true,"visible": true + } + ] + + } + , + "keyRate": { + + "name": "Ключевая ставка ЦБ", + + "destination": "utilities/key-rates", + + "class": "ru.clearing.classes.statics.data.misc.KeyRate", + + "table": "key_rate", + + "fields": [ + {"code": "rate", + "type": 10,"name": "Ключевая ставка ЦБ","shortname": "Ставка","searchable": true,"sortable": true,"visible": true + } + , + {"code": "startDate", + "type": 6,"name": "Дата начала действия ключевой ставки","shortname": "Начальная дата","searchable": true,"sortable": true,"visible": true + } + , + {"code": "endDate", + "type": 6,"name": "Дата окончания действия ключевой ставки","shortname": "Конечная дата","searchable": true,"sortable": true,"visible": true + } + , + {"code": "document", + "type": 2,"length": 255,"name": "Документ ЦБ, регламентирующий установку величины ключевой ставки","shortname": "Документ ЦБ","searchable": true,"sortable": true,"visible": true + } + , + {"code": "workflowStatus", + "type": 12,"name": "Статус","shortname": "Статус","searchable": true,"sortable": true,"visible": true,"link": "workflowStatus" + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + ] + ,"actions":[ + {"method":"post", + + "name": "Добавление ключевой ставки ЦБ", + + "fields": [ + {"code": "rate", + "type": 10,"name": "Ключевая ставка ЦБ","shortname": "Ставка","required": true + } + , + {"code": "startDate", + "type": 6,"name": "Дата начала действия ключевой ставки","shortname": "Начальная дата","required": true + } + , + {"code": "endDate", + "type": 6,"name": "Дата окончания действия ключевой ставки","shortname": "Конечная дата","required": true + } + , + {"code": "document", + "type": 2,"length": 255,"name": "Документ ЦБ","shortname": "Документ ЦБ","required": true + } + ] + } + , + {"method":"put", + + "name": "Изменение ключевой ставки ЦБ", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "keyRate","linkCode": "id","required": true + } + , + {"code": "rate", + "type": 10,"name": "Ключевая ставка ЦБ","shortname": "Ставка" + } + , + {"code": "startDate", + "type": 6,"name": "Дата начала действия ключевой ставки","shortname": "Начальная дата" + } + , + {"code": "endDate", + "type": 6,"name": "Дата окончания действия ключевой ставки","shortname": "Конечная дата" + } + , + {"code": "document", + "type": 2,"length": 255,"name": "Документ ЦБ","shortname": "Документ ЦБ" + } + ] + } + , + {"method":"delete", + + "name": "Удаление ключевой ставки ЦБ", + + "confirmation": "rate,document", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "keyRate","linkCode": "id","required": true + } + ] + } + ] + } + , + "balanceRegister": { + + "name": "Реестр остатков денежных средств", + + "destination": "balance-registers", + + "class": "ru.clearing.classes.statics.data.misc.BalanceRegister", + + "table": "balance_register", + + "fields": [ + {"code": "sDf01Date", + "type": 4,"name": "Дата создания записи в S_DF01","shortname": "Дата создания записи в S_DF01","searchable": true,"sortable": true + } + , + {"code": "currencyCode", + "type": 12,"name": "Код валюты","shortname": "Валюта","link": "currencyCode" + } + , + {"code": "setHouseName", + "type": 2,"length": 255,"name": "Наименование РО","shortname": "Наименование РО","searchable": true,"sortable": true,"visible": true + } + , + {"code": "account", + "type": 2,"length": 50,"name": "Номер торгового/клирингового счета","shortname": "Номер торгового/клирингового счета","searchable": true,"sortable": true,"visible": true + } + , + {"code": "infoAccount", + "type": 2,"length": 50,"name": "Номер счета внутреннего учета СПВБ","shortname": "Номер счета внутреннего учета СПВБ","searchable": true,"sortable": true,"visible": true + } + , + {"code": "remainderSum", + "type": 10,"name": "Остаток денежных средст","shortname": "Остаток","searchable": true,"sortable": true + } + , + {"code": "blockedSum", + "type": 10,"name": "Сумма блокированных денежных средств","shortname": "Блокированные","searchable": true,"sortable": true + } + , + {"code": "unblockedSum", + "type": 10,"name": "Сумма свободных денежных средств","shortname": "Свободные","searchable": true,"sortable": true + } + , + {"code": "inn", + "type": 2,"length": 255,"name": "Идентификационный номер налогоплательщика (ИНН)","shortname": "ИНН","searchable": true,"sortable": true,"visible": true + } + , + {"code": "market", + "type": 1,"name": "Сегмент рынка","shortname": "Сегмент рынка","searchable": true,"sortable": true,"visible": true,"link": "market","linkCode": "name" + } + , + {"code": "fullName", + "type": 2,"length": 255,"name": "Наименование Участника Клиринга","shortname": "Участник Клиринга","searchable": true,"sortable": true,"visible": true + } + , + {"code": "typeRemains", + "type": 12,"name": "Тип остатка","shortname": "Тип остатка","searchable": true,"sortable": true,"visible": true + } + , + {"code": "docNumber", + "type": 2,"length": 255,"name": "Номер документа","shortname": "Номер","searchable": true,"sortable": true,"visible": true + } + , + {"code": "companyId", + "type": 1,"name": "Компания","shortname": "Компания","searchable": false,"sortable": false,"visible": true,"link": "company","linkCode": "shortName" + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "createdAt", + "field": "created","type": 4,"name": "Дата и время создания записи","shortname": "Создано","searchable": true,"sortable": true + } + , + {"code": "updatedAt", + "field": "updated","type": 4,"name": "Дата и время изменения записи","shortname": "Изменено","searchable": true,"sortable": true + } + ] + + } + , + "managementJournal": { + + "name": "Журнал мониторинга и контроля", + + "destination": "management-journals", + + "class": "ru.clearing.classes.statics.data.journal.ManagementJournal", + + "table": "management_journal", + + "fields": [ + {"code": "companyId", + "type": 1,"name": "Участник","shortname": "Участник","searchable": true,"sortable": true,"visible": true,"link": "company","linkCode": "shortName" + } + , + {"code": "userId", + "type": 1,"name": "Автор сообщения","shortname": "Сотрудник","searchable": true,"sortable": true,"visible": true,"link": "userCls" + } + , + {"code": "managementJournalType", + "type": 12,"name": "Тип мониторинга","shortname": "Тип","searchable": true,"sortable": true,"visible": true,"link": "managementJournalType" + } + , + {"code": "managementJournalPurpose", + "type": 12,"name": "Цель мониторинга","shortname": "Цель","searchable": true,"sortable": true,"visible": true,"link": "managementJournalPurpose" + } + , + {"code": "managementJournalStatus", + "type": 12,"name": "Статус","shortname": "Статус","searchable": true,"sortable": true,"visible": true,"link": "managementJournalStatus" + } + , + {"code": "text", + "type": 2,"name": "Сообщение","shortname": "Сообщение","searchable": true,"visible": true,"sortable": true,"length": 4096 + } + , + {"code": "changeAccessSign", + "type": 12,"name": "Признак изменения доступа","shortname": "Изменение доступа","searchable": true,"sortable": true,"visible": true,"link": "allowed" + } + , + {"code": "changeDataSign", + "type": 12,"name": "Признак изменения данных","shortname": "Изменение данных","searchable": true,"sortable": true,"visible": true,"link": "allowed" + } + , + {"code": "eventDate", + "type": 4,"name": "Дата события ЕГРЮЛ","shortname": "Дата события","searchable": true,"sortable": true + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "createdAt", + "field": "created","type": 4,"name": "Создано","shortname": "Создано","searchable": true,"sortable": true + } + , + {"code": "updatedAt", + "field": "updated","type": 4,"name": "Изменено","shortname": "Изменено","searchable": true,"sortable": true + } + ] + + } + , + "inDocumentJournal": { + + "name": "Журнал входящих документов", + + "destination": "in-document-journals", + + "class": "ru.clearing.classes.statics.data.journal.InDocumentJournal", + + "table": "in_document_journal", + + "fields": [ + {"code": "registrationDate", + "type": 6,"name": "Дата регистрации","shortname": "Дата","searchable": true,"sortable": true,"visible": true + } + , + {"code": "registrationTime", + "type": 5,"name": "Время регистрации","shortname": "Время","searchable": true,"sortable": true,"visible": true + } + , + {"code": "registrationNumber", + "type": 1,"name": "Регистационный номер","shortname": "Регистационный номер","searchable": true,"sortable": true,"visible": true + } + , + {"code": "documentName", + "type": 2,"length": 255,"name": "Наименование документа","shortname": "Документ","searchable": true,"sortable": true,"visible": true + } + , + {"code": "sender", + "type": 2,"length": 255,"name": "Полное наименование отправителя","shortname": "Отправителя","searchable": true,"sortable": true,"visible": true + } + , + {"code": "quantity", + "type": 1,"name": "Количествово экземпляров","shortname": "Кол-во экз.","searchable": true,"sortable": true,"visible": true + } + , + {"code": "clearingCode", + "type": 2,"length": 255,"name": "Код Участника Клиринга","shortname": "Код УК","searchable": true,"sortable": true,"visible": true + } + , + {"code": "courierType", + "type": 12,"name": "Способ отправки","shortname": "Способ отправки","searchable": true,"sortable": true,"visible": true,"link": "courierType" + } + , + {"code": "emailDate", + "type": 6,"name": "Дата отправки электронной почтой","shortname": "Дата отправки эл. почтой","searchable": true,"sortable": true,"visible": true + } + , + {"code": "amount", + "type": 11,"name": "Сумма","shortname": "Сумма","searchable": true,"sortable": true,"visible": true + } + , + {"code": "dossierNumber", + "type": 2,"length": 50,"name": "Номер дела","shortname": "Дело №","searchable": true,"sortable": true,"visible": true + } + , + {"code": "comment", + "type": 2,"length": 255,"name": "Комментарий","shortname": "Комментарий","searchable": true,"sortable": true,"visible": true + } + , + {"code": "receiptDate", + "type": 6,"name": "Дата получения оригинала","shortname": "Дата получения","searchable": true,"sortable": true,"visible": true + } + , + {"code": "resultStatus", + "type": 12,"name": "Статус загрузки документа","shortname": "Статус","searchable": true,"sortable": true,"visible": true,"link": "resultStatus" + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "№п/п","searchable": true,"sortable": true + } + ] + + } + , + "outDocumentJournal": { + + "name": "Журнал исходящих документов", + + "destination": "out-document-journals", + + "class": "ru.clearing.classes.statics.data.journal.OutDocumentJournal", + + "table": "out_document_journal", + + "fields": [ + {"code": "registrationDate", + "type": 6,"name": "Дата регистрации","shortname": "Дата","searchable": true,"sortable": true,"visible": true + } + , + {"code": "registrationTime", + "type": 5,"name": "Время регистрации","shortname": "Время","searchable": true,"sortable": true,"visible": true + } + , + {"code": "registrationNumber", + "type": 1,"name": "Регистационный номер","shortname": "Регистационный номер","searchable": true,"sortable": true,"visible": true + } + , + {"code": "documentName", + "type": 2,"length": 255,"name": "Наименование документа","shortname": "Документ","searchable": true,"sortable": true,"visible": true + } + , + {"code": "addressee", + "type": 2,"length": 255,"name": "Полное наименование получателя","shortname": "Получатель","searchable": true,"sortable": true,"visible": true + } + , + {"code": "quantity", + "type": 1,"name": "Количествово экземпляров","shortname": "Кол-во экз.","searchable": true,"sortable": true,"visible": true + } + , + {"code": "clearingCode", + "type": 2,"length": 255,"name": "Код Участника Клиринга","shortname": "Код УК","searchable": true,"sortable": true,"visible": true + } + , + {"code": "courierType", + "type": 12,"name": "Способ отправки","shortname": "Способ отправки","searchable": true,"sortable": true,"visible": true,"link": "courierType" + } + , + {"code": "emailDate", + "type": 6,"name": "Дата отправки электронной почтой","shortname": "Дата отправки эл. почтой","searchable": true,"sortable": true,"visible": true + } + , + {"code": "amount", + "type": 11,"name": "Сумма","shortname": "Сумма","searchable": true,"sortable": true,"visible": true + } + , + {"code": "dossierNumber", + "type": 2,"length": 50,"name": "Номер дела","shortname": "Дело №","searchable": true,"sortable": true,"visible": true + } + , + {"code": "postDate", + "type": 6,"name": "Дата почтового отправления","shortname": "Дата отправления","searchable": true,"sortable": true,"visible": true + } + , + {"code": "resultStatus", + "type": 12,"name": "Статус выгрузки документа","shortname": "Статус","searchable": true,"sortable": true,"visible": true,"link": "resultStatus" + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "№п/п","searchable": true,"sortable": true + } + ] + + } + , + "executionDeposit": { + + "name": "Сделки", + + "destination": "execution-deposits", + + "class": "ru.clearing.classes.statics.data.execution.ExecutionDeposit", + + "table": "execution_deposit", + + "fields": [ + {"code": "exchangeExecutionId", + "type": 1,"name": "Идентификационный номер сделки в Торговой системе","shortname": "Номер сделки","visible": true,"searchable": true,"sortable": true + } + , + {"code": "exchangeExecutionTime", + "type": 4,"name": "Время заключения сделки в Торговой системе","shortname": "Время заключения сделки","visible": true,"searchable": true,"sortable": true + } + , + {"code": "tradingDate", + "type": 6,"name": "Дата заключения сделки","shortname": "Дата заключения сделки","visible": true,"searchable": true,"sortable": true + } + , + {"code": "accountId", + "type": 1,"name": "Торговый счет","shortname": "Счет","visible": true,"searchable": true,"sortable": true,"link": "account","linkCode": "account" + } + , + {"code": "market", + "type": 12,"name": "Секция финансового инструмента","shortname": "Секция","visible": true,"searchable": true,"sortable": true,"link": "market","linkCode": "name" + } + , + {"code": "price", + "type": 10,"name": "Ставка по депозиту","shortname": "Ставка, %","visible": true,"searchable": true,"sortable": true + } + , + {"code": "lots", + "type": 11,"name": "Количество лотов","shortname": "Лоты","visible": true,"searchable": true,"sortable": true + } + , + {"code": "quantity", + "type": 11,"name": "Количество штук","shortname": "Штуки","visible": false,"searchable": true,"sortable": true + } + , + {"code": "firstLegAmount", + "type": 11,"name": "Объем сделки","shortname": "Объем","visible": true,"searchable": true,"sortable": true + } + , + {"code": "secondLegAmount", + "type": 11,"name": "Объем возврата","shortname": "Объем возврата","visible": false,"searchable": true,"sortable": true + } + , + {"code": "interestAmount", + "type": 11,"name": "Объем процентов","shortname": "Проценты","visible": false,"searchable": true,"sortable": true + } + , + {"code": "side", + "type": 12,"name": "Направление сделки","shortname": "Направление","visible": true,"searchable": true,"sortable": true,"link": "moneyFlowSide" + } + , + {"code": "settlementCurrency", + "type": 12,"name": "Валюта расчетов по инструменту","shortname": "Валюта","visible": true,"searchable": true,"sortable": true,"link": "currencyCode","linkCode": "code" + } + , + {"code": "companyId", + "type": 1,"name": "Название компании","shortname": "Компания","visible": true,"searchable": true,"sortable": true,"link": "company","linkCode": "shortName" + } + , + {"code": "duration", + "type": 1,"name": "Срок, дней","shortname": "Срок","visible": true,"searchable": true,"sortable": true + } + , + {"code": "firstLegSettlementDate", + "type": 6,"name": "Дата размещения","shortname": "Дата размещения","visible": true,"searchable": true,"sortable": true + } + , + {"code": "secondLegSettlementDate", + "type": 6,"name": "Дата возврата","shortname": "Дата возврата","visible": true,"searchable": true,"sortable": true + } + , + {"code": "firstLegSettlementCode", + "type": 6,"name": "Код расчетов при размещении","shortname": "Код расчетов при размещении","visible": false,"searchable": true,"sortable": true,"ignore": true + } + , + {"code": "secondLegSettlementCode", + "type": 6,"name": "Код расчетов при возврате","shortname": "Код расчетов","visible": false,"searchable": true,"sortable": true,"ignore": true + } + , + {"code": "securityFullName", + "type": 2,"length": 255,"name": "Наименование инструмента","shortname": "Инструмент","visible": true,"searchable": true,"sortable": true + } + , + {"code": "securitySymbol", + "type": 2,"length": 255,"name": "Код инструмента в Торговой Системе","shortname": "Код инструмента","visible": true,"searchable": true,"sortable": true + } + , + {"code": "securityId", + "type": 1,"name": "Финансовый инструмент","shortname": "Код биржевого инструмента / товара","searchable": true,"sortable": true,"link": "moneyMarketSecurity","linkCode": "securitySymbol","ignore": true + } + , + {"code": "counterPartyId", + "type": 1,"name": "Имя компании-партнера, с которым заключена сделка","shortname": "Партнер","visible": false,"searchable": true,"sortable": true,"link": "company" + } + , + {"code": "coverageStatus", + "type": 12,"name": "Cтатус достаточности обеспечения","shortname": "Обеспеченность","searchable": true,"sortable": true,"link": "allowed" + } + , + {"code": "sessionId", + "type": 1,"name": "Наименование сессии","shortname": "Сессия","visible": true,"searchable": true,"sortable": true,"link": "moneyMarketSession" + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","visible": false,"searchable": true,"sortable": true + } + , + {"code": "createdAt", + "field": "created","type": 5,"name": "Время регистрации сделки","shortname": "Время сделки","visible": false,"searchable": true,"sortable": true + } + , + {"code": "updatedAt", + "field": "updated","type": 5,"name": "Время изменения сделки","shortname": "Время изменения","visible": false,"searchable": true,"sortable": true + } + , + {"code": "clearingDate", + "type": 6,"name": "Дата клиринга","shortname": "Дата клиринга","visible": false,"searchable": true,"sortable": true + } + ] + + } + , + "dealRegister": { + + "name": "Реестр сделок", + + "destination": "deal-registers", + + "class": "ru.clearing.classes.statics.data.register.DealRegister", + + "table": "deal_register", + + "fields": [ + {"code": "executionId", + "type": 1,"name": "Идентификационный номер сделки в Клиринговой системе","shortname": "Номер сделки КС","visible": false,"searchable": true,"sortable": true + } + , + {"code": "exchangeExecutionId", + "type": 1,"name": "Идентификационный номер сделки в Торговой системе","shortname": "Номер сделки","visible": true,"searchable": true,"sortable": true + } + , + {"code": "exchangeExecutionTime", + "type": 4,"name": "Время заключения сделки в Торговой системе","shortname": "Время заключения сделки","visible": true,"searchable": true,"sortable": true + } + , + {"code": "tradingDate", + "type": 6,"name": "Дата заключения сделки","shortname": "Дата заключения сделки","visible": true,"searchable": true,"sortable": true + } + , + {"code": "account", + "type": 2,"length": 50,"name": "Торговый счет","shortname": "Счет","visible": true,"searchable": true,"sortable": true + } + , + {"code": "market", + "type": 12,"name": "Секция финансового инструмента","shortname": "Секция","visible": true,"searchable": true,"sortable": true,"link": "market","linkCode": "name" + } + , + {"code": "price", + "type": 10,"name": "Ставка по депозиту","shortname": "Ставка, %","visible": true,"searchable": true,"sortable": true + } + , + {"code": "amount", + "type": 11,"name": "Сумма сделки","shortname": "Сумма сделки","visible": true,"searchable": true,"sortable": true + } + , + {"code": "side", + "type": 12,"name": "Направление сделки","shortname": "Направление","visible": true,"searchable": true,"sortable": true,"link": "moneyFlowSide" + } + , + {"code": "settlementCurrency", + "type": 12,"name": "Валюта расчетов по инструменту","shortname": "Валюта","visible": true,"searchable": true,"sortable": true,"link": "currencyCode","linkCode": "code" + } + , + {"code": "companyId", + "type": 1,"name": "Название компании","shortname": "Компания","visible": true,"searchable": true,"sortable": true,"link": "company","linkCode": "shortName" + } + , + {"code": "firstLegSettlementDate", + "type": 6,"name": "Дата размещения","shortname": "Дата размещения","visible": true,"searchable": true,"sortable": true + } + , + {"code": "secondLegSettlementDate", + "type": 6,"name": "Дата возврата","shortname": "Дата возврата","visible": true,"searchable": true,"sortable": true + } + , + {"code": "securityFullName", + "type": 2,"length": 255,"name": "Наименование инструмента","shortname": "Инструмент","visible": true,"searchable": true,"sortable": true + } + , + {"code": "securitySymbol", + "type": 2,"length": 255,"name": "Код инструмента в Торговой Системе","shortname": "Код инструмента","visible": true,"searchable": true,"sortable": true + } + , + {"code": "securityId", + "type": 1,"name": "Финансовый инструмент","shortname": "Код биржевого инструмента / товара","searchable": true,"sortable": true,"link": "moneyMarketSecurity","linkCode": "securitySymbol","ignore": true + } + , + {"code": "counterPartyId", + "type": 1,"name": "Имя компании-партнера, с которым заключена сделка","shortname": "Партнер","visible": false,"searchable": true,"sortable": true,"link": "company" + } + , + {"code": "coverageStatus", + "type": 12,"name": "Cтатус достаточности обеспечения","shortname": "Обеспеченность","searchable": true,"sortable": true,"link": "allowed" + } + , + {"code": "sessionId", + "type": 1,"name": "Наименование сессии","shortname": "Сессия","visible": true,"searchable": true,"sortable": true,"link": "moneyMarketSession" + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","visible": false,"searchable": true,"sortable": true + } + , + {"code": "createdAt", + "type": 5,"name": "Время регистрации","shortname": "Время регистрации","visible": false,"searchable": true,"sortable": true + } + , + {"code": "updatedAt", + "type": 5,"name": "Время изменения","shortname": "Время изменения","visible": false,"searchable": true,"sortable": true + } + , + {"code": "clearingDate", + "type": 6,"name": "Дата клиринга","shortname": "Дата клиринга","visible": false,"searchable": true,"sortable": true + } + ] + + } + , + "admittedDealRegister": { + + "name": "Реестр сделок, допущенных к клирингу", + + "destination": "admitted-deal-registers", + + "class": "ru.clearing.classes.statics.data.register.AdmittedDealRegister", + + "table": "admitted_deal_register", + + "fields": [ + {"code": "executionId", + "type": 1,"name": "Идентификационный номер сделки в Клиринговой системе","shortname": "Номер сделки КС","visible": false,"searchable": true,"sortable": true + } + , + {"code": "companyFullName", + "type": 2,"length": 255,"name": "Наименование биржи","shortname": "Наименование биржи","searchable": true,"sortable": true,"visible": true + } + , + {"code": "tradingDate", + "type": 6,"name": "Дата заключения сделки","shortname": "Дата заключения сделки","visible": true,"searchable": true,"sortable": true + } + , + {"code": "exchangeExecutionId", + "type": 1,"name": "Идентификационный номер сделки в Торговой системе","shortname": "Номер сделки","visible": true,"searchable": true,"sortable": true + } + , + {"code": "exchangeExecutionTime", + "type": 4,"name": "Время заключения сделки в Торговой системе","shortname": "Время заключения сделки","visible": true,"searchable": true,"sortable": true + } + , + {"code": "securitySymbol", + "type": 2,"length": 255,"name": "Финансовый инструмент","shortname": "Код биржевого инструмента / товара","visible": true,"searchable": true,"sortable": true + } + , + {"code": "securityFullName", + "type": 2,"length": 255,"name": "Наименование инструмента","shortname": "Инструмент","visible": false,"searchable": true,"sortable": true + } + , + {"code": "sellerFullName", + "type": 2,"length": 255,"name": "Наименование продавца","shortname": "Наименование продавца","searchable": true,"sortable": true,"visible": true + } + , + {"code": "sellerClearingCode", + "type": 2,"length": 255,"name": "Код продавца","shortname": "Код продавца","searchable": true,"sortable": true,"visible": true + } + , + {"code": "sellerAccount", + "type": 2,"length": 50,"name": "Счет продавца","shortname": "Счет продавца","searchable": true,"sortable": true,"visible": true + } + , + {"code": "buyerFullName", + "type": 2,"length": 255,"name": "Наименование покупателя","shortname": "Наименование покупателя","searchable": true,"sortable": true,"visible": true + } + , + {"code": "buyerClearingCode", + "type": 2,"length": 255,"name": "Код покупателя","shortname": "Код покупателя","searchable": true,"sortable": true,"visible": true + } + , + {"code": "buyerAccount", + "type": 2,"length": 50,"name": "Счет покупателя","shortname": "Счет покупателя","searchable": true,"sortable": true,"visible": true + } + , + {"code": "amount", + "type": 11,"name": "Сумма сделки","shortname": "Сумма сделки","visible": true,"searchable": true,"sortable": true + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","visible": false,"searchable": true,"sortable": true + } + , + {"code": "createdAt", + "field": "created","type": 5,"name": "Время регистрации","shortname": "Время регистрации","visible": false,"searchable": true,"sortable": true + } + , + {"code": "updatedAt", + "field": "updated","type": 5,"name": "Время изменения","shortname": "Время изменения","visible": false,"searchable": true,"sortable": true + } + , + {"code": "clearingDate", + "type": 6,"name": "Дата клиринга","shortname": "Дата клиринга","visible": false,"searchable": true,"sortable": true + } + ] + + } + , + "coveredDealRegister": { + + "name": "Реестр сделок, прошедших процедуру контроля обеспечения", + + "destination": "covered-deal-registers", + + "class": "ru.clearing.classes.statics.data.register.CoveredDealRegister", + + "table": "covered_deal_register", + + "fields": [ + {"code": "executionId", + "type": 1,"name": "Идентификационный номер сделки в Клиринговой системе","shortname": "Номер сделки КС","visible": false,"searchable": true,"sortable": true + } + , + {"code": "companyFullName", + "type": 2,"length": 255,"name": "Наименование биржи","shortname": "Наименование биржи","searchable": true,"sortable": true,"visible": true + } + , + {"code": "tradingDate", + "type": 6,"name": "Дата заключения сделки","shortname": "Дата заключения сделки","visible": true,"searchable": true,"sortable": true + } + , + {"code": "exchangeExecutionId", + "type": 1,"name": "Идентификационный номер сделки в Торговой системе","shortname": "Номер сделки","visible": true,"searchable": true,"sortable": true + } + , + {"code": "exchangeExecutionTime", + "type": 4,"name": "Время заключения сделки в Торговой системе","shortname": "Время заключения сделки","visible": true,"searchable": true,"sortable": true + } + , + {"code": "securitySymbol", + "type": 2,"length": 255,"name": "Финансовый инструмент","shortname": "Код биржевого инструмента / товара","visible": true,"searchable": true,"sortable": true + } + , + {"code": "securityFullName", + "type": 2,"length": 255,"name": "Наименование инструмента","shortname": "Инструмент","visible": false,"searchable": true,"sortable": true + } + , + {"code": "sellerFullName", + "type": 2,"length": 255,"name": "Наименование продавца","shortname": "Наименование продавца","searchable": true,"sortable": true,"visible": true + } + , + {"code": "sellerClearingCode", + "type": 2,"length": 255,"name": "Код продавца","shortname": "Код продавца","searchable": true,"sortable": true,"visible": true + } + , + {"code": "sellerAccount", + "type": 2,"length": 50,"name": "Счет продавца","shortname": "Счет продавца","searchable": true,"sortable": true,"visible": true + } + , + {"code": "buyerFullName", + "type": 2,"length": 255,"name": "Наименование покупателя","shortname": "Наименование покупателя","searchable": true,"sortable": true,"visible": true + } + , + {"code": "buyerClearingCode", + "type": 2,"length": 255,"name": "Код покупателя","shortname": "Код покупателя","searchable": true,"sortable": true,"visible": true + } + , + {"code": "buyerAccount", + "type": 2,"length": 50,"name": "Счет покупателя","shortname": "Счет покупателя","searchable": true,"sortable": true,"visible": true + } + , + {"code": "amount", + "type": 11,"name": "Сумма сделки","shortname": "Сумма сделки","visible": true,"searchable": true,"sortable": true + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","visible": false,"searchable": true,"sortable": true + } + , + {"code": "createdAt", + "field": "created","type": 5,"name": "Время регистрации","shortname": "Время регистрации","visible": false,"searchable": true,"sortable": true + } + , + {"code": "updatedAt", + "field": "updated","type": 5,"name": "Время изменения","shortname": "Время изменения","visible": false,"searchable": true,"sortable": true + } + , + {"code": "clearingDate", + "type": 6,"name": "Дата клиринга","shortname": "Дата клиринга","visible": false,"searchable": true,"sortable": true + } + ] + + } + , + "uncoveredDealRegister": { + + "name": "Реестр сделок, не прошедших процедуру контроля обеспечения", + + "destination": "uncovered-deal-registers", + + "class": "ru.clearing.classes.statics.data.register.UncoveredDealRegister", + + "table": "uncovered_deal_register", + + "fields": [ + {"code": "executionId", + "type": 1,"name": "Идентификационный номер сделки в Клиринговой системе","shortname": "Номер сделки КС","visible": false,"searchable": true,"sortable": true + } + , + {"code": "companyFullName", + "type": 2,"length": 255,"name": "Наименование биржи","shortname": "Наименование биржи","searchable": true,"sortable": true,"visible": true + } + , + {"code": "tradingDate", + "type": 6,"name": "Дата заключения сделки","shortname": "Дата заключения сделки","visible": true,"searchable": true,"sortable": true + } + , + {"code": "exchangeExecutionId", + "type": 1,"name": "Идентификационный номер сделки в Торговой системе","shortname": "Номер сделки","visible": true,"searchable": true,"sortable": true + } + , + {"code": "exchangeExecutionTime", + "type": 4,"name": "Время заключения сделки в Торговой системе","shortname": "Время заключения сделки","visible": true,"searchable": true,"sortable": true + } + , + {"code": "securitySymbol", + "type": 2,"length": 255,"name": "Финансовый инструмент","shortname": "Код биржевого инструмента / товара","visible": true,"searchable": true,"sortable": true + } + , + {"code": "securityFullName", + "type": 2,"length": 255,"name": "Наименование инструмента","shortname": "Инструмент","visible": false,"searchable": true,"sortable": true + } + , + {"code": "sellerFullName", + "type": 2,"length": 255,"name": "Наименование продавца","shortname": "Наименование продавца","searchable": true,"sortable": true,"visible": true + } + , + {"code": "sellerClearingCode", + "type": 2,"length": 255,"name": "Код продавца","shortname": "Код продавца","searchable": true,"sortable": true,"visible": true + } + , + {"code": "sellerAccount", + "type": 2,"length": 50,"name": "Счет продавца","shortname": "Счет продавца","searchable": true,"sortable": true,"visible": true + } + , + {"code": "buyerFullName", + "type": 2,"length": 255,"name": "Наименование покупателя","shortname": "Наименование покупателя","searchable": true,"sortable": true,"visible": true + } + , + {"code": "buyerClearingCode", + "type": 2,"length": 255,"name": "Код покупателя","shortname": "Код покупателя","searchable": true,"sortable": true,"visible": true + } + , + {"code": "buyerAccount", + "type": 2,"length": 50,"name": "Счет покупателя","shortname": "Счет покупателя","searchable": true,"sortable": true,"visible": true + } + , + {"code": "amount", + "type": 11,"name": "Сумма сделки","shortname": "Сумма сделки","visible": true,"searchable": true,"sortable": true + } + , + {"code": "resultStatus", + "type": 12,"name": "Результат клиринга","shortname": "Результат клиринга","visible": true,"searchable": true,"sortable": true,"link": "resultStatus" + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","visible": false,"searchable": true,"sortable": true + } + , + {"code": "createdAt", + "field": "created","type": 5,"name": "Время регистрации","shortname": "Время регистрации","visible": false,"searchable": true,"sortable": true + } + , + {"code": "updatedAt", + "field": "updated","type": 5,"name": "Время изменения","shortname": "Время изменения","visible": false,"searchable": true,"sortable": true + } + , + {"code": "clearingDate", + "type": 6,"name": "Дата клиринга","shortname": "Дата клиринга","visible": false,"searchable": true,"sortable": true + } + ] + + } + , + "reportRegister": { + + "name": "Реестр отправленных отчетов", + + "destination": "report-registers", + + "class": "ru.clearing.classes.statics.data.register.ReportRegister", + + "table": "report_register", + + "fields": [ + {"code": "companyFullName", + "type": 2,"length": 255,"name": "Наименование участника","shortname": "Участник","searchable": true,"sortable": true + } + , + {"code": "clearingCode", + "type": 2,"length": 255,"name": "Код клиринга","shortname": "Код участника","searchable": true,"sortable": true + } + , + {"code": "sessionId", + "type": 1,"name": "Сессия","shortname": "Сессия","visible": true,"searchable": true,"sortable": true,"link": "moneyMarketSession" + } + , + {"code": "comment", + "type": 2,"name": "Комментарий","shortname": "Основание","searchable": true,"sortable": true,"length": 255 + } + , + {"code": "name", + "type": 2,"length": 255,"name": "Наименование","shortname": "Наименование","visible": false,"searchable": true,"sortable": true + } + , + {"code": "quantity", + "type": 1,"name": "Количество записей","shortname": "Количество","visible": false,"searchable": true,"sortable": true + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","visible": false,"searchable": true,"sortable": true + } + , + {"code": "createdAt", + "field": "created","type": 5,"name": "Время регистрации","shortname": "Время","visible": true,"searchable": true,"sortable": true + } + , + {"code": "updatedAt", + "field": "updated","type": 5,"name": "Время изменения","shortname": "Время изменения","visible": false,"searchable": true,"sortable": true + } + , + {"code": "clearingDate", + "type": 6,"name": "Дата клиринга","shortname": "Дата клиринга","visible": false,"searchable": true,"sortable": true + } + ] + + } + , + "contractRegister": { + + "name": "Журнал регистрации договоров", + + "destination": "contract-registers", + + "class": "ru.clearing.classes.statics.data.register.ContractRegister", + + "table": "contract_register", + + "fields": [ + {"code": "name", + "type": 2,"length": 255,"name": "Наименование документа","shortname": "Наименование","searchable": true,"sortable": true,"visible": true + } + , + {"code": "number", + "type": 2,"length": 255,"name": "Номер документа","shortname": "Номер","searchable": true,"sortable": true,"visible": true + } + , + {"code": "issueDate", + "type": 6,"name": "Дата составления","shortname": "Дата выдачи","searchable": true,"sortable": true + } + , + {"code": "companyFullName", + "type": 1,"name": "Наименование лица","shortname": "Компания","searchable": true,"sortable": true,"visible": true + } + , + {"code": "companyId", + "type": 1,"name": "Наименование Компании","shortname": "Компания","searchable": true,"sortable": true,"visible": true,"link": "company","linkCode": "shortName" + } + , + {"code": "documentType", + "type": 12,"name": "Наименование типа документа","shortname": "Тип документа","searchable": true,"sortable": true,"visible": true,"link": "documentType" + } + , + {"code": "issuePlace", + "type": 2,"length": 255,"name": "Место выдачи","shortname": "Место выдачи","searchable": true,"sortable": true,"visible": true + } + , + {"code": "issuer", + "type": 2,"length": 255,"name": "Кем выдан","shortname": "Кем выдан","searchable": true,"sortable": true,"visible": true + } + , + {"code": "issuerCode", + "type": 2,"length": 255,"name": "Код выдавшего органа","shortname": "Код выдавшего органа","searchable": true,"sortable": true,"visible": true + } + , + {"code": "place", + "type": 2,"length": 255,"name": "Место","shortname": "Место","searchable": true,"sortable": true,"visible": true + } + , + {"code": "validFromDate", + "type": 6,"name": "Дата начала срока действия","shortname": "Дата начала срока действия","searchable": true,"sortable": true + } + , + {"code": "validToDate", + "type": 6,"name": "Дата окончания срока действия","shortname": "Дата окончания срока действия","searchable": true,"sortable": true + } + , + {"code": "closeDate", + "type": 6,"name": "Дата расторжения","shortname": "Дата расторжения","searchable": true,"sortable": true + } + , + {"code": "comment", + "type": 2,"length": 255,"name": "Место","shortname": "Место","searchable": true,"sortable": true,"visible": true + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","visible": false,"searchable": true,"sortable": true + } + , + {"code": "createdAt", + "type": 5,"name": "Дата и время регистрации документа","shortname": "Время сделки","visible": true,"searchable": true,"sortable": true + } + , + {"code": "updatedAt", + "type": 5,"name": "Время изменения сделки","shortname": "Время изменения","visible": false,"searchable": true,"sortable": true + } + ] + + } + , + "orderRegister": { + + "name": "Реестр распоряжений, направленных расчетной организации", + + "destination": "order-registers", + + "class": "ru.clearing.classes.statics.data.register.OrderRegister", + + "table": "order_register", + + "fields": [ + {"code": "creditLegAccount", + "type": 2,"lenght": "50","name": "Счет отправителя","shortname": "Счет отправителя","searchable": true,"sortable": true,"visible": true + } + , + {"code": "creditLegAmount", + "type": 10,"name": "Сумма отправителя","shortname": "Сумма отправителя","searchable": true,"sortable": true,"visible": true + } + , + {"code": "creditLegCurrencyCode", + "type": 12,"name": "Код валюты отправителя","shortname": "Валюта отправителя","searchable": true,"sortable": true,"visible": true,"link": "currency" + } + , + {"code": "creditLegDirection", + "type": 1,"name": "Направление отправителя","shortname": "Направление","searchable": true,"sortable": true,"visible": true,"link": "inOutDirection" + } + , + {"code": "debitLegAccount", + "type": 2,"lenght": "50","name": "Счет получателя","shortname": "Счет получателя","searchable": true,"sortable": true,"visible": true + } + , + {"code": "sender", + "type": 2,"length": 255,"name": "Отправитель","shortname": "Отправитель","searchable": true,"sortable": true,"visible": true + } + , + {"code": "addressee", + "type": 2,"length": 255,"name": "Получатель","shortname": "Получатель","searchable": true,"sortable": true,"visible": true + } + , + {"code": "documentNumber", + "type": 2,"length": 255,"name": "Номер документа в сторонней системе","shortname": "Номер РО","searchable": true,"sortable": true + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "createdAt", + "field": "created","type": 4,"name": "Дата и время создания записи","shortname": "Создано","searchable": true,"sortable": true,"ignore": true + } + , + {"code": "updatedAt", + "field": "updated","type": 4,"name": "Дата и время изменения записи","shortname": "Изменено","searchable": true,"sortable": true,"ignore": true + } + , + {"code": "clearingDate", + "type": 6,"name": "Дата расчета","shortname": "Дата расчета","searchable": true,"sortable": true,"visible": true + } + ] + + } + , + "liabilitiesClaimsMoney": { + + "name": "Требования и обязательства денежных средств", + + "destination": "liabilities-claims-money", + + "class": "ru.clearing.classes.statics.data.liabilities.LiabilitiesClaimsMoney", + + "table": "liabilities_claims_money", + + "fields": [ + {"code": "companyId", + "type": 1,"name": "Наименование участника","shortname": "Участник","searchable": true,"sortable": true,"link": "company","linkCode": "shortName","ignore": true + } + , + {"code": "shortName", + "type": 2,"name": "Короткое наименование Участника","shortname": "Участник","searchable": true,"sortable": true,"length": 255,"visible": true + } + , + {"code": "accountId", + "type": 1,"name": "Наименование счета","shortname": "Счет","searchable": true,"sortable": true,"link": "account","ignore": true + } + , + {"code": "account", + "type": 2,"length": 50,"name": "Наименование счета","shortname": "Счет","searchable": true,"sortable": true,"visible": true + } + , + {"code": "accountType", + "type": 12,"name": "Тип счета","shortname": "Тип счета","searchable": true,"sortable": true,"link": "accountType" + } + , + {"code": "currency", + "type": 12,"name": "Код валюты","shortname": "Валюта","searchable": true,"sortable": true,"visible": true,"link": "currencyCode","linkCode": "code" + } + , + {"code": "liabilitiesAmount", + "type": 11,"name": "Регистр «Обязательства по денежным средствам, сформированные по результатам собственных сделок Участника клиринга», исключая проценты","shortname": "Сумма обязательств","searchable": true,"sortable": true,"visible": true + } + , + {"code": "claimsAmount", + "type": 11,"name": "Сумма требований, исключая проценты","shortname": "Сумма требований","searchable": true,"sortable": true,"visible": true + } + , + {"code": "settlementDate", + "type": 6,"name": "Дата расчета","shortname": "Дата расчета","searchable": true,"sortable": true,"visible": true + } + , + {"code": "tradingDate", + "type": 6,"name": "Дата торгов","shortname": "Дата торгов","searchable": true,"sortable": true + } + , + {"code": "tradingCode", + "type": 2,"name": "Торговый код Участника","shortname": "Торговый код","searchable": true,"sortable": true,"length": 255,"visible": true + } + , + {"code": "fullName", + "type": 2,"name": "Полное наименование Участника","shortname": "Наименование участника","searchable": true,"sortable": true,"length": 255,"visible": true + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "createdAt", + "field": "created","type": 4,"name": "Дата и время создания записи","shortname": "Создано","searchable": true,"sortable": true,"ignore": true + } + , + {"code": "updatedAt", + "field": "updated","type": 4,"name": "Дата и время изменения записи","shortname": "Изменено","searchable": true,"sortable": true,"ignore": true + } + , + {"code": "clearingDate", + "type": 6,"name": "Дата клиринга","shortname": "Дата клиринга","searchable": true,"sortable": true + } + ] + + } + , + "liabilitiesClaimsAssets": { + + "name": "Требования и обязательства финансовых активов", + + "destination": "liabilities-claims-assets", + + "class": "ru.clearing.classes.statics.data.liabilities.LiabilitiesClaimsAssets", + + "table": "liabilities_claims_assets", + + "fields": [ + {"code": "companyId", + "type": 1,"name": "Наименование участника","shortname": "Участник","searchable": true,"sortable": true,"link": "company","linkCode": "shortName","ignore": true + } + , + {"code": "shortName", + "type": 2,"name": "Короткое наименование Участника","shortname": "Участник","searchable": true,"sortable": true,"length": 255,"visible": true + } + , + {"code": "accountId", + "type": 1,"name": "Наименование счета","shortname": "Счет","searchable": true,"sortable": true,"link": "account","ignore": true + } + , + {"code": "account", + "type": 2,"length": 50,"name": "Наименование счета","shortname": "Счет","searchable": true,"sortable": true,"visible": true + } + , + {"code": "accountType", + "type": 12,"name": "Тип счета","shortname": "Тип счета","searchable": true,"sortable": true,"link": "accountType" + } + , + {"code": "currency", + "type": 12,"name": "Код валюты","shortname": "Валюта","searchable": true,"sortable": true,"visible": true,"link": "currencyCode","linkCode": "code" + } + , + {"code": "settlementDate", + "type": 6,"name": "Дата расчета","shortname": "Дата расчета","searchable": true,"sortable": true,"visible": true + } + , + {"code": "liabilitiesQuantity", + "type": 10,"name": "Сумма обязательств","shortname": "Сумма обязательств","searchable": true,"sortable": true,"visible": true + } + , + {"code": "claimsQuantity", + "type": 10,"name": "Сумма требований","shortname": "Сумма требований","searchable": true,"sortable": true,"visible": true + } + , + {"code": "contract", + "type": 2,"name": "Номер договора","shortname": "Номер договора","searchable": true,"sortable": true,"length": 255,"visible": true + } + , + {"code": "securityId", + "type": 1,"name": "Инструмент","shortname": "Инструмент","searchable": true,"sortable": true,"visible": true,"link": "moneyMarketSecurity","linkCode": "fullName" + } + , + {"code": "tradingDate", + "type": 6,"name": "Дата торгов","shortname": "Дата торгов","searchable": true,"sortable": true + } + , + {"code": "refundDate", + "type": 6,"name": "Дата возврата","shortname": "Дата возврата","searchable": true,"sortable": true,"visible": true + } + , + {"code": "price", + "type": 10,"name": "Ставка по депозиту","shortname": "Ставка,%","searchable": true,"sortable": true,"visible": true + } + , + {"code": "tradingCode", + "type": 2,"name": "Торговый код Участника","shortname": "Торговый код","searchable": true,"sortable": true,"length": 255,"visible": true + } + , + {"code": "clearingCode", + "type": 2,"name": "Клиринговый код Участника","shortname": "Клиринговый код","searchable": true,"sortable": true,"length": 255,"visible": true + } + , + {"code": "comment", + "type": 2,"name": "Комментарий","shortname": "Комментарий","searchable": true,"sortable": true,"length": 255 + } + , + {"code": "fullName", + "type": 2,"name": "Полное наименование Участника","shortname": "Наименование участника","searchable": true,"sortable": true,"length": 255,"visible": true + } + , + {"code": "parentId", + "type": 1,"name": "Запись основного договора без разделения","shortname": "Родительский договор","searchable": true,"sortable": true + } + , + {"code": "liabilitiesClaimsMoneyId", + "type": 1,"name": "Регистры денежных средств","shortname": "Регистры денег","searchable": true,"sortable": true,"link": "liabilitiesClaimsMoney" + } + , + {"code": "clearingStatus", + "type": 1,"name": "Статус клиринга","shortname": "Статус клиринга","searchable": true,"sortable": true,"link": "clearingStatus","ignore": true + } + , + {"code": "paymentId", + "type": 1,"name": "Платеж","shortname": "Платеж","searchable": true,"sortable": true + } + , + {"code": "refundPaymentId", + "type": 1,"name": "Обратный платежа","shortname": "Обратный платеж","searchable": true,"sortable": true + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "createdAt", + "field": "created","type": 4,"name": "Дата и время создания записи","shortname": "Создано","searchable": true,"sortable": true,"ignore": true + } + , + {"code": "updatedAt", + "field": "updated","type": 4,"name": "Дата и время изменения записи","shortname": "Изменено","searchable": true,"sortable": true,"ignore": true + } + , + {"code": "clearingDate", + "type": 6,"name": "Дата клиринга","shortname": "Дата клиринга","searchable": true,"sortable": true + } + ] + + } + , + "statement": { + + "name": "Денежные средства от расчетной организации", + + "destination": "statements", + + "class": "ru.clearing.classes.statics.data.statement.Statement", + + "table": "statement", + + "fields": [ + {"code": "addresseeId", + "type": 1,"name": "Наименование участника получателя","shortname": "Получатель","searchable": true,"sortable": true,"link": "company" + } + , + {"code": "senderId", + "type": 1,"name": "Наименование участника отправителя","shortname": "Отправитель","searchable": true,"sortable": true,"link": "company" + } + , + {"code": "statementType", + "type": 12,"name": "Тип поступления средств","shortname": "Тип поступления средств","searchable": true,"sortable": true,"link": "statementType" + } + , + {"code": "comment", + "type": 2,"length": 255,"name": "Комментарий","shortname": "Основание","searchable": true,"sortable": true + } + , + {"code": "accountId", + "type": 1,"name": "Наименование счета","shortname": "Счет","searchable": true,"sortable": true,"link": "account" + } + , + {"code": "account", + "type": 2,"length": 50,"name": "Наименование счета","shortname": "Счет","searchable": true,"sortable": true + } + , + {"code": "inOutDirection", + "type": 12,"name": "Направление","shortname": "Направление","searchable": true,"sortable": true,"link": "inOutDirection" + } + , + {"code": "settlementDate", + "type": 6,"name": "Дата расчетов","shortname": "Дата расчетов","searchable": true,"sortable": true + } + , + {"code": "amount", + "type": 11,"name": "Объем","shortname": "Объем","searchable": true,"sortable": true + } + , + {"code": "cashMovementCurrencyCode", + "type": 12,"name": "Код валюты","shortname": "Валюта","searchable": true,"sortable": true,"visible": true,"link": "currency" + } + , + {"code": "operationStatus", + "type": 12,"name": "Cтатус обработки","shortname": "Статус","searchable": true,"sortable": true,"link": "operationStatus" + } + , + {"code": "errorCode", + "type": 12,"name": "Код ошибки","shortname": "Код ошибки","searchable": true,"sortable": true,"link": "errorCode","linkCode": "code" + } + , + {"code": "errorText", + "type": 12,"name": "Полный текст ошибки","shortname": "Ошибка","searchable": true,"sortable": true,"link": "errorText","linkCode": "text" + } + , + {"code": "inSDfId", + "type": 1,"name": "Запись, инициировавшая изменения этой таблицы","shortname": "Входящая запись","searchable": true,"sortable": true,"ignore": true + } + , + {"code": "outSDfId", + "type": 1,"name": "Запись, сформированная в результате изменения этой таблицы","shortname": "Исходящая запись","searchable": true,"sortable": true,"ignore": true + } + , + {"code": "inOutSDfType", + "type": 12,"name": "Типы входящей и исходящей записей","shortname": "Типы входящей и исходящей записей","searchable": true,"sortable": true,"ignore": true,"link": "inOutSDfType" + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "createdAt", + "field": "created","type": 4,"name": "Дата и время создания записи","shortname": "Создано","searchable": true,"sortable": true,"ignore": true + } + , + {"code": "updatedAt", + "field": "updated","type": 4,"name": "Дата и время изменения записи","shortname": "Изменено","searchable": true,"sortable": true,"ignore": true + } + , + {"code": "clearingDate", + "type": 6,"name": "Дата расчета","shortname": "Дата расчета","searchable": true,"sortable": true,"visible": true + } + ] + + } + , + "tradeSettlement": { + + "name": "Проводки на базе сделок торговой системы", + + "class": "", + + "table": "trade_settlement", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "addresseeId", + "type": 1,"name": "Идентификатор участника получателя","shortname": "Получатель","searchable": true,"sortable": true,"link": "company" + } + , + {"code": "senderId", + "type": 1,"name": "Идентификатор участника отправителя","shortname": "Отправитель","searchable": true,"sortable": true,"link": "company" + } + , + {"code": "createdAt", + "field": "created","type": 4,"name": "Дата и время создания записи","shortname": "Создано","searchable": true,"sortable": true,"ignore": true + } + , + {"code": "updatedAt", + "field": "updated","type": 4,"name": "Дата и время изменения записи","shortname": "Изменено","searchable": true,"sortable": true,"ignore": true + } + , + {"code": "clearingDate", + "type": 6,"name": "Дата расчета","shortname": "Дата расчета","searchable": true,"sortable": true,"visible": true + } + , + {"code": "amount", + "type": 11,"name": "Объем","shortname": "Объем","searchable": true,"sortable": true + } + , + {"code": "currencyCode", + "type": 12,"name": "Код валюты","shortname": "Валюта","searchable": true,"sortable": true,"visible": true,"link": "currency" + } + , + {"code": "inOutDirection", + "type": 1,"name": "Направление","shortname": "Направление","searchable": true,"sortable": true,"link": "inOutDirection" + } + , + {"code": "accountId", + "type": 1,"name": "Идентификатор счета","shortname": "Идентификатор счета","searchable": true,"sortable": true,"link": "account" + } + , + {"code": "account", + "type": 2,"length": 50,"name": "Счет","shortname": "Счет","searchable": true,"sortable": true + } + , + {"code": "operationStatus", + "type": 12,"name": "Cтатус обработки","shortname": "Статус","searchable": true,"sortable": true,"link": "operationStatus" + } + ] + + } + , + "operation": { + + "name": "Проводки", + + "class": "", + + "table": "operation", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "addresseeId", + "type": 1,"name": "Идентификатор участника получателя","shortname": "Получатель","searchable": true,"sortable": true,"link": "company" + } + , + {"code": "senderId", + "type": 1,"name": "Идентификатор участника отправителя","shortname": "Отправитель","searchable": true,"sortable": true,"link": "company" + } + , + {"code": "createdAt", + "field": "created","type": 4,"name": "Дата и время создания записи","shortname": "Создано","searchable": true,"sortable": true,"ignore": true + } + , + {"code": "updatedAt", + "field": "updated","type": 4,"name": "Дата и время изменения записи","shortname": "Изменено","searchable": true,"sortable": true,"ignore": true + } + , + {"code": "clearingDate", + "type": 6,"name": "Дата расчета","shortname": "Дата расчета","searchable": true,"sortable": true,"visible": true + } + , + {"code": "operationTypeId", + "type": 1,"name": "Тип проводки","shortname": "Тип","searchable": true,"sortable": true,"link": "operationType" + } + , + {"code": "operationStatus", + "type": 12,"name": "Cтатус обработки","shortname": "Статус","searchable": true,"sortable": true,"link": "operationStatus" + } + ] + + } + , + "paymentInstruction": { + + "name": "Платежные поручения", + + "destination": "payment-instructions", + + "class": "ru.clearing.classes.statics.data.payment.PaymentInstruction", + + "table": "payment_instruction", + + "fields": [ + {"code": "senderId", + "type": 1,"name": "Наименование участника отправителя","shortname": "Отправитель","searchable": true,"sortable": true,"link": "company","linkCode": "shortName","visible": true + } + , + {"code": "addresseeId", + "type": 1,"name": "Наименование участника получателя","shortname": "Получатель","searchable": true,"sortable": true,"link": "company","linkCode": "shortName","visible": true + } + , + {"code": "adresseeBic", + "type": 2,"length": 255,"name": "Банковский идентификационный код (БИК) получателя","shortname": "БИК получателя","searchable": true,"sortable": true + } + , + {"code": "payeeBankName", + "type": 2,"length": 255,"name": "Наименование банка отправителя","shortname": "Банк отправителя","searchable": true,"sortable": true + } + , + {"code": "payeeBic", + "type": 2,"length": 255,"name": "Банковский идентификационный код (БИК) отправителя","shortname": "БИК отправителя","searchable": true,"sortable": true + } + , + {"code": "addresseeBankName", + "type": 2,"length": 255,"name": "Наименование банка получателя","shortname": "Банк получателя","searchable": true,"sortable": true + } + , + {"code": "paymentDate", + "type": 4,"name": "Дата и время платежа","shortname": "Дата и время платежа","searchable": true,"sortable": true,"ignore": true + } + , + {"code": "paymentPurpose", + "type": 2,"length": 255,"name": "Назначение платежа","shortname": "Назначение","searchable": true,"sortable": true,"visible": true + } + , + {"code": "settlementDate", + "type": 6,"name": "Дата расчетов","shortname": "Дата расчетов","searchable": true,"sortable": true,"visible": true + } + , + {"code": "creditLeg_amount", + "field": "creditLegAmount","type": 10,"name": "Сумма отправителя","shortname": "Сумма отправителя","searchable": true,"sortable": true,"visible": true + } + , + {"code": "debitLeg_amount", + "field": "debitLegAmount","type": 10,"name": "Сумма получателя","shortname": "Сумма получателя","searchable": true,"sortable": true,"visible": true + } + , + {"code": "creditLeg_accountId", + "field": "creditLegAccountId","type": 1,"name": "Наименование счета отправителя","shortname": "Счет отправителя","searchable": true,"sortable": true,"link": "account","ignore": true + } + , + {"code": "credit_csAccount", + "field": "creditCsAccount","type": 2,"length": 255,"name": "Корреспондентский счет отправителя","shortname": "Корр. счет отправителя","searchable": true,"sortable": true,"ignore": true + } + , + {"code": "creditLeg_account", + "field": "creditLegAccount","type": 2,"length": 50,"name": "Счет отправителя","shortname": "Счет отправителя","searchable": true,"sortable": true,"visible": true + } + , + {"code": "debitLeg_accountId", + "field": "debitLegAccountId","type": 1,"name": "Наименование счета получателя","shortname": "Счет получателя","searchable": true,"sortable": true,"link": "account","ignore": true + } + , + {"code": "debit_csAccount", + "field": "debitCsAccount","type": 2,"length": 255,"name": "Корреспондентский счет получателя","shortname": "Корр. счет получателя","searchable": true,"sortable": true,"ignore": true + } + , + {"code": "debitLeg_account", + "field": "debitLegAccount","type": 2,"length": 50,"name": "Счет получателя","shortname": "Счет получателя","searchable": true,"sortable": true,"visible": true + } + , + {"code": "creditLeg_direction", + "field": "creditLegDirection","type": 1,"name": "Направление отправителя","shortname": "Направление отправителя","searchable": true,"sortable": true,"link": "inOutDirection","ignore": true + } + , + {"code": "debitLeg_direction", + "field": "debitLegDirection","type": 1,"name": "Направление получателя","shortname": "Направление получателя","searchable": true,"sortable": true,"link": "inOutDirection","ignore": true + } + , + {"code": "creditLeg_currencyCode", + "field": "creditLegCurrencyCode","type": 12,"name": "Код валюты отправителя","shortname": "Валюта отправителя","searchable": true,"sortable": true,"link": "currency" + } + , + {"code": "debitLeg_currencyCode", + "field": "debitLegCurrencyCode","type": 12,"name": "Код валюты получателя","shortname": "Валюта получателя","searchable": true,"sortable": true,"link": "currency" + } + , + {"code": "transactionStatus", + "type": 12,"name": "Cтатус транзакции","shortname": "Статус","searchable": true,"sortable": true,"visible": true,"link": "transactionStatus","ignore": true + } + , + {"code": "documentNumber", + "type": 2,"length": 255,"name": "Номер документа в сторонней системе","shortname": "Номер РО","searchable": true,"sortable": true + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "updatedAt", + "field": "updated","type": 4,"name": "Дата и время изменения записи","shortname": "Изменено","searchable": true,"sortable": true,"ignore": true + } + , + {"code": "createdAt", + "field": "created","type": 4,"name": "Дата и время создания записи","shortname": "Создано","searchable": true,"sortable": true,"ignore": true + } + , + {"code": "clearingDate", + "type": 6,"name": "Дата расчета","shortname": "Дата расчета","searchable": true,"sortable": true,"ignore": true + } + ] + + } + , + "marketData": { + + "name": "Итоги торгов", + + "class": "ru.clearing.classes.TransactionData.Execution.MarketData", + + "table": "market_data", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","visible": false,"searchable": true,"sortable": true + } + , + {"code": "securitiesDepositId", + "type": 1,"name": "Биржевой код инструмента","shortname": "Инструмент","visible": true,"searchable": true,"sortable": true,"link": "moneyMarketSecurity","linkCode": "fullName" + } + , + {"code": "companyName", + "type": 2,"length": 255,"name": "Инициатор торгов","shortname": "Инициатор","visible": false,"searchable": true,"sortable": true + } + , + {"code": "market", + "type": 12,"name": "Секция","shortname": "Секция","visible": true,"searchable": true,"sortable": true,"link": "market","linkCode": "name" + } + , + {"code": "counterPartyNum", + "type": 1,"name": "Количество участников, заключивших сделки","shortname": "Участников","visible": true,"searchable": true,"sortable": true + } + , + {"code": "tradesNum", + "type": 1,"name": "Количество сделок","shortname": "Сделок","visible": true,"searchable": true,"sortable": true + } + , + {"code": "amount", + "type": 11,"name": "Объем сделок, руб","shortname": "Объем сделок","visible": true,"searchable": true,"sortable": true + } + , + {"code": "openPrice", + "type": 10,"name": "Откр.","shortname": "Откр.,%","visible": true,"searchable": true,"sortable": true + } + , + {"code": "maxPrice", + "type": 10,"name": "Макс.","shortname": "Макс.,%","visible": true,"searchable": true,"sortable": true + } + , + {"code": "minPrice", + "type": 10,"name": "Мин.","shortname": "Мин.,%","visible": true,"searchable": true,"sortable": true + } + , + {"code": "closePrice", + "type": 10,"name": "Закр.","shortname": "Закр.,%","visible": true,"searchable": true,"sortable": true + } + , + {"code": "avgPrice", + "type": 10,"name": "Ср.взв.","shortname": "Ср.взв.,%","visible": true,"searchable": true,"sortable": true + } + , + {"code": "duration", + "type": 3,"name": "Срок, дней","shortname": "Срок","searchable": true,"sortable": true + } + , + {"code": "createdAt", + "type": 5,"name": "Время регистрации сделки","shortname": "Время сделки","visible": true,"searchable": true,"sortable": true + } + , + {"code": "updatedAt", + "type": 5,"name": "Время изменения сделки","shortname": "Время изменения","visible": false,"searchable": true,"sortable": true + } + , + {"code": "tradingDate", + "type": 6,"name": "Дата торгов","shortname": "Дата торгов","visible": false,"searchable": true,"sortable": true + } + ] + + } + , + "chargeTariff": { + + "name": "Тарифы комиссий", + + "logUpdates": "true", + + "table": "charge_tariff", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "market", + "type": 12,"name": "Секция","shortname": "Секция","searchable": true,"sortable": true,"visible": true,"link": "market","linkCode": "name" + } + , + {"code": "clearingMemberCategory", + "type": 12,"name": "Категория участника клиринга","shortname": "Категория","searchable": true,"sortable": true,"visible": true,"link": "clearingCategory" + } + , + {"code": "chargeTypeId", + "type": 1,"name": "Тип комиссии","shortname": "Тип комиссии","searchable": true,"sortable": true,"link": "chargeType","visible": true + } + , + {"code": "chargeRate", + "type": 10,"name": "Ставка комиссионного сбора","shortname": "Ставка комиссионного сбора","searchable": true,"sortable": true,"visible": true + } + , + {"code": "currency", + "type": 1,"name": "Валюта начисления комиссии","shortname": "Валюта комиссии","searchable": true,"sortable": true,"visible": true,"link": "currencyCode","linkCode": "code" + } + , + {"code": "validFromDate", + "type": 6,"name": "Дата начала срока действия","shortname": "Дата начала срока действия","searchable": true,"sortable": true + } + , + {"code": "validToDate", + "type": 6,"name": "Дата окончания срока действия","shortname": "Дата окончания срока действия","searchable": true,"sortable": true + } + , + {"code": "createdAt", + "field": "created","type": 4,"name": "Создано","shortname": "Создано","searchable": true,"sortable": true + } + , + {"code": "updatedAt", + "field": "updated","type": 4,"name": "Изменено","shortname": "Изменено","searchable": true,"sortable": true + } + ] + + } + , + "individualChargeTariff": { + + "name": "Индивидуальные тарифы комиссий для Участника", + + "logUpdates": "true", + + "table": "individual_charge_tariff", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "companyId", + "type": 1,"name": "Участник","shortname": "Участник","searchable": true,"sortable": true,"link": "company","linkCode": "shortName" + } + , + {"code": "market", + "type": 12,"name": "Секция","shortname": "Секция","searchable": true,"sortable": true,"visible": true,"link": "market","linkCode": "name" + } + , + {"code": "clearingMemberCategory", + "type": 12,"name": "Категория участника клиринга","shortname": "Категория","searchable": true,"sortable": true,"visible": true,"link": "clearingCategory" + } + , + {"code": "chargeTypeId", + "type": 1,"name": "Тип комиссии","shortname": "Тип комиссии","searchable": true,"sortable": true,"link": "chargeType","visible": true + } + , + {"code": "chargeRate", + "type": 10,"name": "Ставка комиссионного сбора","shortname": "Ставка комиссионного сбора","searchable": true,"sortable": true,"visible": true + } + , + {"code": "currency", + "type": 1,"name": "Валюта начисления комиссии","shortname": "Валюта комиссии","searchable": true,"sortable": true,"visible": true,"link": "currencyCode","linkCode": "code" + } + , + {"code": "validFromDate", + "type": 6,"name": "Дата начала срока действия","shortname": "Дата начала срока действия","searchable": true,"sortable": true + } + , + {"code": "validToDate", + "type": 6,"name": "Дата окончания срока действия","shortname": "Дата окончания срока действия","searchable": true,"sortable": true + } + , + {"code": "createdAt", + "field": "created","type": 4,"name": "Создано","shortname": "Создано","searchable": true,"sortable": true + } + , + {"code": "updatedAt", + "field": "updated","type": 4,"name": "Изменено","shortname": "Изменено","searchable": true,"sortable": true + } + ] + + } + , + "companyTariff": { + + "name": "Тарифы комиссий в разрезе Участника", + + "class": "", + + "table": "company_tariff", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "market", + "type": 12,"name": "Секция","shortname": "Секция","searchable": true,"sortable": true,"visible": true,"link": "market","linkCode": "name" + } + , + {"code": "clearingMemberCategory", + "type": 12,"name": "Категория участника клиринга","shortname": "Категория","searchable": true,"sortable": true,"visible": true,"link": "clearingCategory" + } + , + {"code": "fullName", + "type": 2,"name": "Полное наименование Участника","shortname": "Наименование участника","searchable": true,"sortable": true,"visible": true,"length": 255,"link": "company","linkCode": "fullName" + } + , + {"code": "contract", + "type": 2,"name": "Номер договора","shortname": "Номер договора","searchable": true,"sortable": true,"visible": true,"length": 255 + } + , + {"code": "chargeTypeId", + "type": 1,"name": "Тип комиссии","shortname": "Тип комиссии","searchable": true,"sortable": true,"link": "chargeType","visible": true + } + , + {"code": "chargeRate", + "type": 10,"name": "Ставка комиссионного сбора","shortname": "Ставка комиссионного сбора","searchable": true,"sortable": true,"visible": true + } + , + {"code": "currency", + "type": 1,"name": "Валюта начисления комиссии","shortname": "Валюта комиссии","searchable": true,"sortable": true,"visible": true,"link": "currencyCode","linkCode": "code" + } + , + {"code": "validFromDate", + "type": 6,"name": "Дата начала срока действия","shortname": "Дата начала срока действия","searchable": true,"sortable": true + } + , + {"code": "validToDate", + "type": 6,"name": "Дата окончания срока действия","shortname": "Дата окончания срока действия","searchable": true,"sortable": true + } + , + {"code": "createdAt", + "field": "created","type": 4,"name": "Создано","shortname": "Создано","searchable": true,"sortable": true + } + , + {"code": "updatedAt", + "field": "updated","type": 4,"name": "Изменено","shortname": "Изменено","searchable": true,"sortable": true + } + , + {"code": "companyId", + "type": 1,"name": "Участник","shortname": "Участник","searchable": true,"sortable": true,"link": "company","linkCode": "shortName" + } + ] + + } + , + "sDf01": { + + "name": "ДФ-01 Информация о денежных средствах, находящихся на торговых банковских счетах Участников клиринга", + + "class": "ru.clearing.classes.statics.data.sdf.SDf01", + + "table": "s_df_01", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "curr_code", + "type": 2,"length": 12,"name": "Код валюты","shortname": "Код валюты","searchable": true,"sortable": true,"visible": true + } + , + {"code": "account", + "type": 2,"length": 35,"name": "Код счета участника клиринга","shortname": "Счет УК","searchable": true,"sortable": true + } + , + {"code": "remainder", + "type": 2,"length": 22,"name": "Остаток денежных средств","shortname": "Остаток денежных средств","searchable": true,"sortable": true + } + , + {"code": "deal", + "type": 2,"length": 10,"name": "Биржевой код участника клиринга","shortname": "Биржевой код УК","searchable": true,"sortable": true,"visible": true + } + , + {"code": "acc_code", + "type": 2,"length": 5,"name": "Не используется в Системе","shortname": "Не используется","searchable": true,"sortable": true + } + , + {"code": "dat", + "type": 2,"length": 8,"name": "Дата расчетов","shortname": "Дата расчетов","searchable": true,"sortable": true + } + , + {"code": "market", + "type": 2,"length": 1,"name": "Биржевая секция","shortname": "Биржевая секция","searchable": true,"sortable": true + } + , + {"code": "acc_name", + "type": 2,"length": 30,"name": "Наименование участника клиринга","shortname": "Наименование УК","searchable": true,"sortable": true + } + , + {"code": "acc_type", + "type": 2,"length": 2,"name": "Признак счета","shortname": "Признак счета","searchable": true,"sortable": true + } + , + {"code": "sumengage", + "type": 2,"length": 22,"name": "Не используется в Системе","shortname": "Не используется","searchable": true,"sortable": true + } + , + {"code": "sumunblock", + "type": 2,"length": 22,"name": "Не используется в Системе","shortname": "Не используется","searchable": true,"sortable": true + } + , + {"code": "file_type", + "type": 2,"length": 1,"name": "Не используется в Системе","shortname": "Не используется","searchable": true,"sortable": true + } + , + {"code": "fileName", + "type": 2,"length": 255,"name": "Наименование входящего файла","shortname": "Наименование файла","searchable": true,"sortable": true + } + , + {"code": "generationTime", + "type": 4,"name": "Дата и время обработки файла","shortname": "Дата и время обработки","searchable": true,"sortable": true + } + , + {"code": "generationId", + "type": 1,"name": "Идентификатор взаимодействия","shortname": "ID взаимодействия","searchable": true,"sortable": true + } + ] + + } + , + "sDf02": { + + "name": "ДФ-02 Уведомление об исполнении операции загрузки денежных средств или уведомление об ошибке", + + "class": "ru.clearing.classes.statics.data.sdf.SDf02", + + "table": "s_df_02", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "curr_code", + "type": 2,"length": 12,"name": "Код валюты","shortname": "Код валюты","searchable": true,"sortable": true,"visible": true + } + , + {"code": "account", + "type": 2,"length": 35,"name": "Код счета участника клиринга","shortname": "Счет УК","searchable": true,"sortable": true + } + , + {"code": "remainder", + "type": 2,"length": 22,"name": "Остаток денежных средств","shortname": "Остаток денежных средств","searchable": true,"sortable": true + } + , + {"code": "deal", + "type": 2,"length": 10,"name": "Биржевой код участника клиринга","shortname": "Биржевой код УК","searchable": true,"sortable": true,"visible": true + } + , + {"code": "acc_code", + "type": 2,"length": 5,"name": "Не используется в Системе","shortname": "Не используется","searchable": true,"sortable": true + } + , + {"code": "dat", + "type": 2,"length": 8,"name": "Дата расчетов","shortname": "Дата расчетов","searchable": true,"sortable": true + } + , + {"code": "market", + "type": 2,"length": 1,"name": "Биржевая секция","shortname": "Биржевая секция","searchable": true,"sortable": true + } + , + {"code": "acc_name", + "type": 2,"length": 30,"name": "Наименование участника клиринга","shortname": "Наименование УК","searchable": true,"sortable": true + } + , + {"code": "acc_type", + "type": 2,"length": 2,"name": "Признак счета","shortname": "Признак счета","searchable": true,"sortable": true + } + , + {"code": "sumengage", + "type": 2,"length": 22,"name": "Не используется в Системе","shortname": "Не используется","searchable": true,"sortable": true + } + , + {"code": "sumunblock", + "type": 2,"length": 22,"name": "Не используется в Системе","shortname": "Не используется","searchable": true,"sortable": true + } + , + {"code": "file_type", + "type": 2,"length": 1,"name": "Не используется в Системе","shortname": "Не используется","searchable": true,"sortable": true + } + , + {"code": "result", + "type": 2,"length": 3,"name": "Результат обработки каждой записи исходного файла ДФ-01","shortname": "Результат обработки ДФ-01","searchable": true,"sortable": true + } + , + {"code": "generationTime", + "type": 4,"name": "Дата и время создания записи","shortname": "Дата и время создания","searchable": true,"sortable": true + } + , + {"code": "generationId", + "type": 1,"name": "Идентификатор взаимодействия","shortname": "ID взаимодействия","searchable": true,"sortable": true + } + , + {"code": "inSDf01Id", + "type": 1,"name": "Идентификатор соответствующей записи из таблицы-источника","shortname": "Входящая запись","searchable": true,"sortable": true + } + ] + + } + , + "sDf03": { + + "name": "ДФ-03 Сводное платежное поручение", + + "class": "ru.clearing.classes.statics.data.sdf.SDf03", + + "table": "s_df_03", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "seg_type", + "type": 2,"length": 1,"name": "Код инициатора в КС","shortname": "Инициатор в КС","searchable": true,"sortable": true + } + , + {"code": "doc_type", + "type": 2,"lenght": "4","name": "Тип документа","shortname": "Тип документа","searchable": true,"sortable": true + } + , + {"code": "docnm_ref", + "type": 2,"length": 16,"name": "Ссылочный номер документа у отправителя","shortname": "Номер документа у отправителя","searchable": true,"sortable": true + } + , + {"code": "docnmprev", + "type": 2,"length": 16,"name": "Ссылка на предшестввующий документ","shortname": "Предшествующий документ","searchable": true,"sortable": true + } + , + {"code": "priority", + "type": 2,"length": 1,"name": "Приоритет скорости отправления сообщения","shortname": "Приоритет отправки","searchable": true,"sortable": true + } + , + {"code": "sbankcode", + "type": 2,"length": 12,"name": "Код банка-плательщика","shortname": "Банк-плательщик","searchable": true,"sortable": true + } + , + {"code": "c_acc_deb", + "type": 2,"length": 35,"name": "Счет по дебету","shortname": "Счет по дебету","searchable": true,"sortable": true + } + , + {"code": "sbanknam1", + "type": 2,"length": 35,"name": "Наименование банка-плательщика","shortname": "Наименование банка-плательщика","searchable": true,"sortable": true + } + , + {"code": "sbanknam2", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "sbanknam3", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "sbanknam4", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "sbanknam5", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "rbankcode", + "type": 2,"length": 12,"name": "Код банка-получателя","shortname": "Код банка-получателя","searchable": true,"sortable": true + } + , + {"code": "c_acc_cred", + "type": 2,"length": 35,"name": "Счет по кредиту","shortname": "","searchable": true,"sortable": true + } + , + {"code": "rbanknam1", + "type": 2,"length": 35,"name": "Наименование банка-получателя","shortname": "Наименование банка-получателя","searchable": true,"sortable": true + } + , + {"code": "rbanknam2", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "rbanknam3", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "rbanknam4", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "rbanknam5", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "pay_date", + "type": 2,"lenght": "8","name": "Платеж-дата","shortname": "Платеж-дата","searchable": true,"sortable": true + } + , + {"code": "ext_date", + "type": 2,"lenght": "8","name": "Дата по выписке","shortname": "Дата по выписке","searchable": true,"sortable": true + } + , + {"code": "pay_val", + "type": 2,"length": 12,"name": "Валюта платежа","shortname": "Валюта","searchable": true,"sortable": true + } + , + {"code": "sum_deb", + "type": 2,"lenght": "22","name": "Сумма дебет ","shortname": "Сумма дебет","searchable": true,"sortable": true + } + , + {"code": "sclientn1", + "type": 2,"length": 35,"name": "Наименование клиента-плательщика","shortname": "Наименование клиента-плательщика","searchable": true,"sortable": true + } + , + {"code": "sclientn2", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "sclientn3", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "sclientn4", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "sc_code", + "type": 2,"length": 12,"name": "Код клиента-плательщика","shortname": "Код клиента-плательщика","searchable": true,"sortable": true + } + , + {"code": "acc_deb", + "type": 2,"length": 35,"name": "Счет клиента-плательщика(дебет)","shortname": "Счет клиента-плательщика(дебет)","searchable": true,"sortable": true + } + , + {"code": "rclientn1", + "type": 2,"length": 35,"name": "Наименование клиента-получателя","shortname": "Наименование клиента-получателя","searchable": true,"sortable": true + } + , + {"code": "rclientn2", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "rclientn3", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "rclientn4", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "acc_kr_1", + "type": 2,"length": 35,"name": "Счет кредит","shortname": "Счет кредит","searchable": true,"sortable": true + } + , + {"code": "acc_kr_2", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "sp_code", + "type": 2,"length": 2,"name": "Код назначения платежа","shortname": "Код назначения платежа","searchable": true,"sortable": true + } + , + {"code": "specif_1", + "type": 2,"length": 35,"name": "Назначение платежа","shortname": "Назначение платежа","searchable": true,"sortable": true + } + , + {"code": "specif_2", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "specif_3", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "specif_4", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "specif_5", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "specif_6", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "send_type", + "type": 2,"length": 10,"name": "Тип отправления плат. поручения","shortname": "Тип отправления плат. поручения","searchable": true,"sortable": true + } + , + {"code": "servdate", + "type": 2,"length": 8,"name": "Дата получения товара, оказания услуг в плат. поручении","shortname": "Дата получения товара","searchable": true,"sortable": true + } + , + {"code": "doc_result", + "type": 2,"length": 2,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "imp_result", + "type": 2,"length": 3,"name": "Результат приема","shortname": "Результат приема","searchable": true,"sortable": true + } + , + {"code": "generationTime", + "type": 4,"name": "Дата и время создания записи","shortname": "Дата и время создания","searchable": true,"sortable": true + } + , + {"code": "generationId", + "type": 1,"name": "Идентификатор взаимодействия","shortname": "ID взаимодействия","searchable": true,"sortable": true + } + , + {"code": "paymentInstructionId", + "type": 1,"name": "Идентификатор соответствующей записи из таблицы-источника","shortname": "Входящая запись","searchable": true,"sortable": true,"link": "paymentInstruction" + } + ] + + } + , + "sDf04": { + + "name": "ДФ-04 Подтверждение переводов из Расчетной организации для СПВБ", + + "class": "ru.clearing.classes.statics.data.sdf.SDf04", + + "table": "s_df_04", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "seg_type", + "type": 2,"length": 1,"name": "Код инициатора в КС","shortname": "Инициатор в КС","searchable": true,"sortable": true + } + , + {"code": "doc_type", + "type": 2,"lenght": "4","name": "Тип документа","shortname": "Тип документа","searchable": true,"sortable": true + } + , + {"code": "docnm_ref", + "type": 2,"length": 16,"name": "Ссылочный номер документа у отправителя","shortname": "Номер документа у отправителя","searchable": true,"sortable": true + } + , + {"code": "docnmprev", + "type": 2,"length": 16,"name": "Ссылка на предшестввующий документ","shortname": "Предшествующий документ","searchable": true,"sortable": true + } + , + {"code": "priority", + "type": 2,"length": 1,"name": "Приоритет скорости отправления сообщения","shortname": "Приоритет отправки","searchable": true,"sortable": true + } + , + {"code": "sbankcode", + "type": 2,"length": 12,"name": "Код банка-плательщика","shortname": "Банк-плательщик","searchable": true,"sortable": true + } + , + {"code": "c_acc_deb", + "type": 2,"length": 35,"name": "Счет по дебету","shortname": "Счет по дебету","searchable": true,"sortable": true + } + , + {"code": "sbanknam1", + "type": 2,"length": 35,"name": "Наименование банка-плательщика","shortname": "Наименование банка-плательщика","searchable": true,"sortable": true + } + , + {"code": "sbanknam2", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "sbanknam3", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "sbanknam4", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "sbanknam5", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "rbankcode", + "type": 2,"length": 12,"name": "Код банка-получателя","shortname": "Код банка-получателя","searchable": true,"sortable": true + } + , + {"code": "c_acc_cred", + "type": 2,"length": 35,"name": "Счет по кредиту","shortname": "","searchable": true,"sortable": true + } + , + {"code": "rbanknam1", + "type": 2,"length": 35,"name": "Наименование банка-получателя","shortname": "Наименование банка-получателя","searchable": true,"sortable": true + } + , + {"code": "rbanknam2", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "rbanknam3", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "rbanknam4", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "rbanknam5", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "pay_date", + "type": 2,"lenght": "8","name": "Платеж-дата","shortname": "Платеж-дата","searchable": true,"sortable": true + } + , + {"code": "ext_date", + "type": 2,"lenght": "8","name": "Дата по выписке","shortname": "Дата по выписке","searchable": true,"sortable": true + } + , + {"code": "pay_val", + "type": 2,"length": 12,"name": "Валюта платежа","shortname": "Валюта","searchable": true,"sortable": true + } + , + {"code": "sum_deb", + "type": 2,"lenght": "22","name": "Сумма дебет ","shortname": "Сумма дебет","searchable": true,"sortable": true + } + , + {"code": "sclientn1", + "type": 2,"length": 35,"name": "Наименование клиента-плательщика","shortname": "Наименование клиента-плательщика","searchable": true,"sortable": true + } + , + {"code": "sclientn2", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "sclientn3", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "sclientn4", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "sc_code", + "type": 2,"length": 12,"name": "Код клиента-плательщика","shortname": "Код клиента-плательщика","searchable": true,"sortable": true + } + , + {"code": "acc_deb", + "type": 2,"length": 35,"name": "Счет клиента-плательщика(дебет)","shortname": "Счет клиента-плательщика(дебет)","searchable": true,"sortable": true + } + , + {"code": "rclientn1", + "type": 2,"length": 35,"name": "Наименование клиента-получателя","shortname": "Наименование клиента-получателя","searchable": true,"sortable": true + } + , + {"code": "rclientn2", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "rclientn3", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "rclientn4", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "acc_kr_1", + "type": 2,"length": 35,"name": "Счет кредит","shortname": "Счет кредит","searchable": true,"sortable": true + } + , + {"code": "acc_kr_2", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "sp_code", + "type": 2,"length": 2,"name": "Код назначения платежа","shortname": "Код назначения платежа","searchable": true,"sortable": true + } + , + {"code": "specif_1", + "type": 2,"length": 35,"name": "Назначение платежа","shortname": "Назначение платежа","searchable": true,"sortable": true + } + , + {"code": "specif_2", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "specif_3", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "specif_4", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "specif_5", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "specif_6", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "send_type", + "type": 2,"length": 10,"name": "Тип отправления плат. поручения","shortname": "Тип отправления плат. поручения","searchable": true,"sortable": true + } + , + {"code": "servdate", + "type": 2,"length": 8,"name": "Дата получения товара, оказания услуг в плат. поручении","shortname": "Дата получения товара","searchable": true,"sortable": true + } + , + {"code": "doc_result", + "type": 2,"length": 2,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "imp_result", + "type": 2,"length": 3,"name": "Результат приема","shortname": "Результат приема","searchable": true,"sortable": true + } + , + {"code": "fileName", + "field": "file_name","type": 2,"length": 255,"name": "Наименование входящего файла","shortname": "Наименование файла","searchable": true,"sortable": true + } + , + {"code": "generationTime", + "type": 4,"name": "Дата и время обработки файла","shortname": "Дата и время обработки","searchable": true,"sortable": true + } + , + {"code": "generationId", + "type": 1,"name": "Идентификатор взаимодействия","shortname": "ID взаимодействия","searchable": true,"sortable": true + } + ] + + } + , + "sDf05": { + + "name": "ДФ-05 Уведомление о завершении расчетов в ПРЦ", + + "class": "ru.clearing.classes.statics.data.sdf.SDf05", + + "table": "s_df_05", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "tp", + "type": 10,"name": "Тип документа","shortname": "Тип документа","searchable": true,"sortable": true + } + , + {"code": "dt", + "type": 6,"name": "Дата завершения расчетов","shortname": "Дата завершения расчетов","searchable": true,"sortable": true + } + , + {"code": "tm", + "type": 5,"name": "Время завершения расчетов","shortname": "Время завершения расчетов","searchable": true,"sortable": true + } + , + {"code": "pr", + "type": 2,"length": 1,"name": "Результат обработки запроса","shortname": "Результат обработки запроса","searchable": true,"sortable": true + } + , + {"code": "generationTime", + "type": 4,"name": "Дата и время создания записи","shortname": "Дата и время создания","searchable": true,"sortable": true + } + , + {"code": "generationId", + "type": 1,"name": "Идентификатор взаимодействия","shortname": "ID взаимодействия","searchable": true,"sortable": true + } + ] + + } + , + "sDf08": { + + "name": "ДФ-08 Запрос остатков по всем счетам", + + "class": "ru.clearing.classes.statics.data.sdf.SDf08", + + "table": "s_df_08", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "number", + "type": 2,"length": 10,"name": "Номер запроса остатков по счетам","shortname": "Номер запроса","searchable": true,"sortable": true,"visible": true + } + , + {"code": "datetime", + "type": 2,"length": 13,"name": "Дата и время сообщения","shortname": "Дата и время сообщения","searchable": true,"sortable": true + } + , + {"code": "generationTime", + "type": 4,"name": "Дата и время создания записи","shortname": "Дата и время создания","searchable": true,"sortable": true + } + , + {"code": "generationId", + "type": 1,"name": "Идентификатор взаимодействия","shortname": "ID взаимодействия","searchable": true,"sortable": true + } + ] + + } + , + "sDf09": { + + "name": "ДФ-09 Уведомление о поступлении средств на клиринговый счет", + + "class": "ru.clearing.classes.statics.data.sdf.SDf09", + + "table": "s_df_09", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "account", + "type": 2,"length": 20,"name": "Номер счета участника торгов","shortname": "Номер счета участника торгов","searchable": true,"sortable": true + } + , + {"code": "sum", + "type": 10,"name": "Сумма платежного документа (операции)","shortname": "Сумма платежного документа","searchable": true,"sortable": true + } + , + {"code": "market", + "type": 2,"length": 1,"name": "Код сегмента рынка","shortname": "Код сегмента рынка","searchable": true,"sortable": true + } + , + {"code": "type", + "type": 2,"length": 1,"name": "Код типа платежного документа (операции)","shortname": "Код типа платежного документа","searchable": true,"sortable": true + } + , + {"code": "number", + "type": 10,"name": "Номер платежного документа (операции)","shortname": "Номер запроса","searchable": true,"sortable": true + } + , + {"code": "inn", + "field": "inn","type": 10,"name": "ИНН","shortname": "ИНН","searchable": true,"sortable": true,"visible": true + } + , + {"code": "fileName", + "type": 2,"length": 255,"name": "Наименование входящего файла","shortname": "Наименование файла","searchable": true,"sortable": true + } + , + {"code": "generationTime", + "type": 4,"name": "Дата и время обработки файла","shortname": "Дата и время обработки","searchable": true,"sortable": true + } + , + {"code": "generationId", + "type": 1,"name": "Идентификатор взаимодействия","shortname": "ID взаимодействия","searchable": true,"sortable": true + } + ] + + } + , + "sDf10": { + + "name": "ДФ-10 Подтверждение о загрузке по поступлению на клиринговый счет", + + "class": "ru.clearing.classes.statics.data.sdf.SDf10", + + "table": "s_df_10", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "account", + "type": 2,"length": 20,"name": "Номер счета участника торгов","shortname": "Номер счета участника торгов","searchable": true,"sortable": true + } + , + {"code": "sum", + "type": 10,"name": "Сумма платежного документа (операции)","shortname": "Сумма платежного документа","searchable": true,"sortable": true + } + , + {"code": "market", + "type": 2,"length": 1,"name": "Код сегмента рынка","shortname": "Код сегмента рынка","searchable": true,"sortable": true + } + , + {"code": "type", + "type": 2,"length": 1,"name": "Код типа платежного документа (операции)","shortname": "Код типа платежного документа","searchable": true,"sortable": true + } + , + {"code": "number", + "type": 10,"name": "Номер платежного документа (операции)","shortname": "Номер запроса","searchable": true,"sortable": true + } + , + {"code": "inn", + "type": 10,"name": "ИНН","shortname": "ИНН","searchable": true,"sortable": true,"visible": true + } + , + {"code": "result", + "type": 2,"length": 3,"name": "Результат приема","shortname": "Результат приема","searchable": true,"sortable": true + } + , + {"code": "generationTime", + "type": 4,"name": "Дата и время создания записи","shortname": "Дата и время создания","searchable": true,"sortable": true + } + , + {"code": "generationId", + "type": 1,"name": "Идентификатор взаимодействия","shortname": "ID взаимодействия","searchable": true,"sortable": true + } + , + {"code": "inSDf09Id", + "type": 1,"name": "Идентификатор соответствующей записи из таблицы-источника","shortname": "Входящая запись","searchable": true,"sortable": true + } + ] + + } + , + "sDf11": { + + "name": "ДФ-11 Из КС в ПРЦ Платежное распоряжение на перевод средств с ТБС Участника на КС Инициатора", + + "class": "ru.clearing.classes.statics.data.sdf.SDf11", + + "table": "s_df_11", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "seg_type", + "type": 2,"length": 1,"name": "Код инициатора в КС","shortname": "Инициатор в КС","searchable": true,"sortable": true + } + , + {"code": "doc_type", + "type": 2,"lenght": "4","name": "Тип документа","shortname": "Тип документа","searchable": true,"sortable": true + } + , + {"code": "docnm_ref", + "type": 2,"length": 16,"name": "Ссылочный номер документа у отправителя","shortname": "Номер документа у отправителя","searchable": true,"sortable": true + } + , + {"code": "docnmprev", + "type": 2,"length": 16,"name": "Ссылка на предшестввующий документ","shortname": "Предшествующий документ","searchable": true,"sortable": true + } + , + {"code": "priority", + "type": 2,"length": 1,"name": "Приоритет скорости отправления сообщения","shortname": "Приоритет отправки","searchable": true,"sortable": true + } + , + {"code": "sbankcode", + "type": 2,"length": 12,"name": "Код банка-плательщика","shortname": "Банк-плательщик","searchable": true,"sortable": true + } + , + {"code": "c_acc_deb", + "type": 2,"length": 35,"name": "Счет по дебету","shortname": "Счет по дебету","searchable": true,"sortable": true + } + , + {"code": "sbanknam1", + "type": 2,"length": 35,"name": "Наименование банка-плательщика","shortname": "Наименование банка-плательщика","searchable": true,"sortable": true + } + , + {"code": "sbanknam2", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "sbanknam3", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "sbanknam4", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "sbanknam5", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "rbankcode", + "type": 2,"length": 12,"name": "Код банка-получателя","shortname": "Код банка-получателя","searchable": true,"sortable": true + } + , + {"code": "c_acc_cred", + "type": 2,"length": 35,"name": "Счет по кредиту","shortname": "","searchable": true,"sortable": true + } + , + {"code": "rbanknam1", + "type": 2,"length": 35,"name": "Наименование банка-получателя","shortname": "Наименование банка-получателя","searchable": true,"sortable": true + } + , + {"code": "rbanknam2", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "rbanknam3", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "rbanknam4", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "rbanknam5", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "pay_date", + "type": 2,"lenght": "8","name": "Платеж-дата","shortname": "Платеж-дата","searchable": true,"sortable": true + } + , + {"code": "ext_date", + "type": 2,"lenght": "8","name": "Дата по выписке","shortname": "Дата по выписке","searchable": true,"sortable": true + } + , + {"code": "pay_val", + "type": 2,"length": 12,"name": "Валюта платежа","shortname": "Валюта","searchable": true,"sortable": true + } + , + {"code": "sum_deb", + "type": 2,"lenght": "22","name": "Сумма дебет ","shortname": "Сумма дебет","searchable": true,"sortable": true + } + , + {"code": "sclientn1", + "type": 2,"length": 35,"name": "Наименование клиента-плательщика","shortname": "Наименование клиента-плательщика","searchable": true,"sortable": true + } + , + {"code": "sclientn2", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "sclientn3", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "sclientn4", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "sc_code", + "type": 2,"length": 12,"name": "Код клиента-плательщика","shortname": "Код клиента-плательщика","searchable": true,"sortable": true + } + , + {"code": "acc_deb", + "type": 2,"length": 35,"name": "Счет клиента-плательщика(дебет)","shortname": "Счет клиента-плательщика(дебет)","searchable": true,"sortable": true + } + , + {"code": "rclientn1", + "type": 2,"length": 35,"name": "Наименование клиента-получателя","shortname": "Наименование клиента-получателя","searchable": true,"sortable": true + } + , + {"code": "rclientn2", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "rclientn3", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "rclientn4", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "acc_kr_1", + "type": 2,"length": 35,"name": "Счет кредит","shortname": "Счет кредит","searchable": true,"sortable": true + } + , + {"code": "acc_kr_2", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "sp_code", + "type": 2,"length": 2,"name": "Код назначения платежа","shortname": "Код назначения платежа","searchable": true,"sortable": true + } + , + {"code": "specif_1", + "type": 2,"length": 35,"name": "Назначение платежа","shortname": "Назначение платежа","searchable": true,"sortable": true + } + , + {"code": "specif_2", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "specif_3", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "specif_4", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "specif_5", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "specif_6", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "send_type", + "type": 2,"length": 10,"name": "Тип отправления плат. поручения","shortname": "Тип отправления плат. поручения","searchable": true,"sortable": true + } + , + {"code": "servdate", + "type": 2,"length": 8,"name": "Дата получения товара, оказания услуг в плат. поручении","shortname": "Дата получения товара","searchable": true,"sortable": true + } + , + {"code": "doc_result", + "type": 2,"length": 2,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "generationTime", + "type": 4,"name": "Дата и время создания записи","shortname": "Дата и время создания","searchable": true,"sortable": true + } + , + {"code": "generationId", + "type": 1,"name": "Идентификатор взаимодействия","shortname": "ID взаимодействия","searchable": true,"sortable": true + } + , + {"code": "paymentInstructionId", + "type": 1,"name": "Идентификатор соответствующей записи из таблицы-источника","shortname": "Входящая запись","searchable": true,"sortable": true,"link": "paymentInstruction" + } + ] + + } + , + "sDf12": { + + "name": "ДФ-12 Из ПРЦ в КС Информация о блокировке/разблокировке/закрытии ТБС УК", + + "class": "ru.clearing.classes.statics.data.sdf.SDf12", + + "table": "s_df_12", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "account", + "type": 2,"length": 25,"name": "Код счета участника клиринга","shortname": "Код счета УК","searchable": true,"sortable": true,"visible": true + } + , + {"code": "deal", + "type": 2,"length": 4,"name": "Биржевой код участника клиринга","shortname": "Биржевой код УК","searchable": true,"sortable": true,"visible": true + } + , + {"code": "status", + "type": 3,"name": "Статус счета","shortname": "Статус","searchable": true,"sortable": true,"visible": true + } + , + {"code": "fileName", + "type": 2,"length": 255,"name": "Наименование входящего файла","shortname": "Наименование файла","searchable": true,"sortable": true + } + , + {"code": "generationTime", + "type": 4,"name": "Дата и время обработки файла","shortname": "Дата и время обработки","searchable": true,"sortable": true + } + , + {"code": "generationId", + "type": 1,"name": "Идентификатор взаимодействия","shortname": "ID взаимодействия","searchable": true,"sortable": true + } + ] + + } + , + "sDf13": { + + "name": "ДФ-13 Вывод свободных средств для инициаторов категории В с клирингового счета 30414/7 - платежное поручение АО СПВБ на вывод средств из РО", + + "class": "ru.clearing.classes.statics.data.sdf.SDf13", + + "table": "s_df_13", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "seg_type", + "type": 2,"length": 1,"name": "Код инициатора в КС","shortname": "Инициатор в КС","searchable": true,"sortable": true + } + , + {"code": "doc_type", + "type": 2,"lenght": "4","name": "Тип документа","shortname": "Тип документа","searchable": true,"sortable": true + } + , + {"code": "docnm_ref", + "type": 2,"length": 16,"name": "Ссылочный номер документа у отправителя","shortname": "Номер документа у отправителя","searchable": true,"sortable": true + } + , + {"code": "docnmprev", + "type": 2,"length": 16,"name": "Ссылка на предшестввующий документ","shortname": "Предшествующий документ","searchable": true,"sortable": true + } + , + {"code": "priority", + "type": 2,"length": 1,"name": "Приоритет скорости отправления сообщения","shortname": "Приоритет отправки","searchable": true,"sortable": true + } + , + {"code": "sbankcode", + "type": 2,"length": 12,"name": "Код банка-плательщика","shortname": "Банк-плательщик","searchable": true,"sortable": true + } + , + {"code": "c_acc_deb", + "type": 2,"length": 35,"name": "Кор счет банка - плательщика в системе - акт.","shortname": "Кор счет банка - плательщика","searchable": true,"sortable": true + } + , + {"code": "sbanknam1", + "type": 2,"length": 35,"name": "Наименование банка-плательщика","shortname": "Наименование банка-плательщика","searchable": true,"sortable": true + } + , + {"code": "sbanknam2", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "sbanknam3", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "sbanknam4", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "sbanknam5", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "rbankcode", + "type": 2,"length": 12,"name": "Код банка-получателя","shortname": "Код банка-получателя","searchable": true,"sortable": true + } + , + {"code": "c_acc_cred", + "type": 2,"length": 35,"name": "Кор счет банка - получателя в системе - акт. ","shortname": "Кор счет банка - получателя","searchable": true,"sortable": true + } + , + {"code": "rbanknam1", + "type": 2,"length": 35,"name": "Наименование банка-получателя","shortname": "Наименование банка-получателя","searchable": true,"sortable": true + } + , + {"code": "op_type", + "type": 2,"length": 2,"name": "Вид операции","shortname": "Вид операции","searchable": true,"sortable": true + } + , + {"code": "op_order", + "type": 2,"length": 1,"name": "Очередность платежа","shortname": "Очередность платежа","searchable": true,"sortable": true + } + , + {"code": "rbanknam4", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "rbanknam5", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "pay_date", + "type": 2,"lenght": "8","name": "Платеж-дата","shortname": "Платеж-дата","searchable": true,"sortable": true + } + , + {"code": "ext_date", + "type": 2,"lenght": "8","name": "Дата по выписке","shortname": "Дата по выписке","searchable": true,"sortable": true + } + , + {"code": "pay_val", + "type": 2,"length": 12,"name": "Валюта платежа","shortname": "Валюта","searchable": true,"sortable": true + } + , + {"code": "sum_deb", + "type": 2,"lenght": "22","name": "Сумма дебет ","shortname": "Сумма дебет","searchable": true,"sortable": true + } + , + {"code": "sclientn1", + "type": 2,"length": 35,"name": "Наименование клиента-плательщика","shortname": "Наименование клиента-плательщика","searchable": true,"sortable": true + } + , + {"code": "inn_deb", + "type": 2,"length": 12,"name": "ИНН клиента-плательщика","shortname": "ИНН клиента-плательщика","searchable": true,"sortable": true + } + , + {"code": "kpp_deb", + "type": 2,"length": 9,"name": "КПП клиента-плательщика","shortname": "КПП клиента-плательщика","searchable": true,"sortable": true + } + , + {"code": "sclientn4", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "sc_code", + "type": 2,"length": 12,"name": "Код клиента-плательщика","shortname": "Код клиента-плательщика","searchable": true,"sortable": true + } + , + {"code": "acc_deb", + "type": 2,"length": 35,"name": "Счет клиента-плательщика(дебет)","shortname": "Счет клиента-плательщика(дебет)","searchable": true,"sortable": true + } + , + {"code": "rclientn1", + "type": 2,"length": 35,"name": "Наименование клиента-получателя","shortname": "Наименование клиента-получателя","searchable": true,"sortable": true + } + , + {"code": "inn_cred", + "type": 2,"length": 12,"name": "ИНН клиента-получателя","shortname": "ИНН клиента-получателя","searchable": true,"sortable": true + } + , + {"code": "kpp_cred", + "type": 2,"length": 9,"name": "КПП клиента-получателя","shortname": "КПП клиента-получателя","searchable": true,"sortable": true + } + , + {"code": "rclientn4", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "acc_kr_1", + "type": 2,"length": 35,"name": "Счет получателя","shortname": "Счет получателя","searchable": true,"sortable": true + } + , + {"code": "acc_kr_2", + "type": 2,"length": 35,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "sp_code", + "type": 2,"length": 2,"name": "Код назначения платежа","shortname": "Код назначения платежа","searchable": true,"sortable": true + } + , + {"code": "specif_1", + "type": 2,"length": 35,"name": "Назначение платежа","shortname": "Назначение платежа","searchable": true,"sortable": true + } + , + {"code": "specif_2", + "type": 2,"length": 35,"name": "Назначение платежа","shortname": "Назначение платежа","searchable": true,"sortable": true + } + , + {"code": "specif_3", + "type": 2,"length": 35,"name": "Назначение платежа","shortname": "Назначение платежа","searchable": true,"sortable": true + } + , + {"code": "specif_4", + "type": 2,"length": 35,"name": "Назначение платежа","shortname": "Назначение платежа","searchable": true,"sortable": true + } + , + {"code": "specif_5", + "type": 2,"length": 35,"name": "Назначение платежа","shortname": "Назначение платежа","searchable": true,"sortable": true + } + , + {"code": "specif_6", + "type": 2,"length": 35,"name": "Назначение платежа","shortname": "Назначение платежа","searchable": true,"sortable": true + } + , + {"code": "send_type", + "type": 2,"length": 10,"name": "Вид платежа","shortname": "Вид платежа","searchable": true,"sortable": true + } + , + {"code": "servdate", + "type": 2,"length": 8,"name": "Дата получения товара, оказания услуг в плат. поручении","shortname": "Дата получения товара","searchable": true,"sortable": true + } + , + {"code": "doc_result", + "type": 2,"length": 2,"name": "","shortname": "","searchable": true,"sortable": true + } + , + {"code": "generationTime", + "type": 4,"name": "Дата и время создания записи","shortname": "Дата и время создания","searchable": true,"sortable": true + } + , + {"code": "generationId", + "type": 1,"name": "Идентификатор взаимодействия","shortname": "ID взаимодействия","searchable": true,"sortable": true + } + ] + + } + , + "sDf16": { + + "name": "ДФ-16 Формат запроса по возврату депозита или дозачисление/списание денежных средств", + + "class": "ru.clearing.classes.statics.data.sdf.SDf16", + + "table": "s_df_16", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "account", + "type": 2,"length": 20,"name": "Номер счета участника торгов","shortname": "Номер счета участника торгов","searchable": true,"sortable": true + } + , + {"code": "sum", + "type": 10,"name": "Сумма платежного документа (операции)","shortname": "Сумма платежного документа","searchable": true,"sortable": true + } + , + {"code": "market", + "type": 2,"length": 1,"name": "Код сегмента рынка","shortname": "Код сегмента рынка","searchable": true,"sortable": true + } + , + {"code": "type", + "type": 2,"length": 1,"name": "Код типа платежного документа (операции)","shortname": "Код типа платежного документа","searchable": true,"sortable": true + } + , + {"code": "inn", + "field": "inn","type": 10,"name": "ИНН","shortname": "ИНН","searchable": true,"sortable": true,"visible": true + } + , + {"code": "bic", + "field": "bic","type": 10,"name": "БИК","shortname": "БИК","searchable": true,"sortable": true,"visible": true + } + , + {"code": "spec", + "field": "spec","type": 2,"length": 255,"name": "Назначение","shortname": "Назначение","searchable": true,"sortable": true + } + , + {"code": "number", + "type": 10,"name": "Номер платежного документа (операции)","shortname": "Номер платежного документа","searchable": true,"sortable": true + } + , + {"code": "fileName", + "type": 2,"length": 255,"name": "Наименование входящего файла","shortname": "Наименование файла","searchable": true,"sortable": true + } + , + {"code": "generationTime", + "type": 4,"name": "Дата и время обработки файла","shortname": "Дата и время обработки","searchable": true,"sortable": true + } + , + {"code": "generationId", + "type": 1,"name": "Идентификатор взаимодействия","shortname": "ID взаимодействия","searchable": true,"sortable": true + } + ] + + } + , + "sDf17": { + + "name": "ДФ-17 Формат ответа на запрос по возврату депозита или дозачисление/списание денежных средств", + + "class": "ru.clearing.classes.statics.data.sdf.SDf17", + + "table": "s_df_17", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "account", + "type": 2,"length": 20,"name": "Номер счета участника торгов","shortname": "Номер счета участника торгов","searchable": true,"sortable": true + } + , + {"code": "sum", + "type": 10,"name": "Сумма платежного документа (операции)","shortname": "Сумма платежного документа","searchable": true,"sortable": true + } + , + {"code": "market", + "type": 2,"length": 1,"name": "Код сегмента рынка","shortname": "Код сегмента рынка","searchable": true,"sortable": true + } + , + {"code": "type", + "type": 2,"length": 1,"name": "Код типа платежного документа (операции)","shortname": "Код типа платежного документа","searchable": true,"sortable": true + } + , + {"code": "inn", + "type": 10,"name": "ИНН","shortname": "ИНН","searchable": true,"sortable": true,"visible": true + } + , + {"code": "bic", + "type": 10,"name": "БИК","shortname": "БИК","searchable": true,"sortable": true,"visible": true + } + , + {"code": "spec", + "type": 2,"length": 255,"name": "Назначение","shortname": "Назначение","searchable": true,"sortable": true + } + , + {"code": "number", + "type": 10,"name": "Номер платежного документа (операции)","shortname": "Номер платежного документа","searchable": true,"sortable": true + } + , + {"code": "result", + "type": 10,"name": "Код завершения операции","shortname": "Код завершения операции","searchable": true,"sortable": true + } + , + {"code": "generationTime", + "type": 4,"name": "Дата и время создания записи","shortname": "Дата и время создания","searchable": true,"sortable": true + } + , + {"code": "generationId", + "type": 1,"name": "Идентификатор взаимодействия","shortname": "ID взаимодействия","searchable": true,"sortable": true + } + , + {"code": "inSDf16Id", + "type": 1,"name": "Идентификатор соответствующей записи из таблицы-источника","shortname": "Входящая запись","searchable": true,"sortable": true + } + ] + + } + , + "sDf18": { + + "name": "ДФ-18 Из КС в ПРЦ Квитанция о получении информации о состоянии счета (блокировка/разблокировка/закрытие)", + + "class": "ru.clearing.classes.statics.data.sdf.SDf18", + + "table": "s_df_18", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "account", + "type": 2,"length": 25,"name": "Код счета участника клиринга","shortname": "Код счета УК","searchable": true,"sortable": true,"visible": true + } + , + {"code": "deal", + "type": 2,"length": 4,"name": "Биржевой код участника клиринга","shortname": "Биржевой код УК","searchable": true,"sortable": true,"visible": true + } + , + {"code": "status", + "type": 3,"name": "Статус счета","shortname": "Статус","searchable": true,"sortable": true,"visible": true + } + , + {"code": "result", + "type": 10,"name": "Код завершения операции","shortname": "Код завершения операции","searchable": true,"sortable": true + } + , + {"code": "generationTime", + "type": 4,"name": "Дата и время создания записи","shortname": "Дата и время создания","searchable": true,"sortable": true + } + , + {"code": "generationId", + "type": 1,"name": "Идентификатор взаимодействия","shortname": "ID взаимодействия","searchable": true,"sortable": true + } + , + {"code": "inSDf12Id", + "type": 1,"name": "Идентификатор соответствующей записи из таблицы-источника","shortname": "Входящая запись","searchable": true,"sortable": true + } + ] + + } + , + "s_trade": { + + "name": "Сделки из Торговой системы", + + "class": "ru.clearing.classes.statics.data.misc.STrade", + + "table": "s_trade", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "trade_num", + "type": 1,"name": "Номер сделки","shortname": "Номер сделки","searchable": true,"sortable": true + } + , + {"code": "sec_code", + "type": 2,"length": 255,"name": "Код ценной бумаги","shortname": "Код ценной бумаги","searchable": true,"sortable": true + } + , + {"code": "trade_date_time", + "type": 4,"name": "Дата-время сделки","shortname": "Дата-время сделки","searchable": true,"sortable": true + } + , + {"code": "settle_date", + "type": 6,"name": "Плановая дата исполнения сделки","shortname": "Плановая дата исполнения сделки","searchable": true,"sortable": true + } + , + {"code": "price", + "type": 10,"name": "Цена сделки","shortname": "Цена сделки","searchable": true,"sortable": true + } + , + {"code": "value", + "type": 11,"name": "Сумма сделки","shortname": "Сумма сделки","searchable": true,"sortable": true + } + , + {"code": "qty", + "type": 11,"name": "Количество лотов по сделке","shortname": "Количество лотов по сделке","searchable": true,"sortable": true + } + , + {"code": "accruedint", + "type": 10,"name": "НКД за 1 ценную бумагу","shortname": "НКД за 1 ценную бумагу","searchable": true,"sortable": true + } + , + {"code": "firm_id", + "type": 2,"length": 255,"name": "ID клиента в КС","shortname": "ID клиента в КС","searchable": true,"sortable": true + } + , + {"code": "client_code", + "type": 2,"length": 255,"name": "Код участника торгов = Код участника клиринга = Код участника расчетов","shortname": "Участник","searchable": true,"sortable": true + } + , + {"code": "exchange_commission", + "type": 11,"name": "Комиссия по сделке","shortname": "Комиссия","searchable": true,"sortable": true + } + , + {"code": "class_code", + "type": 2,"length": 255,"name": "Код класса сделки из новой ТС","shortname": "Код класса сделки","searchable": true,"sortable": true + } + , + {"code": "operation", + "type": 2,"length": 255,"name": "Тип плеча (Купля/Продажа)","shortname": "Тип плеча","searchable": true,"sortable": true + } + , + {"code": "issue_account", + "type": 2,"length": 50,"name": "Счет для учета ценной бумаги","shortname": "Счет для учета ценной бумаги","searchable": true,"sortable": true + } + , + {"code": "money_account", + "type": 2,"length": 50,"name": "Счет для учета денежных средств","shortname": "Счет для учета денежных средств","searchable": true,"sortable": true + } + , + {"code": "trade_type", + "type": 2,"length": 50,"name": "Первичное размещение/торги","shortname": "Первичное размещение/торги","searchable": true,"sortable": true + } + , + {"code": "days_to_mat_date", + "type": 1,"name": "Количество дней до погашения","shortname": "Количество дней до погашения","searchable": true,"sortable": true + } + , + {"code": "collateral", + "type": 2,"length": 50,"name": "Признак залога (не используется)","shortname": "Признак залога (не используется)","searchable": true,"sortable": true + } + , + {"code": "settle_code", + "type": 2,"length": 50,"name": "Код периода сделки из новой ТС","shortname": "Код периода сделки из новой ТС","searchable": true,"sortable": true + } + ] + + } + , + "notification": { + + "name": "Сообщения", + + "destination": "notifications", + + "class": "ru.clearing.classes.statics.data.misc.Notification", + + "logUpdates": "true", + + "table": "notification", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "createdAt", + "field": "created","type": 4,"name": "Дата и время создания записи","shortname": "Создано","searchable": true,"sortable": true,"ignore": true + } + , + {"code": "updatedAt", + "field": "updated","type": 4,"name": "Дата и время изменения записи","shortname": "Изменено","searchable": true,"sortable": true,"ignore": true + } + , + {"code": "clearingDate", + "type": 6,"name": "Дата","shortname": "Дата","searchable": true,"sortable": true,"visible": true + } + , + {"code": "senderId", + "type": 1,"name": "Идентификатор участника отправителя","shortname": "Отправитель","searchable": true,"sortable": true,"link": "company" + } + , + {"code": "addresseeId", + "type": 1,"name": "Идентификатор участника получателя","shortname": "Получатель","searchable": true,"sortable": true,"link": "company" + } + , + {"code": "objectType", + "type": 12,"name": "Тип объекта","shortname": "Объект","searchable": true,"sortable": true,"link": "objectType" + } + , + {"code": "objectId", + "type": 4,"name": "Идентификатор объекта","shortname": "ID объекта","searchable": true,"sortable": true + } + , + {"code": "notificationStatus", + "type": 12,"name": "Статус сообщения","shortname": "Статус","searchable": true,"sortable": true,"visible": true,"link": "notificationStatus" + } + ] + ,"actions":[ + {"method":"put", + + "name": "Изменение статуса сообщения", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "notification","linkCode": "id","required": true + } + , + {"code": "notificationStatus", + "type": 12,"name": "Статус сообщения","shortname": "Статус","link": "notificationStatus","required": true + } + ] + } + ] + } + , + "verificationResult": { + + "name": "Результаты сверки", + + "destination": "verification-results", + + "class": "ru.clearing.classes.statics.data.clearing.VerificationResult", + + "table": "verification_result", + + "fields": [ + {"code": "clearingCode", + "type": 2,"length": 255,"name": "Код участника клиринга","shortname": "Клиринговый код","searchable": true,"sortable": true,"visible": true + } + , + {"code": "accountId", + "type": 1,"name": "Счет УК, по которому проводится сверка","shortname": "Счет УК","searchable": true,"sortable": true + } + , + {"code": "inSum", + "type": 11,"name": "Входящая сумма остатков","shortname": "Остатки","visible": true,"searchable": true,"sortable": true + } + , + {"code": "outIntSum", + "type": 11,"name": "Исходящая сумма остатков, полученная в КС","shortname": "Остатки, полученные в КС","visible": true,"searchable": true,"sortable": true + } + , + {"code": "outExtSum", + "type": 11,"name": "Исходящая сумма остатков из отчета ПРЦ","shortname": "Остатки, полученные из ПРЦ","visible": true,"searchable": true,"sortable": true + } + , + {"code": "diffSum", + "type": 11,"name": "Сумма расхождений","shortname": "Сумма расхождений","visible": true,"searchable": true,"sortable": true + } + , + {"code": "generationId", + "type": 1,"name": "Идентификатор взаимодействия","shortname": "ID взаимодействия","searchable": true,"sortable": true + } + , + {"code": "generationStatus", + "type": 12,"name": "Общий статус сверки","shortname": "Статус","searchable": true,"sortable": true,"visible": true,"link": "resultStatus" + } + , + {"code": "resultStatus", + "type": 12,"name": "Статус сверки","shortname": "Статус","searchable": true,"sortable": true,"visible": true,"link": "resultStatus" + } + , + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "createdAt", + "type": 4,"name": "Дата и время создания записи","shortname": "Создано","searchable": true,"sortable": true,"ignore": true + } + , + {"code": "updatedAt", + "type": 4,"name": "Дата и время изменения записи","shortname": "Изменено","searchable": true,"sortable": true,"ignore": true + } + ] + + } + , + "session": { + + "name": "Клиринговая сессия", + + "class": "ru.clearing.classes.statics.data.misc.Session", + + "logUpdates": "true", + + "table": "session", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "createdAt", + "field": "created","type": 4,"name": "Дата и время создания записи","shortname": "Создано","searchable": true,"sortable": true,"ignore": true + } + , + {"code": "updatedAt", + "field": "updated","type": 4,"name": "Дата и время изменения записи","shortname": "Изменено","searchable": true,"sortable": true,"ignore": true + } + , + {"code": "clearingDate", + "type": 6,"name": "Дата","shortname": "Дата","searchable": true,"sortable": true,"visible": true + } + , + {"code": "sessionStatus", + "type": 12,"name": "Статус клиринговой сессии","shortname": "Статус","searchable": true,"sortable": true,"visible": true,"link": "sessionStatus" + } + ] + + } + , + "moneyMarketSession": { + + "name": "Сессия денежного рынка", + + "class": "com.spicex.TransactionData.Session", + + "logUpdates": "true", + + "table": "money_market_session", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true + } + , + {"code": "clearingDate", + "type": 6,"name": "Дата","shortname": "Дата","searchable": true,"sortable": true,"visible": true,"extends": "session" + } + , + {"code": "sessionStatus", + "type": 12,"name": "Статус клиринговой сессии","shortname": "Статус","searchable": true,"sortable": true,"visible": true,"link": "sessionStatus","extends": "session" + } + , + {"code": "companyId", + "type": 1,"name": "Наименование инициатора торгов","shortname": "Инициатор","visible": false,"searchable": true,"sortable": true,"link": "company","linkCode": "shortName" + } + , + {"code": "securityId", + "type": 1,"name": "Наименование инструмента","shortname": "Инструмент","searchable": false,"sortable": true,"visible": true,"link": "moneyMarketSecurity","linkCode": "fullName" + } + , + {"code": "userId", + "type": 1,"name": "Наименование пользователя","shortname": "Пользователь","searchable": true,"sortable": true,"visible": true,"link": "userCls" + } + ] + + } + + } + + ,"views": { + + } + + ,"types": [ + + { + "code": "identity", + + "id": "1" + , + "name": "Идентификатор" + , + "type": "bigint" + , + "javatype": "Long" + + } + , + { + "code": "string", + + "id": "2" + , + "name": "Строка" + , + "type": "varchar" + , + "javatype": "String" + + } + , + { + "code": "long", + + "id": "3" + , + "name": "Целый" + , + "type": "bigint" + , + "javatype": "Long" + + } + , + { + "code": "dateTime", + + "id": "4" + , + "name": "Дата и время" + , + "type": "timestamp" + , + "javatype": "Instant" + + } + , + { + "code": "time", + + "id": "5" + , + "name": "Время" + , + "type": "time" + , + "javatype": "LocalTime" + + } + , + { + "code": "date", + + "id": "6" + , + "name": "Дата" + , + "type": "date" + , + "javatype": "LocalDate" + + } + , + { + "code": "array", + + "id": "7" + , + "name": "Массив" + , + "type": "json" + , + "javatype": "String" + + } + , + { + "code": "object", + + "id": "8" + , + "name": "Объект" + , + "type": "jsonb" + , + "javatype": "String" + + } + , + { + "code": "boolean", + + "id": "9" + , + "name": "Булевый" + , + "type": "boolean" + , + "javatype": "Boolean" + + } + , + { + "code": "double", + + "id": "10" + , + "name": "Число с точкой" + , + "type": "numeric(72,18)" + , + "javatype": "BigDecimal" + + } + , + { + "code": "amount", + + "id": "11" + , + "name": "Объем из числа с точкой" + , + "type": "numeric(72,2)" + , + "javatype": "BigDecimal" + + } + , + { + "code": "code", + + "id": "12" + , + "name": "Код 4 символа" + , + "type": "varchar(4)" + , + "javatype": "String" + + } + + ] + + } \ No newline at end of file diff --git a/clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/execution/ExecutionDeposit.java b/clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/execution/ExecutionDeposit.java index 73a011f1c..0d80e74c0 100644 --- a/clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/execution/ExecutionDeposit.java +++ b/clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/execution/ExecutionDeposit.java @@ -10,7 +10,7 @@ public class ExecutionDeposit extends BusinessObject { private Long exchangeExecutionId; private Instant exchangeExecutionTime; private LocalDate tradingDate; - private Long accountId; + private Long tradingClearingRegistryId; private String market; private BigDecimal price; private BigDecimal lots; @@ -24,11 +24,12 @@ public class ExecutionDeposit extends BusinessObject { private Long duration; private LocalDate firstLegSettlementDate; private LocalDate secondLegSettlementDate; - private LocalDate firstLegSettlementCode; - private LocalDate secondLegSettlementCode; + private String firstLegSettlementCode; + private String secondLegSettlementCode; private String securityFullName; private String securitySymbol; private Long securityId; + private String contract; private Long counterPartyId; private String coverageStatus; private Long sessionId; @@ -58,12 +59,12 @@ public class ExecutionDeposit extends BusinessObject { this.tradingDate = tradingDate; } - public Long getAccountId() { - return accountId; + public Long getTradingClearingRegistryId() { + return tradingClearingRegistryId; } - public void setAccountId(Long accountId) { - this.accountId = accountId; + public void setTradingClearingRegistryId(Long tradingClearingRegistryId) { + this.tradingClearingRegistryId = tradingClearingRegistryId; } public String getMarket() { @@ -170,19 +171,19 @@ public class ExecutionDeposit extends BusinessObject { this.secondLegSettlementDate = secondLegSettlementDate; } - public LocalDate getFirstLegSettlementCode() { + public String getFirstLegSettlementCode() { return firstLegSettlementCode; } - public void setFirstLegSettlementCode(LocalDate firstLegSettlementCode) { + public void setFirstLegSettlementCode(String firstLegSettlementCode) { this.firstLegSettlementCode = firstLegSettlementCode; } - public LocalDate getSecondLegSettlementCode() { + public String getSecondLegSettlementCode() { return secondLegSettlementCode; } - public void setSecondLegSettlementCode(LocalDate secondLegSettlementCode) { + public void setSecondLegSettlementCode(String secondLegSettlementCode) { this.secondLegSettlementCode = secondLegSettlementCode; } @@ -210,6 +211,14 @@ public class ExecutionDeposit extends BusinessObject { this.securityId = securityId; } + public String getContract() { + return contract; + } + + public void setContract(String contract) { + this.contract = contract; + } + public Long getCounterPartyId() { return counterPartyId; } diff --git a/clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/execution/ExecutionDepositHistory.java b/clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/execution/ExecutionDepositHistory.java new file mode 100644 index 000000000..784900a03 --- /dev/null +++ b/clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/execution/ExecutionDepositHistory.java @@ -0,0 +1,28 @@ +package ru.clearing.classes.statics.data.execution; + +import ru.clearing.classes.ConstSerializable; +import ru.clearing.classes.objects.BusinessEvent; + +import java.io.Serial; + +/** + * Изменение состояния объекта Сделки + *

+ * DB table: EXECUTION_DEPOSIT_HISTORY + **/ +public class ExecutionDepositHistory extends BusinessEvent { + @Serial + private static final long serialVersionUID = ConstSerializable.serialVersionUID; + + private ExecutionDeposit object; + + @Override + public ExecutionDeposit getObject() { + return object; + } + + @Override + public void setObject(ExecutionDeposit object) { + this.object = object; + } +} \ No newline at end of file diff --git a/clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/execution/ExecutionFond.java b/clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/execution/ExecutionFond.java new file mode 100644 index 000000000..8cc9e76f9 --- /dev/null +++ b/clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/execution/ExecutionFond.java @@ -0,0 +1,263 @@ +package ru.clearing.classes.statics.data.execution; + +import ru.clearing.classes.ConstSerializable; +import ru.clearing.classes.objects.BusinessObject; + +import java.math.BigDecimal; +import java.time.Instant; +import java.time.LocalDate; + +/** + * Сделки на Фондовой секции + *

+ * DB table: EXECUTION_FOND + **/ +public class ExecutionFond extends BusinessObject { + private static final long serialVersionUID = ConstSerializable.serialVersionUID; + + private LocalDate clearingDate; + private Long exchangeExecutionId; + private String side; + private String market; + private LocalDate tradingDate; + private String securitySymbol; + private Long securityId; + private BigDecimal interestAmount; + private Long exchangeOrderId; + private BigDecimal price; + private BigDecimal settlementAmount; + private BigDecimal lots; + private BigDecimal quantity; + private Instant exchangeExecutionTime; + private Long duration; + private Long tradingClearingRegistryId; + private String comment; + private Long clientCodeId; + private String settlementCode; + private Long companyId; + private Long counterPartyId; + private String securityFullName; + private LocalDate settlementDate; + private String settlementCurrency; + private Instant exchangeExecutionMicroseconds; + private String coverageStatus; + private Long sessionId; + + + public LocalDate getClearingDate() { + return clearingDate; + } + + public void setClearingDate(LocalDate value) { + this.clearingDate = value; + } + + public Long getExchangeExecutionId() { + return exchangeExecutionId; + } + + public void setExchangeExecutionId(Long value) { + this.exchangeExecutionId = value; + } + + public String getSide() { + return side; + } + + public void setSide(String value) { + this.side = value; + } + + public String getMarket() { + return market; + } + + public void setMarket(String value) { + this.market = value; + } + + public LocalDate getTradingDate() { + return tradingDate; + } + + public void setTradingDate(LocalDate value) { + this.tradingDate = value; + } + + public String getSecuritySymbol() { + return securitySymbol; + } + + public void setSecuritySymbol(String value) { + this.securitySymbol = value; + } + + public Long getSecurityId() { + return securityId; + } + + public void setSecurityId(Long value) { + this.securityId = value; + } + + public BigDecimal getInterestAmount() { + return interestAmount; + } + + public void setInterestAmount(BigDecimal value) { + this.interestAmount = value; + } + + public Long getExchangeOrderId() { + return exchangeOrderId; + } + + public void setExchangeOrderId(Long value) { + this.exchangeOrderId = value; + } + + public BigDecimal getPrice() { + return price; + } + + public void setPrice(BigDecimal value) { + this.price = value; + } + + public BigDecimal getSettlementAmount() { + return settlementAmount; + } + + public void setSettlementAmount(BigDecimal value) { + this.settlementAmount = value; + } + + public BigDecimal getLots() { + return lots; + } + + public void setLots(BigDecimal value) { + this.lots = value; + } + + public BigDecimal getQuantity() { + return quantity; + } + + public void setQuantity(BigDecimal value) { + this.quantity = value; + } + + public Instant getExchangeExecutionTime() { + return exchangeExecutionTime; + } + + public void setExchangeExecutionTime(Instant value) { + this.exchangeExecutionTime = value; + } + + public Long getDuration() { + return duration; + } + + public void setDuration(Long value) { + this.duration = value; + } + + public Long getTradingClearingRegistryId() { + return tradingClearingRegistryId; + } + + public void setTradingClearingRegistryId(Long value) { + this.tradingClearingRegistryId = value; + } + + public String getComment() { + return comment; + } + + public void setComment(String value) { + this.comment = value; + } + + public Long getClientCodeId() { + return clientCodeId; + } + + public void setClientCodeId(Long value) { + this.clientCodeId = value; + } + + public String getSettlementCode() { + return settlementCode; + } + + public void setSettlementCode(String value) { + this.settlementCode = value; + } + + public Long getCompanyId() { + return companyId; + } + + public void setCompanyId(Long value) { + this.companyId = value; + } + + public Long getCounterPartyId() { + return counterPartyId; + } + + public void setCounterPartyId(Long value) { + this.counterPartyId = value; + } + + public String getSecurityFullName() { + return securityFullName; + } + + public void setSecurityFullName(String value) { + this.securityFullName = value; + } + + public LocalDate getSettlementDate() { + return settlementDate; + } + + public void setSettlementDate(LocalDate value) { + this.settlementDate = value; + } + + public String getSettlementCurrency() { + return settlementCurrency; + } + + public void setSettlementCurrency(String value) { + this.settlementCurrency = value; + } + + public Instant getExchangeExecutionMicroseconds() { + return exchangeExecutionMicroseconds; + } + + public void setExchangeExecutionMicroseconds(Instant value) { + this.exchangeExecutionMicroseconds = value; + } + + public String getCoverageStatus() { + return coverageStatus; + } + + public void setCoverageStatus(String value) { + this.coverageStatus = value; + } + + public Long getSessionId() { + return sessionId; + } + + public void setSessionId(Long value) { + this.sessionId = value; + } + +} \ No newline at end of file diff --git a/clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/execution/ExecutionFondHistory.java b/clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/execution/ExecutionFondHistory.java new file mode 100644 index 000000000..bdae32cd1 --- /dev/null +++ b/clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/execution/ExecutionFondHistory.java @@ -0,0 +1,28 @@ +package ru.clearing.classes.statics.data.execution; + +import ru.clearing.classes.ConstSerializable; +import ru.clearing.classes.objects.BusinessEvent; + +import java.io.Serial; + +/** + * Изменение состояния объекта Сделки на Фондовой секции + *

+ * DB table: EXECUTION_FOND_HISTORY + **/ +public class ExecutionFondHistory extends BusinessEvent { + @Serial + private static final long serialVersionUID = ConstSerializable.serialVersionUID; + + private ExecutionFond object; + + @Override + public ExecutionFond getObject() { + return object; + } + + @Override + public void setObject(ExecutionFond object) { + this.object = object; + } +} \ No newline at end of file diff --git a/clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/misc/STrade.java b/clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/misc/STrade.java deleted file mode 100644 index f49c7b224..000000000 --- a/clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/misc/STrade.java +++ /dev/null @@ -1,189 +0,0 @@ -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; - -/** - * Сделки из Торговой системы - *

- * DB table: S_TRADE - **/ -public class STrade extends SpcexObjectBase { - private static final long serialVersionUID = ConstSerializable.serialVersionUID; - - private Long tradeNum; - private String secCode; - private Instant tradeDateTime; - private LocalDate settleDate; - private BigDecimal price; - private BigDecimal value; - private BigDecimal qty; - private BigDecimal accruedint; - private String firmId; - private String clientCode; - private BigDecimal exchangeCommission; - private String classCode; - private String operation; - private String issueAccount; - private String moneyAccount; - private String tradeType; - private Long daysToMatDate; - private String collateral; - private String settleCode; - - public Long getTradeNum() { - return tradeNum; - } - - public void setTradeNum(Long value) { - this.tradeNum = value; - } - - public String getSecCode() { - return secCode; - } - - public void setSecCode(String value) { - this.secCode = value; - } - - public Instant getTradeDateTime() { - return tradeDateTime; - } - - public void setTradeDateTime(Instant value) { - this.tradeDateTime = value; - } - - public LocalDate getSettleDate() { - return settleDate; - } - - public void setSettleDate(LocalDate value) { - this.settleDate = 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 getFirmId() { - return firmId; - } - - public void setFirmId(String value) { - this.firmId = value; - } - - public String getClientCode() { - return clientCode; - } - - public void setClientCode(String value) { - this.clientCode = value; - } - - public BigDecimal getExchangeCommission() { - return exchangeCommission; - } - - public void setExchangeCommission(BigDecimal value) { - this.exchangeCommission = value; - } - - public String getClassCode() { - return classCode; - } - - public void setClassCode(String value) { - this.classCode = value; - } - - public String getOperation() { - return operation; - } - - public void setOperation(String value) { - this.operation = value; - } - - public String getIssueAccount() { - return issueAccount; - } - - public void setIssueAccount(String value) { - this.issueAccount = value; - } - - public String getMoneyAccount() { - return moneyAccount; - } - - public void setMoneyAccount(String value) { - this.moneyAccount = value; - } - - public String getTradeType() { - return tradeType; - } - - public void setTradeType(String value) { - this.tradeType = value; - } - - public Long getDaysToMatDate() { - return daysToMatDate; - } - - public void setDaysToMatDate(Long value) { - this.daysToMatDate = value; - } - - public String getCollateral() { - return collateral; - } - - public void setCollateral(String value) { - this.collateral = value; - } - - public String getSettleCode() { - return settleCode; - } - - public void setSettleCode(String value) { - this.settleCode = value; - } -} diff --git a/clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/misc/STrades.java b/clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/misc/STrades.java new file mode 100644 index 000000000..fa3a8bbe9 --- /dev/null +++ b/clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/misc/STrades.java @@ -0,0 +1,414 @@ +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; + +/** + * Сделки из Торговой системы + *

+ * DB table: S_TRADE + **/ +public class STrades extends SpcexObjectBase { + private static final long serialVersionUID = ConstSerializable.serialVersionUID; + + private Long tradeNum; + private String operation; + private String classCode; + private LocalDate tradeDate; + private String secCode; + private BigDecimal accruedint; + private BigDecimal accruedint2; + private BigDecimal lowerDiscount; + private Long orderNum; + private BigDecimal price; + private BigDecimal price2; + private BigDecimal repoRate; + private BigDecimal repoValue; + private BigDecimal repo2Value; + private BigDecimal startDiscount; + private BigDecimal tsCommission; + private BigDecimal upperDiscount; + private BigDecimal value; + private BigDecimal yield; + private BigDecimal qty; + private BigDecimal qtyPcs; + private Instant tradeDateTime; + private Long repoTerm; + private BigDecimal clearingCommission; + private BigDecimal exchangeCommission; + private BigDecimal techCenterCommission; + private String account; + private String brokerRef; + private String clientCode; + private String settleCode; + private String userId; + private String exchangeCode; + private String firmId; + private String firmName; + private String cpFirmId; + private String cpFirmName; + private String className; + private String secName; + private LocalDate settleDate; + private String settleCurrency; + private String tradeCurrency; + private Long tradeTimeMs; + private String bankAccId; + private String section; + + public Long getTradeNum() { + return tradeNum; + } + + public void setTradeNum(Long tradeNum) { + this.tradeNum = tradeNum; + } + + public String getOperation() { + return operation; + } + + public void setOperation(String operation) { + this.operation = operation; + } + + public String getClassCode() { + return classCode; + } + + public void setClassCode(String classCode) { + this.classCode = classCode; + } + + public LocalDate getTradeDate() { + return tradeDate; + } + + public void setTradeDate(LocalDate tradeDate) { + this.tradeDate = tradeDate; + } + + public String getSecCode() { + return secCode; + } + + public void setSecCode(String secCode) { + this.secCode = secCode; + } + + public BigDecimal getAccruedint() { + return accruedint; + } + + public void setAccruedint(BigDecimal accruedint) { + this.accruedint = accruedint; + } + + public BigDecimal getAccruedint2() { + return accruedint2; + } + + public void setAccruedint2(BigDecimal accruedint2) { + this.accruedint2 = accruedint2; + } + + public BigDecimal getLowerDiscount() { + return lowerDiscount; + } + + public void setLowerDiscount(BigDecimal lowerDiscount) { + this.lowerDiscount = lowerDiscount; + } + + public Long getOrderNum() { + return orderNum; + } + + public void setOrderNum(Long orderNum) { + this.orderNum = orderNum; + } + + public BigDecimal getPrice() { + return price; + } + + public void setPrice(BigDecimal price) { + this.price = price; + } + + public BigDecimal getPrice2() { + return price2; + } + + public void setPrice2(BigDecimal price2) { + this.price2 = price2; + } + + public BigDecimal getRepoRate() { + return repoRate; + } + + public void setRepoRate(BigDecimal repoRate) { + this.repoRate = repoRate; + } + + public BigDecimal getRepoValue() { + return repoValue; + } + + public void setRepoValue(BigDecimal repoValue) { + this.repoValue = repoValue; + } + + public BigDecimal getRepo2Value() { + return repo2Value; + } + + public void setRepo2Value(BigDecimal repo2Value) { + this.repo2Value = repo2Value; + } + + public BigDecimal getStartDiscount() { + return startDiscount; + } + + public void setStartDiscount(BigDecimal startDiscount) { + this.startDiscount = startDiscount; + } + + public BigDecimal getTsCommission() { + return tsCommission; + } + + public void setTsCommission(BigDecimal tsCommission) { + this.tsCommission = tsCommission; + } + + public BigDecimal getUpperDiscount() { + return upperDiscount; + } + + public void setUpperDiscount(BigDecimal upperDiscount) { + this.upperDiscount = upperDiscount; + } + + public BigDecimal getValue() { + return value; + } + + public void setValue(BigDecimal value) { + this.value = value; + } + + public BigDecimal getYield() { + return yield; + } + + public void setYield(BigDecimal yield) { + this.yield = yield; + } + + public BigDecimal getQty() { + return qty; + } + + public void setQty(BigDecimal qty) { + this.qty = qty; + } + + public BigDecimal getQtyPcs() { + return qtyPcs; + } + + public void setQtyPcs(BigDecimal qtyPcs) { + this.qtyPcs = qtyPcs; + } + + public Instant getTradeDateTime() { + return tradeDateTime; + } + + public void setTradeDateTime(Instant tradeDateTime) { + this.tradeDateTime = tradeDateTime; + } + + public Long getRepoTerm() { + return repoTerm; + } + + public void setRepoTerm(Long repoTerm) { + this.repoTerm = repoTerm; + } + + public BigDecimal getClearingCommission() { + return clearingCommission; + } + + public void setClearingCommission(BigDecimal clearingCommission) { + this.clearingCommission = clearingCommission; + } + + public BigDecimal getExchangeCommission() { + return exchangeCommission; + } + + public void setExchangeCommission(BigDecimal exchangeCommission) { + this.exchangeCommission = exchangeCommission; + } + + public BigDecimal getTechCenterCommission() { + return techCenterCommission; + } + + public void setTechCenterCommission(BigDecimal techCenterCommission) { + this.techCenterCommission = techCenterCommission; + } + + public String getAccount() { + return account; + } + + public void setAccount(String account) { + this.account = account; + } + + public String getBrokerRef() { + return brokerRef; + } + + public void setBrokerRef(String brokerRef) { + this.brokerRef = brokerRef; + } + + public String getClientCode() { + return clientCode; + } + + public void setClientCode(String clientCode) { + this.clientCode = clientCode; + } + + public String getSettleCode() { + return settleCode; + } + + public void setSettleCode(String settleCode) { + this.settleCode = settleCode; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public String getExchangeCode() { + return exchangeCode; + } + + public void setExchangeCode(String exchangeCode) { + this.exchangeCode = exchangeCode; + } + + public String getFirmId() { + return firmId; + } + + public void setFirmId(String firmId) { + this.firmId = firmId; + } + + public String getFirmName() { + return firmName; + } + + public void setFirmName(String firmName) { + this.firmName = firmName; + } + + public String getCpFirmId() { + return cpFirmId; + } + + public void setCpFirmId(String cpFirmId) { + this.cpFirmId = cpFirmId; + } + + public String getCpFirmName() { + return cpFirmName; + } + + public void setCpFirmName(String cpFirmName) { + this.cpFirmName = cpFirmName; + } + + public String getClassName() { + return className; + } + + public void setClassName(String className) { + this.className = className; + } + + public String getSecName() { + return secName; + } + + public void setSecName(String secName) { + this.secName = secName; + } + + public LocalDate getSettleDate() { + return settleDate; + } + + public void setSettleDate(LocalDate settleDate) { + this.settleDate = settleDate; + } + + public String getSettleCurrency() { + return settleCurrency; + } + + public void setSettleCurrency(String settleCurrency) { + this.settleCurrency = settleCurrency; + } + + public String getTradeCurrency() { + return tradeCurrency; + } + + public void setTradeCurrency(String tradeCurrency) { + this.tradeCurrency = tradeCurrency; + } + + public Long getTradeTimeMs() { + return tradeTimeMs; + } + + public void setTradeTimeMs(Long tradeTimeMs) { + this.tradeTimeMs = tradeTimeMs; + } + + public String getBankAccId() { + return bankAccId; + } + + public void setBankAccId(String bankAccId) { + this.bankAccId = bankAccId; + } + + public String getSection() { + return section; + } + + public void setSection(String section) { + this.section = section; + } +} diff --git a/clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/misc/Session.java b/clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/misc/Session.java index 71b854668..718c33301 100644 --- a/clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/misc/Session.java +++ b/clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/misc/Session.java @@ -9,6 +9,11 @@ public class Session extends BusinessObject { private static final long serialVersionUID = ConstSerializable.serialVersionUID; private LocalDate clearingDate; private String sessionStatus; + private Long companyId; + private Long securityId; + private Long userId; + private String section; + private String sessionType; public LocalDate getClearingDate() { return clearingDate; @@ -25,4 +30,44 @@ public class Session extends BusinessObject { public void setSessionStatus(String sessionStatus) { this.sessionStatus = sessionStatus; } + + public Long getCompanyId() { + return companyId; + } + + public void setCompanyId(Long companyId) { + this.companyId = companyId; + } + + public Long getSecurityId() { + return securityId; + } + + public void setSecurityId(Long securityId) { + this.securityId = securityId; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public String getSection() { + return section; + } + + public void setSection(String section) { + this.section = section; + } + + public String getSessionType() { + return sessionType; + } + + public void setSessionType(String sessionType) { + this.sessionType = sessionType; + } } \ No newline at end of file diff --git a/clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/misc/SessionHistory.java b/clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/misc/SessionHistory.java new file mode 100644 index 000000000..6be919fb3 --- /dev/null +++ b/clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/misc/SessionHistory.java @@ -0,0 +1,28 @@ +package ru.clearing.classes.statics.data.misc; + +import ru.clearing.classes.ConstSerializable; +import ru.clearing.classes.objects.BusinessEvent; + +import java.io.Serial; + +/** + * Изменение состояния объекта Клиринговая сессия + *

+ * DB table: SESSION_HISTORY + **/ +public class SessionHistory extends BusinessEvent { + @Serial + private static final long serialVersionUID = ConstSerializable.serialVersionUID; + + private Session object; + + @Override + public Session getObject() { + return object; + } + + @Override + public void setObject(Session object) { + this.object = object; + } +} \ No newline at end of file diff --git a/clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/profile/CompanyInfo.java b/clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/profile/CompanyInfo.java index 175c17b69..f77984590 100644 --- a/clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/profile/CompanyInfo.java +++ b/clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/profile/CompanyInfo.java @@ -17,13 +17,14 @@ public class CompanyInfo extends SpcexObjectBase { private String legalKind; // ref CHAR(4), private String organizationType; // ref CHAR(4), private String residence; // ref CHAR(4), - private String shortName; - private String fullName; +// private String shortName; // extends Company +// private String fullName; // extends Company private String shortNameEng; private String fullNameEng; - private String tradingCode; - private String clearingCode; - private String registrationCode; +// private String tradingCode; // extends Company +// private String clearingCode; // extends Company +// private String registrationCode; // extends Company +// private String workflowStatus; // extends Company public Long getCompanyId() { return companyId; @@ -89,22 +90,6 @@ public class CompanyInfo extends SpcexObjectBase { this.residence = residence; } - public String getShortName() { - return shortName; - } - - public void setShortName(String shortName) { - this.shortName = shortName; - } - - public String getFullName() { - return fullName; - } - - public void setFullName(String fullName) { - this.fullName = fullName; - } - public String getShortNameEng() { return shortNameEng; } @@ -121,27 +106,4 @@ public class CompanyInfo extends SpcexObjectBase { this.fullNameEng = fullNameEng; } - public String getTradingCode() { - return tradingCode; - } - - public void setTradingCode(String tradingCode) { - this.tradingCode = tradingCode; - } - - public String getClearingCode() { - return clearingCode; - } - - public void setClearingCode(String clearingCode) { - this.clearingCode = clearingCode; - } - - public String getRegistrationCode() { - return registrationCode; - } - - public void setRegistrationCode(String registrationCode) { - this.registrationCode = registrationCode; - } } \ No newline at end of file diff --git a/clearing-parent/clearing-service/src/main/java/ru/spcex/clearing/service/Clearing.java b/clearing-parent/clearing-service/src/main/java/ru/spcex/clearing/service/Clearing.java index 3e97acbb6..1f8f795e0 100644 --- a/clearing-parent/clearing-service/src/main/java/ru/spcex/clearing/service/Clearing.java +++ b/clearing-parent/clearing-service/src/main/java/ru/spcex/clearing/service/Clearing.java @@ -4,8 +4,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import ru.clearing.classes.statics.data.execution.ExecutionDeposit; import ru.clearing.classes.statics.data.company.ClearingMemberCategory; +import ru.clearing.classes.statics.data.execution.ExecutionDeposit; import ru.clearing.classes.statics.data.liabilities.LiabilitiesClaimsAssets; import ru.clearing.classes.statics.data.liabilities.LiabilitiesClaimsMoney; import ru.clearing.classes.statics.data.payment.PaymentInstruction; @@ -175,7 +175,7 @@ public class Clearing { //send request to kafka, wait for a reply synchronized (this) { AccountBalanceClearingRequest request = new AccountBalanceClearingRequest(); - request.setAccountId(execDeposit.getAccountId()); + // todo CLS-275 request.setAccountId(execDeposit.getAccountId()); request.setCompanyId(execDeposit.getCompanyId()); request.setFirstLegAmount(execDeposit.getFirstLegAmount()); Long sentRequestId = kafka.sendRequestToQueue(Consts.BALANCE_ACCOUNT_UPDATE, request); @@ -199,7 +199,7 @@ public class Clearing { } } Optional lcaFirstLegFound = lbltsClmsAssetsCreator.searchLCA( - execDeposit.getAccountId(), execDeposit.getCompanyId(), + /* null execDeposit.getAccountId() todo CLS-275 */ null, execDeposit.getCompanyId(), execDeposit.getSecurityId(), execDeposit.getFirstLegSettlementDate()); LiabilitiesClaimsAssets lcaFirstLeg = orElse(lcaFirstLegFound).ifPresentOrElse(lca -> { log.trace("LiabilitiesClaimsAssets first leg {} was found", lca.getId()); @@ -213,7 +213,7 @@ public class Clearing { return lca; }); Optional lcaSecondLegFound = lbltsClmsAssetsCreator.searchLCA( - execDeposit.getAccountId(), execDeposit.getCompanyId(), + /*todo CLS-275 execDeposit.getAccountId()*/ null, execDeposit.getCompanyId(), execDeposit.getSecurityId(), execDeposit.getSecondLegSettlementDate()); LiabilitiesClaimsAssets lcaSecondLeg = orElse(lcaSecondLegFound).ifPresentOrElse(lca -> { log.trace("LiabilitiesClaimsAssets second leg {} was found", lca.getId()); diff --git a/clearing-parent/clearing-service/src/main/java/ru/spcex/clearing/service/ExecutionDepositComponent.java b/clearing-parent/clearing-service/src/main/java/ru/spcex/clearing/service/ExecutionDepositComponent.java index 56f44c003..7cb432dcd 100644 --- a/clearing-parent/clearing-service/src/main/java/ru/spcex/clearing/service/ExecutionDepositComponent.java +++ b/clearing-parent/clearing-service/src/main/java/ru/spcex/clearing/service/ExecutionDepositComponent.java @@ -13,7 +13,7 @@ import ru.clearing.classes.statics.data.account.Account; import ru.clearing.classes.statics.data.company.Company; import ru.clearing.classes.statics.data.execution.ExecutionDeposit; import ru.clearing.classes.statics.data.misc.Listing; -import ru.clearing.classes.statics.data.misc.STrade; +import ru.clearing.classes.statics.data.misc.STrades; import ru.clearing.classes.statics.data.security.Security; import ru.spcex.clearing.error.ClearingError; import ru.spcex.clearing.error.ClearingException; @@ -22,8 +22,6 @@ import ru.spcex.clearing.platform.messaging.domain.ActionType; import ru.spcex.clearing.platform.messaging.domain.BaseRequest; import ru.spcex.clearing.platform.messaging.domain.Consts; import ru.spcex.clearing.platform.messaging.domain.cud.registry.DealRegisterNewRequest; -import ru.spcex.clearing.platform.messaging.domain.cud.securitites.MoneyMarketSecurityNewRequest; -import ru.spcex.platform.classes.base.SpcexObjectBase; import ru.spcex.platform.enumeration.Allowed; import ru.spcex.platform.enumeration.Market; import ru.spcex.platform.enumeration.MoneyFlowSide; @@ -54,7 +52,7 @@ public class ExecutionDepositComponent { private final Logger log = LoggerFactory.getLogger(getClass()); private final ImdgProvider imdgProvider; - private Imdg sTradeImdg; + private Imdg sTradeImdg; private Imdg securityImdg; private Imdg executionDepositImdg; private Imdg companyImdg; @@ -71,7 +69,7 @@ public class ExecutionDepositComponent { @Autowired public ExecutionDepositComponent(ImdgProvider imdgProvider, Producer kafka) { this.imdgProvider = imdgProvider; - this.sTradeImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_STrade, STrade.class); + this.sTradeImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_STrades, STrades.class); this.securityImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Security, Security.class); this.executionDepositImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_ExecutionDeposit, ExecutionDeposit.class); this.companyImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Company, Company.class); @@ -100,7 +98,7 @@ public class ExecutionDepositComponent { public void processNewTS() { log.debug("Start check new S_TRADE after {}", tradingDay); - Collection sTrades; + Collection sTrades; { ImdgPredicateBuilder pb = sTradeImdg.predicateBuilder(); ImdgPredicate sql = pb.greatEqual("tradeDateTime", tradingDay); @@ -118,7 +116,7 @@ public class ExecutionDepositComponent { // Проверить все инструменты. Set secCodesOfSecurity; { - Set secCodesOfSTrade = sTrades.stream().map(STrade::getSecCode).filter(Objects::nonNull).collect(Collectors.toSet()); + Set secCodesOfSTrade = sTrades.stream().map(STrades::getSecCode).filter(Objects::nonNull).collect(Collectors.toSet()); log.debug("Verify {} instruments for {} STrade's.", secCodesOfSTrade.size(), sTrades.size()); ImdgPredicate allIn = securityImdg.predicateBuilder().in("securitySymbol", secCodesOfSTrade.toArray(new String[0])); Collection foundSecurities = securityImdg.getCollectionObjectsByPredicate(allIn); @@ -138,7 +136,7 @@ public class ExecutionDepositComponent { // Но при этом, во время создания новых ExecutionDeposit по STrade, TradeNum могут повторяться. LocalDate today = LocalDate.now(); - for (STrade trade : sTrades) { + for (STrades trade : sTrades) { log.trace("Check s_trade[{}].tradeNum={} operation={} on date {}", trade.getId(), trade.getTradeNum(), trade.getOperation(), today); boolean existEDeposit; { @@ -200,7 +198,7 @@ public class ExecutionDepositComponent { } - Long newMaxTradeNum = sTrades.stream().mapToLong(STrade::getTradeNum).max().orElseGet(() -> tradeNum); + Long newMaxTradeNum = sTrades.stream().mapToLong(STrades::getTradeNum).max().orElseGet(() -> tradeNum); log.info("Process completed. Next tradeNum is {}", newMaxTradeNum); } @@ -240,27 +238,27 @@ public class ExecutionDepositComponent { } } - protected ExecutionDeposit createExecutionDeposit(STrade sTrade, + protected ExecutionDeposit createExecutionDeposit(STrades sTrades, Allowed coverageStatus, Long sessionId) throws ClearingException { - Account account = accountImdg.getSingleObjectByFieldValues(Map.of("account", sTrade.getMoneyAccount())); - Security security = securityImdg.getSingleObjectByFieldValues(Map.of("securitySymbol", sTrade.getSecCode())); + Account account = null; // todo CLS-275 accountImdg.getSingleObjectByFieldValues(Map.of("account", sTrades.getMoneyAccount())); + Security security = securityImdg.getSingleObjectByFieldValues(Map.of("securitySymbol", sTrades.getSecCode())); if (security == null) { - log.warn("security securitySymbol=\"{}\" not found", sTrade.getSecCode()); - throw new ClearingException(new EnumMessage(ClearingError.RecordNotFound, sTrade.getSecCode())); + log.warn("security securitySymbol=\"{}\" not found", sTrades.getSecCode()); + throw new ClearingException(new EnumMessage(ClearingError.RecordNotFound, sTrades.getSecCode())); } Listing listing = null; if (security != null) { listing = listingImdg.getSingleObjectByFieldValues(Map.of("securityId", security.getId())); } - Company company = companyImdg.getSingleObjectByFieldValues(Map.of("tradingCode", sTrade.getFirmId())); + Company company = companyImdg.getSingleObjectByFieldValues(Map.of("tradingCode", sTrades.getFirmId())); if (company == null) { - throw new ClearingException(new EnumMessage(ClearingError.CompanyNotFound, sTrade.getFirmId())); + throw new ClearingException(new EnumMessage(ClearingError.CompanyNotFound, sTrades.getFirmId())); } - return createExecutionDeposit(sTrade, account, listing, company, security, coverageStatus, sessionId); + return createExecutionDeposit(sTrades, account, listing, company, security, coverageStatus, sessionId); } - private ExecutionDeposit createExecutionDeposit(STrade sTrade, Account account, Listing listing, + private ExecutionDeposit createExecutionDeposit(STrades sTrades, Account account, Listing listing, Company company, Security security, Allowed coverageStatus, Long sessionId) { ExecutionDeposit eDeposit = new ExecutionDeposit(); @@ -271,22 +269,22 @@ public class ExecutionDepositComponent { eDeposit.setTradingDate(nowDay); eDeposit.setClearingDate(nowDay); - eDeposit.setExchangeExecutionId(sTrade.getTradeNum()); - eDeposit.setExchangeExecutionTime(sTrade.getTradeDateTime()); + eDeposit.setExchangeExecutionId(sTrades.getTradeNum()); + eDeposit.setExchangeExecutionTime(sTrades.getTradeDateTime()); if (account != null) { - eDeposit.setAccountId(account.getId()); + // todo CLS-275 eDeposit.setAccountId(account.getId()); } eDeposit.setMarket(Market.mkrs.getKey()); - eDeposit.setPrice(sTrade.getPrice()); - eDeposit.setLots(sTrade.getQty()); + eDeposit.setPrice(sTrades.getPrice()); + eDeposit.setLots(sTrades.getQty()); if (listing != null && listing.getLotSize() != null && eDeposit.getLots() != null) { BigDecimal quantity = eDeposit.getLots().multiply(listing.getLotSize()); eDeposit.setQuantity(quantity); } - eDeposit.setFirstLegAmount(sTrade.getValue()); - eDeposit.setSecondLegAmount(sTrade.getValue()); + eDeposit.setFirstLegAmount(sTrades.getValue()); + eDeposit.setSecondLegAmount(sTrades.getValue()); //eDeposit.setInterestAmount(null); - String operation = sTrade.getOperation(); //Символьный код по справочнику moneyFlowSide), соответствующий значению из s_trade.operation (sTrade.getOperation()) + String operation = sTrades.getOperation(); //Символьный код по справочнику moneyFlowSide), соответствующий значению из s_trade.operation (sTrade.getOperation()) if ("B".equalsIgnoreCase(operation)) { operation = MoneyFlowSide.BUY.getKey(); } @@ -296,9 +294,9 @@ public class ExecutionDepositComponent { eDeposit.setSide(operation); eDeposit.setSettlementCurrency("RUB"); // (справочник currencyCode) eDeposit.setCompanyId(company.getId()); - eDeposit.setDuration(sTrade.getDaysToMatDate()); + // todo CLS-275 eDeposit.setDuration(sTrades.getDaysToMatDate()); eDeposit.setFirstLegSettlementDate(nowDay); - eDeposit.setSecondLegSettlementDate(sTrade.getSettleDate()); + eDeposit.setSecondLegSettlementDate(sTrades.getSettleDate()); //eDeposit.setFirstLegSettlementCode(null); //eDeposit.setSecondLegSettlementCode(null); eDeposit.setSecurityFullName(security.getFullName()); diff --git a/clearing-parent/clearing-service/src/main/java/ru/spcex/clearing/service/builder/LiabilitiesClaimsAssetsCreator.java b/clearing-parent/clearing-service/src/main/java/ru/spcex/clearing/service/builder/LiabilitiesClaimsAssetsCreator.java index af9a50363..149fd948a 100644 --- a/clearing-parent/clearing-service/src/main/java/ru/spcex/clearing/service/builder/LiabilitiesClaimsAssetsCreator.java +++ b/clearing-parent/clearing-service/src/main/java/ru/spcex/clearing/service/builder/LiabilitiesClaimsAssetsCreator.java @@ -40,7 +40,7 @@ public class LiabilitiesClaimsAssetsCreator { private LiabilitiesClaimsAssets createLCA(ExecutionDeposit executionDeposit, Account account) { LiabilitiesClaimsAssets liabilitiesClaimsAssets = new LiabilitiesClaimsAssets(); liabilitiesClaimsAssets.setCompanyId(executionDeposit.getCompanyId()); - liabilitiesClaimsAssets.setAccountId(executionDeposit.getAccountId()); +// todo new fields liabilitiesClaimsAssets.setAccountId(executionDeposit.getAccountId()); liabilitiesClaimsAssets.setAccountType(account.getAccountType()); liabilitiesClaimsAssets.setAccount(account.getAccount()); liabilitiesClaimsAssets.setCurrency(executionDeposit.getSettlementCurrency()); @@ -61,7 +61,7 @@ public class LiabilitiesClaimsAssetsCreator { public LiabilitiesClaimsAssets createFirstLegLCA(ClearingCategory category, ExecutionDeposit executionDeposit) { - Account account = accountImdg.getSingleObjectByID(executionDeposit.getAccountId()); + Account account = null; // todo CLS-275 accountImdg.getSingleObjectByID(executionDeposit.getAccountId()); LiabilitiesClaimsAssets lca = createLCA(executionDeposit, account); lca.setSettlementDate(executionDeposit.getFirstLegSettlementDate()); AccountType accType = IEnumKey.getEnumByKey(AccountType.class, account.getAccountType()); @@ -79,7 +79,7 @@ public class LiabilitiesClaimsAssetsCreator { } public LiabilitiesClaimsAssets createSecondLegLCA(ClearingCategory category, ExecutionDeposit executionDeposit) { - Account account = accountImdg.getSingleObjectByID(executionDeposit.getAccountId()); + Account account = null;// todo CLS-275 accountImdg.getSingleObjectByID(executionDeposit.getAccountId()); LiabilitiesClaimsAssets lca = createLCA(executionDeposit, account); lca.setSettlementDate(executionDeposit.getSecondLegSettlementDate()); AccountType accType = IEnumKey.getEnumByKey(AccountType.class, account.getAccountType()); @@ -115,7 +115,7 @@ public class LiabilitiesClaimsAssetsCreator { public void updateSecondLegLca(LiabilitiesClaimsAssets lca, ExecutionDeposit executionDeposit, ClearingCategory category) { - Account account = accountImdg.getSingleObjectByID(executionDeposit.getAccountId()); + Account account = null; // todo CLS-275 accountImdg.getSingleObjectByID(executionDeposit.getAccountId()); AccountType accType = IEnumKey.getEnumByKey(AccountType.class, account.getAccountType()); boolean iClrn = ClearingCategory.I.equals(category) && AccountType.Clrn.equals(accType); boolean vInfo = ClearingCategory.V.equals(category) && AccountType.Info.equals(accType); @@ -135,7 +135,7 @@ public class LiabilitiesClaimsAssetsCreator { } public void updateFirstLegLca(LiabilitiesClaimsAssets lca, ExecutionDeposit executionDeposit, ClearingCategory category) { - Account account = accountImdg.getSingleObjectByID(executionDeposit.getAccountId()); + Account account = null; // todo CLS-275 accountImdg.getSingleObjectByID(executionDeposit.getAccountId()); AccountType accType = IEnumKey.getEnumByKey(AccountType.class, account.getAccountType()); boolean iClrn = ClearingCategory.I.equals(category) && AccountType.Clrn.equals(accType); boolean vInfo = ClearingCategory.V.equals(category) && AccountType.Info.equals(accType); diff --git a/clearing-parent/clearing-service/src/main/java/ru/spcex/clearing/service/validation/ExecutionDepositValidationRule.java b/clearing-parent/clearing-service/src/main/java/ru/spcex/clearing/service/validation/ExecutionDepositValidationRule.java index 449e93754..58624d5b1 100644 --- a/clearing-parent/clearing-service/src/main/java/ru/spcex/clearing/service/validation/ExecutionDepositValidationRule.java +++ b/clearing-parent/clearing-service/src/main/java/ru/spcex/clearing/service/validation/ExecutionDepositValidationRule.java @@ -1,13 +1,10 @@ package ru.spcex.clearing.service.validation; -import ru.clearing.classes.statics.data.account.Account; -import ru.clearing.classes.statics.data.account.AccountBalance; import ru.clearing.classes.statics.data.company.Company; import ru.clearing.classes.statics.data.company.relation.Relation; import ru.clearing.classes.statics.data.execution.ExecutionDeposit; import ru.spcex.clearing.error.ClearingErrorInternal; import ru.spcex.clearing.imdg.IMDGDistributedNames; -import ru.spcex.platform.enumeration.AccountStatus; import ru.spcex.platform.enumeration.ClearingCategory; import ru.spcex.platform.enumeration.ServiceStatus; import ru.spcex.platform.enumeration.WorkflowStatus; @@ -37,17 +34,17 @@ public enum ExecutionDepositValidationRule implements IValidationRule validate(ImdgValidationContext context) { ExecutionDeposit validatedObject = context.getValidatedObject(); - if (validatedObject.getAccountId() == null) { +// todo CLS-275 if (validatedObject.getAccountId() == null) { return of(ClearingErrorInternal.AccountNotActive); - } - Imdg accountImdg = context.obtainMap(IMDGDistributedNames.Map_Account, Account.class); - Relation relation = context.getStoredObject(ClrngValidationStored.relation); - Account account = accountImdg.getSingleObjectByFieldValues( - Map.of("id", validatedObject.getAccountId(), "relationId", relation.getId())); - if (account == null || !AccountStatus.ACTIVE.equalsByKey(account.getStatus())) { - return of(ClearingErrorInternal.AccountNotActive); - } - return empty(); +// } +// Imdg accountImdg = context.obtainMap(IMDGDistributedNames.Map_Account, Account.class); +// Relation relation = context.getStoredObject(ClrngValidationStored.relation); +// Account account = accountImdg.getSingleObjectByFieldValues( +// Map.of("id", validatedObject.getAccountId(), "relationId", relation.getId())); +// if (account == null || !AccountStatus.ACTIVE.equalsByKey(account.getStatus())) { +// return of(ClearingErrorInternal.AccountNotActive); +// } +// return empty(); } }, CompanyIsNotBlocked() { @@ -70,18 +67,18 @@ public enum ExecutionDepositValidationRule implements IValidationRule accountBalanceImdg = context.obtainMap(IMDGDistributedNames.Map_AccountBalance, AccountBalance.class); - AccountBalance accountBalance = accountBalanceImdg.getSingleObjectByFieldValues( - Map.of("accountId", validatedObject.getAccountId(), - "companyId", validatedObject.getCompanyId())); - if (accountBalance == null) { +// Imdg accountBalanceImdg = context.obtainMap(IMDGDistributedNames.Map_AccountBalance, AccountBalance.class); +// todo CLS-275 AccountBalance accountBalance = accountBalanceImdg.getSingleObjectByFieldValues( +// Map.of("accountId", validatedObject.getAccountId(), +// "companyId", validatedObject.getCompanyId())); +// if (accountBalance == null) { return of(ClearingErrorInternal.FinancialObligationNotSatisfied); - } +// } //todo ABS - if (validatedObject.getFirstLegAmount().compareTo(accountBalance.getFreeBalanceAmount()) > 0) { - return of(ClearingErrorInternal.FinancialObligationNotSatisfied); - } - return empty(); +// todo CLS-275 if (validatedObject.getFirstLegAmount().compareTo(accountBalance.getFreeBalanceAmount()) > 0) { +// return of(ClearingErrorInternal.FinancialObligationNotSatisfied); +// } +// return empty(); } }; diff --git a/clearing-parent/clearing-service/src/test/java/ru/spcex/clearing/service/ClearingServiceTest.java b/clearing-parent/clearing-service/src/test/java/ru/spcex/clearing/service/ClearingServiceTest.java index fe0610a68..9fb48d361 100644 --- a/clearing-parent/clearing-service/src/test/java/ru/spcex/clearing/service/ClearingServiceTest.java +++ b/clearing-parent/clearing-service/src/test/java/ru/spcex/clearing/service/ClearingServiceTest.java @@ -6,10 +6,10 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import ru.clearing.classes.statics.data.account.Account; import ru.clearing.classes.statics.data.account.AccountBalance; +import ru.clearing.classes.statics.data.company.ClearingMemberCategory; import ru.clearing.classes.statics.data.company.Company; import ru.clearing.classes.statics.data.company.relation.Relation; import ru.clearing.classes.statics.data.execution.ExecutionDeposit; -import ru.clearing.classes.statics.data.company.ClearingMemberCategory; import ru.clearing.classes.statics.data.liabilities.LiabilitiesClaimsAssets; import ru.clearing.classes.statics.data.liabilities.LiabilitiesClaimsMoney; import ru.clearing.classes.statics.data.payment.PaymentInstruction; @@ -378,7 +378,7 @@ class ClearingServiceTest extends AbstractClearingTest { executionDeposit.setExchangeExecutionId(5L); executionDeposit.setExchangeExecutionTime(Instant.now()); executionDeposit.setTradingDate(LocalDate.now()); - executionDeposit.setAccountId(accountId); + executionDeposit.setTradingClearingRegistryId(accountId); //todo CLS-275 executionDeposit.setAccountId(accountId); executionDeposit.setMarket("market"); executionDeposit.setPrice(new BigDecimal(9)); executionDeposit.setLots(new BigDecimal(0)); @@ -392,8 +392,9 @@ class ClearingServiceTest extends AbstractClearingTest { executionDeposit.setDuration(1L); executionDeposit.setFirstLegSettlementDate(dtF); executionDeposit.setSecondLegSettlementDate(dtS); - executionDeposit.setFirstLegSettlementCode(LocalDate.now()); - executionDeposit.setSecondLegSettlementCode(LocalDate.now()); + executionDeposit.setFirstLegSettlementCode("leg1c"); + executionDeposit.setSecondLegSettlementCode("legcc"); + executionDeposit.setContract("contract"); executionDeposit.setSecurityFullName("full"); executionDeposit.setSecuritySymbol("symbol"); executionDeposit.setSecurityId(securityId); diff --git a/clearing-parent/clearing-service/src/test/java/ru/spcex/clearing/service/ExecutionDepositComponentTest.java b/clearing-parent/clearing-service/src/test/java/ru/spcex/clearing/service/ExecutionDepositComponentTest.java index 0f4ff3be6..3cc096ed0 100644 --- a/clearing-parent/clearing-service/src/test/java/ru/spcex/clearing/service/ExecutionDepositComponentTest.java +++ b/clearing-parent/clearing-service/src/test/java/ru/spcex/clearing/service/ExecutionDepositComponentTest.java @@ -7,7 +7,7 @@ import ru.clearing.classes.statics.data.account.Account; import ru.clearing.classes.statics.data.company.Company; import ru.clearing.classes.statics.data.execution.ExecutionDeposit; import ru.clearing.classes.statics.data.misc.Listing; -import ru.clearing.classes.statics.data.misc.STrade; +import ru.clearing.classes.statics.data.misc.STrades; import ru.clearing.classes.statics.data.security.Security; import ru.spcex.clearing.imdg.IMDGDistributedNames; import ru.spcex.clearing.platform.messaging.domain.cud.schedule.LauncherCommandRequest; @@ -31,7 +31,7 @@ class ExecutionDepositComponentTest extends AbstractClearingTest { @Autowired ExecutionDepositComponent executionDepositComponent; private Instant todayInstant; - private Imdg sTradeImdg; + private Imdg sTradeImdg; private Imdg securityImdg; private Imdg executionDepositImdg; private Imdg companyImdg; @@ -43,7 +43,7 @@ class ExecutionDepositComponentTest extends AbstractClearingTest { super.init(); executionDepositComponent.resetTradingDay(); this.todayInstant = executionDepositComponent.tradingDay; - this.sTradeImdg = hazelcastServiceTest.getImdg(IMDGDistributedNames.Map_STrade, STrade.class); + this.sTradeImdg = hazelcastServiceTest.getImdg(IMDGDistributedNames.Map_STrades, STrades.class); this.securityImdg = hazelcastServiceTest.getImdg(IMDGDistributedNames.Map_Security, Security.class); this.executionDepositImdg = hazelcastServiceTest.getImdg(IMDGDistributedNames.Map_ExecutionDeposit, ExecutionDeposit.class); this.companyImdg = hazelcastServiceTest.getImdg(IMDGDistributedNames.Map_Company, Company.class); @@ -62,13 +62,13 @@ class ExecutionDepositComponentTest extends AbstractClearingTest { void processNewTS() { String secCode = "SecCode"; String operation = "oper"; - STrade sTrade = new STrade(); + STrades sTrades = new STrades(); Long exchangeExecutionId = 1221L; LocalDate today = LocalDate.now(); - sTrade.setTradeDateTime(todayInstant); - sTrade.setSecCode(secCode); - sTrade.setOperation(operation); - sTradeImdg.insert(sTrade); + sTrades.setTradeDateTime(todayInstant); + sTrades.setSecCode(secCode); + sTrades.setOperation(operation); + sTradeImdg.insert(sTrades); Security security = new Security(); security.setSecuritySymbol(secCode); diff --git a/clearing-parent/company-service/src/main/java/ru/spcex/clearing/company/service/CompanyInfoService.java b/clearing-parent/company-service/src/main/java/ru/spcex/clearing/company/service/CompanyInfoService.java index 6fad333bf..7dd8ba584 100644 --- a/clearing-parent/company-service/src/main/java/ru/spcex/clearing/company/service/CompanyInfoService.java +++ b/clearing-parent/company-service/src/main/java/ru/spcex/clearing/company/service/CompanyInfoService.java @@ -92,8 +92,6 @@ public class CompanyInfoService extends QueueConsumer implements InitializingBea companyInfo.setResidence(req.getResidence()); companyInfo.setShortNameEng(req.getShortNameEng()); companyInfo.setFullNameEng(req.getFullNameEng()); - companyInfo.setShortName(req.getShortName()); - companyInfo.setFullName(req.getFullName()); company.setUpdated(Instant.now()); companyMap.update(company); diff --git a/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/CompanyInfoServiceTest.java b/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/CompanyInfoServiceTest.java index a70d40205..d823d4ab6 100644 --- a/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/CompanyInfoServiceTest.java +++ b/clearing-parent/company-service/src/test/java/ru/spcex/clearing/company/service/CompanyInfoServiceTest.java @@ -113,8 +113,6 @@ class CompanyInfoServiceTest { * {@link CompanyInfoUpdateRequest#residence} - RUS
* {@link CompanyInfoUpdateRequest#shortNameEng} - updated shortNameEng
* {@link CompanyInfoUpdateRequest#fullNameEng} - updated fullNameEng
- * {@link CompanyInfoUpdateRequest#shortName} - updated shortName
- * {@link CompanyInfoUpdateRequest#fullName} - updated fullName
*/ @Test void companyInfoUpdate() throws InterruptedException { @@ -131,12 +129,12 @@ class CompanyInfoServiceTest { existsCompanyInfo.setResidence("0000"); existsCompanyInfo.setShortNameEng("exists shortNameEng"); existsCompanyInfo.setFullNameEng("exists fullNameEng"); - existsCompanyInfo.setShortName("exists shortName"); - existsCompanyInfo.setFullName("exists fullName"); Company existsCompany = new Company(); existsCompany.setId(ID); existsCompany.setWorkflowStatus(WorkflowStatus.Active.getKey()); existsCompany.setProfile(existsCompanyInfo); + existsCompany.setShortName("exists shortName"); + existsCompany.setFullName("exists fullName"); companyImdg.insert(existsCompany); CompanyInfoUpdateRequest companyInfoUpdateRequest = new CompanyInfoUpdateRequest(); @@ -165,8 +163,6 @@ class CompanyInfoServiceTest { predictableCompanyInfo.setResidence("RUS"); predictableCompanyInfo.setShortNameEng("updated shortNameEng"); predictableCompanyInfo.setFullNameEng("updated fullNameEng"); - predictableCompanyInfo.setShortName("updated shortName"); - predictableCompanyInfo.setFullName("updated fullName"); //ACT String jsonString = getJsonStringForUpdate(companyInfoUpdateRequest, ID); diff --git a/clearing-parent/db-scripts/src/main/resources/db/DATA.sql b/clearing-parent/db-scripts/src/main/resources/db/DATA.sql index 61510c946..9123792cb 100644 --- a/clearing-parent/db-scripts/src/main/resources/db/DATA.sql +++ b/clearing-parent/db-scripts/src/main/resources/db/DATA.sql @@ -1,5 +1,5 @@ --- DB version: 3.5.0.18 --- DATA version: 3.5.0.2 +-- DB version: 3.5.0.19 +-- DATA version: 3.5.0.3 /* Dictionaries */ INSERT INTO ALLOWED_DICTIONARY(ID, CODE, NAME) values (1, 'ALWD', 'Разрешено') ON CONFLICT (ID) DO UPDATE SET CODE = EXCLUDED.CODE, NAME = EXCLUDED.NAME; @@ -160,6 +160,8 @@ INSERT INTO COMPANY_SYMBOL_DICTIONARY(ID, CODE, NAME, SHORTNAME) values (17, 'RG INSERT INTO COMPANY_SYMBOL_DICTIONARY(ID, CODE, NAME, SHORTNAME) values (18, 'UUID', 'Идентификатор во внешней системе', 'Внешний идентификатор') ON CONFLICT (ID) DO UPDATE SET CODE = EXCLUDED.CODE, NAME = EXCLUDED.NAME, SHORTNAME = EXCLUDED.SHORTNAME; +INSERT INTO COMPANY_SYMBOL_DICTIONARY(ID, CODE, NAME, SHORTNAME) values (19, 'RDPZ', 'Требуется получение документа о подтверждении открытия депозитного счета', 'Подтверждение депозитного счета') ON CONFLICT (ID) DO UPDATE SET CODE = EXCLUDED.CODE, NAME = EXCLUDED.NAME, SHORTNAME = EXCLUDED.SHORTNAME; + INSERT INTO COMPANY_ROLE_DICTIONARY(ID, CODE, NAME) values (1, 'RPRT', 'Отчетная организация') ON CONFLICT (ID) DO UPDATE SET CODE = EXCLUDED.CODE, NAME = EXCLUDED.NAME; INSERT INTO COMPANY_ROLE_DICTIONARY(ID, CODE, NAME) values (2, 'CLRH', 'Клиринговая организация') ON CONFLICT (ID) DO UPDATE SET CODE = EXCLUDED.CODE, NAME = EXCLUDED.NAME; @@ -448,6 +450,32 @@ INSERT INTO PARENT_DICTIONARY(ID, CODE, NAME) values (2, 'PLNR', 'Расписа INSERT INTO PARENT_DICTIONARY(ID, CODE, NAME) values (3, 'CLND', 'Календарь') ON CONFLICT (ID) DO UPDATE SET CODE = EXCLUDED.CODE, NAME = EXCLUDED.NAME; +INSERT INTO SESSION_STATUS_DICTIONARY(ID, CODE, NAME) values (1, 'ACTV', 'Сессия активна') ON CONFLICT (ID) DO UPDATE SET CODE = EXCLUDED.CODE, NAME = EXCLUDED.NAME; + +INSERT INTO SESSION_STATUS_DICTIONARY(ID, CODE, NAME) values (2, 'CLRN', 'Идет клиринг') ON CONFLICT (ID) DO UPDATE SET CODE = EXCLUDED.CODE, NAME = EXCLUDED.NAME; + +INSERT INTO SESSION_STATUS_DICTIONARY(ID, CODE, NAME) values (3, 'CLOS', 'Клиринг завершен') ON CONFLICT (ID) DO UPDATE SET CODE = EXCLUDED.CODE, NAME = EXCLUDED.NAME; + +INSERT INTO SESSION_TYPE_DICTIONARY(ID, CODE, NAME) values (1, 'FINL', 'Итоговая клиринговая сессия') ON CONFLICT (ID) DO UPDATE SET CODE = EXCLUDED.CODE, NAME = EXCLUDED.NAME; + +INSERT INTO SESSION_TYPE_DICTIONARY(ID, CODE, NAME) values (2, 'MEDM', 'Промежуточная клиринговая сессия') ON CONFLICT (ID) DO UPDATE SET CODE = EXCLUDED.CODE, NAME = EXCLUDED.NAME; + +INSERT INTO SESSION_TYPE_DICTIONARY(ID, CODE, NAME) values (3, 'XDEP', 'Промежуточная возврат депозитов') ON CONFLICT (ID) DO UPDATE SET CODE = EXCLUDED.CODE, NAME = EXCLUDED.NAME; + +INSERT INTO SESSION_TYPE_DICTIONARY(ID, CODE, NAME) values (4, 'IPOT', 'Первичные торги Т0') ON CONFLICT (ID) DO UPDATE SET CODE = EXCLUDED.CODE, NAME = EXCLUDED.NAME; + +INSERT INTO SESSION_TYPE_DICTIONARY(ID, CODE, NAME) values (5, 'TRDT', 'Вторичные торги Т0') ON CONFLICT (ID) DO UPDATE SET CODE = EXCLUDED.CODE, NAME = EXCLUDED.NAME; + +INSERT INTO SESSION_TYPE_DICTIONARY(ID, CODE, NAME) values (6, 'LIQU', 'Ликвидационное прекращение обязательств') ON CONFLICT (ID) DO UPDATE SET CODE = EXCLUDED.CODE, NAME = EXCLUDED.NAME; + +INSERT INTO SESSION_TYPE_DICTIONARY(ID, CODE, NAME) values (7, 'IPOB', 'Первичные торги Bn') ON CONFLICT (ID) DO UPDATE SET CODE = EXCLUDED.CODE, NAME = EXCLUDED.NAME; + +INSERT INTO SESSION_TYPE_DICTIONARY(ID, CODE, NAME) values (8, 'IPO0', 'Первичные торги B0') ON CONFLICT (ID) DO UPDATE SET CODE = EXCLUDED.CODE, NAME = EXCLUDED.NAME; + +INSERT INTO MONEY_FLOW_SIDE_DICTIONARY(ID, CODE, NAME) values (1, 'BUY', 'Разместить') ON CONFLICT (ID) DO UPDATE SET CODE = EXCLUDED.CODE, NAME = EXCLUDED.NAME; + +INSERT INTO MONEY_FLOW_SIDE_DICTIONARY(ID, CODE, NAME) values (2, 'SELL', 'Привлечь') ON CONFLICT (ID) DO UPDATE SET CODE = EXCLUDED.CODE, NAME = EXCLUDED.NAME; + INSERT INTO COURIER_TYPE_DICTIONARY(ID, CODE, NAME) values (1, 'STHS', 'ЭДО с Расчетной Организацией') ON CONFLICT (ID) DO UPDATE SET CODE = EXCLUDED.CODE, NAME = EXCLUDED.NAME; INSERT INTO TRANSACTION_STATUS_DICTIONARY(ID, CODE, NAME) values (1, 'STLD', 'Рассчитан') ON CONFLICT (ID) DO UPDATE SET CODE = EXCLUDED.CODE, NAME = EXCLUDED.NAME; @@ -482,10 +510,6 @@ INSERT INTO IN_OUT_DIRECTION_DICTIONARY(ID, CODE, NAME) values (1, 'IN', 'Зач INSERT INTO IN_OUT_DIRECTION_DICTIONARY(ID, CODE, NAME) values (2, 'OUT', 'Списание') ON CONFLICT (ID) DO UPDATE SET CODE = EXCLUDED.CODE, NAME = EXCLUDED.NAME; -INSERT INTO MONEY_FLOW_SIDE_DICTIONARY(ID, CODE, NAME) values (1, 'BUY', 'Разместить') ON CONFLICT (ID) DO UPDATE SET CODE = EXCLUDED.CODE, NAME = EXCLUDED.NAME; - -INSERT INTO MONEY_FLOW_SIDE_DICTIONARY(ID, CODE, NAME) values (2, 'SELL', 'Привлечь') ON CONFLICT (ID) DO UPDATE SET CODE = EXCLUDED.CODE, NAME = EXCLUDED.NAME; - INSERT INTO STATEMENT_TYPE_DICTIONARY(ID, CODE, NAME) values (1, 'FULL', 'Установка суммы') ON CONFLICT (ID) DO UPDATE SET CODE = EXCLUDED.CODE, NAME = EXCLUDED.NAME; INSERT INTO STATEMENT_TYPE_DICTIONARY(ID, CODE, NAME) values (2, 'INCR', 'Изменение суммы') ON CONFLICT (ID) DO UPDATE SET CODE = EXCLUDED.CODE, NAME = EXCLUDED.NAME; @@ -528,12 +552,6 @@ INSERT INTO IN_OUT_S_DF_TYPE_DICTIONARY(ID, CODE, NAME) values (2, '1617', 'Вх INSERT INTO IN_OUT_S_DF_TYPE_DICTIONARY(ID, CODE, NAME) values (3, '0910', 'Входящий ДФ-09/Исходящий ДФ-10') ON CONFLICT (ID) DO UPDATE SET CODE = EXCLUDED.CODE, NAME = EXCLUDED.NAME; -INSERT INTO SESSION_STATUS_DICTIONARY(ID, CODE, NAME) values (1, 'ACTV', 'Сессия активна') ON CONFLICT (ID) DO UPDATE SET CODE = EXCLUDED.CODE, NAME = EXCLUDED.NAME; - -INSERT INTO SESSION_STATUS_DICTIONARY(ID, CODE, NAME) values (2, 'CLRN', 'Идет клиринг') ON CONFLICT (ID) DO UPDATE SET CODE = EXCLUDED.CODE, NAME = EXCLUDED.NAME; - -INSERT INTO SESSION_STATUS_DICTIONARY(ID, CODE, NAME) values (3, 'CLOS', 'Клиринг завершен') ON CONFLICT (ID) DO UPDATE SET CODE = EXCLUDED.CODE, NAME = EXCLUDED.NAME; - INSERT INTO OBJECT_TYPE_DICTIONARY(ID, CODE, NAME) values (1, 'STMT', 'STATEMENT') ON CONFLICT (ID) DO UPDATE SET CODE = EXCLUDED.CODE, NAME = EXCLUDED.NAME; INSERT INTO OBJECT_TYPE_DICTIONARY(ID, CODE, NAME) values (2, 'VFRS', 'verificationResult') ON CONFLICT (ID) DO UPDATE SET CODE = EXCLUDED.CODE, NAME = EXCLUDED.NAME; diff --git a/clearing-parent/db-scripts/src/main/resources/db/DDL.sql b/clearing-parent/db-scripts/src/main/resources/db/DDL.sql index 78382efaa..91d9d0733 100644 --- a/clearing-parent/db-scripts/src/main/resources/db/DDL.sql +++ b/clearing-parent/db-scripts/src/main/resources/db/DDL.sql @@ -1,4 +1,4 @@ --- DB version: 3.5.0.18 +-- DB version: 3.5.0.19 /* Dictionaries */ -- allowed - Справочник признаков допустимости использования объектов @@ -443,6 +443,39 @@ COMMENT ON COLUMN PARENT_DICTIONARY.CODE IS 'Код'; COMMENT ON COLUMN PARENT_DICTIONARY.NAME IS 'Наименование'; +-- sessionStatus - Справочник статусов клиринговых сессий +DROP TABLE IF EXISTS SESSION_STATUS_DICTIONARY; +CREATE TABLE SESSION_STATUS_DICTIONARY(ID bigint PRIMARY KEY, CODE varchar(4), NAME varchar(50)); +COMMENT ON TABLE SESSION_STATUS_DICTIONARY IS 'Справочник статусов клиринговых сессий'; + +COMMENT ON COLUMN SESSION_STATUS_DICTIONARY.ID IS 'Идентификатор'; + +COMMENT ON COLUMN SESSION_STATUS_DICTIONARY.CODE IS 'Код'; + +COMMENT ON COLUMN SESSION_STATUS_DICTIONARY.NAME IS 'Наименование'; + +-- sessionType - Справочник типов клиринговых сессий +DROP TABLE IF EXISTS SESSION_TYPE_DICTIONARY; +CREATE TABLE SESSION_TYPE_DICTIONARY(ID bigint PRIMARY KEY, CODE varchar(4), NAME varchar(50)); +COMMENT ON TABLE SESSION_TYPE_DICTIONARY IS 'Справочник типов клиринговых сессий'; + +COMMENT ON COLUMN SESSION_TYPE_DICTIONARY.ID IS 'Идентификатор'; + +COMMENT ON COLUMN SESSION_TYPE_DICTIONARY.CODE IS 'Код'; + +COMMENT ON COLUMN SESSION_TYPE_DICTIONARY.NAME IS 'Наименование'; + +-- moneyFlowSide - Справочник направлений +DROP TABLE IF EXISTS MONEY_FLOW_SIDE_DICTIONARY; +CREATE TABLE MONEY_FLOW_SIDE_DICTIONARY(ID bigint PRIMARY KEY, CODE varchar(4), NAME varchar(255)); +COMMENT ON TABLE MONEY_FLOW_SIDE_DICTIONARY IS 'Справочник направлений'; + +COMMENT ON COLUMN MONEY_FLOW_SIDE_DICTIONARY.ID IS 'Идентификатор'; + +COMMENT ON COLUMN MONEY_FLOW_SIDE_DICTIONARY.CODE IS 'Код'; + +COMMENT ON COLUMN MONEY_FLOW_SIDE_DICTIONARY.NAME IS 'Значение'; + -- chargeDirection - Направление начисления комиссии DROP TABLE IF EXISTS CHARGE_DIRECTION_DICTIONARY; CREATE TABLE CHARGE_DIRECTION_DICTIONARY(ID bigint PRIMARY KEY, CODE varchar(4), NAME varchar(50)); @@ -498,17 +531,6 @@ COMMENT ON COLUMN CLEARING_STATUS_DICTIONARY.CODE IS 'Код'; COMMENT ON COLUMN CLEARING_STATUS_DICTIONARY.NAME IS 'Наименование'; --- moneyFlowSide - Направление заявки -DROP TABLE IF EXISTS MONEY_FLOW_SIDE_DICTIONARY; -CREATE TABLE MONEY_FLOW_SIDE_DICTIONARY(ID bigint PRIMARY KEY, CODE varchar(4), NAME varchar(255)); -COMMENT ON TABLE MONEY_FLOW_SIDE_DICTIONARY IS 'Направление заявки'; - -COMMENT ON COLUMN MONEY_FLOW_SIDE_DICTIONARY.ID IS 'Идентификатор'; - -COMMENT ON COLUMN MONEY_FLOW_SIDE_DICTIONARY.CODE IS 'Код'; - -COMMENT ON COLUMN MONEY_FLOW_SIDE_DICTIONARY.NAME IS 'Значение'; - -- inOutDirection - Справочник значений направления денежного потока DROP TABLE IF EXISTS IN_OUT_DIRECTION_DICTIONARY; CREATE TABLE IN_OUT_DIRECTION_DICTIONARY(ID bigint PRIMARY KEY, CODE varchar(4), NAME varchar(255)); @@ -619,17 +641,6 @@ COMMENT ON COLUMN IN_OUT_S_DF_TYPE_DICTIONARY.CODE IS 'Код'; COMMENT ON COLUMN IN_OUT_S_DF_TYPE_DICTIONARY.NAME IS 'Тип записи'; --- sessionStatus - Справочник статусов клиринговой сессии -DROP TABLE IF EXISTS SESSION_STATUS_DICTIONARY; -CREATE TABLE SESSION_STATUS_DICTIONARY(ID bigint PRIMARY KEY, CODE varchar(4), NAME varchar(50)); -COMMENT ON TABLE SESSION_STATUS_DICTIONARY IS 'Справочник статусов клиринговой сессии'; - -COMMENT ON COLUMN SESSION_STATUS_DICTIONARY.ID IS 'Идентификатор'; - -COMMENT ON COLUMN SESSION_STATUS_DICTIONARY.CODE IS 'Код'; - -COMMENT ON COLUMN SESSION_STATUS_DICTIONARY.NAME IS 'Наименование'; - -- objectType - Справочник типов объектов DROP TABLE IF EXISTS OBJECT_TYPE_DICTIONARY; CREATE TABLE OBJECT_TYPE_DICTIONARY(ID bigint PRIMARY KEY, CODE varchar(4), NAME varchar(50)); @@ -2227,6 +2238,426 @@ COMMENT ON COLUMN LAUNCHER.CREATED_AT IS 'Дата-время создания COMMENT ON COLUMN LAUNCHER.UPDATED_AT IS 'Дата-время изменения записи'; +-- session - Клиринговая сессия +DROP TABLE IF EXISTS SESSION; +CREATE TABLE SESSION(ID bigint PRIMARY KEY, CREATED_AT timestamp, UPDATED_AT timestamp, CLEARING_DATE date, SESSION_STATUS varchar(4), COMPANY_ID bigint, SECURITY_ID bigint, USER_ID bigint, SECTION varchar(4), SESSION_TYPE varchar(4)); +COMMENT ON TABLE SESSION IS 'Клиринговая сессия'; + +COMMENT ON COLUMN SESSION.ID IS 'Идентификатор записи'; + +COMMENT ON COLUMN SESSION.CREATED_AT IS 'Дата-время создания записи'; + +COMMENT ON COLUMN SESSION.UPDATED_AT IS 'Дата-время изменения записи'; + +COMMENT ON COLUMN SESSION.CLEARING_DATE IS 'Дата'; + +COMMENT ON COLUMN SESSION.SESSION_STATUS IS 'Код статуса клиринговой сессии (linked to sessionStatus)'; + +COMMENT ON COLUMN SESSION.COMPANY_ID IS 'Идентификатор инициатора торгов (linked to company)'; + +COMMENT ON COLUMN SESSION.SECURITY_ID IS 'Идентификатор инструмента (linked to security)'; + +COMMENT ON COLUMN SESSION.USER_ID IS 'Идентификатор пользователя (linked to userCls)'; + +COMMENT ON COLUMN SESSION.SECTION IS 'Код наименования секции (linked to section)'; + +COMMENT ON COLUMN SESSION.SESSION_TYPE IS 'Код типа клиринговой сессии (linked to sessionType)'; + + +-- History log of session - Клиринговая сессия +DROP TABLE IF EXISTS SESSION_HISTORY; +CREATE TABLE SESSION_HISTORY(SESSION_ID BIGINT NOT NULL, EVENT_TIME timestamp, EVENT_USER_ID BIGINT, EVENT_TYPE VARCHAR(4), ID bigint PRIMARY KEY, CREATED_AT timestamp, UPDATED_AT timestamp, CLEARING_DATE date, SESSION_STATUS varchar(4), COMPANY_ID bigint, SECURITY_ID bigint, USER_ID bigint, SECTION varchar(4), SESSION_TYPE varchar(4)); +COMMENT ON TABLE SESSION_HISTORY IS 'История изменений таблицы session'; +COMMENT ON COLUMN SESSION_HISTORY.SESSION_ID IS 'Идентификатор записи в таблице SESSION'; +COMMENT ON COLUMN SESSION_HISTORY.EVENT_TIME IS 'Дата и время изменения'; +COMMENT ON COLUMN SESSION_HISTORY.EVENT_USER_ID IS 'Инициатор изменения'; +COMMENT ON COLUMN SESSION_HISTORY.EVENT_TYPE IS 'Тип изменения'; + +COMMENT ON COLUMN SESSION_HISTORY.ID IS 'Идентификатор записи'; + +COMMENT ON COLUMN SESSION_HISTORY.CREATED_AT IS 'Дата-время создания записи'; + +COMMENT ON COLUMN SESSION_HISTORY.UPDATED_AT IS 'Дата-время изменения записи'; + +COMMENT ON COLUMN SESSION_HISTORY.CLEARING_DATE IS 'Дата'; + +COMMENT ON COLUMN SESSION_HISTORY.SESSION_STATUS IS 'Код статуса клиринговой сессии (linked to sessionStatus)'; + +COMMENT ON COLUMN SESSION_HISTORY.COMPANY_ID IS 'Идентификатор инициатора торгов (linked to company)'; + +COMMENT ON COLUMN SESSION_HISTORY.SECURITY_ID IS 'Идентификатор инструмента (linked to security)'; + +COMMENT ON COLUMN SESSION_HISTORY.USER_ID IS 'Идентификатор пользователя (linked to userCls)'; + +COMMENT ON COLUMN SESSION_HISTORY.SECTION IS 'Код наименования секции (linked to section)'; + +COMMENT ON COLUMN SESSION_HISTORY.SESSION_TYPE IS 'Код типа клиринговой сессии (linked to sessionType)'; + +-- sTrades - Сделки из Торговой системы +DROP TABLE IF EXISTS S_TRADES; +CREATE TABLE S_TRADES(ID bigint PRIMARY KEY, TRADE_NUM bigint, OPERATION varchar(40), CLASS_CODE varchar(255), TRADE_DATE date, SEC_CODE varchar(255), ACCRUEDINT numeric(72,18), ACCRUEDINT2 numeric(72,18), LOWER_DISCOUNT numeric(72,18), ORDER_NUM bigint, PRICE numeric(72,18), PRICE2 numeric(72,18), REPO_RATE numeric(72,18), REPO_VALUE numeric(72,18), REPO2_VALUE numeric(72,18), START_DISCOUNT numeric(72,18), TS_COMMISSION numeric(72,18), UPPER_DISCOUNT numeric(72,18), VALUE numeric(72,18), YIELD numeric(72,18), QTY numeric(72,18), QTY_PCS numeric(72,18), TRADE_DATE_TIME timestamp, REPO_TERM bigint, CLEARING_COMMISSION numeric(72,18), EXCHANGE_COMMISSION numeric(72,18), TECH_CENTER_COMMISSION numeric(72,18), ACCOUNT varchar(50), BROKER_REF varchar(34), CLIENT_CODE varchar(255), SETTLE_CODE varchar(50), USER_ID varchar(32), EXCHANGE_CODE varchar(64), FIRM_ID varchar(255), FIRM_NAME varchar(255), CP_FIRM_ID varchar(255), CP_FIRM_NAME varchar(255), CLASS_NAME varchar(255), SEC_NAME varchar(255), SETTLE_DATE date, SETTLE_CURRENCY varchar(4), TRADE_CURRENCY varchar(4), TRADE_TIME_MS bigint, BANK_ACC_ID varchar(12), SECTION varchar(4)); +COMMENT ON TABLE S_TRADES IS 'Сделки из Торговой системы'; + +COMMENT ON COLUMN S_TRADES.ID IS 'Идентификатор записи'; + +COMMENT ON COLUMN S_TRADES.TRADE_NUM IS 'Номер сделки'; + +COMMENT ON COLUMN S_TRADES.OPERATION IS 'Направленность сделки (BUY или SELL)'; + +COMMENT ON COLUMN S_TRADES.CLASS_CODE IS 'Код класса инструментов'; + +COMMENT ON COLUMN S_TRADES.TRADE_DATE IS 'Дата торговой сессии'; + +COMMENT ON COLUMN S_TRADES.SEC_CODE IS 'Код инструмента'; + +COMMENT ON COLUMN S_TRADES.ACCRUEDINT IS 'Накопленный купонный доход'; + +COMMENT ON COLUMN S_TRADES.ACCRUEDINT2 IS 'Доход(%) на дату выкупа'; + +COMMENT ON COLUMN S_TRADES.LOWER_DISCOUNT IS 'Нижний дисконт(%)'; + +COMMENT ON COLUMN S_TRADES.ORDER_NUM IS 'Номер заявки'; + +COMMENT ON COLUMN S_TRADES.PRICE IS 'Цена сделки'; + +COMMENT ON COLUMN S_TRADES.PRICE2 IS 'Цена выкупа второй части РЕПО'; + +COMMENT ON COLUMN S_TRADES.REPO_RATE IS 'Ставка РЕПО (%)'; + +COMMENT ON COLUMN S_TRADES.REPO_VALUE IS 'Сумма РЕПО'; + +COMMENT ON COLUMN S_TRADES.REPO2_VALUE IS 'Объем сделки выкупа РЕПО, рублей'; + +COMMENT ON COLUMN S_TRADES.START_DISCOUNT IS 'Начальный дисконт(%)'; + +COMMENT ON COLUMN S_TRADES.TS_COMMISSION IS 'Комиссия торговой системы'; + +COMMENT ON COLUMN S_TRADES.UPPER_DISCOUNT IS 'Верхний дисконт(%)'; + +COMMENT ON COLUMN S_TRADES.VALUE IS 'Объем сделки без учета комиссионного сбора биржи и % дохода'; + +COMMENT ON COLUMN S_TRADES.YIELD IS 'Доходность'; + +COMMENT ON COLUMN S_TRADES.QTY IS 'Количество бумаг в лотах'; + +COMMENT ON COLUMN S_TRADES.QTY_PCS IS 'Количество бумаг в штуках'; + +COMMENT ON COLUMN S_TRADES.TRADE_DATE_TIME IS 'Дата и время сделки'; + +COMMENT ON COLUMN S_TRADES.REPO_TERM IS 'Срок РЕПО'; + +COMMENT ON COLUMN S_TRADES.CLEARING_COMMISSION IS 'Клиринговая комиссия. Параметр сделок на МБ'; + +COMMENT ON COLUMN S_TRADES.EXCHANGE_COMMISSION IS 'Комиссия Фондовой биржи. Параметр сделок на МБ'; + +COMMENT ON COLUMN S_TRADES.TECH_CENTER_COMMISSION IS 'Комиссия Технического центра. Параметр сделок на МБ'; + +COMMENT ON COLUMN S_TRADES.ACCOUNT IS 'Торговый счет'; + +COMMENT ON COLUMN S_TRADES.BROKER_REF IS 'Комментарий, обычно: код клиента>/номер поручения>'; + +COMMENT ON COLUMN S_TRADES.CLIENT_CODE IS 'Код участника торгов = Код участника клиринга = Код участника расчетов'; + +COMMENT ON COLUMN S_TRADES.SETTLE_CODE IS 'Код расчетов по сделке'; + +COMMENT ON COLUMN S_TRADES.USER_ID IS 'Идентификатор трейдера'; + +COMMENT ON COLUMN S_TRADES.EXCHANGE_CODE IS 'Идентификатор биржи'; + +COMMENT ON COLUMN S_TRADES.FIRM_ID IS 'Трейдер'; + +COMMENT ON COLUMN S_TRADES.FIRM_NAME IS 'Организация трейдера'; + +COMMENT ON COLUMN S_TRADES.CP_FIRM_ID IS 'Партнер'; + +COMMENT ON COLUMN S_TRADES.CP_FIRM_NAME IS 'Организация партнера'; + +COMMENT ON COLUMN S_TRADES.CLASS_NAME IS 'Класс инструмента'; + +COMMENT ON COLUMN S_TRADES.SEC_NAME IS 'Полное наименование инструмента'; + +COMMENT ON COLUMN S_TRADES.SETTLE_DATE IS 'Дата расчетов'; + +COMMENT ON COLUMN S_TRADES.SETTLE_CURRENCY IS 'Валюта расчетов'; + +COMMENT ON COLUMN S_TRADES.TRADE_CURRENCY IS 'Валюта сделки'; + +COMMENT ON COLUMN S_TRADES.TRADE_TIME_MS IS 'Микросекунды времени сделки'; + +COMMENT ON COLUMN S_TRADES.BANK_ACC_ID IS 'Идентификатор расчетного счета/кода в клиринговой организации'; + +COMMENT ON COLUMN S_TRADES.SECTION IS 'Код наименования секции (linked to section)'; + +-- executionDeposit - Сделки +DROP TABLE IF EXISTS EXECUTION_DEPOSIT; +CREATE TABLE EXECUTION_DEPOSIT(EXCHANGE_EXECUTION_ID bigint, EXCHANGE_EXECUTION_TIME timestamp, TRADING_DATE date, TRADING_CLEARING_REGISTRY_ID bigint, MARKET varchar(4), PRICE numeric(72,18), LOTS numeric(72,2), QUANTITY numeric(72,2), FIRST_LEG_AMOUNT numeric(72,2), SECOND_LEG_AMOUNT numeric(72,2), INTEREST_AMOUNT numeric(72,2), SIDE varchar(4), SETTLEMENT_CURRENCY varchar(4), COMPANY_ID bigint, DURATION bigint, FIRST_LEG_SETTLEMENT_DATE date, SECOND_LEG_SETTLEMENT_DATE date, FIRST_LEG_SETTLEMENT_CODE varchar(12), SECOND_LEG_SETTLEMENT_CODE varchar(12), SECURITY_FULL_NAME varchar(255), SECURITY_SYMBOL varchar(255), SECURITY_ID bigint, CONTRACT varchar(255), COUNTER_PARTY_ID bigint, COVERAGE_STATUS varchar(4), SESSION_ID bigint, ID bigint PRIMARY KEY, CREATED_AT timestamp, UPDATED_AT timestamp, CLEARING_DATE date); +COMMENT ON TABLE EXECUTION_DEPOSIT IS 'Сделки'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT.EXCHANGE_EXECUTION_ID IS 'Идентификационный номер сделки в Торговой системе'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT.EXCHANGE_EXECUTION_TIME IS 'Время заключения сделки в Торговой системе'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT.TRADING_DATE IS 'Дата заключения сделки'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT.TRADING_CLEARING_REGISTRY_ID IS 'Идентификатор торгово-клирингового регистра (linked to tradingClearingRegistry)'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT.MARKET IS 'Код секции финансового инструмента (linked to market)'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT.PRICE IS 'Ставка по депозиту'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT.LOTS IS 'Количество лотов'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT.QUANTITY IS 'Количество штук'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT.FIRST_LEG_AMOUNT IS 'Объем сделки'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT.SECOND_LEG_AMOUNT IS 'Объем возврата'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT.INTEREST_AMOUNT IS 'Объем процентов'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT.SIDE IS 'Код направления сделки (linked to moneyFlowSide)'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT.SETTLEMENT_CURRENCY IS 'Код валюты расчетов по инструменту (linked to currencyCode)'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT.COMPANY_ID IS 'Идентификатор компании (linked to company)'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT.DURATION IS 'Срок, дней'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT.FIRST_LEG_SETTLEMENT_DATE IS 'Дата размещения'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT.SECOND_LEG_SETTLEMENT_DATE IS 'Дата возврата'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT.FIRST_LEG_SETTLEMENT_CODE IS 'Код расчетов при размещении'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT.SECOND_LEG_SETTLEMENT_CODE IS 'Код расчетов при возврате'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT.SECURITY_FULL_NAME IS 'Наименование инструмента'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT.SECURITY_SYMBOL IS 'Код инструмента в Торговой Системе'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT.SECURITY_ID IS 'Идентификатор финансового инструмента (linked to moneyMarketSecurity)'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT.CONTRACT IS 'Продукт'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT.COUNTER_PARTY_ID IS 'Идентификатор компании-партнера, с которой заключена сделка (linked to company)'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT.COVERAGE_STATUS IS 'Код статуса достаточности обеспечения (linked to allowed)'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT.SESSION_ID IS 'Сессия (linked to session)'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT.ID IS 'Идентификатор записи'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT.CREATED_AT IS 'Дата-время создания записи'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT.UPDATED_AT IS 'Дата-время изменения записи'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT.CLEARING_DATE IS 'Дата клиринга'; + + +-- History log of executionDeposit - Сделки +DROP TABLE IF EXISTS EXECUTION_DEPOSIT_HISTORY; +CREATE TABLE EXECUTION_DEPOSIT_HISTORY(EXECUTION_DEPOSIT_ID BIGINT NOT NULL, EVENT_TIME timestamp, EVENT_USER_ID BIGINT, EVENT_TYPE VARCHAR(4), EXCHANGE_EXECUTION_ID bigint, EXCHANGE_EXECUTION_TIME timestamp, TRADING_DATE date, TRADING_CLEARING_REGISTRY_ID bigint, MARKET varchar(4), PRICE numeric(72,18), LOTS numeric(72,2), QUANTITY numeric(72,2), FIRST_LEG_AMOUNT numeric(72,2), SECOND_LEG_AMOUNT numeric(72,2), INTEREST_AMOUNT numeric(72,2), SIDE varchar(4), SETTLEMENT_CURRENCY varchar(4), COMPANY_ID bigint, DURATION bigint, FIRST_LEG_SETTLEMENT_DATE date, SECOND_LEG_SETTLEMENT_DATE date, FIRST_LEG_SETTLEMENT_CODE varchar(12), SECOND_LEG_SETTLEMENT_CODE varchar(12), SECURITY_FULL_NAME varchar(255), SECURITY_SYMBOL varchar(255), SECURITY_ID bigint, CONTRACT varchar(255), COUNTER_PARTY_ID bigint, COVERAGE_STATUS varchar(4), SESSION_ID bigint, ID bigint PRIMARY KEY, CREATED_AT timestamp, UPDATED_AT timestamp, CLEARING_DATE date); +COMMENT ON TABLE EXECUTION_DEPOSIT_HISTORY IS 'История изменений таблицы executionDeposit'; +COMMENT ON COLUMN EXECUTION_DEPOSIT_HISTORY.EXECUTION_DEPOSIT_ID IS 'Идентификатор записи в таблице EXECUTION_DEPOSIT'; +COMMENT ON COLUMN EXECUTION_DEPOSIT_HISTORY.EVENT_TIME IS 'Дата и время изменения'; +COMMENT ON COLUMN EXECUTION_DEPOSIT_HISTORY.EVENT_USER_ID IS 'Инициатор изменения'; +COMMENT ON COLUMN EXECUTION_DEPOSIT_HISTORY.EVENT_TYPE IS 'Тип изменения'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT_HISTORY.EXCHANGE_EXECUTION_ID IS 'Идентификационный номер сделки в Торговой системе'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT_HISTORY.EXCHANGE_EXECUTION_TIME IS 'Время заключения сделки в Торговой системе'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT_HISTORY.TRADING_DATE IS 'Дата заключения сделки'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT_HISTORY.TRADING_CLEARING_REGISTRY_ID IS 'Идентификатор торгово-клирингового регистра (linked to tradingClearingRegistry)'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT_HISTORY.MARKET IS 'Код секции финансового инструмента (linked to market)'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT_HISTORY.PRICE IS 'Ставка по депозиту'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT_HISTORY.LOTS IS 'Количество лотов'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT_HISTORY.QUANTITY IS 'Количество штук'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT_HISTORY.FIRST_LEG_AMOUNT IS 'Объем сделки'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT_HISTORY.SECOND_LEG_AMOUNT IS 'Объем возврата'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT_HISTORY.INTEREST_AMOUNT IS 'Объем процентов'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT_HISTORY.SIDE IS 'Код направления сделки (linked to moneyFlowSide)'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT_HISTORY.SETTLEMENT_CURRENCY IS 'Код валюты расчетов по инструменту (linked to currencyCode)'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT_HISTORY.COMPANY_ID IS 'Идентификатор компании (linked to company)'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT_HISTORY.DURATION IS 'Срок, дней'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT_HISTORY.FIRST_LEG_SETTLEMENT_DATE IS 'Дата размещения'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT_HISTORY.SECOND_LEG_SETTLEMENT_DATE IS 'Дата возврата'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT_HISTORY.FIRST_LEG_SETTLEMENT_CODE IS 'Код расчетов при размещении'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT_HISTORY.SECOND_LEG_SETTLEMENT_CODE IS 'Код расчетов при возврате'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT_HISTORY.SECURITY_FULL_NAME IS 'Наименование инструмента'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT_HISTORY.SECURITY_SYMBOL IS 'Код инструмента в Торговой Системе'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT_HISTORY.SECURITY_ID IS 'Идентификатор финансового инструмента (linked to moneyMarketSecurity)'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT_HISTORY.CONTRACT IS 'Продукт'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT_HISTORY.COUNTER_PARTY_ID IS 'Идентификатор компании-партнера, с которой заключена сделка (linked to company)'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT_HISTORY.COVERAGE_STATUS IS 'Код статуса достаточности обеспечения (linked to allowed)'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT_HISTORY.SESSION_ID IS 'Сессия (linked to session)'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT_HISTORY.ID IS 'Идентификатор записи'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT_HISTORY.CREATED_AT IS 'Дата-время создания записи'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT_HISTORY.UPDATED_AT IS 'Дата-время изменения записи'; + +COMMENT ON COLUMN EXECUTION_DEPOSIT_HISTORY.CLEARING_DATE IS 'Дата клиринга'; + +-- executionFond - Сделки на Фондовой секции +DROP TABLE IF EXISTS EXECUTION_FOND; +CREATE TABLE EXECUTION_FOND(ID bigint PRIMARY KEY, CREATED_AT timestamp, UPDATED_AT timestamp, CLEARING_DATE date, EXCHANGE_EXECUTION_ID bigint, SIDE varchar(4), MARKET varchar(4), TRADING_DATE date, SECURITY_SYMBOL varchar(255), SECURITY_ID bigint, INTEREST_AMOUNT numeric(72,2), EXCHANGE_ORDER_ID bigint, PRICE numeric(72,18), SETTLEMENT_AMOUNT numeric(72,2), LOTS numeric(72,2), QUANTITY numeric(72,2), EXCHANGE_EXECUTION_TIME timestamp, DURATION bigint, TRADING_CLEARING_REGISTRY_ID bigint, COMMENT varchar(255), CLIENT_CODE_ID bigint, SETTLEMENT_CODE varchar(12), COMPANY_ID bigint, COUNTER_PARTY_ID bigint, SECURITY_FULL_NAME varchar(255), SETTLEMENT_DATE date, SETTLEMENT_CURRENCY varchar(4), EXCHANGE_EXECUTION_MICROSECONDS timestamp, COVERAGE_STATUS varchar(4), SESSION_ID bigint); +COMMENT ON TABLE EXECUTION_FOND IS 'Сделки на Фондовой секции'; + +COMMENT ON COLUMN EXECUTION_FOND.ID IS 'Идентификатор записи'; + +COMMENT ON COLUMN EXECUTION_FOND.CREATED_AT IS 'Дата-время создания записи'; + +COMMENT ON COLUMN EXECUTION_FOND.UPDATED_AT IS 'Дата-время изменения записи'; + +COMMENT ON COLUMN EXECUTION_FOND.CLEARING_DATE IS 'Дата клиринга'; + +COMMENT ON COLUMN EXECUTION_FOND.EXCHANGE_EXECUTION_ID IS 'Идентификационный номер сделки в Торговой системе'; + +COMMENT ON COLUMN EXECUTION_FOND.SIDE IS 'Код направления сделки (linked to moneyFlowSide)'; + +COMMENT ON COLUMN EXECUTION_FOND.MARKET IS 'Код секции финансового инструмента (linked to market)'; + +COMMENT ON COLUMN EXECUTION_FOND.TRADING_DATE IS 'Дата заключения сделки'; + +COMMENT ON COLUMN EXECUTION_FOND.SECURITY_SYMBOL IS 'Код инструмента в Торговой Системе'; + +COMMENT ON COLUMN EXECUTION_FOND.SECURITY_ID IS 'Идентификатор финансового инструмента (linked to security)'; + +COMMENT ON COLUMN EXECUTION_FOND.INTEREST_AMOUNT IS 'Объем процентов'; + +COMMENT ON COLUMN EXECUTION_FOND.EXCHANGE_ORDER_ID IS 'Идентификационный номер заявки в Торговой системе'; + +COMMENT ON COLUMN EXECUTION_FOND.PRICE IS 'Ставка по депозиту'; + +COMMENT ON COLUMN EXECUTION_FOND.SETTLEMENT_AMOUNT IS 'Объем сделки'; + +COMMENT ON COLUMN EXECUTION_FOND.LOTS IS 'Количество лотов'; + +COMMENT ON COLUMN EXECUTION_FOND.QUANTITY IS 'Количество штук'; + +COMMENT ON COLUMN EXECUTION_FOND.EXCHANGE_EXECUTION_TIME IS 'Время заключения сделки в Торговой системе'; + +COMMENT ON COLUMN EXECUTION_FOND.DURATION IS 'Срок, дней'; + +COMMENT ON COLUMN EXECUTION_FOND.TRADING_CLEARING_REGISTRY_ID IS 'Идентификатор торгово-клирингового регистра (linked to tradingClearingRegistry)'; + +COMMENT ON COLUMN EXECUTION_FOND.COMMENT IS 'Комментарий'; + +COMMENT ON COLUMN EXECUTION_FOND.CLIENT_CODE_ID IS 'Идентификатор кода клиента'; + +COMMENT ON COLUMN EXECUTION_FOND.SETTLEMENT_CODE IS 'Код расчетов при размещении'; + +COMMENT ON COLUMN EXECUTION_FOND.COMPANY_ID IS 'Идентификатор компании (linked to company)'; + +COMMENT ON COLUMN EXECUTION_FOND.COUNTER_PARTY_ID IS 'Идентификатор компании-партнера, с которой заключена сделка (linked to company)'; + +COMMENT ON COLUMN EXECUTION_FOND.SECURITY_FULL_NAME IS 'Наименование инструмента'; + +COMMENT ON COLUMN EXECUTION_FOND.SETTLEMENT_DATE IS 'Дата расчетов'; + +COMMENT ON COLUMN EXECUTION_FOND.SETTLEMENT_CURRENCY IS 'Код валюты расчетов по инструменту (linked to currencyCode)'; + +COMMENT ON COLUMN EXECUTION_FOND.EXCHANGE_EXECUTION_MICROSECONDS IS 'Микросекунды заключения сделки в Торговой системе'; + +COMMENT ON COLUMN EXECUTION_FOND.COVERAGE_STATUS IS 'Код статуса достаточности обеспечения (linked to allowed)'; + +COMMENT ON COLUMN EXECUTION_FOND.SESSION_ID IS 'Идентификатор сессии (linked to session)'; + + +-- History log of executionFond - Сделки на Фондовой секции +DROP TABLE IF EXISTS EXECUTION_FOND_HISTORY; +CREATE TABLE EXECUTION_FOND_HISTORY(EXECUTION_FOND_ID BIGINT NOT NULL, EVENT_TIME timestamp, EVENT_USER_ID BIGINT, EVENT_TYPE VARCHAR(4), ID bigint PRIMARY KEY, CREATED_AT timestamp, UPDATED_AT timestamp, CLEARING_DATE date, EXCHANGE_EXECUTION_ID bigint, SIDE varchar(4), MARKET varchar(4), TRADING_DATE date, SECURITY_SYMBOL varchar(255), SECURITY_ID bigint, INTEREST_AMOUNT numeric(72,2), EXCHANGE_ORDER_ID bigint, PRICE numeric(72,18), SETTLEMENT_AMOUNT numeric(72,2), LOTS numeric(72,2), QUANTITY numeric(72,2), EXCHANGE_EXECUTION_TIME timestamp, DURATION bigint, TRADING_CLEARING_REGISTRY_ID bigint, COMMENT varchar(255), CLIENT_CODE_ID bigint, SETTLEMENT_CODE varchar(12), COMPANY_ID bigint, COUNTER_PARTY_ID bigint, SECURITY_FULL_NAME varchar(255), SETTLEMENT_DATE date, SETTLEMENT_CURRENCY varchar(4), EXCHANGE_EXECUTION_MICROSECONDS timestamp, COVERAGE_STATUS varchar(4), SESSION_ID bigint); +COMMENT ON TABLE EXECUTION_FOND_HISTORY IS 'История изменений таблицы executionFond'; +COMMENT ON COLUMN EXECUTION_FOND_HISTORY.EXECUTION_FOND_ID IS 'Идентификатор записи в таблице EXECUTION_FOND'; +COMMENT ON COLUMN EXECUTION_FOND_HISTORY.EVENT_TIME IS 'Дата и время изменения'; +COMMENT ON COLUMN EXECUTION_FOND_HISTORY.EVENT_USER_ID IS 'Инициатор изменения'; +COMMENT ON COLUMN EXECUTION_FOND_HISTORY.EVENT_TYPE IS 'Тип изменения'; + +COMMENT ON COLUMN EXECUTION_FOND_HISTORY.ID IS 'Идентификатор записи'; + +COMMENT ON COLUMN EXECUTION_FOND_HISTORY.CREATED_AT IS 'Дата-время создания записи'; + +COMMENT ON COLUMN EXECUTION_FOND_HISTORY.UPDATED_AT IS 'Дата-время изменения записи'; + +COMMENT ON COLUMN EXECUTION_FOND_HISTORY.CLEARING_DATE IS 'Дата клиринга'; + +COMMENT ON COLUMN EXECUTION_FOND_HISTORY.EXCHANGE_EXECUTION_ID IS 'Идентификационный номер сделки в Торговой системе'; + +COMMENT ON COLUMN EXECUTION_FOND_HISTORY.SIDE IS 'Код направления сделки (linked to moneyFlowSide)'; + +COMMENT ON COLUMN EXECUTION_FOND_HISTORY.MARKET IS 'Код секции финансового инструмента (linked to market)'; + +COMMENT ON COLUMN EXECUTION_FOND_HISTORY.TRADING_DATE IS 'Дата заключения сделки'; + +COMMENT ON COLUMN EXECUTION_FOND_HISTORY.SECURITY_SYMBOL IS 'Код инструмента в Торговой Системе'; + +COMMENT ON COLUMN EXECUTION_FOND_HISTORY.SECURITY_ID IS 'Идентификатор финансового инструмента (linked to security)'; + +COMMENT ON COLUMN EXECUTION_FOND_HISTORY.INTEREST_AMOUNT IS 'Объем процентов'; + +COMMENT ON COLUMN EXECUTION_FOND_HISTORY.EXCHANGE_ORDER_ID IS 'Идентификационный номер заявки в Торговой системе'; + +COMMENT ON COLUMN EXECUTION_FOND_HISTORY.PRICE IS 'Ставка по депозиту'; + +COMMENT ON COLUMN EXECUTION_FOND_HISTORY.SETTLEMENT_AMOUNT IS 'Объем сделки'; + +COMMENT ON COLUMN EXECUTION_FOND_HISTORY.LOTS IS 'Количество лотов'; + +COMMENT ON COLUMN EXECUTION_FOND_HISTORY.QUANTITY IS 'Количество штук'; + +COMMENT ON COLUMN EXECUTION_FOND_HISTORY.EXCHANGE_EXECUTION_TIME IS 'Время заключения сделки в Торговой системе'; + +COMMENT ON COLUMN EXECUTION_FOND_HISTORY.DURATION IS 'Срок, дней'; + +COMMENT ON COLUMN EXECUTION_FOND_HISTORY.TRADING_CLEARING_REGISTRY_ID IS 'Идентификатор торгово-клирингового регистра (linked to tradingClearingRegistry)'; + +COMMENT ON COLUMN EXECUTION_FOND_HISTORY.COMMENT IS 'Комментарий'; + +COMMENT ON COLUMN EXECUTION_FOND_HISTORY.CLIENT_CODE_ID IS 'Идентификатор кода клиента'; + +COMMENT ON COLUMN EXECUTION_FOND_HISTORY.SETTLEMENT_CODE IS 'Код расчетов при размещении'; + +COMMENT ON COLUMN EXECUTION_FOND_HISTORY.COMPANY_ID IS 'Идентификатор компании (linked to company)'; + +COMMENT ON COLUMN EXECUTION_FOND_HISTORY.COUNTER_PARTY_ID IS 'Идентификатор компании-партнера, с которой заключена сделка (linked to company)'; + +COMMENT ON COLUMN EXECUTION_FOND_HISTORY.SECURITY_FULL_NAME IS 'Наименование инструмента'; + +COMMENT ON COLUMN EXECUTION_FOND_HISTORY.SETTLEMENT_DATE IS 'Дата расчетов'; + +COMMENT ON COLUMN EXECUTION_FOND_HISTORY.SETTLEMENT_CURRENCY IS 'Код валюты расчетов по инструменту (linked to currencyCode)'; + +COMMENT ON COLUMN EXECUTION_FOND_HISTORY.EXCHANGE_EXECUTION_MICROSECONDS IS 'Микросекунды заключения сделки в Торговой системе'; + +COMMENT ON COLUMN EXECUTION_FOND_HISTORY.COVERAGE_STATUS IS 'Код статуса достаточности обеспечения (linked to allowed)'; + +COMMENT ON COLUMN EXECUTION_FOND_HISTORY.SESSION_ID IS 'Идентификатор сессии (linked to session)'; + -- clearmemberRegister - Реестр участников клиринга DROP TABLE IF EXISTS CLEARMEMBER_REGISTER; CREATE TABLE CLEARMEMBER_REGISTER(TRADING_CODE varchar(255), CLEARING_CODE varchar(255), FULL_NAME varchar(255), SHORT_NAME varchar(255), CATEGORY_LIST varchar(4), CORPORATION_SOLE varchar(4), ACCOUNT varchar(50), BANK bigint, BANK_NAME varchar(255), INN varchar(255), BIC varchar(255), OGRN varchar(255), CPP varchar(255), OCPO varchar(255), CONTRACT_NUMBER varchar(255), CONTRACT_DATE date, REGISTRATION_DATE date, SYSTEM_DATE date, ACCESS_DATE timestamp, SUSPENTION_DATE timestamp, REOPENING_DATE timestamp, CLOSE_DATE timestamp, EXCLUSION_DATE timestamp, ADDRESS varchar(255), EMAIL varchar(255), ID bigint PRIMARY KEY, CREATED_AT timestamp, UPDATED_AT timestamp); @@ -2452,69 +2883,6 @@ COMMENT ON COLUMN OUT_DOCUMENT_JOURNAL.RESULT_STATUS IS 'Статус выгру COMMENT ON COLUMN OUT_DOCUMENT_JOURNAL.ID IS 'Идентификатор записи'; --- executionDeposit - Сделки -DROP TABLE IF EXISTS EXECUTION_DEPOSIT; -CREATE TABLE EXECUTION_DEPOSIT(EXCHANGE_EXECUTION_ID bigint, EXCHANGE_EXECUTION_TIME timestamp, TRADING_DATE date, ACCOUNT_ID bigint, MARKET varchar(4), PRICE numeric(72,18), LOTS numeric(72,2), QUANTITY numeric(72,2), FIRST_LEG_AMOUNT numeric(72,2), SECOND_LEG_AMOUNT numeric(72,2), INTEREST_AMOUNT numeric(72,2), SIDE varchar(4), SETTLEMENT_CURRENCY varchar(4), COMPANY_ID bigint, DURATION bigint, FIRST_LEG_SETTLEMENT_DATE date, SECOND_LEG_SETTLEMENT_DATE date, FIRST_LEG_SETTLEMENT_CODE date, SECOND_LEG_SETTLEMENT_CODE date, SECURITY_FULL_NAME varchar(255), SECURITY_SYMBOL varchar(255), SECURITY_ID bigint, COUNTER_PARTY_ID bigint, COVERAGE_STATUS varchar(4), SESSION_ID bigint, ID bigint PRIMARY KEY, CREATED_AT time, UPDATED_AT time, CLEARING_DATE date); -COMMENT ON TABLE EXECUTION_DEPOSIT IS 'Сделки'; - -COMMENT ON COLUMN EXECUTION_DEPOSIT.EXCHANGE_EXECUTION_ID IS 'Идентификационный номер сделки в Торговой системе'; - -COMMENT ON COLUMN EXECUTION_DEPOSIT.EXCHANGE_EXECUTION_TIME IS 'Время заключения сделки в Торговой системе'; - -COMMENT ON COLUMN EXECUTION_DEPOSIT.TRADING_DATE IS 'Дата заключения сделки'; - -COMMENT ON COLUMN EXECUTION_DEPOSIT.ACCOUNT_ID IS 'Торговый счет (linked to account)'; - -COMMENT ON COLUMN EXECUTION_DEPOSIT.MARKET IS 'Секция финансового инструмента (linked to market)'; - -COMMENT ON COLUMN EXECUTION_DEPOSIT.PRICE IS 'Ставка по депозиту'; - -COMMENT ON COLUMN EXECUTION_DEPOSIT.LOTS IS 'Количество лотов'; - -COMMENT ON COLUMN EXECUTION_DEPOSIT.QUANTITY IS 'Количество штук'; - -COMMENT ON COLUMN EXECUTION_DEPOSIT.FIRST_LEG_AMOUNT IS 'Объем сделки'; - -COMMENT ON COLUMN EXECUTION_DEPOSIT.SECOND_LEG_AMOUNT IS 'Объем возврата'; - -COMMENT ON COLUMN EXECUTION_DEPOSIT.INTEREST_AMOUNT IS 'Объем процентов'; - -COMMENT ON COLUMN EXECUTION_DEPOSIT.SIDE IS 'Направление сделки (linked to moneyFlowSide)'; - -COMMENT ON COLUMN EXECUTION_DEPOSIT.SETTLEMENT_CURRENCY IS 'Валюта расчетов по инструменту (linked to currencyCode)'; - -COMMENT ON COLUMN EXECUTION_DEPOSIT.COMPANY_ID IS 'Название компании (linked to company)'; - -COMMENT ON COLUMN EXECUTION_DEPOSIT.DURATION IS 'Срок, дней'; - -COMMENT ON COLUMN EXECUTION_DEPOSIT.FIRST_LEG_SETTLEMENT_DATE IS 'Дата размещения'; - -COMMENT ON COLUMN EXECUTION_DEPOSIT.SECOND_LEG_SETTLEMENT_DATE IS 'Дата возврата'; - -COMMENT ON COLUMN EXECUTION_DEPOSIT.FIRST_LEG_SETTLEMENT_CODE IS 'Код расчетов при размещении'; - -COMMENT ON COLUMN EXECUTION_DEPOSIT.SECOND_LEG_SETTLEMENT_CODE IS 'Код расчетов при возврате'; - -COMMENT ON COLUMN EXECUTION_DEPOSIT.SECURITY_FULL_NAME IS 'Наименование инструмента'; - -COMMENT ON COLUMN EXECUTION_DEPOSIT.SECURITY_SYMBOL IS 'Код инструмента в Торговой Системе'; - -COMMENT ON COLUMN EXECUTION_DEPOSIT.SECURITY_ID IS 'Финансовый инструмент (linked to moneyMarketSecurity)'; - -COMMENT ON COLUMN EXECUTION_DEPOSIT.COUNTER_PARTY_ID IS 'Имя компании-партнера, с которым заключена сделка (linked to company)'; - -COMMENT ON COLUMN EXECUTION_DEPOSIT.COVERAGE_STATUS IS 'Cтатус достаточности обеспечения (linked to allowed)'; - -COMMENT ON COLUMN EXECUTION_DEPOSIT.SESSION_ID IS 'Наименование сессии (linked to moneyMarketSession)'; - -COMMENT ON COLUMN EXECUTION_DEPOSIT.ID IS 'Идентификатор записи'; - -COMMENT ON COLUMN EXECUTION_DEPOSIT.CREATED_AT IS 'Время регистрации сделки'; - -COMMENT ON COLUMN EXECUTION_DEPOSIT.UPDATED_AT IS 'Время изменения сделки'; - -COMMENT ON COLUMN EXECUTION_DEPOSIT.CLEARING_DATE IS 'Дата клиринга'; - -- dealRegister - Реестр сделок DROP TABLE IF EXISTS DEAL_REGISTER; CREATE TABLE DEAL_REGISTER(EXECUTION_ID bigint, EXCHANGE_EXECUTION_ID bigint, EXCHANGE_EXECUTION_TIME timestamp, TRADING_DATE date, ACCOUNT varchar(50), MARKET varchar(4), PRICE numeric(72,18), AMOUNT numeric(72,2), SIDE varchar(4), SETTLEMENT_CURRENCY varchar(4), COMPANY_ID bigint, FIRST_LEG_SETTLEMENT_DATE date, SECOND_LEG_SETTLEMENT_DATE date, SECURITY_FULL_NAME varchar(255), SECURITY_SYMBOL varchar(255), SECURITY_ID bigint, COUNTER_PARTY_ID bigint, COVERAGE_STATUS varchar(4), SESSION_ID bigint, ID bigint PRIMARY KEY, CREATED_AT time, UPDATED_AT time, CLEARING_DATE date); @@ -3892,51 +4260,6 @@ COMMENT ON COLUMN S_DF18.GENERATION_ID IS 'Идентификатор взаим COMMENT ON COLUMN S_DF18.IN_S_DF12_ID IS 'Идентификатор соответствующей записи из таблицы-источника'; --- s_trade - Сделки из Торговой системы -DROP TABLE IF EXISTS S_TRADE; -CREATE TABLE S_TRADE(ID bigint PRIMARY KEY, TRADE_NUM bigint, SEC_CODE varchar(255), TRADE_DATE_TIME timestamp, SETTLE_DATE date, PRICE numeric(72,18), VALUE numeric(72,2), QTY numeric(72,2), ACCRUEDINT numeric(72,18), FIRM_ID varchar(255), CLIENT_CODE varchar(255), EXCHANGE_COMMISSION numeric(72,2), CLASS_CODE varchar(255), OPERATION varchar(255), ISSUE_ACCOUNT varchar(50), MONEY_ACCOUNT varchar(50), TRADE_TYPE varchar(50), DAYS_TO_MAT_DATE bigint, COLLATERAL varchar(50), SETTLE_CODE varchar(50)); -COMMENT ON TABLE S_TRADE IS 'Сделки из Торговой системы'; - -COMMENT ON COLUMN S_TRADE.ID IS 'Идентификатор записи'; - -COMMENT ON COLUMN S_TRADE.TRADE_NUM IS 'Номер сделки'; - -COMMENT ON COLUMN S_TRADE.SEC_CODE IS 'Код ценной бумаги'; - -COMMENT ON COLUMN S_TRADE.TRADE_DATE_TIME IS 'Дата-время сделки'; - -COMMENT ON COLUMN S_TRADE.SETTLE_DATE IS 'Плановая дата исполнения сделки'; - -COMMENT ON COLUMN S_TRADE.PRICE IS 'Цена сделки'; - -COMMENT ON COLUMN S_TRADE.VALUE IS 'Сумма сделки'; - -COMMENT ON COLUMN S_TRADE.QTY IS 'Количество лотов по сделке'; - -COMMENT ON COLUMN S_TRADE.ACCRUEDINT IS 'НКД за 1 ценную бумагу'; - -COMMENT ON COLUMN S_TRADE.FIRM_ID IS 'ID клиента в КС'; - -COMMENT ON COLUMN S_TRADE.CLIENT_CODE IS 'Код участника торгов = Код участника клиринга = Код участника расчетов'; - -COMMENT ON COLUMN S_TRADE.EXCHANGE_COMMISSION IS 'Комиссия по сделке'; - -COMMENT ON COLUMN S_TRADE.CLASS_CODE IS 'Код класса сделки из новой ТС'; - -COMMENT ON COLUMN S_TRADE.OPERATION IS 'Тип плеча (Купля/Продажа)'; - -COMMENT ON COLUMN S_TRADE.ISSUE_ACCOUNT IS 'Счет для учета ценной бумаги'; - -COMMENT ON COLUMN S_TRADE.MONEY_ACCOUNT IS 'Счет для учета денежных средств'; - -COMMENT ON COLUMN S_TRADE.TRADE_TYPE IS 'Первичное размещение/торги'; - -COMMENT ON COLUMN S_TRADE.DAYS_TO_MAT_DATE IS 'Количество дней до погашения'; - -COMMENT ON COLUMN S_TRADE.COLLATERAL IS 'Признак залога (не используется)'; - -COMMENT ON COLUMN S_TRADE.SETTLE_CODE IS 'Код периода сделки из новой ТС'; - -- notification - Сообщения DROP TABLE IF EXISTS NOTIFICATION; CREATE TABLE NOTIFICATION(ID bigint PRIMARY KEY, CREATED_AT timestamp, UPDATED_AT timestamp, CLEARING_DATE date, SENDER_ID bigint, ADDRESSEE_ID bigint, OBJECT_TYPE varchar(4), OBJECT_ID timestamp, NOTIFICATION_STATUS varchar(4)); @@ -4017,41 +4340,6 @@ COMMENT ON COLUMN VERIFICATION_RESULT.CREATED_AT IS 'Дата и время со COMMENT ON COLUMN VERIFICATION_RESULT.UPDATED_AT IS 'Дата и время изменения записи'; --- session - Клиринговая сессия -DROP TABLE IF EXISTS SESSION; -CREATE TABLE SESSION(ID bigint PRIMARY KEY, CREATED_AT timestamp, UPDATED_AT timestamp, CLEARING_DATE date, SESSION_STATUS varchar(4)); -COMMENT ON TABLE SESSION IS 'Клиринговая сессия'; - -COMMENT ON COLUMN SESSION.ID IS 'Идентификатор записи'; - -COMMENT ON COLUMN SESSION.CREATED_AT IS 'Дата и время создания записи'; - -COMMENT ON COLUMN SESSION.UPDATED_AT IS 'Дата и время изменения записи'; - -COMMENT ON COLUMN SESSION.CLEARING_DATE IS 'Дата'; - -COMMENT ON COLUMN SESSION.SESSION_STATUS IS 'Статус клиринговой сессии (linked to sessionStatus)'; - - --- History log of session - Клиринговая сессия -DROP TABLE IF EXISTS SESSION_HISTORY; -CREATE TABLE SESSION_HISTORY(SESSION_ID BIGINT NOT NULL, EVENT_TIME timestamp, EVENT_USER_ID BIGINT, EVENT_TYPE VARCHAR(4), ID bigint PRIMARY KEY, CREATED_AT timestamp, UPDATED_AT timestamp, CLEARING_DATE date, SESSION_STATUS varchar(4)); -COMMENT ON TABLE SESSION_HISTORY IS 'История изменений таблицы session'; -COMMENT ON COLUMN SESSION_HISTORY.SESSION_ID IS 'Идентификатор записи в таблице SESSION'; -COMMENT ON COLUMN SESSION_HISTORY.EVENT_TIME IS 'Дата и время изменения'; -COMMENT ON COLUMN SESSION_HISTORY.EVENT_USER_ID IS 'Инициатор изменения'; -COMMENT ON COLUMN SESSION_HISTORY.EVENT_TYPE IS 'Тип изменения'; - -COMMENT ON COLUMN SESSION_HISTORY.ID IS 'Идентификатор записи'; - -COMMENT ON COLUMN SESSION_HISTORY.CREATED_AT IS 'Дата и время создания записи'; - -COMMENT ON COLUMN SESSION_HISTORY.UPDATED_AT IS 'Дата и время изменения записи'; - -COMMENT ON COLUMN SESSION_HISTORY.CLEARING_DATE IS 'Дата'; - -COMMENT ON COLUMN SESSION_HISTORY.SESSION_STATUS IS 'Статус клиринговой сессии (linked to sessionStatus)'; - -- moneyMarketSession - Сессия денежного рынка DROP TABLE IF EXISTS MONEY_MARKET_SESSION; CREATE TABLE MONEY_MARKET_SESSION(ID bigint PRIMARY KEY, COMPANY_ID bigint, SECURITY_ID bigint, USER_ID bigint); diff --git a/clearing-parent/dictionary/src/main/java/ru/clearing/platform/dictionary/SessionStatusDictionary.java b/clearing-parent/dictionary/src/main/java/ru/clearing/platform/dictionary/SessionStatusDictionary.java new file mode 100644 index 000000000..c09164d32 --- /dev/null +++ b/clearing-parent/dictionary/src/main/java/ru/clearing/platform/dictionary/SessionStatusDictionary.java @@ -0,0 +1,11 @@ +package ru.clearing.platform.dictionary; + +/** + * Справочник статусов клиринговых сессий + * + * Dictionary DB table: SESSION_STATUS_DICTIONARY + **/ +public class SessionStatusDictionary extends AbstractDictionary { + private static final long serialVersionUID = ConstDictionarySerializable.serialVersionUID; + +} \ No newline at end of file diff --git a/clearing-parent/dictionary/src/main/java/ru/clearing/platform/dictionary/SessionTypeDictionary.java b/clearing-parent/dictionary/src/main/java/ru/clearing/platform/dictionary/SessionTypeDictionary.java new file mode 100644 index 000000000..93624f60d --- /dev/null +++ b/clearing-parent/dictionary/src/main/java/ru/clearing/platform/dictionary/SessionTypeDictionary.java @@ -0,0 +1,11 @@ +package ru.clearing.platform.dictionary; + +/** + * Справочник типов клиринговых сессий + * + * Dictionary DB table: SESSION_TYPE_DICTIONARY + **/ +public class SessionTypeDictionary extends AbstractDictionary { + private static final long serialVersionUID = ConstDictionarySerializable.serialVersionUID; + +} \ No newline at end of file diff --git a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/businessevent/ExecutionDepositHistoryMapStore.java b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/businessevent/ExecutionDepositHistoryMapStore.java new file mode 100644 index 000000000..50a30d3eb --- /dev/null +++ b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/businessevent/ExecutionDepositHistoryMapStore.java @@ -0,0 +1,82 @@ +package ru.spcex.clearing.imdg.businessevent; + +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Component; +import ru.clearing.classes.statics.data.execution.ExecutionDeposit; +import ru.clearing.classes.statics.data.execution.ExecutionDepositHistory; +import ru.spcex.clearing.imdg.IMDGDistributedNames; +import ru.spcex.clearing.imdg.base.TemplateEventMapStore; +import ru.spcex.platform.utils.time.TimeUtil; + +@Component +public class ExecutionDepositHistoryMapStore extends TemplateEventMapStore { + + public ExecutionDepositHistoryMapStore(JdbcTemplate jdbcTemplate) { + super(jdbcTemplate); + } + + @Override + public String getMapName() { + return IMDGDistributedNames.Map_ExecutionDepositHistory; + } + + @Override + public String getTableName() { + return "EXECUTION_DEPOSIT_HISTORY"; + } + + @Override + public String[] getFields() { + return new String[]{"ID", "EVENT_TIME", "EVENT_USER_ID", "EVENT_TYPE", + "EXECUTION_DEPOSIT_ID", "CREATED_AT", "UPDATED_AT", "EXCHANGE_EXECUTION_ID", "EXCHANGE_EXECUTION_TIME", + "TRADING_DATE", "TRADING_CLEARING_REGISTRY_ID", "MARKET", "PRICE", "LOTS", "QUANTITY", "FIRST_LEG_AMOUNT", + "SECOND_LEG_AMOUNT", "INTEREST_AMOUNT", "SIDE", "SETTLEMENT_CURRENCY", "COMPANY_ID", "DURATION", + "FIRST_LEG_SETTLEMENT_DATE", "SECOND_LEG_SETTLEMENT_DATE", "FIRST_LEG_SETTLEMENT_CODE", + "SECOND_LEG_SETTLEMENT_CODE", "SECURITY_FULL_NAME", "SECURITY_SYMBOL", "SECURITY_ID", "CONTRACT", + "COUNTER_PARTY_ID", "COVERAGE_STATUS", "SESSION_ID", "CLEARING_DATE" + }; + } + + @Override + public Object[] objectToField(ExecutionDepositHistory historyLog) { + ExecutionDeposit object = historyLog.getObject(); + Object[] args = new Object[]{ + historyLog.getId(), + TimeUtil.toDateFromInstant(historyLog.getEventTime()), + historyLog.getUserId(), + historyLog.getEventType(), + + object.getId(), + TimeUtil.toDateFromInstant(object.getCreated()), + TimeUtil.toDateFromInstant(object.getUpdated()), + object.getExchangeExecutionId(), + TimeUtil.toDateFromInstant(object.getExchangeExecutionTime()), + TimeUtil.toDateFromLocalDate(object.getTradingDate()), + object.getTradingClearingRegistryId(), + object.getMarket(), + object.getPrice(), + object.getLots(), + object.getQuantity(), + object.getFirstLegAmount(), + object.getSecondLegAmount(), + object.getInterestAmount(), + object.getSide(), + object.getSettlementCurrency(), + object.getCompanyId(), + object.getDuration(), + TimeUtil.toDateFromLocalDate(object.getFirstLegSettlementDate()), + TimeUtil.toDateFromLocalDate(object.getSecondLegSettlementDate()), + object.getFirstLegSettlementCode(), + object.getSecondLegSettlementCode(), + object.getSecurityFullName(), + object.getSecuritySymbol(), + object.getSecurityId(), + object.getContract(), + object.getCounterPartyId(), + object.getCoverageStatus(), + object.getSessionId(), + TimeUtil.toDateFromLocalDate(object.getClearingDate()) + }; + return args; + } +} \ No newline at end of file diff --git a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/businessevent/ExecutionFondHistoryMapStore.java b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/businessevent/ExecutionFondHistoryMapStore.java new file mode 100644 index 000000000..f51370e0f --- /dev/null +++ b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/businessevent/ExecutionFondHistoryMapStore.java @@ -0,0 +1,78 @@ +package ru.spcex.clearing.imdg.businessevent; + +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Component; +import ru.clearing.classes.statics.data.execution.ExecutionFond; +import ru.clearing.classes.statics.data.execution.ExecutionFondHistory; +import ru.spcex.clearing.imdg.IMDGDistributedNames; +import ru.spcex.clearing.imdg.base.TemplateEventMapStore; +import ru.spcex.platform.utils.time.TimeUtil; + +@Component +public class ExecutionFondHistoryMapStore extends TemplateEventMapStore { + + public ExecutionFondHistoryMapStore(JdbcTemplate jdbcTemplate) { + super(jdbcTemplate); + } + + @Override + public String getMapName() { + return IMDGDistributedNames.Map_ExecutionFondHistory; + } + + @Override + public String getTableName() { + return "EXECUTION_FOND_HISTORY"; + } + + @Override + public String[] getFields() { + return new String[]{"ID", "EVENT_TIME", "EVENT_USER_ID", "EVENT_TYPE", + "EXECUTION_FOND_ID", "CREATED_AT", "UPDATED_AT", "CLEARING_DATE", "EXCHANGE_EXECUTION_ID", "SIDE", "MARKET", "TRADING_DATE", "SECURITY_SYMBOL", "SECURITY_ID", "INTEREST_AMOUNT", "EXCHANGE_ORDER_ID", "PRICE", "SETTLEMENT_AMOUNT", "LOTS", "QUANTITY", "EXCHANGE_EXECUTION_TIME", "DURATION", "TRADING_CLEARING_REGISTRY_ID", "COMMENT", "CLIENT_CODE_ID", "SETTLEMENT_CODE", "COMPANY_ID", "COUNTER_PARTY_ID", "SECURITY_FULL_NAME", "SETTLEMENT_DATE", "SETTLEMENT_CURRENCY", "EXCHANGE_EXECUTION_MICROSECONDS", "COVERAGE_STATUS", "SESSION_ID" + }; + } + + @Override + public Object[] objectToField(ExecutionFondHistory historyLog) { + ExecutionFond object = historyLog.getObject(); + Object[] args = new Object[]{ + historyLog.getId(), + TimeUtil.toDateFromInstant(historyLog.getEventTime()), + historyLog.getUserId(), + historyLog.getEventType(), + + object.getId(), + TimeUtil.toDateFromInstant(object.getCreated()), + TimeUtil.toDateFromInstant(object.getUpdated()), + TimeUtil.toDateFromLocalDate(object.getClearingDate()), + object.getExchangeExecutionId(), + object.getSide(), + object.getMarket(), + TimeUtil.toDateFromLocalDate(object.getTradingDate()), + object.getSecuritySymbol(), + object.getSecurityId(), + object.getInterestAmount(), + object.getExchangeOrderId(), + object.getPrice(), + object.getSettlementAmount(), + object.getLots(), + object.getQuantity(), + TimeUtil.toDateFromInstant(object.getExchangeExecutionTime()), + object.getDuration(), + object.getTradingClearingRegistryId(), + object.getComment(), + object.getClientCodeId(), + object.getSettlementCode(), + object.getCompanyId(), + object.getCounterPartyId(), + object.getSecurityFullName(), + TimeUtil.toDateFromLocalDate(object.getSettlementDate()), + object.getSettlementCurrency(), + TimeUtil.toDateFromInstant(object.getExchangeExecutionMicroseconds()), + object.getCoverageStatus(), + object.getSessionId() + }; + return args; + } + +} \ No newline at end of file diff --git a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/businessevent/SessionHistoryMapStore.java b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/businessevent/SessionHistoryMapStore.java new file mode 100644 index 000000000..03deb8de5 --- /dev/null +++ b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/businessevent/SessionHistoryMapStore.java @@ -0,0 +1,58 @@ +package ru.spcex.clearing.imdg.businessevent; + +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Component; +import ru.clearing.classes.statics.data.misc.Session; +import ru.clearing.classes.statics.data.misc.SessionHistory; +import ru.spcex.clearing.imdg.IMDGDistributedNames; +import ru.spcex.clearing.imdg.base.TemplateEventMapStore; +import ru.spcex.platform.utils.time.TimeUtil; + +@Component +public class SessionHistoryMapStore extends TemplateEventMapStore { + + public SessionHistoryMapStore(JdbcTemplate jdbcTemplate) { + super(jdbcTemplate); + } + + @Override + public String getMapName() { + return IMDGDistributedNames.Map_SessionHistory; + } + + @Override + public String getTableName() { + return "SESSION_HISTORY"; + } + + @Override + public String[] getFields() { + return new String[]{"ID", "EVENT_TIME", "EVENT_USER_ID", "EVENT_TYPE", + "SESSION_ID", "CREATED_AT", "UPDATED_AT", "CLEARING_DATE", "SESSION_STATUS", "COMPANY_ID", "SECURITY_ID", "USER_ID", "SECTION", "SESSION_TYPE" + }; + } + + @Override + public Object[] objectToField(SessionHistory historyLog) { + Session object = historyLog.getObject(); + Object[] args = new Object[]{ + historyLog.getId(), + TimeUtil.toDateFromInstant(historyLog.getEventTime()), + historyLog.getUserId(), + historyLog.getEventType(), + + object.getId(), + TimeUtil.toDateFromInstant(object.getCreated()), + TimeUtil.toDateFromInstant(object.getUpdated()), + TimeUtil.toDateFromLocalDate(object.getClearingDate()), + object.getSessionStatus(), + object.getCompanyId(), + object.getSecurityId(), + object.getUserId(), + object.getSection(), + object.getSessionType() + }; + return args; + } + +} \ No newline at end of file diff --git a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/businessobject/ExecutionFondMapStore.java b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/businessobject/ExecutionFondMapStore.java new file mode 100644 index 000000000..0eb253637 --- /dev/null +++ b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/businessobject/ExecutionFondMapStore.java @@ -0,0 +1,114 @@ +package ru.spcex.clearing.imdg.businessobject; + +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Component; +import ru.clearing.classes.statics.data.execution.ExecutionFond; +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; + +@Component +public class ExecutionFondMapStore extends TemplateMapStore { + + public ExecutionFondMapStore(JdbcTemplate jdbcTemplate) { + super(jdbcTemplate); + } + + @Override + public String getMapName() { + return IMDGDistributedNames.Map_ExecutionFond; + } + + @Override + public String getTableName() { + return "EXECUTION_FOND"; + } + + @Override + public String[] getFields() { + return new String[]{ + "ID", "CREATED_AT", "UPDATED_AT", "CLEARING_DATE", "EXCHANGE_EXECUTION_ID", "SIDE", "MARKET", + "TRADING_DATE", "SECURITY_SYMBOL", "SECURITY_ID", "INTEREST_AMOUNT", "EXCHANGE_ORDER_ID", "PRICE", + "SETTLEMENT_AMOUNT", "LOTS", "QUANTITY", "EXCHANGE_EXECUTION_TIME", "DURATION", "TRADING_CLEARING_REGISTRY_ID", + "COMMENT", "CLIENT_CODE_ID", "SETTLEMENT_CODE", "COMPANY_ID", "COUNTER_PARTY_ID", "SECURITY_FULL_NAME", + "SETTLEMENT_DATE", "SETTLEMENT_CURRENCY", "EXCHANGE_EXECUTION_MICROSECONDS", "COVERAGE_STATUS", "SESSION_ID" + }; + } + + @Override + public ExecutionFond objectReader(ResultSet resultSet) throws SQLException { + ExecutionFond object = new ExecutionFond(); + object.setId(resultSet.getObject("ID", Long.class)); + object.setCreated(getInstantFromTimestamp(resultSet, "CREATED_AT")); + object.setUpdated(getInstantFromTimestamp(resultSet, "UPDATED_AT")); + object.setClearingDate(getLocalDateFromSqlDate(resultSet, "CLEARING_DATE")); + object.setExchangeExecutionId(resultSet.getObject("EXCHANGE_EXECUTION_ID", Long.class)); + object.setSide(resultSet.getObject("SIDE", String.class)); + object.setMarket(resultSet.getObject("MARKET", String.class)); + object.setTradingDate(getLocalDateFromSqlDate(resultSet, "TRADING_DATE")); + object.setSecuritySymbol(resultSet.getObject("SECURITY_SYMBOL", String.class)); + object.setSecurityId(resultSet.getObject("SECURITY_ID", Long.class)); + object.setInterestAmount(resultSet.getObject("INTEREST_AMOUNT", BigDecimal.class)); + object.setExchangeOrderId(resultSet.getObject("EXCHANGE_ORDER_ID", Long.class)); + object.setPrice(resultSet.getObject("PRICE", BigDecimal.class)); + object.setSettlementAmount(resultSet.getObject("SETTLEMENT_AMOUNT", BigDecimal.class)); + object.setLots(resultSet.getObject("LOTS", BigDecimal.class)); + object.setQuantity(resultSet.getObject("QUANTITY", BigDecimal.class)); + object.setExchangeExecutionTime(getInstantFromTimestamp(resultSet, "EXCHANGE_EXECUTION_TIME")); + object.setDuration(resultSet.getObject("DURATION", Long.class)); + object.setTradingClearingRegistryId(resultSet.getObject("TRADING_CLEARING_REGISTRY_ID", Long.class)); + object.setComment(resultSet.getObject("COMMENT", String.class)); + object.setClientCodeId(resultSet.getObject("CLIENT_CODE_ID", Long.class)); + object.setSettlementCode(resultSet.getObject("SETTLEMENT_CODE", String.class)); + object.setCompanyId(resultSet.getObject("COMPANY_ID", Long.class)); + object.setCounterPartyId(resultSet.getObject("COUNTER_PARTY_ID", Long.class)); + object.setSecurityFullName(resultSet.getObject("SECURITY_FULL_NAME", String.class)); + object.setSettlementDate(getLocalDateFromSqlDate(resultSet, "SETTLEMENT_DATE")); + object.setSettlementCurrency(resultSet.getObject("SETTLEMENT_CURRENCY", String.class)); + object.setExchangeExecutionMicroseconds(getInstantFromTimestamp(resultSet, "EXCHANGE_EXECUTION_MICROSECONDS")); + object.setCoverageStatus(resultSet.getObject("COVERAGE_STATUS", String.class)); + object.setSessionId(resultSet.getObject("SESSION_ID", Long.class)); + return object; + } + + @Override + public Object[] objectToField(ExecutionFond object) { + Object[] args = new Object[]{ + object.getId(), + TimeUtil.toDateFromInstant(object.getCreated()), + TimeUtil.toDateFromInstant(object.getUpdated()), + TimeUtil.toDateFromLocalDate(object.getClearingDate()), + object.getExchangeExecutionId(), + object.getSide(), + object.getMarket(), + TimeUtil.toDateFromLocalDate(object.getTradingDate()), + object.getSecuritySymbol(), + object.getSecurityId(), + object.getInterestAmount(), + object.getExchangeOrderId(), + object.getPrice(), + object.getSettlementAmount(), + object.getLots(), + object.getQuantity(), + TimeUtil.toDateFromInstant(object.getExchangeExecutionTime()), + object.getDuration(), + object.getTradingClearingRegistryId(), + object.getComment(), + object.getClientCodeId(), + object.getSettlementCode(), + object.getCompanyId(), + object.getCounterPartyId(), + object.getSecurityFullName(), + TimeUtil.toDateFromLocalDate(object.getSettlementDate()), + object.getSettlementCurrency(), + TimeUtil.toDateFromInstant(object.getExchangeExecutionMicroseconds()), + object.getCoverageStatus(), + object.getSessionId() + }; + return args; + } +} \ No newline at end of file diff --git a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/dictionary/SessionStatusDictionaryMapStore.java b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/dictionary/SessionStatusDictionaryMapStore.java new file mode 100644 index 000000000..df9ec7588 --- /dev/null +++ b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/dictionary/SessionStatusDictionaryMapStore.java @@ -0,0 +1,31 @@ +package ru.spcex.clearing.imdg.dictionary; + +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Component; +import ru.clearing.platform.dictionary.SessionStatusDictionary; +import ru.spcex.clearing.imdg.IMDGDistributedNames; +import ru.spcex.clearing.imdg.base.DictionaryTMapStore; + +@Component +public class SessionStatusDictionaryMapStore extends DictionaryTMapStore { + + public SessionStatusDictionaryMapStore(JdbcTemplate jdbcTemplate) { + super(jdbcTemplate); + } + + @Override + public String getMapName() { + return IMDGDistributedNames.Map_SessionStatusDictionary; + } + + @Override + public String getTableName() { + return "SESSION_STATUS_DICTIONARY"; + } + + @Override + public SessionStatusDictionary getDictionaryObject() { + return new SessionStatusDictionary(); + } + +} \ No newline at end of file diff --git a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/dictionary/SessionTypeDictionaryMapStore.java b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/dictionary/SessionTypeDictionaryMapStore.java new file mode 100644 index 000000000..d4c88c97c --- /dev/null +++ b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/dictionary/SessionTypeDictionaryMapStore.java @@ -0,0 +1,31 @@ +package ru.spcex.clearing.imdg.dictionary; + +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Component; +import ru.clearing.platform.dictionary.SessionTypeDictionary; +import ru.spcex.clearing.imdg.IMDGDistributedNames; +import ru.spcex.clearing.imdg.base.DictionaryTMapStore; + +@Component +public class SessionTypeDictionaryMapStore extends DictionaryTMapStore { + + public SessionTypeDictionaryMapStore(JdbcTemplate jdbcTemplate) { + super(jdbcTemplate); + } + + @Override + public String getMapName() { + return IMDGDistributedNames.Map_SessionTypeDictionary; + } + + @Override + public String getTableName() { + return "SESSION_TYPE_DICTIONARY"; + } + + @Override + public SessionTypeDictionary getDictionaryObject() { + return new SessionTypeDictionary(); + } + +} \ No newline at end of file diff --git a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/object/ExecutionDepositMapStore.java b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/object/ExecutionDepositMapStore.java index ffd05dfb0..b6909d23b 100644 --- a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/object/ExecutionDepositMapStore.java +++ b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/object/ExecutionDepositMapStore.java @@ -33,33 +33,13 @@ public class ExecutionDepositMapStore extends TemplateMapStore @Override public String[] getFields() { - return new String[]{"ID", "CREATED_AT", "UPDATED_AT", - "EXCHANGE_EXECUTION_ID", - "EXCHANGE_EXECUTION_TIME", - "TRADING_DATE", - "ACCOUNT_ID", - "MARKET", - "PRICE", - "LOTS", - "QUANTITY", - "FIRST_LEG_AMOUNT", - "SECOND_LEG_AMOUNT", - "INTEREST_AMOUNT", - "SIDE", - "SETTLEMENT_CURRENCY", - "COMPANY_ID", - "DURATION", - "FIRST_LEG_SETTLEMENT_DATE", - "SECOND_LEG_SETTLEMENT_DATE", - "FIRST_LEG_SETTLEMENT_CODE", - "SECOND_LEG_SETTLEMENT_CODE", - "SECURITY_FULL_NAME", - "SECURITY_SYMBOL", - "SECURITY_ID", - "COUNTER_PARTY_ID", - "COVERAGE_STATUS", - "SESSION_ID", - "CLEARING_DATE", + return new String[]{ + "ID", "CREATED_AT", "UPDATED_AT", + "EXCHANGE_EXECUTION_ID", "EXCHANGE_EXECUTION_TIME", "TRADING_DATE", "TRADING_CLEARING_REGISTRY_ID", + "MARKET", "PRICE", "LOTS", "QUANTITY", "FIRST_LEG_AMOUNT", "SECOND_LEG_AMOUNT", "INTEREST_AMOUNT", + "SIDE", "SETTLEMENT_CURRENCY", "COMPANY_ID", "DURATION", "FIRST_LEG_SETTLEMENT_DATE", "SECOND_LEG_SETTLEMENT_DATE", + "FIRST_LEG_SETTLEMENT_CODE", "SECOND_LEG_SETTLEMENT_CODE", "SECURITY_FULL_NAME", "SECURITY_SYMBOL", + "SECURITY_ID", "CONTRACT", "COUNTER_PARTY_ID", "COVERAGE_STATUS", "SESSION_ID", "CLEARING_DATE" }; } @@ -72,7 +52,7 @@ public class ExecutionDepositMapStore extends TemplateMapStore object.setExchangeExecutionId(resultSet.getObject("EXCHANGE_EXECUTION_ID", Long.class)); object.setExchangeExecutionTime(getInstantFromTimestamp(resultSet, "EXCHANGE_EXECUTION_TIME")); object.setTradingDate(getLocalDateFromSqlDate(resultSet, "TRADING_DATE")); - object.setAccountId(resultSet.getObject("ACCOUNT_ID", Long.class)); + object.setTradingClearingRegistryId(resultSet.getObject("TRADING_CLEARING_REGISTRY_ID", Long.class)); object.setMarket(resultSet.getObject("MARKET", String.class)); object.setPrice(resultSet.getObject("PRICE", BigDecimal.class)); object.setLots(resultSet.getObject("LOTS", BigDecimal.class)); @@ -86,11 +66,12 @@ public class ExecutionDepositMapStore extends TemplateMapStore object.setDuration(resultSet.getObject("DURATION", Long.class)); object.setFirstLegSettlementDate(getLocalDateFromSqlDate(resultSet, "FIRST_LEG_SETTLEMENT_DATE")); object.setSecondLegSettlementDate(getLocalDateFromSqlDate(resultSet, "SECOND_LEG_SETTLEMENT_DATE")); - object.setFirstLegSettlementCode(getLocalDateFromSqlDate(resultSet, "FIRST_LEG_SETTLEMENT_CODE")); - object.setSecondLegSettlementCode(getLocalDateFromSqlDate(resultSet, "SECOND_LEG_SETTLEMENT_CODE")); + object.setFirstLegSettlementCode(resultSet.getObject("FIRST_LEG_SETTLEMENT_CODE", String.class)); + object.setSecondLegSettlementCode(resultSet.getObject("SECOND_LEG_SETTLEMENT_CODE", String.class)); object.setSecurityFullName(resultSet.getObject("SECURITY_FULL_NAME", String.class)); object.setSecuritySymbol(resultSet.getObject("SECURITY_SYMBOL", String.class)); object.setSecurityId(resultSet.getObject("SECURITY_ID", Long.class)); + object.setContract(resultSet.getObject("CONTRACT", String.class)); object.setCounterPartyId(resultSet.getObject("COUNTER_PARTY_ID", Long.class)); object.setCoverageStatus(resultSet.getObject("COVERAGE_STATUS", String.class)); object.setSessionId(resultSet.getObject("SESSION_ID", Long.class)); @@ -107,7 +88,7 @@ public class ExecutionDepositMapStore extends TemplateMapStore object.getExchangeExecutionId(), TimeUtil.toDateFromInstant(object.getExchangeExecutionTime()), TimeUtil.toDateFromLocalDate(object.getTradingDate()), - object.getAccountId(), + object.getTradingClearingRegistryId(), object.getMarket(), object.getPrice(), object.getLots(), @@ -121,15 +102,16 @@ public class ExecutionDepositMapStore extends TemplateMapStore object.getDuration(), TimeUtil.toDateFromLocalDate(object.getFirstLegSettlementDate()), TimeUtil.toDateFromLocalDate(object.getSecondLegSettlementDate()), - TimeUtil.toDateFromLocalDate(object.getFirstLegSettlementCode()), - TimeUtil.toDateFromLocalDate(object.getSecondLegSettlementCode()), + object.getFirstLegSettlementCode(), + object.getSecondLegSettlementCode(), object.getSecurityFullName(), object.getSecuritySymbol(), object.getSecurityId(), + object.getContract(), object.getCounterPartyId(), object.getCoverageStatus(), object.getSessionId(), - TimeUtil.toDateFromLocalDate(object.getClearingDate()), + TimeUtil.toDateFromLocalDate(object.getClearingDate()) }; return args; } diff --git a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/object/STradeMapStore.java b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/object/STradeMapStore.java deleted file mode 100644 index a906773e5..000000000 --- a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/object/STradeMapStore.java +++ /dev/null @@ -1,94 +0,0 @@ -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 { - - 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.setTradeNum(resultSet.getObject("TRADE_NUM", Long.class)); - object.setSecCode(resultSet.getObject("SEC_CODE", String.class)); - object.setTradeDateTime(getInstantFromTimestamp(resultSet, "TRADE_DATE_TIME")); - object.setSettleDate(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.setFirmId(resultSet.getObject("FIRM_ID", String.class)); - object.setClientCode(resultSet.getObject("CLIENT_CODE", String.class)); - object.setExchangeCommission(resultSet.getObject("EXCHANGE_COMMISSION", BigDecimal.class)); - object.setClassCode(resultSet.getObject("CLASS_CODE", String.class)); - object.setOperation(resultSet.getObject("OPERATION", String.class)); - object.setIssueAccount(resultSet.getObject("ISSUE_ACCOUNT", String.class)); - object.setMoneyAccount(resultSet.getObject("MONEY_ACCOUNT", String.class)); - object.setTradeType(resultSet.getObject("TRADE_TYPE", String.class)); - object.setDaysToMatDate(resultSet.getObject("DAYS_TO_MAT_DATE", Long.class)); - object.setCollateral(resultSet.getObject("COLLATERAL", String.class)); - object.setSettleCode(resultSet.getObject("SETTLE_CODE", String.class)); - return object; - } - - @Override - public Object[] objectToField(STrade object) { - Object[] args = new Object[]{ - object.getId(), - object.getTradeNum(), - object.getSecCode(), - TimeUtil.toDateFromInstant(object.getTradeDateTime()), - object.getSettleDate(), - object.getPrice(), - object.getValue(), - object.getQty(), - object.getAccruedint(), - object.getFirmId(), - object.getClientCode(), - object.getExchangeCommission(), - object.getClassCode(), - object.getOperation(), - object.getIssueAccount(), - object.getMoneyAccount(), - object.getTradeType(), - object.getDaysToMatDate(), - object.getCollateral(), - object.getSettleCode() - }; - return args; - } - -} diff --git a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/object/STradesMapStore.java b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/object/STradesMapStore.java new file mode 100644 index 000000000..22f0b37b1 --- /dev/null +++ b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/object/STradesMapStore.java @@ -0,0 +1,147 @@ +package ru.spcex.clearing.imdg.object; + +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Component; +import ru.clearing.classes.statics.data.misc.STrades; +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; + +@Component +public class STradesMapStore extends TemplateMapStore { + + public STradesMapStore(JdbcTemplate jdbcTemplate) { + super(jdbcTemplate); + } + + @Override + public String getMapName() { + return IMDGDistributedNames.Map_STrades; + } + + @Override + public String getTableName() { + return "S_TRADES"; + } + + @Override + public String[] getFields() { + return new String[]{ + "ID", "TRADE_NUM", "OPERATION", "CLASS_CODE", "TRADE_DATE", "SEC_CODE", "ACCRUEDINT", "ACCRUEDINT2", + "LOWER_DISCOUNT", "ORDER_NUM", "PRICE", "PRICE2", "REPO_RATE", "REPO_VALUE", "REPO2_VALUE", + "START_DISCOUNT", "TS_COMMISSION", "UPPER_DISCOUNT", "VALUE", "YIELD", "QTY", "QTY_PCS", + "TRADE_DATE_TIME", "REPO_TERM", "CLEARING_COMMISSION", "EXCHANGE_COMMISSION", "TECH_CENTER_COMMISSION", + "ACCOUNT", "BROKER_REF", "CLIENT_CODE", "SETTLE_CODE", "USER_ID", "EXCHANGE_CODE", + "FIRM_ID", "FIRM_NAME", "CP_FIRM_ID", "CP_FIRM_NAME", "CLASS_NAME", "SEC_NAME", + "SETTLE_DATE", "SETTLE_CURRENCY", "TRADE_CURRENCY", "TRADE_TIME_MS", "BANK_ACC_ID", "SECTION" + }; + } + + @Override + public STrades objectReader(ResultSet resultSet) throws SQLException { + STrades object = new STrades(); + object.setId(resultSet.getObject("ID", Long.class)); + object.setTradeNum(resultSet.getObject("TRADE_NUM", Long.class)); + object.setOperation(resultSet.getObject("OPERATION", String.class)); + object.setClassCode(resultSet.getObject("CLASS_CODE", String.class)); + object.setTradeDate(getLocalDateFromSqlDate(resultSet, "TRADE_DATE")); + object.setSecCode(resultSet.getObject("SEC_CODE", String.class)); + object.setAccruedint(resultSet.getObject("ACCRUEDINT", BigDecimal.class)); + object.setAccruedint2(resultSet.getObject("ACCRUEDINT2", BigDecimal.class)); + object.setLowerDiscount(resultSet.getObject("LOWER_DISCOUNT", BigDecimal.class)); + object.setOrderNum(resultSet.getObject("ORDER_NUM", Long.class)); + object.setPrice(resultSet.getObject("PRICE", BigDecimal.class)); + object.setPrice2(resultSet.getObject("PRICE2", BigDecimal.class)); + object.setRepoRate(resultSet.getObject("REPO_RATE", BigDecimal.class)); + object.setRepoValue(resultSet.getObject("REPO_VALUE", BigDecimal.class)); + object.setRepo2Value(resultSet.getObject("REPO2_VALUE", BigDecimal.class)); + object.setStartDiscount(resultSet.getObject("START_DISCOUNT", BigDecimal.class)); + object.setTsCommission(resultSet.getObject("TS_COMMISSION", BigDecimal.class)); + object.setUpperDiscount(resultSet.getObject("UPPER_DISCOUNT", BigDecimal.class)); + object.setValue(resultSet.getObject("VALUE", BigDecimal.class)); + object.setYield(resultSet.getObject("YIELD", BigDecimal.class)); + object.setQty(resultSet.getObject("QTY", BigDecimal.class)); + object.setQtyPcs(resultSet.getObject("QTY_PCS", BigDecimal.class)); + object.setTradeDateTime(getInstantFromTimestamp(resultSet, "TRADE_DATE_TIME")); + object.setRepoTerm(resultSet.getObject("REPO_TERM", Long.class)); + object.setClearingCommission(resultSet.getObject("CLEARING_COMMISSION", BigDecimal.class)); + object.setExchangeCommission(resultSet.getObject("EXCHANGE_COMMISSION", BigDecimal.class)); + object.setTechCenterCommission(resultSet.getObject("TECH_CENTER_COMMISSION", BigDecimal.class)); + object.setAccount(resultSet.getObject("ACCOUNT", String.class)); + object.setBrokerRef(resultSet.getObject("BROKER_REF", String.class)); + object.setClientCode(resultSet.getObject("CLIENT_CODE", String.class)); + object.setSettleCode(resultSet.getObject("SETTLE_CODE", String.class)); + object.setUserId(resultSet.getObject("USER_ID", String.class)); + object.setExchangeCode(resultSet.getObject("EXCHANGE_CODE", String.class)); + object.setFirmId(resultSet.getObject("FIRM_ID", String.class)); + object.setFirmName(resultSet.getObject("FIRM_NAME", String.class)); + object.setCpFirmId(resultSet.getObject("CP_FIRM_ID", String.class)); + object.setCpFirmName(resultSet.getObject("CP_FIRM_NAME", String.class)); + object.setClassName(resultSet.getObject("CLASS_NAME", String.class)); + object.setSecName(resultSet.getObject("SEC_NAME", String.class)); + object.setSettleDate(getLocalDateFromSqlDate(resultSet, "SETTLE_DATE")); + object.setSettleCurrency(resultSet.getObject("SETTLE_CURRENCY", String.class)); + object.setTradeCurrency(resultSet.getObject("TRADE_CURRENCY", String.class)); + object.setTradeTimeMs(resultSet.getObject("TRADE_TIME_MS", Long.class)); + object.setBankAccId(resultSet.getObject("BANK_ACC_ID", String.class)); + object.setSection(resultSet.getObject("SECTION", String.class)); + return object; + } + + @Override + public Object[] objectToField(STrades object) { + Object[] args = new Object[]{ + object.getId(), + object.getTradeNum(), + object.getOperation(), + object.getClassCode(), + TimeUtil.toDateFromLocalDate(object.getTradeDate()), + object.getSecCode(), + object.getAccruedint(), + object.getAccruedint2(), + object.getLowerDiscount(), + object.getOrderNum(), + object.getPrice(), + object.getPrice2(), + object.getRepoRate(), + object.getRepoValue(), + object.getRepo2Value(), + object.getStartDiscount(), + object.getTsCommission(), + object.getUpperDiscount(), + object.getValue(), + object.getYield(), + object.getQty(), + object.getQtyPcs(), + TimeUtil.toDateFromInstant(object.getTradeDateTime()), + object.getRepoTerm(), + object.getClearingCommission(), + object.getExchangeCommission(), + object.getTechCenterCommission(), + object.getAccount(), + object.getBrokerRef(), + object.getClientCode(), + object.getSettleCode(), + object.getUserId(), + object.getExchangeCode(), + object.getFirmId(), + object.getFirmName(), + object.getCpFirmId(), + object.getCpFirmName(), + object.getClassName(), + object.getSecName(), + TimeUtil.toDateFromLocalDate(object.getSettleDate()), + object.getSettleCurrency(), + object.getTradeCurrency(), + object.getTradeTimeMs(), + object.getBankAccId(), + object.getSection() + }; + 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 eb9baf0a7..ab0502017 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 @@ -29,17 +29,24 @@ public class SessionMapStore extends TemplateMapStore { @Override public String[] getFields() { - return new String[]{"id", "created_at", "updated_at", "clearing_date", "session_status"}; + return new String[]{ + "id", "created_at", "updated_at", "clearing_date", "session_status", "company_id", "security_id", "user_id", "section", "session_type" + }; } @Override protected Session objectReader(ResultSet resultSet) throws SQLException { Session session = new Session(); - session.setId(resultSet.getLong("id")); - session.setCreated(getInstantFromTimestamp(resultSet, "created_at")); - session.setUpdated(getInstantFromTimestamp(resultSet, "updated_at")); - session.setClearingDate(getLocalDateFromSqlDate(resultSet, "clearing_date")); - session.setSessionStatus(resultSet.getString("session_status")); + session.setId(resultSet.getObject("ID", Long.class)); + session.setCreated(getInstantFromTimestamp(resultSet, "CREATED_AT")); + session.setUpdated(getInstantFromTimestamp(resultSet, "UPDATED_AT")); + session.setClearingDate(getLocalDateFromSqlDate(resultSet, "CLEARING_DATE")); + session.setSessionStatus(resultSet.getObject("SESSION_STATUS", String.class)); + session.setCompanyId(resultSet.getObject("COMPANY_ID", Long.class)); + session.setSecurityId(resultSet.getObject("SECURITY_ID", Long.class)); + session.setUserId(resultSet.getObject("USER_ID", Long.class)); + session.setSection(resultSet.getObject("SECTION", String.class)); + session.setSessionType(resultSet.getObject("SESSION_TYPE", String.class)); return session; } @@ -50,7 +57,12 @@ public class SessionMapStore extends TemplateMapStore { TimeUtil.toDateFromInstant(session.getCreated()), TimeUtil.toDateFromInstant(session.getUpdated()), TimeUtil.toDateFromLocalDate(session.getClearingDate()), - session.getSessionStatus() + session.getSessionStatus(), + session.getCompanyId(), + session.getSecurityId(), + session.getUserId(), + session.getSection(), + session.getSessionType() }; return args; } diff --git a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/services/UpdateMapService.java b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/services/UpdateMapService.java index 2deeb3540..43d66ee91 100644 --- a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/services/UpdateMapService.java +++ b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/services/UpdateMapService.java @@ -149,7 +149,7 @@ public class UpdateMapService extends AbstractUpdateMapService { FixedIncomeCashFlowHistory fixedIncomeCashFlowHistory = new FixedIncomeCashFlowHistory(); createBusinessEvent(fixedIncomeCashFlowHistory, eventType); fixedIncomeCashFlowHistory.setObject((FixedIncomeCashFlow) value); - hazelcastServerInstance.getMap(IMDGDistributedNames.Map_MarketHistory).put(fixedIncomeCashFlowHistory.getId(), fixedIncomeCashFlowHistory); + hazelcastServerInstance.getMap(IMDGDistributedNames.Map_FixedIncomeCashFlowHistory).put(fixedIncomeCashFlowHistory.getId(), fixedIncomeCashFlowHistory); } else if (value instanceof CouponPeriod) { CouponPeriodHistory couponPeriodHistory = new CouponPeriodHistory(); createBusinessEvent(couponPeriodHistory, eventType); diff --git a/clearing-parent/imdg/src/test/java/ru/spcex/clearing/imdg/structure/BusinessObjectAndBusinessEventForCheckMapStore.java b/clearing-parent/imdg/src/test/java/ru/spcex/clearing/imdg/structure/BusinessObjectAndBusinessEventForCheckMapStore.java index a49f9b5e3..9e02734db 100644 --- a/clearing-parent/imdg/src/test/java/ru/spcex/clearing/imdg/structure/BusinessObjectAndBusinessEventForCheckMapStore.java +++ b/clearing-parent/imdg/src/test/java/ru/spcex/clearing/imdg/structure/BusinessObjectAndBusinessEventForCheckMapStore.java @@ -84,6 +84,17 @@ public class BusinessObjectAndBusinessEventForCheckMapStore { this.params = params; } + public SettingOperation(String methodName, Object[] params) { + this.methodName = methodName; + this.parameterTypes = new Class[params.length]; + for (int i = 0; i < params.length; i++) { + if (params[i] instanceof Class) + throw new IllegalArgumentException("Required not a Class argument, i=" + i); + parameterTypes[i] = params[i].getClass(); + } + this.params = params; + } + public String getMethodName() { return methodName; } 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 1f495d479..8e5742d50 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 @@ -6,6 +6,9 @@ import ru.clearing.classes.statics.data.company.*; import ru.clearing.classes.statics.data.company.relation.Relation; import ru.clearing.classes.statics.data.company.relation.RelationHistory; import ru.clearing.classes.statics.data.execution.ExecutionDeposit; +import ru.clearing.classes.statics.data.execution.ExecutionDepositHistory; +import ru.clearing.classes.statics.data.execution.ExecutionFond; +import ru.clearing.classes.statics.data.execution.ExecutionFondHistory; import ru.clearing.classes.statics.data.instrument.issue.*; import ru.clearing.classes.statics.data.journal.InDocumentJournal; import ru.clearing.classes.statics.data.journal.ManagementJournal; @@ -21,8 +24,6 @@ import ru.clearing.classes.statics.data.profile.ProfileDocumentHistory; import ru.clearing.classes.statics.data.register.*; import ru.clearing.classes.statics.data.scheduler.*; import ru.clearing.classes.statics.data.sdf.*; -import ru.clearing.classes.statics.data.security.Security; -import ru.clearing.classes.statics.data.security.SecurityHistory; import ru.clearing.classes.statics.data.statement.Statement; import ru.clearing.classes.statics.data.user.*; import ru.clearing.platform.dictionary.*; @@ -56,22 +57,83 @@ public class RunnableMapNamesForTesting { businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_BankAccountHistory, BankAccountHistory.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_ExecutionDepositHistory, ExecutionDepositHistory.class, + usingIgnoringFieldsComparator( + "object.firstLegAmount", + "object.interestAmount", + "object.lots", + "object.quantity", + "object.secondLegAmount") + /*new SettingOperation("object.firstLegAmount", new Object[]{new BigDecimal("850.640000000000000000")}), + new SettingOperation("object.interestAmount", new Object[]{new BigDecimal("851.640000000000000000")}), + new SettingOperation("object.lots", new Object[]{new BigDecimal("852.640000000000000000")}), + new SettingOperation("object.quantity", new Object[]{new BigDecimal("853.640000000000000000")}), + new SettingOperation("object.secondLegAmount", new Object[]{new BigDecimal("854.640000000000000000")})*/ + )); + businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_ExecutionFondHistory, ExecutionFondHistory.class, + usingIgnoringFieldsComparator( + "object.interestAmount", + "object.lots", + "object.quantity", + "object.settlementAmount") + /*new SettingOperation("object.interestAmount", new Object[]{new BigDecimal("850.640000000000000000")}), + new SettingOperation("object.lots", new Object[]{new BigDecimal("851.640000000000000000")}), + new SettingOperation("object.quantity", new Object[]{new BigDecimal("852.640000000000000000")}), + new SettingOperation("object.settlementAmount", new Object[]{new BigDecimal("853.640000000000000000")})*/)); 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)); // parent table + businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_SessionHistory, SessionHistory.class)); +// businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_SecurityHistory, SecurityHistory.class)); // parent table businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_UserConnectHistory, UserConnectHistory.class)); businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_UserHistory, UserHistory.class)); businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_CurrencyHistory, CurrencyHistory.class)); - businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_ListingHistory, ListingHistory.class)); + businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_ListingHistory, ListingHistory.class, + usingIgnoringFieldsComparator( + "object.lotSize") + /*new SettingOperation("object.lotSize", new Object[]{new BigDecimal("850.640000000000000000")}),*/)); businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_MarketHistory, MarketHistory.class)); businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_CompanySymbolsHistory, CompanySymbolsHistory.class)); businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_ProfileDocumentHistory, ProfileDocumentHistory.class)); businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_ClearingMemberCategoryHistory, ClearingMemberCategoryHistory.class)); - businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_MoneyMarketSecurityHistory, MoneyMarketSecurityHistory.class)); - businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_EquitySecurityHistory, EquitySecurityHistory.class)); - businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_FixedIncomeSecurityHistory, FixedIncomeSecurityHistory.class)); - businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_FixedIncomeCashFlowHistory, FixedIncomeCashFlowHistory.class)); - businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_CouponPeriodHistory, CouponPeriodHistory.class)); + businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_MoneyMarketSecurityHistory, MoneyMarketSecurityHistory.class, + usingIgnoringFieldsComparator( // todo поправить тест для ASecurityHistoryMapStore + "object.created", "object.updated", + "object.fullName", "object.fullNameEng", + "object.instrumentType", + "object.isin", "object.issuerId", + "object.lotSize", + "object.securitySymbol", + "object.shortName", "object.shortNameEng", + "object.uuid", "object.workflowStatus" + ))); + businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_EquitySecurityHistory, EquitySecurityHistory.class, + usingIgnoringFieldsComparator( // todo поправить тест для ASecurityHistoryMapStore + "object.created", "object.updated", + "object.fullName", "object.fullNameEng", + "object.instrumentType", + "object.isin", "object.issuerId", + "object.lotSize", + "object.securitySymbol", + "object.shortName", "object.shortNameEng", + "object.uuid", "object.workflowStatus" + ))); + businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_FixedIncomeSecurityHistory, FixedIncomeSecurityHistory.class, + usingIgnoringFieldsComparator( // todo поправить тест для ASecurityHistoryMapStore + "object.created", "object.updated", + "object.fullName", "object.fullNameEng", + "object.instrumentType", + "object.isin", "object.issuerId", + "object.lotSize", + "object.securitySymbol", + "object.shortName", "object.shortNameEng", + "object.uuid", "object.workflowStatus" + ))); + businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_FixedIncomeCashFlowHistory, FixedIncomeCashFlowHistory.class, + usingIgnoringFieldsComparator("object.accruedCoupon") + /* new SettingOperation("getObject.setAccruedCoupon", new Object[]{new BigDecimal("870.680000000000000000")})*/)); + businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_CouponPeriodHistory, CouponPeriodHistory.class, + usingIgnoringFieldsComparator("object.couponRate") + /* new SettingOperation("getObject.setCouponRate", new Object[]{new BigDecimal("870.680000000000000000")})*/)); //business object // businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_AccountBalance, AccountBalance.class)); @@ -80,6 +142,11 @@ public class RunnableMapNamesForTesting { 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_ExecutionFond, ExecutionFond.class, + new SettingOperation("setInterestAmount", new Object[]{new BigDecimal("850.64")}), + new SettingOperation("setLots", new Object[]{new BigDecimal("851.64")}), + new SettingOperation("setQuantity", new Object[]{new BigDecimal("852.64")}), + new SettingOperation("setSettlementAmount", new Object[]{new BigDecimal("853.64")}))); businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_Launcher, Launcher.class)); businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_LiabilitiesClaimsAssets, LiabilitiesClaimsAssets.class)); businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_LiabilitiesClaimsMoney, LiabilitiesClaimsMoney.class, @@ -92,13 +159,34 @@ public class RunnableMapNamesForTesting { 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_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_UserConnect, UserConnect.class)); businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_User, User.class)); - businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_EquitySecurity, EquitySecurity.class)); - businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_FixedIncomeSecurity, FixedIncomeSecurity.class)); + businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_EquitySecurity, EquitySecurity.class + , usingIgnoringFieldsComparator( // todo поправить тест для ASecurityMapStore - проблема в заполнении securityId + "created", "updated", + "fullName", "fullNameEng", + "instrumentType", + "isin", "issuerId", + "lotSize", + "securitySymbol", + "shortName", "shortNameEng", + "uuid", "workflowStatus" + ) + )); + businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_FixedIncomeSecurity, FixedIncomeSecurity.class, + usingIgnoringFieldsComparator( // todo поправить тест для ASecurityMapStore + "created", "updated", + "fullName", "fullNameEng", + "instrumentType", + "isin", "issuerId", + "lotSize", + "securitySymbol", + "shortName", "shortNameEng", + "uuid", "workflowStatus" + ))); //dictionary dictionaryObjectForCheckMapStores.add(new DictionaryObjectForCheckMapStore<>(IMDGDistributedNames.Map_AccountTypeDictionary, AccountTypeDictionary.class)); @@ -130,6 +218,8 @@ public class RunnableMapNamesForTesting { 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_SessionStatusDictionary, SessionStatusDictionary.class)); + dictionaryObjectForCheckMapStores.add(new DictionaryObjectForCheckMapStore<>(IMDGDistributedNames.Map_SessionTypeDictionary, SessionTypeDictionary.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)); @@ -191,7 +281,20 @@ public class RunnableMapNamesForTesting { 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")}))); + usingIgnoringFieldsComparator( // todo поправить тест для ASecurityHistoryMapStore + "created", "updated", + "fullName", "fullNameEng", + "instrumentType", + "isin", "issuerId", + "lotSize", + "securitySymbol", + "shortName", "shortNameEng", + "uuid", "workflowStatus", + + "nominalValue" // только по точности не совпадает поле, но читается + )//, + //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_OrderRegister, OrderRegister.class)); businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_OutDocumentJournal, OutDocumentJournal.class, @@ -217,10 +320,13 @@ public class RunnableMapNamesForTesting { 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_STrade, STrade.class, + businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_STrades, STrades.class, new SettingOperation("setQty", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}), new SettingOperation("setValue", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}), - new SettingOperation("setExchangeCommission", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}))); + new SettingOperation("setExchangeCommission", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(18)}), + new SettingOperation("setQty", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(18)}), + new SettingOperation("setValue", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(18)}) + )); businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_UncoveredDealRegister, UncoveredDealRegister.class, new SettingOperation("setCreated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}), new SettingOperation("setUpdated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}), @@ -232,8 +338,12 @@ public class RunnableMapNamesForTesting { new SettingOperation("setInSum", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}), new SettingOperation("setOutExtSum", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}), new SettingOperation("setOutIntSum", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}))); - businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_FixedIncomeCashFlow, FixedIncomeCashFlow.class)); - businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_CouponPeriod, CouponPeriod.class)); + businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_FixedIncomeCashFlow, FixedIncomeCashFlow.class, + new SettingOperation("setAccruedCoupon", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}) + )); + businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_CouponPeriod, CouponPeriod.class, + new SettingOperation("setCouponRate", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}) + )); businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_SDf51, SDf51.class)); businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_SDf52, SDf52.class)); businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_SDf53, SDf53.class)); diff --git a/platform-parent/platform-imdg-api/src/main/java/ru/spcex/clearing/imdg/IMDGDistributedNames.java b/platform-parent/platform-imdg-api/src/main/java/ru/spcex/clearing/imdg/IMDGDistributedNames.java index 68a98faee..a989d29b9 100644 --- a/platform-parent/platform-imdg-api/src/main/java/ru/spcex/clearing/imdg/IMDGDistributedNames.java +++ b/platform-parent/platform-imdg-api/src/main/java/ru/spcex/clearing/imdg/IMDGDistributedNames.java @@ -105,6 +105,7 @@ public final class IMDGDistributedNames { public static final String Map_RequestInfo = "Map_RequestInfo"; public static final String Map_PaymentInstruction = "Map_PaymentInstruction"; public static final String Map_Session = "Map_Session"; + public static final String Map_SessionHistory = "Map_SessionHistory"; public static final String Map_Notification = "Map_Notification"; public static final String Map_LiabilitiesClaimsAssets = "Map_LiabilitiesClaimsAssets"; public static final String Map_LiabilitiesClaimsMoney = "Map_LiabilitiesClaimsMoney"; @@ -112,6 +113,7 @@ public final class IMDGDistributedNames { public static final String Map_ClearMemberRegisterChange = "Map_ClearMemberRegisterChange"; public static final String Map_BalanceRegister = "Map_BalanceRegister"; public static final String Map_ExecutionDeposit = "Map_ExecutionDeposit"; + public static final String Map_ExecutionDepositHistory = "Map_ExecutionDepositHistory"; public static final String Map_DealRegister = "Map_DealRegister"; public static final String Map_AdmittedDealRegister = "Map_AdmittedDealRegister"; public static final String Map_CoveredDealRegister = "Map_CoveredDealRegister"; @@ -120,7 +122,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_STrades = "Map_STrades"; public static final String Map_SectionDictionary = "Map_SectionDictionary"; public static final String Map_ShareTypeDictionary = "Map_ShareTypeDictionary"; public static final String Map_BondTypeDictionary = "Map_BondTypeDictionary"; @@ -159,6 +161,10 @@ public final class IMDGDistributedNames { public static final String Map_RegistryHistory = "Map_RegistryHistory"; public static final String Map_DepoAccount = "Map_DepoAccount"; public static final String Map_DepoAccountHistory = "Map_DepoAccountHistory"; + public static final String Map_SessionStatusDictionary = "Map_SessionStatusDictionary"; + public static final String Map_SessionTypeDictionary = "Map_SessionTypeDictionary"; + public static final String Map_ExecutionFond = "Map_ExecutionFond"; + public static final String Map_ExecutionFondHistory = "Map_ExecutionFondHistory"; public static final String MAP_SEQUENCE_NAME = "MAP_SEQUENCE_NAME"; diff --git a/platform-parent/platform-messaging/src/main/java/ru/spcex/clearing/platform/messaging/domain/Consts.java b/platform-parent/platform-messaging/src/main/java/ru/spcex/clearing/platform/messaging/domain/Consts.java index fddd74586..e81d7e852 100644 --- a/platform-parent/platform-messaging/src/main/java/ru/spcex/clearing/platform/messaging/domain/Consts.java +++ b/platform-parent/platform-messaging/src/main/java/ru/spcex/clearing/platform/messaging/domain/Consts.java @@ -54,6 +54,9 @@ public interface Consts { String DESTINATION_CLEARING_MEMBER_CATEGORY_UPDATE = "clearing-member-category-update"; String DESTINATION_CLEARING_MEMBER_CATEGORY_DELETE = "clearing-member-category-delete"; + String DESTINATION_ACCOUNT_DELETE = "account-delete"; + String DESTINATION_ACCOUNT_UPDATE = "account-update"; + String DESTINATION_ACCOUNT_NEW = "account-new"; String DESTINATION_BANK_ACCOUNT_DELETE = "bank-account-delete"; String DESTINATION_BANK_ACCOUNT_UPDATE = "bank-account-update"; String DESTINATION_BANK_ACCOUNT_NEW = "bank-account-new"; diff --git a/platform-parent/platform-messaging/src/main/java/ru/spcex/clearing/platform/messaging/domain/cud/account/AccountNewRequest.java b/platform-parent/platform-messaging/src/main/java/ru/spcex/clearing/platform/messaging/domain/cud/account/AccountNewRequest.java new file mode 100644 index 000000000..374e4b980 --- /dev/null +++ b/platform-parent/platform-messaging/src/main/java/ru/spcex/clearing/platform/messaging/domain/cud/account/AccountNewRequest.java @@ -0,0 +1,46 @@ +package ru.spcex.clearing.platform.messaging.domain.cud.account; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class AccountNewRequest { + @JsonProperty + public Long companyId; + @JsonProperty + public String account; + @JsonProperty + public String status; + @JsonProperty + public String accountType; + + public Long getCompanyId() { + return companyId; + } + + public void setCompanyId(Long companyId) { + this.companyId = companyId; + } + + public String getAccount() { + return account; + } + + public void setAccount(String account) { + this.account = account; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getAccountType() { + return accountType; + } + + public void setAccountType(String accountType) { + this.accountType = accountType; + } +} diff --git a/platform-parent/platform-messaging/src/main/java/ru/spcex/clearing/platform/messaging/domain/cud/account/AccountUpdateRequest.java b/platform-parent/platform-messaging/src/main/java/ru/spcex/clearing/platform/messaging/domain/cud/account/AccountUpdateRequest.java new file mode 100644 index 000000000..a3e5406e1 --- /dev/null +++ b/platform-parent/platform-messaging/src/main/java/ru/spcex/clearing/platform/messaging/domain/cud/account/AccountUpdateRequest.java @@ -0,0 +1,56 @@ +package ru.spcex.clearing.platform.messaging.domain.cud.account; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class AccountUpdateRequest { + @JsonProperty + public Long id; + @JsonProperty + public Long companyId; + @JsonProperty + public String account; + @JsonProperty + public String status; + @JsonProperty + public String accountType; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getCompanyId() { + return companyId; + } + + public void setCompanyId(Long companyId) { + this.companyId = companyId; + } + + public String getAccount() { + return account; + } + + public void setAccount(String account) { + this.account = account; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getAccountType() { + return accountType; + } + + public void setAccountType(String accountType) { + this.accountType = accountType; + } +} diff --git a/platform-parent/platform-messaging/src/main/java/ru/spcex/clearing/platform/messaging/domain/cud/company/CompanyInfoUpdateRequest.java b/platform-parent/platform-messaging/src/main/java/ru/spcex/clearing/platform/messaging/domain/cud/company/CompanyInfoUpdateRequest.java index 35a845c9b..5a7cd8c5a 100644 --- a/platform-parent/platform-messaging/src/main/java/ru/spcex/clearing/platform/messaging/domain/cud/company/CompanyInfoUpdateRequest.java +++ b/platform-parent/platform-messaging/src/main/java/ru/spcex/clearing/platform/messaging/domain/cud/company/CompanyInfoUpdateRequest.java @@ -29,9 +29,7 @@ public class CompanyInfoUpdateRequest { @JsonProperty private String fullName; @JsonProperty - private String tradingCode; - @JsonProperty - private String clearingCode; + private String workflowStatus; public Long getId() { return id; @@ -129,19 +127,11 @@ public class CompanyInfoUpdateRequest { this.fullName = fullName; } - public String getTradingCode() { - return tradingCode; + public String getWorkflowStatus() { + return workflowStatus; } - public void setTradingCode(String tradingCode) { - this.tradingCode = tradingCode; - } - - public String getClearingCode() { - return clearingCode; - } - - public void setClearingCode(String clearingCode) { - this.clearingCode = clearingCode; + public void setWorkflowStatus(String workflowStatus) { + this.workflowStatus = workflowStatus; } } diff --git a/platform-parent/platform-utils/src/main/java/ru/spcex/platform/utils/enumeration/EnumMessage.java b/platform-parent/platform-utils/src/main/java/ru/spcex/platform/utils/enumeration/EnumMessage.java index 66fec8cff..fc8093067 100644 --- a/platform-parent/platform-utils/src/main/java/ru/spcex/platform/utils/enumeration/EnumMessage.java +++ b/platform-parent/platform-utils/src/main/java/ru/spcex/platform/utils/enumeration/EnumMessage.java @@ -1,5 +1,6 @@ package ru.spcex.platform.utils.enumeration; +import java.util.Arrays; import java.util.Collections; public class EnumMessage { @@ -32,4 +33,9 @@ public class EnumMessage { public void setArgs(Object[] args) { this.args = args; } + + @Override + public String toString() { + return "EnumMessage{subject=" + subject + ", args: " + Arrays.toString(args) + "}"; + } } From 70433b7f85be172af41e8342967aed2e6a53ab71 Mon Sep 17 00:00:00 2001 From: psemenkov Date: Mon, 24 Apr 2023 17:52:20 +0300 Subject: [PATCH 17/27] =?UTF-8?q?http://jira.mfd.msk:8088/browse/CLS-268?= =?UTF-8?q?=20=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=20=D0=BE?= =?UTF-8?q?=D1=88=D0=B8=D0=B1=D0=BA=D0=B8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scheduler/PlannerAllTodayBuilder.java | 22 ++++++++++--------- .../imdg/services/PlannerAllTodayMaker.java | 8 +++---- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/clearing-parent/cleaning-builders/src/main/java/ru/spcex/clearing/scheduler/PlannerAllTodayBuilder.java b/clearing-parent/cleaning-builders/src/main/java/ru/spcex/clearing/scheduler/PlannerAllTodayBuilder.java index afca5a269..3030d10a2 100644 --- a/clearing-parent/cleaning-builders/src/main/java/ru/spcex/clearing/scheduler/PlannerAllTodayBuilder.java +++ b/clearing-parent/cleaning-builders/src/main/java/ru/spcex/clearing/scheduler/PlannerAllTodayBuilder.java @@ -24,27 +24,29 @@ public class PlannerAllTodayBuilder { } private PlannerAllTodayBuilder(){} + //пока для clearingCalendar нет сеттера append, если появится нужно поправить ClearingCalendarService.deleteFromPlannerAllTodayMap() + //из-за поля this.parent = Parent.Template.getKey(); public PlannerAllTodayBuilder append(PlannerTemplate plannerTemplate){ this.task = plannerTemplate.getTask(); this.taskTime = plannerTemplate.getTaskTime(); this.taskStatus = plannerTemplate.getTaskStatus(); this.companyId = plannerTemplate.getCompanyId(); this.securityId = plannerTemplate.getSecurityId(); - this.parent = Parent.Planner.getKey(); + this.parent = Parent.Template.getKey(); this.id = plannerTemplate.getId(); return this; } - public PlannerAllTodayBuilder append(Planner plannerTemplate){ - this.task = plannerTemplate.getTask(); - this.taskTime = plannerTemplate.getTaskTime(); - this.clearingDate = plannerTemplate.getClearingDate(); - this.market = plannerTemplate.getMarket(); - this.taskStatus = plannerTemplate.getTaskStatus(); - this.companyId = plannerTemplate.getCompanyId(); - this.securityId = plannerTemplate.getSecurityId(); + public PlannerAllTodayBuilder append(Planner planner){ + this.task = planner.getTask(); + this.taskTime = planner.getTaskTime(); + this.clearingDate = planner.getClearingDate(); + this.market = planner.getMarket(); + this.taskStatus = planner.getTaskStatus(); + this.companyId = planner.getCompanyId(); + this.securityId = planner.getSecurityId(); this.parent = Parent.Planner.getKey(); - this.id = plannerTemplate.getId(); + this.id = planner.getId(); return this; } diff --git a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/services/PlannerAllTodayMaker.java b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/services/PlannerAllTodayMaker.java index 40eea61ce..4b74e1c97 100644 --- a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/services/PlannerAllTodayMaker.java +++ b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/services/PlannerAllTodayMaker.java @@ -3,6 +3,7 @@ package ru.spcex.clearing.imdg.services; import com.hazelcast.core.HazelcastInstance; import com.hazelcast.core.IMap; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Service; import ru.clearing.classes.statics.data.scheduler.ClearingCalendar; import ru.clearing.classes.statics.data.scheduler.Planner; @@ -27,7 +28,7 @@ public class PlannerAllTodayMaker { private final IMap plannerAllTodayMap; @Autowired - public PlannerAllTodayMaker(HazelcastInstance hazelcastInstance) { + public PlannerAllTodayMaker(@Qualifier("hazelcastInstanceImdg") HazelcastInstance hazelcastInstance) { this.hazelcastInstance = hazelcastInstance; plannerMap = hazelcastInstance.getMap(Map_Planner); clearingCalendarMap = hazelcastInstance.getMap(Map_ClearingCalendar); @@ -61,9 +62,8 @@ public class PlannerAllTodayMaker { List res = new ArrayList<>(); if (needAddFromPlannerTemplate(currentDate, clearingCalendarMap.values())){ - for (PlannerTemplate plannerTemplate : plannerTemplateMap.values()) { - res.add(PlannerAllTodayBuilder.builder().append(plannerTemplate).build()); - } + plannerTemplateMap.values().stream().filter(plannerTemplate -> Status.Active.getKey().equals(plannerTemplate.getTaskStatus())) + .forEach(plannerTemplate -> res.add(PlannerAllTodayBuilder.builder().append(plannerTemplate).build())); } return res; } From 1d9d670c3a07daa454218d21905531ff94debcd5 Mon Sep 17 00:00:00 2001 From: psemenkov Date: Mon, 24 Apr 2023 17:54:04 +0300 Subject: [PATCH 18/27] =?UTF-8?q?http://jira.mfd.msk:8088/browse/CLS-268?= =?UTF-8?q?=20=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=20=D0=BD?= =?UTF-8?q?=D0=B0=D0=B7=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20=D1=82=D0=B5=D1=81?= =?UTF-8?q?=D1=82=D0=BE=D0=B2=D0=BE=D0=B9=20=D0=B4=D0=B8=D1=80=D0=B5=D0=BA?= =?UTF-8?q?=D1=82=D0=BE=D1=80=D0=B8=D0=B8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scheduler/AbstractServiceTest.java | 14 ++++++++------ .../scheduler/config/SchedulerTestConfig.java | 19 +++++++++++++++++++ .../service/ClearingCalendarServiceTest.java | 5 ++--- .../service/LauncherServiceTest.java | 5 ++--- .../scheduler/service/PlannerServiceTest.java | 5 ++--- .../service/PlannerTemplateServiceTest.java | 5 ++--- .../validation/DateNotBeforeRuleTest.java | 4 ++-- .../validation/DictionaryPresentRuleTest.java | 4 ++-- .../validation/EnumPresentRuleTest.java | 4 ++-- .../validation/FieldRequiredRuleTest.java | 4 ++-- .../validation/IdPresentRuleTest.java | 4 ++-- .../validation/TimeNotBeforeRuleTest.java | 4 ++-- 12 files changed, 47 insertions(+), 30 deletions(-) rename clearing-parent/scheduler-service/src/test/java/ru/{specx => spcex}/clearing/scheduler/AbstractServiceTest.java (96%) create mode 100644 clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/config/SchedulerTestConfig.java rename clearing-parent/scheduler-service/src/test/java/ru/{specx => spcex}/clearing/scheduler/service/ClearingCalendarServiceTest.java (98%) rename clearing-parent/scheduler-service/src/test/java/ru/{specx => spcex}/clearing/scheduler/service/LauncherServiceTest.java (96%) rename clearing-parent/scheduler-service/src/test/java/ru/{specx => spcex}/clearing/scheduler/service/PlannerServiceTest.java (98%) rename clearing-parent/scheduler-service/src/test/java/ru/{specx => spcex}/clearing/scheduler/service/PlannerTemplateServiceTest.java (97%) rename clearing-parent/scheduler-service/src/test/java/ru/{specx => spcex}/clearing/scheduler/validation/DateNotBeforeRuleTest.java (94%) rename clearing-parent/scheduler-service/src/test/java/ru/{specx => spcex}/clearing/scheduler/validation/DictionaryPresentRuleTest.java (98%) rename clearing-parent/scheduler-service/src/test/java/ru/{specx => spcex}/clearing/scheduler/validation/EnumPresentRuleTest.java (97%) rename clearing-parent/scheduler-service/src/test/java/ru/{specx => spcex}/clearing/scheduler/validation/FieldRequiredRuleTest.java (94%) rename clearing-parent/scheduler-service/src/test/java/ru/{specx => spcex}/clearing/scheduler/validation/IdPresentRuleTest.java (97%) rename clearing-parent/scheduler-service/src/test/java/ru/{specx => spcex}/clearing/scheduler/validation/TimeNotBeforeRuleTest.java (94%) diff --git a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/AbstractServiceTest.java b/clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/AbstractServiceTest.java similarity index 96% rename from clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/AbstractServiceTest.java rename to clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/AbstractServiceTest.java index d4196c5c4..c2a6b2173 100644 --- a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/AbstractServiceTest.java +++ b/clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/AbstractServiceTest.java @@ -1,4 +1,4 @@ -package ru.specx.clearing.scheduler; +package ru.spcex.clearing.scheduler; import org.apache.kafka.clients.producer.MockProducer; import org.apache.kafka.clients.producer.ProducerRecord; @@ -17,16 +17,14 @@ import ru.clearing.platform.dictionary.DayStatusDictionary; import ru.clearing.platform.dictionary.TaskDictionary; import ru.clearing.platform.dictionary.TaskStatusDictionary; import ru.spcex.clearing.imdg.IMDGDistributedNames; -import ru.spcex.clearing.scheduler.PlannerAllTodayBuilder; import ru.spcex.clearing.scheduler.config.ErrorResolverConfig; +import ru.spcex.clearing.scheduler.config.PlannerQueueConfig; +import ru.spcex.clearing.scheduler.config.SchedulerTestConfig; import ru.spcex.clearing.scheduler.config.validation.ClearingCalendarValidationConfig; import ru.spcex.clearing.scheduler.config.validation.PlannerTemplateValidationConfig; import ru.spcex.clearing.scheduler.config.validation.PlannerValidationConfig; import ru.spcex.clearing.scheduler.config.validation.ValidationConfig; -import ru.spcex.clearing.scheduler.service.ClearingCalendarService; -import ru.spcex.clearing.scheduler.service.LauncherService; -import ru.spcex.clearing.scheduler.service.PlannerService; -import ru.spcex.clearing.scheduler.service.PlannerTemplateService; +import ru.spcex.clearing.scheduler.service.*; import ru.spcex.clearing.test.MatcherFactory; import ru.spcex.clearing.test.TestUtils; import ru.spcex.clearing.test.config.ImdgTestConfig; @@ -54,11 +52,15 @@ import static ru.spcex.platform.enumeration.Market.mkrs; PlannerTemplateValidationConfig.class, ClearingCalendarService.class, PlannerTemplateService.class, + TaskManager.class, + LauncherSender.class, PlannerValidationConfig.class, ClearingCalendarValidationConfig.class, ValidationConfig.class, LauncherService.class, ErrorResolverConfig.class, + PlannerQueueConfig.class, + SchedulerTestConfig.class, ImdgTestConfig.class, KafkaTestConfig.class}) public abstract class AbstractServiceTest { diff --git a/clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/config/SchedulerTestConfig.java b/clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/config/SchedulerTestConfig.java new file mode 100644 index 000000000..916d3992d --- /dev/null +++ b/clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/config/SchedulerTestConfig.java @@ -0,0 +1,19 @@ +package ru.spcex.clearing.scheduler.config; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.scheduling.TaskScheduler; +import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler; + +@Configuration +public class SchedulerTestConfig { + + @Bean + public TaskScheduler threadPoolTaskScheduler(){ + ThreadPoolTaskScheduler threadPoolTaskScheduler + = new ThreadPoolTaskScheduler(); + threadPoolTaskScheduler.setPoolSize(5); + threadPoolTaskScheduler.setThreadNamePrefix("ThreadPoolTaskScheduler"); + return threadPoolTaskScheduler; + } +} diff --git a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/service/ClearingCalendarServiceTest.java b/clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/service/ClearingCalendarServiceTest.java similarity index 98% rename from clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/service/ClearingCalendarServiceTest.java rename to clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/service/ClearingCalendarServiceTest.java index df32644e6..fbb7d953b 100644 --- a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/service/ClearingCalendarServiceTest.java +++ b/clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/service/ClearingCalendarServiceTest.java @@ -1,4 +1,4 @@ -package ru.specx.clearing.scheduler.service; +package ru.spcex.clearing.scheduler.service; import org.apache.kafka.clients.consumer.MockConsumer; import org.junit.jupiter.api.BeforeEach; @@ -13,12 +13,11 @@ import ru.spcex.clearing.platform.messaging.domain.Consts; import ru.spcex.clearing.platform.messaging.domain.cud.common.CommonDeleteRequest; import ru.spcex.clearing.platform.messaging.domain.cud.schedule.ClearingCalendarNewRequest; import ru.spcex.clearing.platform.messaging.domain.cud.schedule.ClearingCalendarUpdateRequest; +import ru.spcex.clearing.scheduler.AbstractServiceTest; import ru.spcex.clearing.scheduler.PlannerAllTodayBuilder; -import ru.spcex.clearing.scheduler.service.ClearingCalendarService; import ru.spcex.clearing.test.MatcherFactory; import ru.spcex.platform.enumeration.DayStatus; import ru.spcex.platform.enumeration.Status; -import ru.specx.clearing.scheduler.AbstractServiceTest; import javax.annotation.PostConstruct; import java.time.LocalDate; diff --git a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/service/LauncherServiceTest.java b/clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/service/LauncherServiceTest.java similarity index 96% rename from clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/service/LauncherServiceTest.java rename to clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/service/LauncherServiceTest.java index 9a4a508a0..fc8f4f7a8 100644 --- a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/service/LauncherServiceTest.java +++ b/clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/service/LauncherServiceTest.java @@ -1,4 +1,4 @@ -package ru.specx.clearing.scheduler.service; +package ru.spcex.clearing.scheduler.service; import org.apache.kafka.clients.consumer.MockConsumer; import org.junit.jupiter.api.BeforeEach; @@ -12,9 +12,8 @@ import ru.spcex.clearing.platform.messaging.domain.ActionType; 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.scheduler.service.LauncherService; +import ru.spcex.clearing.scheduler.AbstractServiceTest; import ru.spcex.clearing.test.MatcherFactory; -import ru.specx.clearing.scheduler.AbstractServiceTest; import javax.annotation.PostConstruct; diff --git a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/service/PlannerServiceTest.java b/clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/service/PlannerServiceTest.java similarity index 98% rename from clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/service/PlannerServiceTest.java rename to clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/service/PlannerServiceTest.java index 49bd15c27..e8b198b5b 100644 --- a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/service/PlannerServiceTest.java +++ b/clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/service/PlannerServiceTest.java @@ -1,4 +1,4 @@ -package ru.specx.clearing.scheduler.service; +package ru.spcex.clearing.scheduler.service; import org.apache.kafka.clients.consumer.MockConsumer; import org.junit.jupiter.api.BeforeEach; @@ -11,11 +11,10 @@ import ru.spcex.clearing.platform.messaging.domain.Consts; import ru.spcex.clearing.platform.messaging.domain.cud.common.CommonDeleteRequest; import ru.spcex.clearing.platform.messaging.domain.cud.schedule.PlannerNewRequest; import ru.spcex.clearing.platform.messaging.domain.cud.schedule.PlannerUpdateRequest; +import ru.spcex.clearing.scheduler.AbstractServiceTest; import ru.spcex.clearing.scheduler.PlannerAllTodayBuilder; -import ru.spcex.clearing.scheduler.service.PlannerService; import ru.spcex.clearing.test.MatcherFactory; import ru.spcex.platform.enumeration.Status; -import ru.specx.clearing.scheduler.AbstractServiceTest; import javax.annotation.PostConstruct; diff --git a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/service/PlannerTemplateServiceTest.java b/clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/service/PlannerTemplateServiceTest.java similarity index 97% rename from clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/service/PlannerTemplateServiceTest.java rename to clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/service/PlannerTemplateServiceTest.java index 269a20562..abed817dd 100644 --- a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/service/PlannerTemplateServiceTest.java +++ b/clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/service/PlannerTemplateServiceTest.java @@ -1,4 +1,4 @@ -package ru.specx.clearing.scheduler.service; +package ru.spcex.clearing.scheduler.service; import org.apache.kafka.clients.consumer.MockConsumer; import org.junit.jupiter.api.Test; @@ -10,10 +10,9 @@ import ru.spcex.clearing.platform.messaging.domain.Consts; import ru.spcex.clearing.platform.messaging.domain.cud.common.CommonDeleteRequest; import ru.spcex.clearing.platform.messaging.domain.cud.schedule.PlannerTemplateNewRequest; import ru.spcex.clearing.platform.messaging.domain.cud.schedule.PlannerTemplateUpdateRequest; +import ru.spcex.clearing.scheduler.AbstractServiceTest; import ru.spcex.clearing.scheduler.PlannerAllTodayBuilder; -import ru.spcex.clearing.scheduler.service.PlannerTemplateService; import ru.spcex.clearing.test.MatcherFactory; -import ru.specx.clearing.scheduler.AbstractServiceTest; import javax.annotation.PostConstruct; diff --git a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/DateNotBeforeRuleTest.java b/clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/validation/DateNotBeforeRuleTest.java similarity index 94% rename from clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/DateNotBeforeRuleTest.java rename to clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/validation/DateNotBeforeRuleTest.java index 753c5f9c9..0426b57d0 100644 --- a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/DateNotBeforeRuleTest.java +++ b/clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/validation/DateNotBeforeRuleTest.java @@ -1,13 +1,13 @@ -package ru.specx.clearing.scheduler.validation; +package ru.spcex.clearing.scheduler.validation; import org.junit.jupiter.api.Test; import ru.spcex.clearing.platform.messaging.domain.cud.schedule.PlannerNewRequest; +import ru.spcex.clearing.scheduler.AbstractServiceTest; import ru.spcex.clearing.scheduler.validation.rules.common.DateNotBeforeRule; import ru.spcex.platform.imdg.validation.ImdgValidationContext; import ru.spcex.platform.utils.enumeration.EnumMessage; import ru.spcex.platform.utils.validation.IValidator; import ru.spcex.platform.utils.validation.ValidatorImpl; -import ru.specx.clearing.scheduler.AbstractServiceTest; import java.time.LocalDate; import java.util.Collection; diff --git a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/DictionaryPresentRuleTest.java b/clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/validation/DictionaryPresentRuleTest.java similarity index 98% rename from clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/DictionaryPresentRuleTest.java rename to clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/validation/DictionaryPresentRuleTest.java index a3efdcfa2..7c10e8da0 100644 --- a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/DictionaryPresentRuleTest.java +++ b/clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/validation/DictionaryPresentRuleTest.java @@ -1,4 +1,4 @@ -package ru.specx.clearing.scheduler.validation; +package ru.spcex.clearing.scheduler.validation; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -10,6 +10,7 @@ import ru.clearing.platform.dictionary.TaskStatusDictionary; import ru.spcex.clearing.imdg.IMDGDistributedNames; import ru.spcex.clearing.platform.messaging.domain.cud.schedule.ClearingCalendarNewRequest; import ru.spcex.clearing.platform.messaging.domain.cud.schedule.PlannerNewRequest; +import ru.spcex.clearing.scheduler.AbstractServiceTest; import ru.spcex.clearing.scheduler.error.ValidationError; import ru.spcex.clearing.scheduler.validation.rules.common.DictionaryPresentRule; import ru.spcex.platform.enumeration.DayStatus; @@ -22,7 +23,6 @@ import ru.spcex.platform.utils.enumeration.EnumMessage; import ru.spcex.platform.utils.enumeration.IEnumKey; import ru.spcex.platform.utils.validation.IValidator; import ru.spcex.platform.utils.validation.ValidatorImpl; -import ru.specx.clearing.scheduler.AbstractServiceTest; import java.lang.reflect.InvocationTargetException; import java.util.Collection; diff --git a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/EnumPresentRuleTest.java b/clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/validation/EnumPresentRuleTest.java similarity index 97% rename from clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/EnumPresentRuleTest.java rename to clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/validation/EnumPresentRuleTest.java index 1f7b5c658..5d039d6aa 100644 --- a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/EnumPresentRuleTest.java +++ b/clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/validation/EnumPresentRuleTest.java @@ -1,4 +1,4 @@ -package ru.specx.clearing.scheduler.validation; +package ru.spcex.clearing.scheduler.validation; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -6,6 +6,7 @@ import org.springframework.beans.factory.annotation.Qualifier; import ru.clearing.platform.dictionary.AbstractDictionary; import ru.spcex.clearing.platform.messaging.domain.cud.schedule.ClearingCalendarNewRequest; import ru.spcex.clearing.platform.messaging.domain.cud.schedule.PlannerNewRequest; +import ru.spcex.clearing.scheduler.AbstractServiceTest; import ru.spcex.clearing.scheduler.error.ValidationError; import ru.spcex.clearing.scheduler.validation.rules.common.EnumPresentRule; import ru.spcex.platform.enumeration.DayStatus; @@ -17,7 +18,6 @@ import ru.spcex.platform.utils.enumeration.EnumMessage; import ru.spcex.platform.utils.enumeration.IEnumKey; import ru.spcex.platform.utils.validation.IValidator; import ru.spcex.platform.utils.validation.ValidatorImpl; -import ru.specx.clearing.scheduler.AbstractServiceTest; import java.lang.reflect.InvocationTargetException; import java.util.Collection; diff --git a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/FieldRequiredRuleTest.java b/clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/validation/FieldRequiredRuleTest.java similarity index 94% rename from clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/FieldRequiredRuleTest.java rename to clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/validation/FieldRequiredRuleTest.java index 351442878..1f32b7866 100644 --- a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/FieldRequiredRuleTest.java +++ b/clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/validation/FieldRequiredRuleTest.java @@ -1,13 +1,13 @@ -package ru.specx.clearing.scheduler.validation; +package ru.spcex.clearing.scheduler.validation; import org.junit.jupiter.api.Test; import ru.spcex.clearing.platform.messaging.domain.cud.schedule.PlannerNewRequest; +import ru.spcex.clearing.scheduler.AbstractServiceTest; import ru.spcex.clearing.scheduler.validation.rules.common.FieldRequiredRule; import ru.spcex.platform.imdg.validation.ImdgValidationContext; import ru.spcex.platform.utils.enumeration.EnumMessage; import ru.spcex.platform.utils.validation.IValidator; import ru.spcex.platform.utils.validation.ValidatorImpl; -import ru.specx.clearing.scheduler.AbstractServiceTest; import java.util.Collection; import java.util.function.Function; diff --git a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/IdPresentRuleTest.java b/clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/validation/IdPresentRuleTest.java similarity index 97% rename from clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/IdPresentRuleTest.java rename to clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/validation/IdPresentRuleTest.java index 97259580c..e8183bece 100644 --- a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/IdPresentRuleTest.java +++ b/clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/validation/IdPresentRuleTest.java @@ -1,4 +1,4 @@ -package ru.specx.clearing.scheduler.validation; +package ru.spcex.clearing.scheduler.validation; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -7,6 +7,7 @@ import ru.clearing.classes.statics.data.company.Company; import ru.clearing.classes.statics.data.security.Security; import ru.spcex.clearing.imdg.IMDGDistributedNames; import ru.spcex.clearing.platform.messaging.domain.cud.schedule.PlannerNewRequest; +import ru.spcex.clearing.scheduler.AbstractServiceTest; import ru.spcex.clearing.scheduler.error.ValidationError; import ru.spcex.clearing.scheduler.validation.rules.common.IdPresentRule; import ru.spcex.platform.classes.base.SpcexObjectBase; @@ -16,7 +17,6 @@ import ru.spcex.platform.imdg.validation.ImdgValidationContext; import ru.spcex.platform.utils.enumeration.EnumMessage; import ru.spcex.platform.utils.validation.IValidator; import ru.spcex.platform.utils.validation.ValidatorImpl; -import ru.specx.clearing.scheduler.AbstractServiceTest; import java.lang.reflect.InvocationTargetException; import java.util.Collection; diff --git a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/TimeNotBeforeRuleTest.java b/clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/validation/TimeNotBeforeRuleTest.java similarity index 94% rename from clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/TimeNotBeforeRuleTest.java rename to clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/validation/TimeNotBeforeRuleTest.java index aca552382..30ecce222 100644 --- a/clearing-parent/scheduler-service/src/test/java/ru/specx/clearing/scheduler/validation/TimeNotBeforeRuleTest.java +++ b/clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/validation/TimeNotBeforeRuleTest.java @@ -1,13 +1,13 @@ -package ru.specx.clearing.scheduler.validation; +package ru.spcex.clearing.scheduler.validation; import org.junit.jupiter.api.Test; import ru.spcex.clearing.platform.messaging.domain.cud.schedule.PlannerNewRequest; +import ru.spcex.clearing.scheduler.AbstractServiceTest; import ru.spcex.clearing.scheduler.validation.rules.common.TimeNotBeforeRule; import ru.spcex.platform.imdg.validation.ImdgValidationContext; import ru.spcex.platform.utils.enumeration.EnumMessage; import ru.spcex.platform.utils.validation.IValidator; import ru.spcex.platform.utils.validation.ValidatorImpl; -import ru.specx.clearing.scheduler.AbstractServiceTest; import java.time.LocalTime; import java.util.Collection; From f41aecf7391a0665ba54fbe0351afa43440baa8f Mon Sep 17 00:00:00 2001 From: psemenkov Date: Mon, 24 Apr 2023 17:57:34 +0300 Subject: [PATCH 19/27] =?UTF-8?q?http://jira.mfd.msk:8088/browse/CLS-268?= =?UTF-8?q?=20=D0=A1=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB=20TaskManager=20=D0=B1?= =?UTF-8?q?=D0=B5=D0=B7=20hazelcast=20listener=20=D0=B4=D0=BE=D0=B1=D0=B0?= =?UTF-8?q?=D0=B2=D0=B8=D0=BB=20=D0=BE=D1=82=D0=BF=D1=80=D0=B0=D0=B2=D0=BA?= =?UTF-8?q?=D1=83=20=D1=81=D0=BE=D0=BE=D0=B1=D1=89=D0=B5=D0=BD=D0=B8=D0=B9?= =?UTF-8?q?=20=D0=B8=D0=B7=20=D1=81=D0=B5=D1=80=D0=B2=D0=B8=D1=81=D0=BE?= =?UTF-8?q?=D0=B2=20=D0=B2=20=D0=BE=D1=87=D0=B5=D1=80=D0=B5=D0=B4=D1=8C=20?= =?UTF-8?q?=D0=B8=20=D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB=20TaskManag?= =?UTF-8?q?erTest.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scheduler/config/PlannerQueueConfig.java | 29 +++ .../service/ClearingCalendarService.java | 28 +-- .../scheduler/service/LauncherSender.java | 1 + .../scheduler/service/PlannerService.java | 20 +- .../service/PlannerTemplateService.java | 26 ++- .../scheduler/service/TaskManager.java | 208 +++++++++--------- .../scheduler/service/TaskManagerTest.java | 107 +++++++++ 7 files changed, 293 insertions(+), 126 deletions(-) create mode 100644 clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/PlannerQueueConfig.java create mode 100644 clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/service/TaskManagerTest.java diff --git a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/PlannerQueueConfig.java b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/PlannerQueueConfig.java new file mode 100644 index 000000000..0534b2053 --- /dev/null +++ b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/PlannerQueueConfig.java @@ -0,0 +1,29 @@ +package ru.spcex.clearing.scheduler.config; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import ru.clearing.classes.statics.data.scheduler.PlannerAllToday; +import ru.spcex.clearing.scheduler.service.TaskManager; + +import java.util.Map; +import java.util.concurrent.BlockingQueue; +import java.util.concurrent.LinkedBlockingQueue; + +@Configuration +public class PlannerQueueConfig { + + private static BlockingQueue> plannerQueue; + + @Bean(name = "plannerQueue") + public BlockingQueue> plannerQueue() { + plannerQueue = new LinkedBlockingQueue<>(); + return plannerQueue; + } + + public static void addToPlannerQueue(TaskManager.Process process, PlannerAllToday plannerAllToday) { + try { + plannerQueue.put(Map.entry(process, plannerAllToday)); + } catch (InterruptedException ignored) { + } + } +} diff --git a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/ClearingCalendarService.java b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/ClearingCalendarService.java index 04a46c4b8..d53bec1bb 100644 --- a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/ClearingCalendarService.java +++ b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/ClearingCalendarService.java @@ -9,7 +9,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Service; import ru.clearing.classes.statics.data.scheduler.ClearingCalendar; -import ru.clearing.classes.statics.data.scheduler.Planner; import ru.clearing.classes.statics.data.scheduler.PlannerAllToday; import ru.clearing.classes.statics.data.scheduler.PlannerTemplate; import ru.spcex.clearing.imdg.IMDGDistributedNames; @@ -22,9 +21,8 @@ import ru.spcex.clearing.platform.messaging.service.QueueConsumer; import ru.spcex.clearing.platform.messaging.service.RequestInfoUpdate; import ru.spcex.clearing.scheduler.PlannerAllTodayBuilder; import ru.spcex.clearing.util.security.UserRoleVerification; -import ru.spcex.platform.classes.base.SpcexObjectBase; import ru.spcex.platform.enumeration.DayStatus; -import ru.spcex.platform.enumeration.Status; +import ru.spcex.platform.enumeration.Parent; import ru.spcex.platform.imdg.api.Imdg; import ru.spcex.platform.imdg.api.ImdgProvider; import ru.spcex.platform.utils.enumeration.IMessageResolver; @@ -35,11 +33,11 @@ import java.time.Instant; import java.time.LocalDate; import java.util.Arrays; import java.util.Collection; -import java.util.List; import java.util.Map; import java.util.function.Function; import static ru.spcex.clearing.scheduler.ISchedulerChecker.isValidWorkday; +import static ru.spcex.clearing.scheduler.config.PlannerQueueConfig.addToPlannerQueue; @Service public class ClearingCalendarService extends QueueConsumer implements InitializingBean { @@ -47,7 +45,6 @@ public class ClearingCalendarService extends QueueConsumer implements Initializi private final Imdg clearingCalendarMap; private final Imdg plannerTemplateMap; private final Imdg plannerAllTodayMap; - private final Imdg plannerMap; private final IMessageResolver messageResolver; private final UserRoleVerification userRoleVerification; private final Function clearingCalendarDeleteRequestValidation; @@ -65,7 +62,6 @@ public class ClearingCalendarService extends QueueConsumer implements Initializi super(kafkaQueue, kafkaProducer); this.clearingCalendarMap = imdgProvider.getImdg(IMDGDistributedNames.Map_ClearingCalendar, ClearingCalendar.class); this.plannerTemplateMap = imdgProvider.getImdg(IMDGDistributedNames.Map_PlannerTemplate, PlannerTemplate.class); - this.plannerMap = imdgProvider.getImdg(IMDGDistributedNames.Map_Planner, Planner.class); this.plannerAllTodayMap = imdgProvider.getImdg(IMDGDistributedNames.Map_PlannerAllToday, PlannerAllToday.class); this.userRoleVerification = userRoleVerification; this.clearingCalendarDeleteRequestValidation = clearingCalendarDeleteRequestValidator; @@ -157,8 +153,11 @@ public class ClearingCalendarService extends QueueConsumer implements Initializi if (isValidWorkday(clearingCalendar, isWeekend)) { for (PlannerTemplate plannerTemplate : plannerTemplateMap.getAllValues()) { PlannerAllToday plannerAllToday = plannerAllTodayMap.getSingleObjectBySQL(String.format("parentId = %s", plannerTemplate.getId())); - if (plannerAllToday == null) - plannerAllTodayMap.insert(PlannerAllTodayBuilder.builder().append(plannerTemplate).build()); + if (plannerAllToday == null) { + plannerAllToday = PlannerAllTodayBuilder.builder().append(plannerTemplate).build(); + plannerAllTodayMap.insert(plannerAllToday); + addToPlannerQueue(TaskManager.Process.add, plannerAllToday); + } } } } @@ -177,14 +176,11 @@ public class ClearingCalendarService extends QueueConsumer implements Initializi } } //удалим все PlannerAllToday созданные на основании plannerTemplate кроме созданных на основании planner - List plannerIds = plannerMap.getCollectionObjectsByFieldValues(Map.of("taskStatus", Status.Active.getKey(), - "clearingDate", currentDate)).stream() - .mapToLong(SpcexObjectBase::getId) - .boxed().toList(); + Collection values = plannerAllTodayMap.getCollectionObjectsByFieldValues(Map.of("parent", Parent.Template.getKey())); - Collection values = plannerAllTodayMap.getAllValues().stream() - .filter(plannerAllToday -> !plannerIds.contains(plannerAllToday.getParentId())).toList(); - - values.forEach(plannerAllTodayMap::delete); + values.forEach(plannerAllToday -> { + plannerAllTodayMap.delete(plannerAllToday); + addToPlannerQueue(TaskManager.Process.delete, plannerAllToday); + }); } } diff --git a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/LauncherSender.java b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/LauncherSender.java index 0f7d385ee..e58529cc9 100644 --- a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/LauncherSender.java +++ b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/LauncherSender.java @@ -39,6 +39,7 @@ public class LauncherSender { BaseRequest request = new BaseRequest<>(); request.setId(idGenerator.nextId()); request.setActionType(ActionType.NEW); + request.setUserId(userId); request.setRequestPayload(toRequest);// iAction.toRequest() return request; } diff --git a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/PlannerService.java b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/PlannerService.java index dddcc9ba7..6376777c2 100644 --- a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/PlannerService.java +++ b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/PlannerService.java @@ -32,6 +32,8 @@ import java.util.Collection; import java.util.Map; import java.util.function.Function; +import static ru.spcex.clearing.scheduler.config.PlannerQueueConfig.addToPlannerQueue; + @Service public class PlannerService extends QueueConsumer implements InitializingBean { private final Logger log = LoggerFactory.getLogger(getClass()); @@ -151,9 +153,16 @@ public class PlannerService extends QueueConsumer implements InitializingBean { public void cudPlannerAllToday(Planner planner) { if (planner.getTaskStatus().equalsIgnoreCase(Status.Active.getKey())) { PlannerAllToday plannerAllToday = PlannerAllTodayBuilder.builder().append(planner).build(); - PlannerAllToday allToday = plannerAllTodayMap.getSingleObjectBySQL(String.format("parentId = %s", planner.getId())); - if (allToday != null) plannerAllToday.setId(allToday.getId()); - plannerAllTodayMap.insert(plannerAllToday); + PlannerAllToday oldPlannerAllToday = plannerAllTodayMap.getSingleObjectBySQL(String.format("parentId = %s", planner.getId())); + if (oldPlannerAllToday != null) { + plannerAllToday.setId(oldPlannerAllToday.getId()); + plannerAllTodayMap.insert(plannerAllToday); + addToPlannerQueue(TaskManager.Process.update, oldPlannerAllToday); + } else { + plannerAllTodayMap.insert(plannerAllToday); + addToPlannerQueue(TaskManager.Process.add, plannerAllToday); + } + } if (planner.getTaskStatus().equalsIgnoreCase(Status.Cancel.getKey()) || planner.getTaskStatus().equalsIgnoreCase(Status.Blocked.getKey())) { @@ -162,7 +171,10 @@ public class PlannerService extends QueueConsumer implements InitializingBean { "taskTime", planner.getTaskTime(), "securityId", planner.getSecurityId(), "companyId", planner.getCompanyId())); - values.forEach(plannerAllTodayMap::delete); + values.forEach(plannerAllToday -> { + plannerAllTodayMap.delete(plannerAllToday); + addToPlannerQueue(TaskManager.Process.delete, plannerAllToday); + }); } } } diff --git a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/PlannerTemplateService.java b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/PlannerTemplateService.java index 443f0c540..b5d1fa993 100644 --- a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/PlannerTemplateService.java +++ b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/PlannerTemplateService.java @@ -36,6 +36,7 @@ import java.util.Map; import java.util.function.Function; import static ru.spcex.clearing.scheduler.ISchedulerChecker.isValidWorkday; +import static ru.spcex.clearing.scheduler.config.PlannerQueueConfig.addToPlannerQueue; @Service public class PlannerTemplateService extends QueueConsumer implements InitializingBean { @@ -102,7 +103,11 @@ public class PlannerTemplateService extends QueueConsumer implements Initializin plannerTemplate.setSecurityId(req.getSecurityId()); plannerTemplateMap.insert(plannerTemplate); - if (todayWorkDay()) plannerAllTodayMap.insert(PlannerAllTodayBuilder.builder().append(plannerTemplate).build()); + if (todayWorkDay()) { + PlannerAllToday plannerAllToday = PlannerAllTodayBuilder.builder().append(plannerTemplate).build(); + plannerAllTodayMap.insert(plannerAllToday); + addToPlannerQueue(TaskManager.Process.add, plannerAllToday); + } log.debug("successfully processed, new id {}", plannerTemplate.getId()); return null; } @@ -127,10 +132,16 @@ public class PlannerTemplateService extends QueueConsumer implements Initializin plannerTemplateMap.update(plannerTemplate); if (todayWorkDay()) { - PlannerAllToday planner = PlannerAllTodayBuilder.builder().append(plannerTemplate).build(); - PlannerAllToday plannerAllToday = plannerAllTodayMap.getSingleObjectBySQL(String.format("parentId = %s", plannerTemplate.getId())); - if (plannerAllToday != null) planner.setId(plannerAllToday.getId()); - plannerAllTodayMap.insert(planner); + PlannerAllToday plannerAllToday = PlannerAllTodayBuilder.builder().append(plannerTemplate).build(); + PlannerAllToday oldPlannerAllToday = plannerAllTodayMap.getSingleObjectBySQL(String.format("parentId = %s", plannerTemplate.getId())); + if (oldPlannerAllToday != null) { + plannerAllToday.setId(oldPlannerAllToday.getId()); + plannerAllTodayMap.insert(plannerAllToday); + addToPlannerQueue(TaskManager.Process.update, oldPlannerAllToday); + }else { + plannerAllTodayMap.insert(plannerAllToday); + addToPlannerQueue(TaskManager.Process.add, plannerAllToday); + } } log.debug("successfully processed, new id {}", plannerTemplate.getId()); return null; @@ -149,7 +160,10 @@ public class PlannerTemplateService extends QueueConsumer implements Initializin if (todayWorkDay()) { PlannerAllToday plannerAllToday = plannerAllTodayMap.getSingleObjectBySQL(String.format("parentId = %s", plannerTemplate.getId())); - if (plannerAllToday != null) plannerAllTodayMap.delete(plannerAllToday); + if (plannerAllToday != null){ + plannerAllTodayMap.delete(plannerAllToday); + addToPlannerQueue(TaskManager.Process.delete, plannerAllToday); + } } plannerTemplateMap.delete(plannerTemplate); return null; diff --git a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/TaskManager.java b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/TaskManager.java index bcc7fbc07..f4c543bc2 100644 --- a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/TaskManager.java +++ b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/TaskManager.java @@ -1,14 +1,10 @@ package ru.spcex.clearing.scheduler.service; -import com.hazelcast.core.EntryEvent; -import com.hazelcast.map.listener.EntryAddedListener; -import com.hazelcast.map.listener.EntryRemovedListener; -import com.hazelcast.map.listener.EntryUpdatedListener; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Lazy; +import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.lang.NonNull; import org.springframework.scheduling.TaskScheduler; import org.springframework.stereotype.Service; @@ -18,15 +14,12 @@ import ru.spcex.platform.enumeration.Status; import ru.spcex.platform.enumeration.Task; import ru.spcex.platform.imdg.api.Imdg; import ru.spcex.platform.imdg.api.ImdgProvider; -import ru.spcex.platform.imdg.iml.hazelcast.adapter.ImdgHazelcast; import java.time.*; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Date; -import java.util.Objects; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ScheduledFuture; +import java.util.*; +import java.util.concurrent.*; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.function.Consumer; import java.util.stream.Collectors; import static ru.spcex.clearing.imdg.IMDGDistributedNames.Map_Launcher; @@ -39,25 +32,63 @@ import static ru.spcex.platform.utils.enumeration.IEnumKey.getEnumByKey; *

*/ @Service("userReportTask") -@Lazy -public class TaskManager implements EntryAddedListener, - EntryUpdatedListener, EntryRemovedListener, - InitializingBean { +public class TaskManager implements InitializingBean, AutoCloseable { private static final Logger log = LoggerFactory.getLogger(TaskManager.class); + public static final Long systemId = 0L;//для системных задач по договоренности, должен быть пользователь с правами админа и id=0L + private final TaskScheduler taskScheduler; private final ImdgProvider imdgProvider; private Imdg launcherMap; private Imdg plannerAllTodayMap; - private ConcurrentHashMap scheduledJobs; + private ConcurrentHashMap scheduledJobs; private LauncherSender launcherSender; + private final BlockingQueue> plannerQueue; + private final Map> callbacks = new HashMap<>(); + private final AtomicBoolean closed = new AtomicBoolean(false); + private final ExecutorService outputExecutor; @Autowired TaskManager(TaskScheduler taskScheduler, ImdgProvider imdgProvider, - LauncherSender launcherSender) { + LauncherSender launcherSender, + @Qualifier("plannerQueue") BlockingQueue> plannerQueue) { this.taskScheduler = taskScheduler; this.imdgProvider = imdgProvider; this.launcherSender = launcherSender; + this.plannerQueue = plannerQueue; + this.outputExecutor = Executors.newSingleThreadExecutor(); + } + + public enum Process { + add, update, delete + } + + @Override + public void afterPropertiesSet() { + this.launcherMap = imdgProvider.getImdg(Map_Launcher, Launcher.class); + this.plannerAllTodayMap = imdgProvider.getImdg(Map_PlannerAllToday, PlannerAllToday.class); + callbacks.put(Process.add, this::entryAdded); + callbacks.put(Process.update, this::entryUpdated); + callbacks.put(Process.delete, this::entryRemoved); + scheduledJobs = new ConcurrentHashMap<>(); + //если сервис стартовал раньше imdg, дождемся создания всех PlannerAllToday. + imdgProvider.waitAvailable(); + updateScheduler(); + process(); + } + + private void process() { + outputExecutor.submit(() -> { + try { + while (!closed.get()) { + //процесс ожидает пока появится новое сообщение в очереди + Map.Entry entry = plannerQueue.take(); + callbacks.get(entry.getKey()).accept(entry.getValue()); + } + } catch (InterruptedException e) { +// closed.set(true); + } + }); } private static LocalDateTime dateOldTypeConvert(@NonNull Date oldDate) { @@ -72,85 +103,65 @@ public class TaskManager implements EntryAddedListener, return dateOldTypeConvert(oldDate).toLocalTime(); } - @Override - public void afterPropertiesSet() { - this.launcherMap = imdgProvider.getImdg(Map_Launcher, Launcher.class); - this.plannerAllTodayMap = imdgProvider.getImdg(Map_PlannerAllToday, PlannerAllToday.class); - if (plannerAllTodayMap instanceof ImdgHazelcast plannerAllTodayImdgHazelcast) { - plannerAllTodayImdgHazelcast.getMap().addEntryListener(this, true); - } - scheduledJobs = new ConcurrentHashMap<>(); - updateScheduler(); - } - - // --- Слушатели Hazelcast Map --- - @Override - public void entryAdded(EntryEvent event) { - PlannerAllToday task = event.getValue(); - - Task taskType = getEnumByKey(Task.class, task.getTask()); - if (taskType == null) { - log.warn("Task skipped, {} task type not recognized", task.getTask()); + // --- Обработчики PlannerAllToday --- + public void entryAdded(PlannerAllToday task) { + String taskStatus = task.getTaskStatus(); + if (taskStatus == null) { + log.warn("Task skipped, {} task status not recognized", task.getTask()); return; } - processTask(task); + if (Active.equalsByKey(taskStatus)) { //&& ACTIVE.equalsById(task.getTaskStatusId()) + addOrUpdateActiveTask(task); + } } - @Override - public void entryUpdated(EntryEvent event) { - PlannerAllToday task = event.getValue(); - PlannerAllToday oldTask = event.getOldValue(); - - LocalTime oldTime = oldTask.getTaskTime(); + public void entryUpdated(PlannerAllToday plannerAllToday) { + PlannerAllToday task = plannerAllTodayMap.getSingleObjectByID(plannerAllToday.getId());//event.getValue(); + PlannerAllToday oldTask = plannerAllToday;//event.getOldValue(); //если таск относится к другому обработчику, пропускаем if (!Objects.equals(task.getTask(), oldTask.getTask())) { - throw new IllegalStateException("changed taskId for SchedulerAllToday in core"); + throw new IllegalStateException("changed taskId for PlannerAllToday in core"); } - if (Active.equalsByKey(oldTask.getTaskStatus())) { //&& ACTIVE.equalsById(task.getTaskStatusId()) - if (!removeTask(task.getTask(), oldTime)) { - log.debug("cannot cancel task with type {}, time {}", task.getTask(), oldTime.toString()); - } else { - log.debug("task with type {}, time {} execution cancelled, adding altered task...", task.getTask(), oldTime.toString()); - } - processTask(task); - } else if (Cancel.equalsByKey(oldTask.getTaskStatus())) { //&& TaskStatuses.CANCEL.equalsById(task.getTaskStatusId()) - restorePreviouslyRemovedTask(oldTime, oldTask); - processTask(task); - } else if (Blocked.equalsByKey(oldTask.getTaskStatus())) { - processTask(task); + String taskStatus = task.getTaskStatus(); + if (taskStatus == null) { + log.warn("Task skipped, {} task status not recognized", task.getTask()); + return; + } + if (Active.equalsByKey(taskStatus)) { //&& ACTIVE.equalsById(task.getTaskStatusId()) + addOrUpdateActiveTask(task); + } else if (Cancel.equalsByKey(taskStatus)) { //&& TaskStatuses.CANCEL.equalsById(task.getTaskStatusId()) + if (removeTask(task.getTask(), task.getId())) + log.debug("task was successfully deleted after update to cancel"); + else log.debug("no task for deleted after update to cancel"); + } else if (Blocked.equalsByKey(taskStatus)) { + if (removeTask(task.getTask(), task.getId())) + log.debug("task was successfully deleted after update to blocked"); + else log.debug("no task for deleted after update to blocked"); } } - @Override - public void entryRemoved(EntryEvent event) { - PlannerAllToday taskToRemove = event.getOldValue(); + public void entryRemoved(PlannerAllToday taskToRemove) { if (taskToRemove == null) { log.debug("no task in removed event"); return; } - LocalTime removedTaskTime = taskToRemove.getTaskTime(); - if (Active.equalsByKey(taskToRemove.getTaskStatus())) { - if (removeTask(taskToRemove.getTask(), removedTaskTime)) - log.debug("task successfully canceled"); - } else if (Cancel.equalsByKey(taskToRemove.getTaskStatus())) { - restorePreviouslyRemovedTask(removedTaskTime, taskToRemove); - } else if (Blocked.equalsByKey(taskToRemove.getTaskStatus())) { - log.debug("BLOCKED task removed; do nothing"); - } + if (removeTask(taskToRemove.getTask(), taskToRemove.getId())) + log.debug("task successfully removed"); + else log.debug("no task for removing"); } - private void restorePreviouslyRemovedTask(LocalTime oldTime, PlannerAllToday oldTask) { - ScheduledFuture cancelledFuture = scheduledJobs.get(oldTime); + private void restorePreviouslyRemovedTask(Long oldTaskId, PlannerAllToday oldTask) { + ScheduledFuture cancelledFuture = scheduledJobs.get(oldTaskId); if (cancelledFuture != null && cancelledFuture.isCancelled()) { PlannerAllToday schedulerAllToday = new PlannerAllToday(); schedulerAllToday.setTask(oldTask.getTask()); schedulerAllToday.setTaskStatus(Active.name()); schedulerAllToday.setTaskTime(oldTask.getTaskTime()); log.debug("CANCEL task updated/removed; restoring previously cancelled task"); - processTask(schedulerAllToday); + addOrUpdateActiveTask(schedulerAllToday); } } @@ -161,49 +172,40 @@ public class TaskManager implements EntryAddedListener, schedulerAllTodays.stream().sorted((o1, o2) -> (Active.equalsByKey(o1.getTaskStatus()) && Cancel.equalsByKey(o2.getTaskStatus())) ? -1 : 0) .collect(Collectors.toCollection(ArrayList::new)); for (PlannerAllToday schedulerAllToday : sortedSchedulers) { - processTask(schedulerAllToday); + addOrUpdateActiveTask(schedulerAllToday); } } // --- Работа с задачами --- - private void processTask(PlannerAllToday task) { + private void addOrUpdateActiveTask(PlannerAllToday task) { LocalTime taskTime = task.getTaskTime(); Task taskType = getEnumByKey(Task.class, task.getTask()); + if (taskType == null) { + log.warn("Task skipped, {} task type not recognized", task.getTask()); + return; + } Status taskStatus = getEnumByKey(Status.class, task.getTaskStatus()); - if (taskStatus == null) throw new IllegalStateException("task status from core can't be null"); - if (taskTime.isBefore(LocalTime.now())) { - log.debug("Task skipped - taskTime {} is before now, taskType {} ok", taskTime, task.getTask()); + if (taskStatus == null) { + log.warn("Task skipped, {} task status not recognized", task.getTask()); return; } if (taskStatus.equals(Blocked)) { log.debug("Task skipped - timeTime {} with status {}", taskTime, Blocked); return; } - { - ScheduledFuture future = scheduledJobs.get(taskTime); - if (future != null) { - if (Cancel.equals(taskStatus)) { - //случай когда пришел cancel, пытаемся отменить зарегистрированный ранее таск - future.cancel(false); - log.debug("cancelling task time {}", taskTime); - return; - } else if (Active.equals(taskStatus)) { - //случай когда пришел активный таск, и уже был на это время неотмененный - if (!future.isCancelled()) { - log.debug("such task time {} has already been registered", taskTime); - return; - } - } - } - } if (Cancel.equals(taskStatus)) { log.debug("task type {} time {} with status CANCEL - no tasks to cancel found", Objects.requireNonNull(taskType).name(), taskTime); return; } + //чтобы не получилось, что старый таск не успели отменить а новый уже создали. + if (taskTime.isBefore(LocalTime.now().plusSeconds(1))) { + log.debug("Task skipped - taskTime {} is before now, taskType {} ok", taskTime, task.getTask()); + return; + } //пришел активный таск log.debug("adding task type {}, time {}", Objects.requireNonNull(taskType).name(), taskTime); ScheduledFuture future = taskScheduler.schedule(() -> doJob(task), LocalDateTime.of(LocalDate.now(), taskTime).atZone(ZoneId.systemDefault()).toInstant()); - ScheduledFuture oldFuture = scheduledJobs.put(taskTime, future); + ScheduledFuture oldFuture = scheduledJobs.put(task.getId(), future); if (oldFuture != null && !oldFuture.isCancelled()) { //for synchronization, never log.warn("tasks were added simultaneously, cancel former one"); boolean success = oldFuture.cancel(false); @@ -211,10 +213,10 @@ public class TaskManager implements EntryAddedListener, } } - private boolean removeTask(String task, LocalTime taskTime) { - ScheduledFuture future = scheduledJobs.remove(taskTime); + private boolean removeTask(String task, Long taskId) { + ScheduledFuture future = scheduledJobs.remove(taskId); if (future == null) { - log.debug("can't cancel task type {}, time {}, not found", task, taskTime); + log.debug("can't cancel task type {}, time {}, not found", task, taskId); return false; } return future.cancel(false); @@ -230,13 +232,19 @@ public class TaskManager implements EntryAddedListener, Instant created = Instant.now(); Launcher launcher = new Launcher(); launcher.setTask(task.getTask()); - launcher.setSenderId(task.getParentId()); + launcher.setSenderId(systemId); launcher.setCreated(created); launcher.setUpdated(created); launcherMap.insert(launcher); // 2. отправить сообщение - launcherSender.sendCommandToQueue(taskE, task.getParentId()); + launcherSender.sendCommandToQueue(taskE, systemId); log.debug("successfully processed, new id {}", launcher.getId()); } } + + @Override + public void close() { + log.debug("Closing task manager {}", getClass().getSimpleName()); + closed.set(true); + } } diff --git a/clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/service/TaskManagerTest.java b/clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/service/TaskManagerTest.java new file mode 100644 index 000000000..18cbebc9a --- /dev/null +++ b/clearing-parent/scheduler-service/src/test/java/ru/spcex/clearing/scheduler/service/TaskManagerTest.java @@ -0,0 +1,107 @@ +package ru.spcex.clearing.scheduler.service; + +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import ru.clearing.classes.statics.data.scheduler.PlannerAllToday; +import ru.spcex.clearing.platform.messaging.domain.BaseRequest; +import ru.spcex.clearing.scheduler.AbstractServiceTest; +import ru.spcex.platform.enumeration.Status; +import ru.spcex.platform.enumeration.Task; + +import javax.annotation.PostConstruct; +import java.time.LocalTime; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.mockito.Mockito.timeout; +import static org.mockito.Mockito.verify; +import static ru.spcex.clearing.scheduler.config.PlannerQueueConfig.addToPlannerQueue; +import static ru.spcex.clearing.scheduler.service.TaskManager.systemId; +import static ru.spcex.clearing.test.TestUtils.BASE_REQUEST_MATCHER; +import static ru.spcex.clearing.test.config.ImdgTestConfig.currentID; +import static ru.spcex.platform.utils.enumeration.IEnumKey.getEnumByKey; + +class TaskManagerTest extends AbstractServiceTest { + + @Autowired + LauncherSender launcherSender; + + @PostConstruct + public void init() { + super.init(); + } + + /** + * {@link TaskManager#entryAdded(PlannerAllToday)}}
+ * Тест проверяет создание и отправку LauncherCommandRequest в Apache Kafka.
+ * Входной запрос {@link PlannerAllToday}:
+ */ + @Test + void entryAdded() { + //ARRANGE + PlannerAllToday plannerAllToday = getPlannerAllToday(Task.createOrder.getKey()); + //ACT + addToPlannerQueue(TaskManager.Process.add, plannerAllToday); + //ASSERT + waitingWhenAddedLauncherCommandRequestAndCheckIt(getEnumByKey(Task.class, plannerAllToday.getTask()), systemId); + } + + /** + * {@link TaskManager#entryUpdated(PlannerAllToday)}}
+ * Тест проверяет создание и отправку LauncherCommandRequest в Apache Kafka.
+ * Входной запрос {@link PlannerAllToday}:
+ */ + @Test + void entryUpdated() { + //ARRANGE + PlannerAllToday plannerAllToday = getPlannerAllToday(Task.createReport_GREP.getKey()); + PlannerAllToday oldPlanner = getPlannerAllToday(Task.createReport_GREP.getKey()); + plannerAllToday.setId(oldPlanner.getId()); + plannerAllTodayImdg.insert(plannerAllToday); + addToPlannerQueue(TaskManager.Process.add, oldPlanner); + //ACT + addToPlannerQueue(TaskManager.Process.update, oldPlanner); + //ASSERT + waitingWhenAddedLauncherCommandRequestAndCheckIt(getEnumByKey(Task.class, plannerAllToday.getTask()), systemId); + } + + + /** + * {@link TaskManager#entryRemoved(PlannerAllToday)}}
+ * Тест проверяет создание и отправку LauncherCommandRequest в Apache Kafka.
+ * Входной запрос {@link PlannerAllToday}:
+ */ + @Test + void entryRemoved() { + //ARRANGE + PlannerAllToday plannerAllToday = getPlannerAllToday(Task.createOrder.getKey()); + PlannerAllToday oldPlanner = getPlannerAllToday(Task.createReport_GREP.getKey()); + addToPlannerQueue(TaskManager.Process.add, oldPlanner); + addToPlannerQueue(TaskManager.Process.delete, oldPlanner); + //ACT + addToPlannerQueue(TaskManager.Process.add, plannerAllToday); + //ASSERT + waitingWhenAddedLauncherCommandRequestAndCheckIt(getEnumByKey(Task.class, plannerAllToday.getTask()), systemId); + } + + protected PlannerAllToday getPlannerAllToday(String task) { + PlannerAllToday plannerAllToday = new PlannerAllToday(); + plannerAllToday.setId(currentID.getAndIncrement()); + plannerAllToday.setTask(task); + plannerAllToday.setTaskTime(LocalTime.now().plusSeconds(18)); + plannerAllToday.setTaskStatus(Status.Active.getKey()); + return plannerAllToday; + } + + public void waitingWhenAddedLauncherCommandRequestAndCheckIt(Task toTaskQueue, Long userId) { + BaseRequest predictableBaseRequest = launcherSender.makeCmdRequest(toTaskQueue, userId); + + //waiting for kafka producer send message (finale event) + verify(mockProducer, timeout(60_000L).times(1)) + .send(producerRecord.capture()); + + BaseRequest baseRequestResult = (BaseRequest) producerRecord.getValue().value(); + assertEquals(toTaskQueue.topic(), producerRecord.getValue().topic()); + predictableBaseRequest.setId(baseRequestResult.getId()); + BASE_REQUEST_MATCHER.assertMatch(baseRequestResult, predictableBaseRequest); + } +} \ No newline at end of file From 510dfde8482b3b72402a92b25dc359fbf1465445 Mon Sep 17 00:00:00 2001 From: psemenkov Date: Mon, 24 Apr 2023 18:07:45 +0300 Subject: [PATCH 20/27] # Conflicts: # clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/account/AccountNewAction.java # clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/businessevent/ExecutionDepositHistoryMapStore.java # clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/businessevent/SessionHistoryMapStore.java # clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/dictionary/SessionStatusDictionaryMapStore.java # clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/dictionary/SessionTypeDictionaryMapStore.java --- .../controller/request/cud/account/AccountNewAction.java | 1 + .../imdg/businessevent/ExecutionDepositHistoryMapStore.java | 2 +- .../clearing/imdg/businessevent/SessionHistoryMapStore.java | 2 +- .../imdg/dictionary/SessionStatusDictionaryMapStore.java | 2 +- .../clearing/imdg/dictionary/SessionTypeDictionaryMapStore.java | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/account/AccountNewAction.java b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/account/AccountNewAction.java index b82832d29..7c428a8c9 100644 --- a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/account/AccountNewAction.java +++ b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/account/AccountNewAction.java @@ -8,6 +8,7 @@ import ru.spcex.clearing.backendapi.errors.BackEndError; import ru.spcex.clearing.platform.messaging.domain.ActionType; import ru.spcex.clearing.platform.messaging.domain.cud.account.AccountNewRequest; import ru.spcex.platform.utils.enumeration.EnumMessage; +import ru.spcex.platform.utils.text.TextUtil; import java.util.ArrayList; import java.util.Collection; diff --git a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/businessevent/ExecutionDepositHistoryMapStore.java b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/businessevent/ExecutionDepositHistoryMapStore.java index 50a30d3eb..8ef0d462f 100644 --- a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/businessevent/ExecutionDepositHistoryMapStore.java +++ b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/businessevent/ExecutionDepositHistoryMapStore.java @@ -2,9 +2,9 @@ package ru.spcex.clearing.imdg.businessevent; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.stereotype.Component; +import ru.spcex.clearing.imdg.IMDGDistributedNames; import ru.clearing.classes.statics.data.execution.ExecutionDeposit; import ru.clearing.classes.statics.data.execution.ExecutionDepositHistory; -import ru.spcex.clearing.imdg.IMDGDistributedNames; import ru.spcex.clearing.imdg.base.TemplateEventMapStore; import ru.spcex.platform.utils.time.TimeUtil; diff --git a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/businessevent/SessionHistoryMapStore.java b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/businessevent/SessionHistoryMapStore.java index 03deb8de5..bd20bc481 100644 --- a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/businessevent/SessionHistoryMapStore.java +++ b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/businessevent/SessionHistoryMapStore.java @@ -2,9 +2,9 @@ package ru.spcex.clearing.imdg.businessevent; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.stereotype.Component; +import ru.spcex.clearing.imdg.IMDGDistributedNames; import ru.clearing.classes.statics.data.misc.Session; import ru.clearing.classes.statics.data.misc.SessionHistory; -import ru.spcex.clearing.imdg.IMDGDistributedNames; import ru.spcex.clearing.imdg.base.TemplateEventMapStore; import ru.spcex.platform.utils.time.TimeUtil; diff --git a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/dictionary/SessionStatusDictionaryMapStore.java b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/dictionary/SessionStatusDictionaryMapStore.java index df9ec7588..340fab1a6 100644 --- a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/dictionary/SessionStatusDictionaryMapStore.java +++ b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/dictionary/SessionStatusDictionaryMapStore.java @@ -3,8 +3,8 @@ package ru.spcex.clearing.imdg.dictionary; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.stereotype.Component; import ru.clearing.platform.dictionary.SessionStatusDictionary; -import ru.spcex.clearing.imdg.IMDGDistributedNames; import ru.spcex.clearing.imdg.base.DictionaryTMapStore; +import ru.spcex.clearing.imdg.IMDGDistributedNames; @Component public class SessionStatusDictionaryMapStore extends DictionaryTMapStore { diff --git a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/dictionary/SessionTypeDictionaryMapStore.java b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/dictionary/SessionTypeDictionaryMapStore.java index d4c88c97c..8e1c81afd 100644 --- a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/dictionary/SessionTypeDictionaryMapStore.java +++ b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/dictionary/SessionTypeDictionaryMapStore.java @@ -3,8 +3,8 @@ package ru.spcex.clearing.imdg.dictionary; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.stereotype.Component; import ru.clearing.platform.dictionary.SessionTypeDictionary; -import ru.spcex.clearing.imdg.IMDGDistributedNames; import ru.spcex.clearing.imdg.base.DictionaryTMapStore; +import ru.spcex.clearing.imdg.IMDGDistributedNames; @Component public class SessionTypeDictionaryMapStore extends DictionaryTMapStore { From 7543e4b08f09870c4a498bbb24336fb6cee1eed2 Mon Sep 17 00:00:00 2001 From: psemenkov Date: Tue, 25 Apr 2023 11:49:26 +0300 Subject: [PATCH 21/27] =?UTF-8?q?http://jira.mfd.msk:8088/browse/CLS-268?= =?UTF-8?q?=20=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=20=D0=BE?= =?UTF-8?q?=D0=B1=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=BA=D1=83=20InterruptedE?= =?UTF-8?q?xception.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scheduler/config/PlannerQueueConfig.java | 8 +++++++- .../clearing/scheduler/service/TaskManager.java | 13 +++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/PlannerQueueConfig.java b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/PlannerQueueConfig.java index 0534b2053..30b904f93 100644 --- a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/PlannerQueueConfig.java +++ b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/PlannerQueueConfig.java @@ -1,9 +1,12 @@ package ru.spcex.clearing.scheduler.config; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import ru.clearing.classes.statics.data.scheduler.PlannerAllToday; import ru.spcex.clearing.scheduler.service.TaskManager; +import ru.spcex.platform.utils.log.ExceptionUtils; import java.util.Map; import java.util.concurrent.BlockingQueue; @@ -11,6 +14,7 @@ import java.util.concurrent.LinkedBlockingQueue; @Configuration public class PlannerQueueConfig { + private static final Logger log = LoggerFactory.getLogger(TaskManager.class); private static BlockingQueue> plannerQueue; @@ -23,7 +27,9 @@ public class PlannerQueueConfig { public static void addToPlannerQueue(TaskManager.Process process, PlannerAllToday plannerAllToday) { try { plannerQueue.put(Map.entry(process, plannerAllToday)); - } catch (InterruptedException ignored) { + } catch (InterruptedException e) { + log.warn("InterruptedException plannerQueue.put {}", ExceptionUtils.getStackTrace(e)); + Thread.currentThread().interrupt(); } } } diff --git a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/TaskManager.java b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/TaskManager.java index f4c543bc2..fc4e3f3ce 100644 --- a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/TaskManager.java +++ b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/TaskManager.java @@ -14,6 +14,7 @@ import ru.spcex.platform.enumeration.Status; import ru.spcex.platform.enumeration.Task; import ru.spcex.platform.imdg.api.Imdg; import ru.spcex.platform.imdg.api.ImdgProvider; +import ru.spcex.platform.utils.log.ExceptionUtils; import java.time.*; import java.util.*; @@ -79,14 +80,17 @@ public class TaskManager implements InitializingBean, AutoCloseable { private void process() { outputExecutor.submit(() -> { - try { - while (!closed.get()) { + while (!closed.get()) { + try { //процесс ожидает пока появится новое сообщение в очереди Map.Entry entry = plannerQueue.take(); callbacks.get(entry.getKey()).accept(entry.getValue()); + } catch (InterruptedException e) { + closed.set(true); + Thread.currentThread().interrupt(); + } catch (Throwable t) { + log.error("InterruptedException in process, {}", ExceptionUtils.getStackTrace(t)); } - } catch (InterruptedException e) { -// closed.set(true); } }); } @@ -246,5 +250,6 @@ public class TaskManager implements InitializingBean, AutoCloseable { public void close() { log.debug("Closing task manager {}", getClass().getSimpleName()); closed.set(true); + outputExecutor.shutdown(); } } From ccddd98cd6b0ca8e3c3f8b5f745aed36def38ce3 Mon Sep 17 00:00:00 2001 From: psemenkov Date: Tue, 25 Apr 2023 13:59:10 +0300 Subject: [PATCH 22/27] =?UTF-8?q?http://jira.mfd.msk:8088/browse/CLS-268?= =?UTF-8?q?=20=D0=A1=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB=20=D0=BE=D0=BF=D1=82?= =?UTF-8?q?=D0=B8=D0=BC=D0=B8=D0=B7=D0=B0=D1=86=D0=B8=D1=8E=20=D0=BA=D0=BE?= =?UTF-8?q?=D0=B4=D0=B0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../imdg/services/PlannerAllTodayMaker.java | 2 +- clearing-parent/scheduler-service/pom.xml | 4 ++++ .../scheduler/config/PlannerQueueConfig.java | 6 +++--- .../ClearingCalendarValidationConfig.java | 4 ++-- .../validation/PlannerTemplateValidationConfig.java | 8 ++++---- .../config/validation/PlannerValidationConfig.java | 8 ++++---- .../scheduler/service/ClearingCalendarService.java | 6 +++--- .../clearing/scheduler/service/TaskManager.java | 13 ------------- 8 files changed, 21 insertions(+), 30 deletions(-) diff --git a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/services/PlannerAllTodayMaker.java b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/services/PlannerAllTodayMaker.java index 4b74e1c97..dde451334 100644 --- a/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/services/PlannerAllTodayMaker.java +++ b/clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/services/PlannerAllTodayMaker.java @@ -62,7 +62,7 @@ public class PlannerAllTodayMaker { List res = new ArrayList<>(); if (needAddFromPlannerTemplate(currentDate, clearingCalendarMap.values())){ - plannerTemplateMap.values().stream().filter(plannerTemplate -> Status.Active.getKey().equals(plannerTemplate.getTaskStatus())) + plannerTemplateMap.values().stream().filter(plannerTemplate -> Status.Active.equalsByKey(plannerTemplate.getTaskStatus())) .forEach(plannerTemplate -> res.add(PlannerAllTodayBuilder.builder().append(plannerTemplate).build())); } return res; diff --git a/clearing-parent/scheduler-service/pom.xml b/clearing-parent/scheduler-service/pom.xml index d607fa83e..c8cfbbc0c 100644 --- a/clearing-parent/scheduler-service/pom.xml +++ b/clearing-parent/scheduler-service/pom.xml @@ -40,6 +40,10 @@ ru.spcex.clearing clearing-validation + + org.springframework.boot + spring-boot-starter-validation + ru.spcex.clearing security-util diff --git a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/PlannerQueueConfig.java b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/PlannerQueueConfig.java index 30b904f93..f7b76882c 100644 --- a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/PlannerQueueConfig.java +++ b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/PlannerQueueConfig.java @@ -8,6 +8,7 @@ import ru.clearing.classes.statics.data.scheduler.PlannerAllToday; import ru.spcex.clearing.scheduler.service.TaskManager; import ru.spcex.platform.utils.log.ExceptionUtils; +import javax.validation.constraints.NotNull; import java.util.Map; import java.util.concurrent.BlockingQueue; import java.util.concurrent.LinkedBlockingQueue; @@ -16,15 +17,14 @@ import java.util.concurrent.LinkedBlockingQueue; public class PlannerQueueConfig { private static final Logger log = LoggerFactory.getLogger(TaskManager.class); - private static BlockingQueue> plannerQueue; + private final static BlockingQueue> plannerQueue = new LinkedBlockingQueue<>(); @Bean(name = "plannerQueue") public BlockingQueue> plannerQueue() { - plannerQueue = new LinkedBlockingQueue<>(); return plannerQueue; } - public static void addToPlannerQueue(TaskManager.Process process, PlannerAllToday plannerAllToday) { + public static void addToPlannerQueue(@NotNull TaskManager.Process process, @NotNull PlannerAllToday plannerAllToday) { try { plannerQueue.put(Map.entry(process, plannerAllToday)); } catch (InterruptedException e) { diff --git a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/validation/ClearingCalendarValidationConfig.java b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/validation/ClearingCalendarValidationConfig.java index 20728668d..3d7327714 100644 --- a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/validation/ClearingCalendarValidationConfig.java +++ b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/validation/ClearingCalendarValidationConfig.java @@ -43,7 +43,7 @@ public class ClearingCalendarValidationConfig { IMDGDistributedNames.Map_Company, Company.class, ValidationError.CompanyNotFound, - company -> WorkflowStatus.Active.getKey().equals(company.getWorkflowStatus()) ? null : ValidationError.CompanyNotActive), + company -> WorkflowStatus.Active.equalsByKey(company.getWorkflowStatus()) ? null : ValidationError.CompanyNotActive), DictionaryPresentRule.instance("dayStatus", ClearingCalendarNewRequest::getDayStatus, IMDGDistributedNames.Map_DayStatusDictionary, @@ -74,7 +74,7 @@ public class ClearingCalendarValidationConfig { IMDGDistributedNames.Map_Company, Company.class, ValidationError.CompanyNotFound, - company -> WorkflowStatus.Active.getKey().equals(company.getWorkflowStatus()) ? null : ValidationError.CompanyNotActive), + company -> WorkflowStatus.Active.equalsByKey(company.getWorkflowStatus()) ? null : ValidationError.CompanyNotActive), DictionaryPresentRule.instance("dayStatus", ClearingCalendarUpdateRequest::getDayStatus, IMDGDistributedNames.Map_DayStatusDictionary, diff --git a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/validation/PlannerTemplateValidationConfig.java b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/validation/PlannerTemplateValidationConfig.java index b63fe45b4..e0390eab6 100644 --- a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/validation/PlannerTemplateValidationConfig.java +++ b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/validation/PlannerTemplateValidationConfig.java @@ -55,13 +55,13 @@ public class PlannerTemplateValidationConfig { IMDGDistributedNames.Map_Company, Company.class, ValidationError.CompanyNotFound, - company -> WorkflowStatus.Active.getKey().equals(company.getWorkflowStatus()) ? null : ValidationError.CompanyNotActive), + company -> WorkflowStatus.Active.equalsByKey(company.getWorkflowStatus()) ? null : ValidationError.CompanyNotActive), IdPresentRule.instance("securityId", PlannerTemplateNewRequest::getSecurityId, IMDGDistributedNames.Map_Security, Security.class, ValidationError.SecurityNotFound, - security -> WorkflowStatus.Active.getKey().equals(security.getWorkflowStatus()) ? null : ValidationError.SecurityNotActive) + security -> WorkflowStatus.Active.equalsByKey(security.getWorkflowStatus()) ? null : ValidationError.SecurityNotActive) ); }; } @@ -102,14 +102,14 @@ public class PlannerTemplateValidationConfig { Company.class, ValidationError.CompanyNotFound, false, - company -> WorkflowStatus.Active.getKey().equals(company.getWorkflowStatus()) ? null : ValidationError.CompanyNotActive), + company -> WorkflowStatus.Active.equalsByKey(company.getWorkflowStatus()) ? null : ValidationError.CompanyNotActive), IdPresentRule.instance("securityId", PlannerTemplateUpdateRequest::getSecurityId, IMDGDistributedNames.Map_Security, Security.class, ValidationError.SecurityNotFound, false, - security -> WorkflowStatus.Active.getKey().equals(security.getWorkflowStatus()) ? null : ValidationError.SecurityNotActive) + security -> WorkflowStatus.Active.equalsByKey(security.getWorkflowStatus()) ? null : ValidationError.SecurityNotActive) ); }; } diff --git a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/validation/PlannerValidationConfig.java b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/validation/PlannerValidationConfig.java index 05e77caf6..c60e0d628 100644 --- a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/validation/PlannerValidationConfig.java +++ b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/validation/PlannerValidationConfig.java @@ -62,13 +62,13 @@ public class PlannerValidationConfig { IMDGDistributedNames.Map_Company, Company.class, ValidationError.CompanyNotFound, - company -> WorkflowStatus.Active.getKey().equals(company.getWorkflowStatus()) ? null : ValidationError.CompanyNotActive), + company -> WorkflowStatus.Active.equalsByKey(company.getWorkflowStatus()) ? null : ValidationError.CompanyNotActive), IdPresentRule.instance("securityId", PlannerNewRequest::getSecurityId, IMDGDistributedNames.Map_Security, Security.class, ValidationError.SecurityNotFound, - security -> WorkflowStatus.Active.getKey().equals(security.getWorkflowStatus()) ? null : ValidationError.SecurityNotActive) + security -> WorkflowStatus.Active.equalsByKey(security.getWorkflowStatus()) ? null : ValidationError.SecurityNotActive) ); }; } @@ -117,14 +117,14 @@ public class PlannerValidationConfig { Company.class, ValidationError.CompanyNotFound, false, - company -> WorkflowStatus.Active.getKey().equals(company.getWorkflowStatus()) ? null : ValidationError.CompanyNotActive), + company -> WorkflowStatus.Active.equalsByKey(company.getWorkflowStatus()) ? null : ValidationError.CompanyNotActive), IdPresentRule.instance("securityId", PlannerUpdateRequest::getSecurityId, IMDGDistributedNames.Map_Security, Security.class, ValidationError.SecurityNotFound, false, - security -> WorkflowStatus.Active.getKey().equals(security.getWorkflowStatus()) ? null : ValidationError.SecurityNotActive) + security -> WorkflowStatus.Active.equalsByKey(security.getWorkflowStatus()) ? null : ValidationError.SecurityNotActive) ); }; } diff --git a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/ClearingCalendarService.java b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/ClearingCalendarService.java index d53bec1bb..0a8f91cce 100644 --- a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/ClearingCalendarService.java +++ b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/ClearingCalendarService.java @@ -103,7 +103,7 @@ public class ClearingCalendarService extends QueueConsumer implements Initializi clearingCalendarMap.insert(clearingCalendar); log.debug("successfully processed, new id {}", clearingCalendar.getId()); //если clearingCalendar.getClearingDate() сегодняшний день необходимо проверить/добавить plannerTemplate - updateFromPlannerAllTodayMap(clearingCalendar); + createPlannerAllTodayFromPlannerTemplateIfIsValidWorkday(clearingCalendar); return null; } @@ -125,7 +125,7 @@ public class ClearingCalendarService extends QueueConsumer implements Initializi clearingCalendarMap.update(clearingCalendar); log.debug("successfully processed, new id {}", clearingCalendar.getId()); //если clearingCalendar.getClearingDate() сегодняшний день необходимо проверить/добавить plannerTemplate - updateFromPlannerAllTodayMap(clearingCalendar); + createPlannerAllTodayFromPlannerTemplateIfIsValidWorkday(clearingCalendar); return null; } @@ -145,7 +145,7 @@ public class ClearingCalendarService extends QueueConsumer implements Initializi return null; } - private void updateFromPlannerAllTodayMap(ClearingCalendar clearingCalendar) { + private void createPlannerAllTodayFromPlannerTemplateIfIsValidWorkday(ClearingCalendar clearingCalendar) { LocalDate currentDate = LocalDate.now(); if (clearingCalendar.getClearingDate() == null || !clearingCalendar.getClearingDate().equals(currentDate)) return; diff --git a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/TaskManager.java b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/TaskManager.java index fc4e3f3ce..9aed3335e 100644 --- a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/TaskManager.java +++ b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/service/TaskManager.java @@ -5,7 +5,6 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.lang.NonNull; import org.springframework.scheduling.TaskScheduler; import org.springframework.stereotype.Service; import ru.clearing.classes.statics.data.scheduler.Launcher; @@ -95,18 +94,6 @@ public class TaskManager implements InitializingBean, AutoCloseable { }); } - private static LocalDateTime dateOldTypeConvert(@NonNull Date oldDate) { - return LocalDateTime.ofInstant(oldDate.toInstant(), ZoneId.systemDefault()); - } - - private static LocalDate dateTypeConvert(@NonNull Date oldDate) { - return dateOldTypeConvert(oldDate).toLocalDate(); - } - - private static LocalTime timeTypeConvert(@NonNull Date oldDate) { - return dateOldTypeConvert(oldDate).toLocalTime(); - } - // --- Обработчики PlannerAllToday --- public void entryAdded(PlannerAllToday task) { String taskStatus = task.getTaskStatus(); From ccb8afc6796f7a67472186b206cdb44010d55056 Mon Sep 17 00:00:00 2001 From: psemenkov Date: Tue, 25 Apr 2023 16:06:10 +0300 Subject: [PATCH 23/27] =?UTF-8?q?http://jira.mfd.msk:8088/browse/CLS-267?= =?UTF-8?q?=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20=D0=BD=D0=BE?= =?UTF-8?q?=D0=B2=D1=8B=D0=B5=20=D1=82=D0=B0=D1=81=D0=BA=D0=B8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/ru/spcex/platform/enumeration/Task.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/platform-parent/platform-enum/src/main/java/ru/spcex/platform/enumeration/Task.java b/platform-parent/platform-enum/src/main/java/ru/spcex/platform/enumeration/Task.java index d91325176..317ab6e8c 100644 --- a/platform-parent/platform-enum/src/main/java/ru/spcex/platform/enumeration/Task.java +++ b/platform-parent/platform-enum/src/main/java/ru/spcex/platform/enumeration/Task.java @@ -16,6 +16,18 @@ public enum Task implements IEnumKey { createOrderConfirm("CORC"), getAllBalance("GALB"), createReport_GREP("GREP"), // Создание отчёта (report-service) RPRT нескольких видов, этот GREP + unloadingSession_LIMM("LIMM"),//Выгрузка в торговую систему остатков секции МКР + unloadingSession_LIMF("LIMF"),//Выгрузка в торговую систему остатков Фондовой секции + liquidationSession_LIQU("LIQU"),//Ликвидационная сессия по обязательтсвам участника + startSession_STRM("STRM"),//Начало торговой сессии секции МКР + terminationSession_ETRM("ETRM"),//Завершение торговой сессии секции МКР + startSession_SIPO("SIPO"),//Начало торговой сессии по первичным торгам + terminationSession_EIPO("EIPO"),//Завершение торговой сессии по первичным торгам + startSession_STRF("STRF"),//Начало торговой сессии по вторичным торгам + terminationSession_ETRF("ETRF"),//Завершение торговой сессии по вторичным торгам + createRegistry_RCHK("RCHK"),//Запрос на сверку активов + createRegistry_GRYT("GRYT"),//Сформировать регистр на текущий день + createRegistry_GRRT("GRRT"),//Сформировать реестр на текущий день createRegistry_GORD("GORD"), // Формирование реестра распоряжений, направленных расчетному депозитарию ; From 95fdcd2d92b080ac3a72985d59ae05a108ca3709 Mon Sep 17 00:00:00 2001 From: psemenkov Date: Wed, 26 Apr 2023 10:52:21 +0300 Subject: [PATCH 24/27] =?UTF-8?q?http://jira.mfd.msk:8088/browse/CLS-267?= =?UTF-8?q?=20=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=20=D0=BD?= =?UTF-8?q?=D0=B0=D0=B7=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20RCHK.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/ru/spcex/platform/enumeration/Task.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform-parent/platform-enum/src/main/java/ru/spcex/platform/enumeration/Task.java b/platform-parent/platform-enum/src/main/java/ru/spcex/platform/enumeration/Task.java index 317ab6e8c..678b0acf5 100644 --- a/platform-parent/platform-enum/src/main/java/ru/spcex/platform/enumeration/Task.java +++ b/platform-parent/platform-enum/src/main/java/ru/spcex/platform/enumeration/Task.java @@ -25,7 +25,7 @@ public enum Task implements IEnumKey { terminationSession_EIPO("EIPO"),//Завершение торговой сессии по первичным торгам startSession_STRF("STRF"),//Начало торговой сессии по вторичным торгам terminationSession_ETRF("ETRF"),//Завершение торговой сессии по вторичным торгам - createRegistry_RCHK("RCHK"),//Запрос на сверку активов + reconciliationRequest_RCHK("RCHK"),//Запрос на сверку активов createRegistry_GRYT("GRYT"),//Сформировать регистр на текущий день createRegistry_GRRT("GRRT"),//Сформировать реестр на текущий день createRegistry_GORD("GORD"), // Формирование реестра распоряжений, направленных расчетному депозитарию From fe3cc5f6f53e3a02a9fdb2cbf35fbf499ae21011 Mon Sep 17 00:00:00 2001 From: psemenkov Date: Wed, 26 Apr 2023 11:03:07 +0300 Subject: [PATCH 25/27] =?UTF-8?q?http://jira.mfd.msk:8088/browse/CLS-268?= =?UTF-8?q?=20=D0=A1=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB=20=D0=BF=D1=80=D0=BE?= =?UTF-8?q?=D0=B2=D0=B5=D1=80=D0=BA=D1=83=20=D0=BD=D0=B0=20Null.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ru/spcex/clearing/scheduler/config/PlannerQueueConfig.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/PlannerQueueConfig.java b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/PlannerQueueConfig.java index f7b76882c..30ba350ee 100644 --- a/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/PlannerQueueConfig.java +++ b/clearing-parent/scheduler-service/src/main/java/ru/spcex/clearing/scheduler/config/PlannerQueueConfig.java @@ -10,6 +10,7 @@ import ru.spcex.platform.utils.log.ExceptionUtils; import javax.validation.constraints.NotNull; import java.util.Map; +import java.util.Objects; import java.util.concurrent.BlockingQueue; import java.util.concurrent.LinkedBlockingQueue; @@ -26,6 +27,8 @@ public class PlannerQueueConfig { public static void addToPlannerQueue(@NotNull TaskManager.Process process, @NotNull PlannerAllToday plannerAllToday) { try { + Objects.requireNonNull(process); + Objects.requireNonNull(plannerAllToday); plannerQueue.put(Map.entry(process, plannerAllToday)); } catch (InterruptedException e) { log.warn("InterruptedException plannerQueue.put {}", ExceptionUtils.getStackTrace(e)); From 6a1f2f7c20776444b8695016544a4a6d1036ed25 Mon Sep 17 00:00:00 2001 From: psemenkov Date: Wed, 26 Apr 2023 14:03:47 +0300 Subject: [PATCH 26/27] =?UTF-8?q?http://jira.mfd.msk:8088/browse/CLS-268?= =?UTF-8?q?=20=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=20=D1=82?= =?UTF-8?q?=D0=B5=D1=81=D1=82=D1=8B.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/test/java/ru/spcex/clearing/imdg/AllMapStoreTest.java | 2 ++ .../spcex/clearing/imdg/services/PlannerAllTodayMakerTest.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/clearing-parent/imdg/src/test/java/ru/spcex/clearing/imdg/AllMapStoreTest.java b/clearing-parent/imdg/src/test/java/ru/spcex/clearing/imdg/AllMapStoreTest.java index f3a5970d0..1bbe3a1cb 100644 --- a/clearing-parent/imdg/src/test/java/ru/spcex/clearing/imdg/AllMapStoreTest.java +++ b/clearing-parent/imdg/src/test/java/ru/spcex/clearing/imdg/AllMapStoreTest.java @@ -1,6 +1,7 @@ package ru.spcex.clearing.imdg; import com.hazelcast.config.MapStoreConfig; +import com.hazelcast.core.Hazelcast; import com.hazelcast.core.HazelcastInstance; import com.hazelcast.core.IMap; import org.apache.commons.lang3.exception.ExceptionUtils; @@ -68,6 +69,7 @@ public class AllMapStoreTest { Path path = Paths.get("src", "main", "resources"); String currentPath = path.toAbsolutePath().toString(); System.setProperty("spring.config.location", currentPath); + Hazelcast.shutdownAll(); } @PostConstruct diff --git a/clearing-parent/imdg/src/test/java/ru/spcex/clearing/imdg/services/PlannerAllTodayMakerTest.java b/clearing-parent/imdg/src/test/java/ru/spcex/clearing/imdg/services/PlannerAllTodayMakerTest.java index 99a0d9cab..84466d114 100644 --- a/clearing-parent/imdg/src/test/java/ru/spcex/clearing/imdg/services/PlannerAllTodayMakerTest.java +++ b/clearing-parent/imdg/src/test/java/ru/spcex/clearing/imdg/services/PlannerAllTodayMakerTest.java @@ -1,5 +1,6 @@ package ru.spcex.clearing.imdg.services; +import com.hazelcast.core.Hazelcast; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -38,6 +39,7 @@ class PlannerAllTodayMakerTest { Path path = Paths.get("src", "main", "resources"); String currentPath = path.toAbsolutePath().toString(); System.setProperty("spring.config.location", currentPath); + Hazelcast.shutdownAll(); } @Test From aa265afd860c722bca3ac443b24e6031436f9bc3 Mon Sep 17 00:00:00 2001 From: psemenkov Date: Wed, 26 Apr 2023 14:17:48 +0300 Subject: [PATCH 27/27] =?UTF-8?q?http://jira.mfd.msk:8088/browse/CLS-268?= =?UTF-8?q?=20=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=20=D1=82?= =?UTF-8?q?=D0=B5=D1=81=D1=82=D1=8B.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/ru/spcex/clearing/imdg/AllMapStoreTest.java | 10 ++++++---- .../imdg/services/PlannerAllTodayMakerTest.java | 6 ++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/clearing-parent/imdg/src/test/java/ru/spcex/clearing/imdg/AllMapStoreTest.java b/clearing-parent/imdg/src/test/java/ru/spcex/clearing/imdg/AllMapStoreTest.java index 1bbe3a1cb..e6c26ef2f 100644 --- a/clearing-parent/imdg/src/test/java/ru/spcex/clearing/imdg/AllMapStoreTest.java +++ b/clearing-parent/imdg/src/test/java/ru/spcex/clearing/imdg/AllMapStoreTest.java @@ -5,10 +5,7 @@ import com.hazelcast.core.Hazelcast; import com.hazelcast.core.HazelcastInstance; import com.hazelcast.core.IMap; import org.apache.commons.lang3.exception.ExceptionUtils; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Assumptions; -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.*; import org.junit.jupiter.api.extension.ExtendWith; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -72,6 +69,11 @@ public class AllMapStoreTest { Hazelcast.shutdownAll(); } + @AfterAll + static void shutdownAll() { + Hazelcast.shutdownAll(); + } + @PostConstruct public void initTestObjects() { try { diff --git a/clearing-parent/imdg/src/test/java/ru/spcex/clearing/imdg/services/PlannerAllTodayMakerTest.java b/clearing-parent/imdg/src/test/java/ru/spcex/clearing/imdg/services/PlannerAllTodayMakerTest.java index 84466d114..761f855f0 100644 --- a/clearing-parent/imdg/src/test/java/ru/spcex/clearing/imdg/services/PlannerAllTodayMakerTest.java +++ b/clearing-parent/imdg/src/test/java/ru/spcex/clearing/imdg/services/PlannerAllTodayMakerTest.java @@ -1,6 +1,7 @@ package ru.spcex.clearing.imdg.services; import com.hazelcast.core.Hazelcast; +import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -42,6 +43,11 @@ class PlannerAllTodayMakerTest { Hazelcast.shutdownAll(); } + @AfterAll + static void shutdownAll() { + Hazelcast.shutdownAll(); + } + @Test void needAddFromPlannerTemplate() { PlannerAllTodayMaker plannerAllTodayMaker = new PlannerAllTodayMaker(testConfig.getHazelcastInstance());