Merge remote-tracking branch 'origin/dev' into imdg_refactoring
# Conflicts: # clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/statement/Statement.java # clearing-parent/classes/src/main/java/ru/clearing/classes/statics/data/user/UserConnect.java # clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/IMDGApplication.java # clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/businessobject/RelationMapStore.java # clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/businessobject/StatementMapStore.java # clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/businessobject/UserConnectMapStore.java # clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/config/HazelcastConfiguration.java # clearing-parent/imdg/src/main/java/ru/spcex/clearing/imdg/config/PoolMapConfigs.java
This commit is contained in:
commit
1adfb2f7a7
136 changed files with 3241 additions and 1401 deletions
|
|
@ -1,18 +1,49 @@
|
|||
package ru.spcex.clearing.account.config;
|
||||
|
||||
import org.apache.kafka.clients.consumer.Consumer;
|
||||
import org.apache.kafka.clients.producer.Producer;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
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.spcex.clearing.account.config.settings.AccountServiceSettings;
|
||||
import ru.spcex.clearing.platform.messaging.config.KafkaConsumerFactory;
|
||||
import ru.spcex.clearing.platform.messaging.config.KafkaProducerFactory;
|
||||
import ru.spcex.clearing.platform.messaging.service.RequestInfo;
|
||||
import ru.spcex.clearing.platform.messaging.service.sender.KafkaSender;
|
||||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
import ru.spcex.platform.imdg.api.ImdgId;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
|
||||
|
||||
@Configuration
|
||||
public class KafkaConfig {
|
||||
@Autowired
|
||||
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
|
||||
@Bean
|
||||
public Consumer<String, Object> createProducer(AccountServiceSettings settings) {
|
||||
return KafkaConsumerFactory.consumer(settings.getKafka());
|
||||
public Consumer<String, Object> createConsumer(AccountServiceSettings settings) {
|
||||
return KafkaConsumerFactory.consumer(settings.getKafkaConsumer());
|
||||
}
|
||||
|
||||
@Autowired
|
||||
@Bean
|
||||
public Producer<String, Object> createProducer(AccountServiceSettings settings) {
|
||||
return KafkaProducerFactory.producer(settings.getKafkaProducer());
|
||||
}
|
||||
|
||||
@Autowired
|
||||
@Bean
|
||||
public KafkaSender kafkaSender(Producer<String, Object> kafkaProducer, ImdgProvider imdgProvider) {
|
||||
ImdgId imdgIdGenerator = imdgProvider.getImdgIdGenerator();
|
||||
return KafkaSender
|
||||
.setup()
|
||||
.producer(kafkaProducer)
|
||||
.idGenerator(imdgIdGenerator::nextId)
|
||||
.imdgProvider(s -> {
|
||||
Imdg<RequestInfo> imdg = imdgProvider.getImdg(s, RequestInfo.class);
|
||||
return imdg::insert;
|
||||
})
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
|||
import org.springframework.context.annotation.PropertySource;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.spcex.clearing.platform.messaging.config.element.KafkaConsumerSettings;
|
||||
import ru.spcex.clearing.platform.messaging.config.element.KafkaProducerSettings;
|
||||
import ru.spcex.platform.imdg.iml.hazelcast.config.HazelcastClientParams;
|
||||
|
||||
@Component
|
||||
|
|
@ -11,7 +12,8 @@ import ru.spcex.platform.imdg.iml.hazelcast.config.HazelcastClientParams;
|
|||
@ConfigurationProperties("account-service")
|
||||
public class AccountServiceSettings {
|
||||
private HazelcastClientParams hazelcast;
|
||||
private KafkaConsumerSettings kafka;
|
||||
private KafkaConsumerSettings kafkaConsumer;
|
||||
private KafkaProducerSettings kafkaProducer;
|
||||
|
||||
public HazelcastClientParams getHazelcast() {
|
||||
return hazelcast;
|
||||
|
|
@ -21,11 +23,19 @@ public class AccountServiceSettings {
|
|||
this.hazelcast = hazelcast;
|
||||
}
|
||||
|
||||
public KafkaConsumerSettings getKafka() {
|
||||
return kafka;
|
||||
public KafkaConsumerSettings getKafkaConsumer() {
|
||||
return kafkaConsumer;
|
||||
}
|
||||
|
||||
public void setKafka(KafkaConsumerSettings kafka) {
|
||||
this.kafka = kafka;
|
||||
public void setKafkaConsumer(KafkaConsumerSettings kafkaConsumer) {
|
||||
this.kafkaConsumer = kafkaConsumer;
|
||||
}
|
||||
|
||||
public KafkaProducerSettings getKafkaProducer() {
|
||||
return kafkaProducer;
|
||||
}
|
||||
|
||||
public void setKafkaProducer(KafkaProducerSettings kafkaProducer) {
|
||||
this.kafkaProducer = kafkaProducer;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,76 @@
|
|||
package ru.spcex.clearing.account.service;
|
||||
|
||||
import org.apache.kafka.clients.consumer.Consumer;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import ru.clearing.classes.statics.data.account.Account;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.spcex.clearing.platform.messaging.domain.BaseRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.Consts;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.account.sdf01.AccountSdf01Request;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.account.sdf01.AccountSdf01RequestPart;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.balance.AccountSdf01ToStatementRequestPart;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.balance.StatementRequest;
|
||||
import ru.spcex.clearing.platform.messaging.service.QueueConsumer;
|
||||
import ru.spcex.clearing.platform.messaging.service.sender.KafkaSender;
|
||||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class AccountService extends QueueConsumer implements InitializingBean {
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
private final Imdg<Account> accountMap;
|
||||
private final KafkaSender kafkaSender;
|
||||
|
||||
@Autowired
|
||||
public AccountService(Consumer<String, Object> kafkaQueue, ImdgProvider imdgProvider, KafkaSender kafkaSender) {
|
||||
super(kafkaQueue);
|
||||
this.accountMap = imdgProvider.getImdg(IMDGDistributedNames.Map_Account, Account.class);
|
||||
this.kafkaSender = kafkaSender;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() {
|
||||
callback(AccountSdf01Request.class)
|
||||
.setConsumer(this::accountNew)
|
||||
.forDestination(Consts.ACCOUNT_NEW, callbacks::put);
|
||||
init();
|
||||
}
|
||||
|
||||
private void accountNew(BaseRequest<AccountSdf01Request> userRequest) {
|
||||
AccountSdf01Request req = userRequest.getRequestPayload();
|
||||
log.debug("AccountSdf01Request received");
|
||||
List<AccountSdf01ToStatementRequestPart> accountToStatement = new ArrayList<>();
|
||||
for (AccountSdf01RequestPart accountReq : req.getAccounts()) {
|
||||
Account account = new Account();
|
||||
account.setAccount(accountReq.getAccount());
|
||||
//fixme account.setCompany();
|
||||
accountMap.insert(account);
|
||||
AccountSdf01ToStatementRequestPart responsePart = responsePart(accountReq.getSdf01Id());
|
||||
accountToStatement.add(responsePart);
|
||||
}
|
||||
sendStatementRequestBack(req.getGroupingSdf01Id(), accountToStatement);
|
||||
log.debug("successfully processed, grouping id={}, processed number={}", req.getGroupingSdf01Id(), accountToStatement.size());
|
||||
}
|
||||
|
||||
private AccountSdf01ToStatementRequestPart responsePart(Long sdf01Id) {
|
||||
AccountSdf01ToStatementRequestPart responsePart = new AccountSdf01ToStatementRequestPart();
|
||||
responsePart.setSdf01Id(sdf01Id);
|
||||
responsePart.setErrorCode(null);
|
||||
responsePart.setErrorText(null);
|
||||
return responsePart;
|
||||
}
|
||||
|
||||
private void sendStatementRequestBack(Long groupingSdf01Id, List<AccountSdf01ToStatementRequestPart> results) {
|
||||
StatementRequest request = new StatementRequest();
|
||||
request.setSdf01GroupId(groupingSdf01Id);
|
||||
request.setAccountCreationResults(results);
|
||||
kafkaSender.sendRequestToQueue(Consts.STATEMENT_PROCESS, request);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +1,19 @@
|
|||
spring.main.web-application-type=none
|
||||
account-service.hazelcast.cluster-members=127.0.0.1
|
||||
account-service.hazelcast.cluster-members=127.0.0.1:5701
|
||||
account-service.hazelcast.login=dev
|
||||
account-service.hazelcast.password=dev-pass
|
||||
account-service.kafka.bootstrap-servers=localhost:9092
|
||||
account-service.kafka.group-id=dev-group
|
||||
account-service.kafka.enable-auto-commit=false
|
||||
account-service.kafka.session-timeout-ms=30000
|
||||
account-service.kafka.auto-offset-reset=latest
|
||||
account-service.kafka.linger-ms=1
|
||||
account-service.kafka.buffer-memory=33554432
|
||||
|
||||
account-service.kafka-consumer.bootstrap-servers=localhost:9092
|
||||
account-service.kafka-consumer.group-id=dev-group-account-service
|
||||
account-service.kafka-consumer.enable-auto-commit=true
|
||||
account-service.kafka-consumer.session-timeout-ms=30000
|
||||
account-service.kafka-consumer.auto-offset-reset=latest
|
||||
account-service.kafka-consumer.linger-ms=1
|
||||
account-service.kafka-consumer.buffer-memory=33554432
|
||||
|
||||
account-service.kafka-producer.bootstrap-servers=localhost:9092
|
||||
account-service.kafka-producer.acks=all
|
||||
account-service.kafka-producer.retries=0
|
||||
account-service.kafka-producer.batch-size=16384
|
||||
account-service.kafka-producer.linger-ms=1
|
||||
account-service.kafka-producer.buffer-memory=33554432
|
||||
|
|
@ -4,6 +4,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
|
||||
import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory;
|
||||
import org.springframework.boot.web.servlet.server.CookieSameSiteSupplier;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.http.converter.HttpMessageConverter;
|
||||
|
|
@ -75,4 +76,9 @@ public class WebConfig implements WebMvcConfigurer {
|
|||
public RequestContextListener requestContextListener() {
|
||||
return new RequestContextListener();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public CookieSameSiteSupplier applicationCookieSameSiteSupplier() {
|
||||
return CookieSameSiteSupplier.ofNone();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ public class QueueExceptionHandler extends ResponseEntityExceptionHandler {
|
|||
UnrecognizedPropertyException jacksonException = (UnrecognizedPropertyException) ex.getCause();
|
||||
message = new EnumMessage(BackEndError.UnknownJsonProperty, jacksonException.getPropertyName());
|
||||
} catch (ClassCastException e) {
|
||||
log.error(ExceptionUtils.getStackTrace(e));
|
||||
log.error(ExceptionUtils.getStackTrace(ex));
|
||||
message = new EnumMessage(BackEndError.FailedToReadHttpMessage);
|
||||
}
|
||||
errorResponse.setCode(message.getSubject().getId());
|
||||
|
|
|
|||
|
|
@ -1,38 +0,0 @@
|
|||
package ru.spcex.clearing.backendapi.controller.queue.user;
|
||||
|
||||
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.user.UserSettings;
|
||||
import ru.spcex.clearing.backendapi.controller.response.entity.user.UserSettingsBackendGetAll;
|
||||
import ru.spcex.clearing.backendapi.service.IStateLoader;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/user-settings")
|
||||
public class UserSettingsSessionController {
|
||||
private final IStateLoader stateLoader;
|
||||
|
||||
@Autowired
|
||||
public UserSettingsSessionController(IStateLoader stateLoader) {
|
||||
this.stateLoader = stateLoader;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "get all user settings.")
|
||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = UserSettingsBackendGetAll.class)})
|
||||
@RequestMapping(method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public UserSettingsBackendGetAll getAll() {
|
||||
Collection<UserSettings> all = stateLoader.getAll(IMDGDistributedNames.Map_UserSettings, UserSettings.class);
|
||||
var response = new UserSettingsBackendGetAll();
|
||||
response.fromEntity(all);
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
package ru.spcex.clearing.backendapi.controller.queue.utilities;
|
||||
|
||||
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.security.core.Authentication;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
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 ru.clearing.classes.statics.data.user.User;
|
||||
import ru.clearing.classes.statics.data.user.UserSettings;
|
||||
import ru.spcex.clearing.backendapi.controller.queue.AbstractQueueController;
|
||||
import ru.spcex.clearing.backendapi.controller.request.cud.utilities.UserSettingsUpdateAction;
|
||||
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.user.UserSettingsBackendGetAll;
|
||||
import ru.spcex.clearing.backendapi.security.KeycloakUtils;
|
||||
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.imdg.api.Imdg;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/utilities/user-settings")
|
||||
public class UserSettingsController extends AbstractQueueController {
|
||||
private final IStateLoader stateLoader;
|
||||
private final Imdg<User> userImdg;
|
||||
|
||||
@Autowired
|
||||
public UserSettingsController(IOperator operator, IStateLoader stateLoader, ImdgProvider imdgProvider) {
|
||||
super(operator);
|
||||
this.stateLoader = stateLoader;
|
||||
this.userImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_User, User.class);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "get all user settings.")
|
||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = UserSettingsBackendGetAll.class)})
|
||||
@RequestMapping(method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public UserSettingsBackendGetAll getAll() {
|
||||
Collection<UserSettings> all = stateLoader.getAll(IMDGDistributedNames.Map_UserSettings, UserSettings.class);
|
||||
var response = new UserSettingsBackendGetAll();
|
||||
response.fromEntity(all);
|
||||
return response;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "update user settings.")
|
||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CudResponse.class), @ApiResponse(code = 400, message = "Ошибка валидации", response = BasicSpcexResponse.class)})
|
||||
@RequestMapping(method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
@ResponseBody
|
||||
public CudResponse update(
|
||||
@ApiParam(value = "Новые значения полей объекта.", required = true)
|
||||
@RequestBody UserSettingsUpdateAction userSettingsUpdateAction) throws ExecutionException, InterruptedException {
|
||||
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
|
||||
String username = KeycloakUtils.getUserNameFromAuthentication(authentication);
|
||||
User user = userImdg.getSingleObjectByFieldValues(Map.of("identifier", username));
|
||||
if (user == null) {
|
||||
throw new IllegalStateException("cannot obtain userId from logged in user " + username);
|
||||
}
|
||||
userSettingsUpdateAction.setUserId(user.getId());
|
||||
return processRequest(Consts.USER_SETTINGS_UPDATE, userSettingsUpdateAction);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
package ru.spcex.clearing.backendapi.controller.request.cud.utilities;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import ru.spcex.clearing.backendapi.domain.actions.IAction;
|
||||
import ru.spcex.clearing.platform.messaging.domain.ActionType;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.utilities.UserSettingsUpdateRequest;
|
||||
|
||||
public class UserSettingsUpdateAction implements IAction<UserSettingsUpdateRequest> {
|
||||
@ApiModelProperty(hidden = true)
|
||||
@JsonProperty
|
||||
public Long userId;
|
||||
|
||||
@JsonProperty
|
||||
public String version;
|
||||
public String json;
|
||||
|
||||
@JsonProperty("json")
|
||||
public void unpackRawJson(JsonNode json) {
|
||||
this.json = json.toString();
|
||||
}
|
||||
|
||||
@ApiModelProperty(hidden = true)
|
||||
@Override
|
||||
public ActionType getActionType() {
|
||||
return ActionType.UPDATE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserSettingsUpdateRequest toRequest() {
|
||||
var req = new UserSettingsUpdateRequest();
|
||||
req.setVersion(version);
|
||||
req.setJson(json);
|
||||
req.setUserId(userId);
|
||||
return req;
|
||||
}
|
||||
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(String version) {
|
||||
this.version = version;
|
||||
}
|
||||
}
|
||||
|
|
@ -53,23 +53,25 @@ public class CompanyBackendGetAll extends BasicSpcexResponse {
|
|||
singleItem.setUpdated(company.getUpdated());
|
||||
CompanyBackendGetFields.CompanyInfoFields companyInfoFields = new CompanyBackendGetFields.CompanyInfoFields();
|
||||
CompanyInfo profile = company.getProfile();
|
||||
companyInfoFields.setId(profile.getId());
|
||||
companyInfoFields.setCompanyId(profile.getCompanyId());
|
||||
companyInfoFields.setCorporationSoleType(profile.getCorporationSoleType());
|
||||
companyInfoFields.setCountryCode(profile.getCountryCode());
|
||||
companyInfoFields.setDescription(profile.getDescription());
|
||||
companyInfoFields.setProfessionalSign(profile.getProfessionalSign());
|
||||
companyInfoFields.setLegalKind(profile.getLegalKind());
|
||||
companyInfoFields.setOrganizationType(profile.getOrganizationType());
|
||||
companyInfoFields.setResidence(profile.getResidence());
|
||||
companyInfoFields.setShortName(profile.getShortName());
|
||||
companyInfoFields.setFullName(profile.getFullName());
|
||||
companyInfoFields.setShortNameEng(profile.getShortNameEng());
|
||||
companyInfoFields.setFullNameEng(profile.getFullNameEng());
|
||||
companyInfoFields.setTradingCode(profile.getTradingCode());
|
||||
companyInfoFields.setClearingCode(profile.getClearingCode());
|
||||
companyInfoFields.setRegistrationCode(profile.getRegistrationCode());
|
||||
singleItem.setProfile(companyInfoFields);
|
||||
if (profile != null) {
|
||||
companyInfoFields.setId(profile.getId());
|
||||
companyInfoFields.setCompanyId(profile.getCompanyId());
|
||||
companyInfoFields.setCorporationSoleType(profile.getCorporationSoleType());
|
||||
companyInfoFields.setCountryCode(profile.getCountryCode());
|
||||
companyInfoFields.setDescription(profile.getDescription());
|
||||
companyInfoFields.setProfessionalSign(profile.getProfessionalSign());
|
||||
companyInfoFields.setLegalKind(profile.getLegalKind());
|
||||
companyInfoFields.setOrganizationType(profile.getOrganizationType());
|
||||
companyInfoFields.setResidence(profile.getResidence());
|
||||
companyInfoFields.setShortName(profile.getShortName());
|
||||
companyInfoFields.setFullName(profile.getFullName());
|
||||
companyInfoFields.setShortNameEng(profile.getShortNameEng());
|
||||
companyInfoFields.setFullNameEng(profile.getFullNameEng());
|
||||
companyInfoFields.setTradingCode(profile.getTradingCode());
|
||||
companyInfoFields.setClearingCode(profile.getClearingCode());
|
||||
companyInfoFields.setRegistrationCode(profile.getRegistrationCode());
|
||||
singleItem.setProfile(companyInfoFields);
|
||||
}
|
||||
payload.getItems().add(singleItem);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
package ru.spcex.clearing.backendapi.security;
|
||||
|
||||
import org.keycloak.KeycloakPrincipal;
|
||||
import org.keycloak.adapters.spi.KeycloakAccount;
|
||||
import org.keycloak.adapters.springsecurity.token.KeycloakAuthenticationToken;
|
||||
import org.springframework.security.core.Authentication;
|
||||
|
||||
public class KeycloakUtils {
|
||||
/**
|
||||
* Достать username из Keycloak имплементации Authentication
|
||||
*/
|
||||
public static String getUserNameFromAuthentication(Authentication authentication) {
|
||||
KeycloakAuthenticationToken auth = (KeycloakAuthenticationToken) authentication;
|
||||
KeycloakAccount details = (KeycloakAccount) auth.getDetails();
|
||||
return ((KeycloakPrincipal) details.getPrincipal())
|
||||
.getKeycloakSecurityContext()
|
||||
.getToken()
|
||||
.getPreferredUsername();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,9 @@
|
|||
server.port=8080
|
||||
server.servlet.context-path=/backend-api
|
||||
server.ssl.key-store-type=PKCS12
|
||||
server.ssl.key-store=classpath:keystore/client.p12
|
||||
server.ssl.key-store-password=Aa123456
|
||||
server.ssl.enabled=true
|
||||
spring.main.web-application-type=servlet
|
||||
|
||||
backend-api.example-setting=test
|
||||
|
|
|
|||
|
|
@ -1,22 +1,29 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<meta version="0.0.0.0">
|
||||
<enums>
|
||||
<courierType id="1" code="POST" name="Почтой"/>
|
||||
<courierType id="2" code="CAB" name="Личный кабинет с ЭЦП"/>
|
||||
<courierType id="3" code="ORIG" name="Оригинал на бумаге"/>
|
||||
<courierType id="3" code="STHS" name="Модуль обмена с Расчетной Организацией"/>
|
||||
<courierType id="1" code="STHS" name="ЭДО с Расчетной Организацией"/>
|
||||
<termType id="1" code="S" name="Срочный"/>
|
||||
<termType id="2" code="K" name="Комбинированный"/>
|
||||
<termType id="3" code="V" name="До востребования"/>
|
||||
<task id="1" code="GBAL" name="Зачисление остатков"/>
|
||||
<task id="2" code="" name=""/>
|
||||
<task id="2" code="GBLC" name="Подтверждение зачисления остатков"/>
|
||||
<task id="3" code="ABLK" name="Блокировка счета"/>
|
||||
<task id="4" code="GALB" name="Запрос остатков по всем счетам"/>
|
||||
<task id="5" code="ADBL" name="Дозачисление/списание остатков"/>
|
||||
<task id="6" code="ADBC" name="Подтверждение дозачисления/списания остатков"/>
|
||||
<task id="7" code="CORD" name="Формирование сводного платежного поручения"/>
|
||||
<task id="8" code="CORC" name="Получение подтверждения переводов"/>
|
||||
<task id="34" code="GBLD" name="Поступление средств"/>
|
||||
<task id="35" code="GBDC" name="Подтверждение поступления средств"/>
|
||||
<taskStatus id="1" code="ACTV" name="Активна"/>
|
||||
<taskStatus id="2" code="BLKD" name="Не активна"/>
|
||||
<taskStatus id="3" code="CNCL" name="Отмена расписания"/>
|
||||
<tradingStatus id="1" code="TRAD" name="Торговый"/>
|
||||
<tradingStatus id="2" code="NTRD" name="Неторговый"/>
|
||||
<transactionStatus id="1" code="STLD" name="Рассчитан"/>
|
||||
<transactionStatus id="2" code="SENT" name="Отправлен в ПРЦ"/>
|
||||
<transactionStatus id="3" code="OK" name="Обработан ПРЦ"/>
|
||||
<transactionStatus id="4" code="FAIL" name="Ошибка ПРЦ"/>
|
||||
<source id="1" code="TIMT" name="Расписание"/>
|
||||
<source id="2" code="SCHD" name="Планировщик"/>
|
||||
<chargeType id="1" code="PRCT" name="Процент"/>
|
||||
|
|
@ -31,8 +38,9 @@
|
|||
<interestStatus id="3" code="DFLT" name="Не возвращены"/>
|
||||
<workflowStatus id="1" code="ACTV" name="Активен"/>
|
||||
<workflowStatus id="2" code="BLKD" name="Не активен"/>
|
||||
<moneyFlowSide id="1" code="SELL" name="Привлечь"/>
|
||||
<moneyFlowSide id="2" code="BUY" name="Разместить"/>
|
||||
<accountStatus id="1" code="ACTV" name="Активен"/>
|
||||
<accountStatus id="2" code="BLKD" name="Заблокирован"/>
|
||||
<accountStatus id="3" code="CLOS" name="Закрыт"/>
|
||||
<balanceAccountType id="1" code="ACNT" name="Остатки по счетам"/>
|
||||
<inOutDirection id="1" code="IN" name="Зачисление"/>
|
||||
<inOutDirection id="2" code="OUT" name="Списание"/>
|
||||
|
|
@ -44,7 +52,7 @@
|
|||
<serviceStatus id="2" code="BLKD" name="Заблокирован"/>
|
||||
<serviceStatus id="3" code="SSPD" name="Приостановлен"/>
|
||||
<serviceStatus id="4" code="CLOS" name="Закрыт"/>
|
||||
<serviceStatus id="4" code="ROPN" name="Возобновлен"/>
|
||||
<serviceStatus id="5" code="ROPN" name="Возобновлен"/>
|
||||
<statementType id="1" code="FULL" name="Установка суммы"/>
|
||||
<statementType id="2" code="INCR" name="Изменение суммы"/>
|
||||
<operationType id="1" code="STMT" name="Расчетные операции"/>
|
||||
|
|
@ -54,14 +62,15 @@
|
|||
<operationStatus id="3" code="EXEC" name="Исполнена"/>
|
||||
<service id="1" code="MKR" name="Денежный рынок МКР"/>
|
||||
<serviceProduct id="1" code="PRNT" name="Расчет обязательств с процентом"/>
|
||||
<serviceProduct id="2" code="ZERO" name="Расчет обязательств без процента"/>
|
||||
<clearingCategory id="1" code="C" name="Категория «Ц» - Банк России"/>
|
||||
<clearingCategory id="2" code="B" name="Категория «Б» - Кредитная организация ДР"/>
|
||||
<clearingCategory id="3" code="F" name="Категория «Ф» - Участник рынка РЦБ"/>
|
||||
<clearingCategory id="4" code="I" name="Категория «И» - Инициатор по ТБС"/>
|
||||
<clearingCategory id="5" code="V" name="Категория «В» - Инициатор по ТКС"/>
|
||||
<clearingCategory id="6" code="T" name="Категория «Т» - Участник товарного рынка"/>
|
||||
<clearingCategory id="7" code="K" name="Категория «К» - Участник клиринга - Контроллер"/>
|
||||
<serviceProduct id="2" code="ZERO" name="Расчет обязательств без процента (по умолчанию)"/>
|
||||
<sector id="1" code="MKR" name="Секция Денежного рынка МКР"/>
|
||||
<clearingMemberCategory id="1" code="C" name="Категория «Ц» - Банк России"/>
|
||||
<clearingMemberCategory id="2" code="B" name="Категория «Б» - Кредитная организация ДР"/>
|
||||
<clearingMemberCategory id="3" code="F" name="Категория «Ф» - Участник рынка РЦБ"/>
|
||||
<clearingMemberCategory id="4" code="I" name="Категория «И» - Инициатор по ТБС"/>
|
||||
<clearingMemberCategory id="5" code="V" name="Категория «В» - Инициатор по ТКС"/>
|
||||
<clearingMemberCategory id="6" code="T" name="Категория «Т» - Участник товарного рынка"/>
|
||||
<clearingMemberCategory id="7" code="K" name="Категория «К» - Участник клиринга - Контроллер"/>
|
||||
<managementJournalType id="1" code="CRPA" name="Корпоративное событие, связанное с допуском"/>
|
||||
<managementJournalType id="2" code="DFLT" name="Отсутствие возврата по платежу"/>
|
||||
<managementJournalType id="3" code="NOTC" name="Генерация уведомления"/>
|
||||
|
|
@ -83,7 +92,6 @@
|
|||
<corporationSoleType id="5" code="OTHR" name="Другой"/>
|
||||
<connectionState id="1" code="CNCT" name="Подключен"/>
|
||||
<connectionState id="2" code="DSBL" name="Отключен"/>
|
||||
|
||||
<documentType id="1" code="PASP" name="Паспорт"/>
|
||||
<documentType id="2" code="ICRT" name="Удостоверение личности"/>
|
||||
<documentType id="3" code="PRXY" name="Доверенность"/>
|
||||
|
|
@ -135,97 +143,119 @@
|
|||
<instrumentType id="2" code="CRNC" name="Валюты"/>
|
||||
<resultStatus id="1" code="NACK" name="Неуспешно"/>
|
||||
<resultStatus id="2" code="ACK" name="Успешно"/>
|
||||
<inOutSDfType id="1" code="0102" name="Входящий DF-01/Исходящий DF-02"/>
|
||||
<inOutSDfType id="1" code="0102" name="Входящий ДФ-01/Исходящий ДФ-02"/>
|
||||
<inOutSDfType id="2" code="1617" name="Входящий ДФ-16/Исходящий ДФ-17"/>
|
||||
<inOutSDfType id="3" code="0910" name="Входящий ДФ-09/Исходящий ДФ-10"/>
|
||||
<sessionStatus id="1" code="ACTV" name="Сессия активна"/>
|
||||
<sessionStatus id="2" code="CLRN" name="Идет клиринг"/>
|
||||
<objectType id="1" code="STMT" name="STATEMENT"/>
|
||||
<notificationStatus id="1" code="ACPT" name="Принято"/>
|
||||
<notificationStatus id="2" code="CNCL" name="Отменено"/>
|
||||
|
||||
<currencyCode id="643" code="RUB" name="Российский рубль"/>
|
||||
|
||||
<!-- error code for securities_services -->
|
||||
<errorCode id="1000" code="1 000" name="Общая ошибка модуля securities_services."/>
|
||||
<errorCode id="1001" code="1 001" name="Нет прав на проведение данной операции."/>
|
||||
<errorCode id="1002" code="1 002" name="Не заданы обязательные поля."/>
|
||||
<errorCode id="1003" code="1 003" name="Запись с указанным идентификатором в справочнике %s не найдена."/>
|
||||
<errorCode id="1004" code="1 004" name="Неверное значение поля %s."/>
|
||||
<errorCode id="1005" code="1 005" name="Такая запись уже существует."/>
|
||||
<errorCode id="1006" code="1 006" name="Запись не найдена."/>
|
||||
<errorCode id="1007" code="1 007" name="Пользователь не найден."/>
|
||||
<errorCode id="1008" code="1 008" name="Пользователь неактивен."/>
|
||||
<errorCode id="1010" code="1 010" name="Такой Инструмент уже существует."/>
|
||||
<errorCode id="1011" code="1 011" name="Инструмент не найден."/>
|
||||
<errorCode id="1012" code="1 012" name="Инструмент неактивен."/>
|
||||
<errorCode id="1000" code="1000" name="Общая ошибка модуля securities_services."/>
|
||||
<errorCode id="1001" code="1001" name="Нет прав на проведение данной операции."/>
|
||||
<errorCode id="1002" code="1002" name="Не заданы обязательные поля."/>
|
||||
<errorCode id="1003" code="1003" name="Запись с указанным идентификатором в справочнике %s не найдена."/>
|
||||
<errorCode id="1004" code="1004" name="Неверное значение поля %s."/>
|
||||
<errorCode id="1005" code="1005" name="Такая запись уже существует."/>
|
||||
<errorCode id="1006" code="1006" name="Запись не найдена."/>
|
||||
<errorCode id="1007" code="1007" name="Пользователь не найден."/>
|
||||
<errorCode id="1008" code="1008" name="Пользователь неактивен."/>
|
||||
<errorCode id="1010" code="1010" name="Такой Инструмент уже существует."/>
|
||||
<errorCode id="1011" code="1011" name="Инструмент не найден."/>
|
||||
<errorCode id="1012" code="1012" name="Инструмент неактивен."/>
|
||||
|
||||
<!-- error code for utility_service -->
|
||||
<errorCode id="2000" code="2 000" name="Общая ошибка модуля utility_service"/>
|
||||
<errorCode id="2001" code="2 001" name="Нет прав на проведение данной операции."/>
|
||||
<errorCode id="2002" code="2 002" name="Не заданы обязательные поля."/>
|
||||
<errorCode id="2003" code="2 003" name="Запись с указанным идентификатором в справочнике %s не найдена."/>
|
||||
<errorCode id="2004" code="2 004" name="Неверное значение поля %s."/>
|
||||
<errorCode id="2005" code="2 005" name="Такая запись уже существует."/>
|
||||
<errorCode id="2006" code="2 006" name="Запись не найдена."/>
|
||||
<errorCode id="2000" code="2000" name="Общая ошибка модуля utility_service"/>
|
||||
<errorCode id="2001" code="2001" name="Нет прав на проведение данной операции."/>
|
||||
<errorCode id="2002" code="2002" name="Не заданы обязательные поля."/>
|
||||
<errorCode id="2003" code="2003" name="Запись с указанным идентификатором в справочнике %s не найдена."/>
|
||||
<errorCode id="2004" code="2004" name="Неверное значение поля %s."/>
|
||||
<errorCode id="2005" code="2005" name="Такая запись уже существует."/>
|
||||
<errorCode id="2006" code="2006" name="Запись не найдена."/>
|
||||
|
||||
<!-- error code for company_services -->
|
||||
<errorCode id="3000" code="3 000" name="Общая ошибка модуля company_services"/>
|
||||
<errorCode id="3001" code="3 001" name="Нет прав на проведение данной операции."/>
|
||||
<errorCode id="3002" code="3 002" name="Не заданы обязательные поля."/>
|
||||
<errorCode id="3003" code="3 003" name="Запись с указанным идентификатором в справочнике %s не найдена."/>
|
||||
<errorCode id="3004" code="3 004" name="Неверное значение поля %s."/>
|
||||
<errorCode id="3005" code="3 005" name="Такая запись уже существует."/>
|
||||
<errorCode id="3006" code="3 006" name="Запись не найдена."/>
|
||||
<errorCode id="3010" code="3 010" name="Такая Компания уже существует"/>
|
||||
<errorCode id="3011" code="3 011" name="Компания не найдена."/>
|
||||
<errorCode id="3012" code="3 012" name="Компания неактивна."/>
|
||||
<errorCode id="3013" code="3 013" name="Профиль Компании не найден."/>
|
||||
<errorCode id="3014" code="3 014" name="Реквизит Компании не найден."/>
|
||||
<errorCode id="3015" code="3 015" name="Контакт Компании не найден."/>
|
||||
<errorCode id="3016" code="3 016" name="Категория Компании не найдена."/>
|
||||
<errorCode id="3017" code="3 017" name="Компании уже присвоена Категория %s."/>
|
||||
<errorCode id="3000" code="3000" name="Общая ошибка модуля company_services"/>
|
||||
<errorCode id="3001" code="3001" name="Нет прав на проведение данной операции."/>
|
||||
<errorCode id="3002" code="3002" name="Не заданы обязательные поля."/>
|
||||
<errorCode id="3003" code="3003" name="Запись с указанным идентификатором в справочнике %s не найдена."/>
|
||||
<errorCode id="3004" code="3004" name="Неверное значение поля %s."/>
|
||||
<errorCode id="3005" code="3005" name="Такая запись уже существует."/>
|
||||
<errorCode id="3006" code="3006" name="Запись не найдена."/>
|
||||
<errorCode id="3010" code="3010" name="Такая Компания уже существует"/>
|
||||
<errorCode id="3011" code="3011" name="Компания не найдена."/>
|
||||
<errorCode id="3012" code="3012" name="Компания неактивна."/>
|
||||
<errorCode id="3013" code="3013" name="Профиль Компании не найден."/>
|
||||
<errorCode id="3014" code="3014" name="Реквизит Компании не найден."/>
|
||||
<errorCode id="3015" code="3015" name="Контакт Компании не найден."/>
|
||||
<errorCode id="3016" code="3016" name="Категория Компании не найдена."/>
|
||||
<errorCode id="3017" code="3017" name="Компании уже присвоена Категория %s."/>
|
||||
|
||||
<!-- error code for report_serivces -->
|
||||
<errorCode id="4000" code="4 000" name="Общая ошибка модуля report_serivces"/>
|
||||
<errorCode id="4000" code="4000" name="Общая ошибка модуля report_serivces"/>
|
||||
|
||||
<!-- == error code for processing accounts and balances == -->
|
||||
<!-- error code for account_services -->
|
||||
<errorCode id="5000" code="5 000" name="Общая ошибка модуля account_services"/>
|
||||
<errorCode id="5001" code="5 001" name="Нет прав на проведение данной операции."/>
|
||||
<errorCode id="5002" code="5 002" name="Не заданы обязательные поля."/>
|
||||
<errorCode id="5003" code="5 003" name="Запись с указанным идентификатором в справочнике %s не найдена."/>
|
||||
<errorCode id="5004" code="5 004" name="Неверное значение поля %s."/>
|
||||
<errorCode id="5005" code="5 005" name="Такая запись уже существует."/>
|
||||
<errorCode id="5006" code="5 006" name="Запись не найдена."/>
|
||||
<errorCode id="5010" code="5 010" name="Счет %s уже существует."/>
|
||||
<errorCode id="5011" code="5 011" name="Счет %s не найден."/>
|
||||
<errorCode id="5012" code="5 012" name="Счет %s неактивен."/>
|
||||
<errorCode id="5000" code="5000" name="Общая ошибка модуля account_services"/>
|
||||
<errorCode id="5001" code="5001" name="Нет прав на проведение данной операции."/>
|
||||
<errorCode id="5002" code="5002" name="Не заданы обязательные поля."/>
|
||||
<errorCode id="5003" code="5003" name="Запись с указанным идентификатором в справочнике %s не найдена."/>
|
||||
<errorCode id="5004" code="5004" name="Неверное значение поля %s."/>
|
||||
<errorCode id="5005" code="5005" name="Такая запись уже существует."/>
|
||||
<errorCode id="5006" code="5006" name="Запись не найдена."/>
|
||||
<errorCode id="5010" code="5010" name="Счет %s уже существует."/>
|
||||
<errorCode id="5011" code="5011" name="Счет %s не найден."/>
|
||||
<errorCode id="5012" code="5012" name="Счет %s неактивен."/>
|
||||
<errorCode id="5013" code="5013" name="Компания не найдена."/>
|
||||
<errorCode id="5014" code="5014" name="Компания неактивна."/>
|
||||
<!-- error code for balance_services -->
|
||||
<errorCode id="5200" code="5 200" name="Общая ошибка модуля balance_services"/>
|
||||
<errorCode id="5211" code="5 211" name="Компания не найдена."/>
|
||||
<errorCode id="5212" code="5 212" name="Компания неактивна."/>
|
||||
<errorCode id="5213" code="5 213" name="Валюта не найдена."/>
|
||||
<errorCode id="5214" code="5 214" name="Загрузка остатков возможна только на текущую дату."/>
|
||||
<errorCode id="5215" code="5 215" name="Загрузка остатков возможна только по рынку МКР."/>
|
||||
<errorCode id="5216" code="5 216" name="Загрузка остатков возможна только по собственным счетам."/>
|
||||
<errorCode id="5217" code="5 217" name="Счет %s не найден."/>
|
||||
<errorCode id="5218" code="5 218" name="Счет %s неактивен."/>
|
||||
<errorCode id="5200" code="5200" name="Общая ошибка модуля balance_services"/>
|
||||
<errorCode id="5210" code="5210" name="Клиринговая сессия неактивна."/>
|
||||
<errorCode id="5211" code="5211" name="Компания не найдена."/>
|
||||
<errorCode id="5212" code="5212" name="Компания неактивна."/>
|
||||
<errorCode id="5213" code="5213" name="Валюта не найдена."/>
|
||||
<errorCode id="5214" code="5214" name="Загрузка остатков возможна только на текущую дату."/>
|
||||
<errorCode id="5215" code="5215" name="Загрузка остатков возможна только по рынку МКР."/>
|
||||
<errorCode id="5216" code="5216" name="Загрузка остатков возможна только по собственным счетам."/>
|
||||
<errorCode id="5217" code="5217" name="Счет %s не найден."/>
|
||||
<errorCode id="5218" code="5218" name="Счет %s неактивен."/>
|
||||
<errorCode id="5219" code="5219" name="Дозачисления/списания возможны только по рынку МКР."/>
|
||||
<errorCode id="5220" code="5220" name="Сумма списания превышает сумму средств на счете."/>
|
||||
<errorCode id="5221" code="5221" name="Поступление средств возможно только по рынку МКР."/>
|
||||
<!-- error code for проведение расчетов -->
|
||||
<errorCode id="5400" code="5 400" name="Общая ошибка модуля проведения расчетов"/>
|
||||
<errorCode id="5400" code="5400" name="Общая ошибка модуля проведения расчетов"/>
|
||||
<!-- error code for dbf-loader -->
|
||||
<errorCode id="5600" code="5 600" name="Общая ошибка модуля dbf-loader"/>
|
||||
<errorCode id="5600" code="5600" name="Общая ошибка модуля dbf-loader"/>
|
||||
<!-- error code for dbf-export -->
|
||||
<errorCode id="5800" code="5 800" name="Общая ошибка модуля dbf-export"/>
|
||||
<errorCode id="5800" code="5800" name="Общая ошибка модуля dbf-export"/>
|
||||
|
||||
<!-- error code for api-lk-company -->
|
||||
<errorCode id="6000" code="6 000" name="Общая ошибка модуля api-lk-company"/>
|
||||
<errorCode id="6000" code="6000" name="Общая ошибка модуля api-lk-company"/>
|
||||
|
||||
<!-- error code for scheduler_service -->
|
||||
<errorCode id="7000" code="7 000" name="Общая ошибка модуля scheduler_service"/>
|
||||
<errorCode id="7001" code="7 001" name="Нет прав на проведение данной операции."/>
|
||||
<errorCode id="7002" code="7 002" name="Не заданы обязательные поля."/>
|
||||
<errorCode id="7003" code="7 003" name="Запись с указанным идентификатором в справочнике %s не найдена."/>
|
||||
<errorCode id="7004" code="7 004" name="Неверное значение поля %s."/>
|
||||
<errorCode id="7005" code="7 005" name="Такая запись уже существует."/>
|
||||
<errorCode id="7006" code="7 006" name="Запись не найдена."/>
|
||||
<errorCode id="7010" code="7 010" name="Невозможно добавить задачу на прошедшую дату."/>
|
||||
<errorCode id="7011" code="7 011" name="Невозможно добавить задачу на прошедшее время."/>
|
||||
<errorCode id="7012" code="7 012" name="Указанный в задаче нструмент не найден."/>
|
||||
<errorCode id="7013" code="7 013" name="Указанный инструмент неактивен."/>
|
||||
<errorCode id="7000" code="7000" name="Общая ошибка модуля scheduler_service"/>
|
||||
<errorCode id="7001" code="7001" name="Нет прав на проведение данной операции."/>
|
||||
<errorCode id="7002" code="7002" name="Не заданы обязательные поля."/>
|
||||
<errorCode id="7003" code="7003" name="Запись с указанным идентификатором в справочнике %s не найдена."/>
|
||||
<errorCode id="7004" code="7004" name="Неверное значение поля %s."/>
|
||||
<errorCode id="7005" code="7005" name="Такая запись уже существует."/>
|
||||
<errorCode id="7006" code="7006" name="Запись не найдена."/>
|
||||
<errorCode id="7010" code="7010" name="Невозможно добавить задачу на прошедшую дату."/>
|
||||
<errorCode id="7011" code="7011" name="Невозможно добавить задачу на прошедшее время."/>
|
||||
<errorCode id="7012" code="7012" name="Указанный в задаче нструмент не найден."/>
|
||||
<errorCode id="7013" code="7013" name="Указанный инструмент неактивен."/>
|
||||
|
||||
<!-- error code for utility_service -->
|
||||
<errorCode id="8000" code="8000" name="Общая ошибка модуля utility_service"/>
|
||||
<errorCode id="8001" code="8001" name="Нет прав на проведение данной операции."/>
|
||||
<errorCode id="8002" code="8002" name="Не заданы обязательные поля."/>
|
||||
<errorCode id="8003" code="8003" name="Запись с указанным идентификатором в справочнике %s не найдена."/>
|
||||
<errorCode id="8004" code="8004" name="Неверное значение поля %s."/>
|
||||
<errorCode id="8005" code="8005" name="Такая запись уже существует."/>
|
||||
<errorCode id="8006" code="8006" name="Запись не найдена."/>
|
||||
|
||||
</enums>
|
||||
<objects>
|
||||
|
|
|
|||
|
|
@ -39,12 +39,17 @@
|
|||
<code name="Код" shortname="Код" type="12"/>
|
||||
<name name="Статус" shortname="Статус" type="2" length="50"/>
|
||||
</taskStatus>
|
||||
<tradingStatus name="Справочник торговых статусов" class="com.spicex.dictionary.TradingStatusDictionary" table="TradingStatusDictionary">
|
||||
<tradingStatus name="Справочник торговых статусов" class="com.spicex.dictionary.TradingStatusDictionary" table="TradingStatusDictionary">
|
||||
<id name="Идентификатор записи" shortname="ID" type="1"/>
|
||||
<code name="Код" shortname="Код" type="12"/>
|
||||
<name name="Торговый статус" shortname="Статус" type="2" length="50"/>
|
||||
</tradingStatus>
|
||||
<source name="Справочник источников" class="com.spicex.dictionary.SourceDictionary" table="SourceDictionary">
|
||||
<transactionStatus name="Справочник статусов транзакций" class="com.spicex.dictionary.TransactionStatusDictionary" table="TransactionStatusDictionary">
|
||||
<id name="Идентификатор записи" shortname="ID" type="1"/>
|
||||
<code name="Код" shortname="Код" type="12"/>
|
||||
<name name="Статус транзакции" shortname="Статус" type="2" length="50"/>
|
||||
</transactionStatus>
|
||||
<source name="Справочник источников" class="com.spicex.dictionary.SourceDictionary" table="SourceDictionary">
|
||||
<id name="Идентификатор записи" shortname="ID" type="1"/>
|
||||
<code name="Код" shortname="Код" type="12"/>
|
||||
<name name="Наименование" shortname="Источник" type="2" length="50"/>
|
||||
|
|
@ -104,11 +109,11 @@
|
|||
<code name="Код" shortname="Код" type="12"/>
|
||||
<name name="Наименование" type="2" length="255"/>
|
||||
</countryCode>
|
||||
<clearingCategory name="Справочник категорий участника клиринга" class="com.spicex.dictionary.">
|
||||
<clearingMemberCategory name="Справочник категорий участника клиринга" class="com.spicex.dictionary.ClearingMemberCategoryDictionary" table="ClearingMemberCategoryDictionary">
|
||||
<id name="Идентификатор записи" shortname="ID" type="1"/>
|
||||
<code name="Код" shortname="Код" type="12"/>
|
||||
<name name="Наименование" shortname="Наименование" type="2" length="255"/>
|
||||
</clearingCategory>
|
||||
</clearingMemberCategory>
|
||||
<contactType name="Справочник типов контактов Компании" class="com.spicex.dictionary.">
|
||||
<id name="Идентификатор записи" shortname="ID" type="1"/>
|
||||
<code name="Код" shortname="Код" type="12"/>
|
||||
|
|
@ -215,14 +220,29 @@
|
|||
<code name="Код" shortname="Код" type="12"/>
|
||||
<name name="Тип записи" shortname="Наименование" type="2" length="50"/>
|
||||
</managementJournalPurpose>
|
||||
<inOutSDfType name="Справочник типов входящих и исходящих записей" class="ru.clearing.platform.dictionary.inOutSDfType" table="InOutSDfType">
|
||||
<inOutSDfType name="Справочник типов входящих и исходящих записей" class="ru.clearing.platform.dictionary.inOutSDfTypeDictionary" table="InOutSDfTypeDictionary">
|
||||
<id name="Идентификатор" shortname="ID" type="1"/>
|
||||
<code name="Код" shortname="Код" type="12"/>
|
||||
<name name="Тип записи" shortname="Наименование" type="2" length="50"/>
|
||||
</inOutSDfType>
|
||||
<sessionStatus name="Справочник статусов клиринговой сессии" class="ru.clearing.platform.dictionary.SessionStatusDictionary" table="SessionStatusDictionary">
|
||||
<id name="Идентификатор" shortname="ID" type="1"/>
|
||||
<code name="Код" shortname="Код" type="12"/>
|
||||
<name name="Наименование" shortname="Наименование" type="2" length="50"/>
|
||||
</sessionStatus>
|
||||
<objectType name="Справочник типов объектов" class="ru.clearing.platform.dictionary.ObjectTypeDictionary" table="ObjectTypeDictionary">
|
||||
<id name="Идентификатор" shortname="ID" type="1"/>
|
||||
<code name="Код" shortname="Код" type="12"/>
|
||||
<name name="Наименование" shortname="Наименование" type="2" length="50"/>
|
||||
</objectType>
|
||||
<notificationStatus name="Справочник статусов сообщений" class="ru.clearing.platform.dictionary.NotificationStatusDictionary" table="NotificationStatusDictionary">
|
||||
<id name="Идентификатор" shortname="ID" type="1"/>
|
||||
<code name="Код" shortname="Код" type="12"/>
|
||||
<name name="Наименование" shortname="Наименование" type="2" length="50"/>
|
||||
</notificationStatus>
|
||||
</enums>
|
||||
<objects>
|
||||
<user name="Пользователь" class="com.spicex.Static.User.UserCls" logUpdates="true" table="UserCls">
|
||||
<userCls name="Пользователь" class="com.spicex.Static.User.UserCls" logUpdates="true" table="UserCls">
|
||||
<id type="1" name="Идентификатор" shortname="ID" searchable="true" sortable="true"/>
|
||||
<createdAt type="4" name="Создано" shortname="Создано" searchable="true" sortable="true"/>
|
||||
<updatedAt type="4" name="Изменено" shortname="Изменено" searchable="true" sortable="true"/>
|
||||
|
|
@ -233,22 +253,22 @@
|
|||
<roles type="2" length="255" name="Роли пользователя" required="false"/>
|
||||
</put>
|
||||
</actions>
|
||||
</user>
|
||||
</userCls>
|
||||
<userRoleSession name="Набор ролей" class="ccom.spicex.Static.User.UserRoleSession" table="UserRoleSession">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true" visible="true"/>
|
||||
<userId type="1" name="Идентификатор пользователя" shortname="Пользователь" searchable="true" sortable="true" visible="true" link="user"/>
|
||||
<userId type="1" name="Идентификатор пользователя" shortname="Пользователь" searchable="true" sortable="true" visible="true" link="userCls"/>
|
||||
<userRole type="12" name="Идентификатор роли" shortname="Роль" searchable="true" sortable="true" visible="true" link="userRole"/>
|
||||
<companyId type="1" name="Идентификатор компании" shortname="Компания" searchable="true" sortable="true" visible="true" link="company"/>
|
||||
<status type="12" name="Статус" shortname="Статус" searchable="true" sortable="true" link="workflowStatus"/>
|
||||
</userRoleSession>
|
||||
<userSettings name="Настройки пользователя" class="ru.clearing.classes.static.data.User.UserSettings" table="userSettings">
|
||||
<id type="1" name="Идентификатор" shortname="ID" searchable="true" sortable="true"/>
|
||||
<userId type="1" name="Пользователь" shortname="Пользователь" searchable="true" sortable="true" visible="true" link="user"/>
|
||||
<userId type="1" name="Пользователь" shortname="Пользователь" searchable="true" sortable="true" visible="true" link="userCls"/>
|
||||
<version type="2" length="50" name="Версия настроек пользователя" shortname="Версия" searchable="false" sortable="false" visible="true"/>
|
||||
<json type="2" length="200000" name="Данные конфигурации" shortname="Конфигурация" searchable="false" sortable="false" visible="true"/>
|
||||
<actions>
|
||||
<put name="Изменение настроек пользователя" destination="">
|
||||
<userId type="1" name="Пользователь" required="false" link="user"/>
|
||||
<userId type="1" name="Пользователь" required="false" link="userCls"/>
|
||||
<version type="2" length="50" name="Версия" required="false"/>
|
||||
<json type="2" length="200000" name="Настройки" required="false"/>
|
||||
</put>
|
||||
|
|
@ -258,14 +278,14 @@
|
|||
<id type="1" name="Идентификатор" shortname="ID" searchable="true" sortable="true"/>
|
||||
<createdAt type="4" name="Создано" shortname="Создано" searchable="true" sortable="true"/>
|
||||
<updatedAt type="4" name="Изменено" shortname="Изменено" searchable="true" sortable="true"/>
|
||||
<userId type="1" name="Пользователь" shortname="Пользователь" searchable="true" sortable="true" visible="true" link="user"/>
|
||||
<userId type="1" name="Пользователь" shortname="Пользователь" searchable="true" sortable="true" visible="true" link="userCls"/>
|
||||
<connectionTime type="4" name="Последнее соединение" shortname="Вход" searchable="true" sortable="true"/>
|
||||
<disconnectionTime type="4" name="Разрыв соединения" shortname="Выход" searchable="true" sortable="true"/>
|
||||
<serverIP type="2" name="IP адрес сервера" shortname="IP сервера" searchable="true" sortable="true" visible="true" length="250"/>
|
||||
<clientIP type="2" name="IP адрес клиента" shortname="IP клиента" searchable="true" sortable="true" visible="true" length="250"/>
|
||||
<connectionState type="12" name="Статус соединения" shortname="Статус" searchable="true" sortable="true" visible="true" link="connectionState"/>
|
||||
<clearingDate type="6" name="Дата" shortname="Дата" searchable="true" sortable="true"/>
|
||||
<errorCode type="12" name="Код ошибки" shortname="Код ошибки" searchable="true" sortable="true" link="errorCode" linkCode="code"/>
|
||||
<errorCode type="1" name="Код ошибки" shortname="Код ошибки" searchable="true" sortable="true" link="errorCode" linkCode="code"/>
|
||||
<errorText type="12" name="Полный текст ошибки" shortname="Ошибка" searchable="true" sortable="true" link="errorText" linkCode="text"/>
|
||||
</userConnect>
|
||||
<timetable name="Постоянное расписание операционного дня" class="ru.clearing.classes.static.data.Scheduler.TimeTable" table="Timetable">
|
||||
|
|
@ -364,12 +384,16 @@
|
|||
<id type="1" name="Идентификатор" shortname="ID" searchable="true" sortable="true" visible="true"/>
|
||||
<createdAt type="4" name="Создано" shortname="Создано" searchable="true" sortable="true"/>
|
||||
<updatedAt type="4" name="Изменено" shortname="Изменено" searchable="true" sortable="true"/>
|
||||
<senderId type="1" name="Отправитель" shortname="Отправитель" searchable="true" sortable="true" visible="true" link="user"/>
|
||||
<senderId type="1" name="Отправитель" shortname="Отправитель" searchable="true" sortable="true" visible="true" link="userCls"/>
|
||||
<task type="12" name="Задача" shortname="Задача" searchable="true" sortable="true" link="task"/>
|
||||
<actions>
|
||||
<getBalance name="Зачисление остатков" destination=""/>
|
||||
<accBlock name="Блокировка счета" destination=""/>
|
||||
<getAllBalance name="Запрос остатков по всем счетам" destination=""/>
|
||||
<getBalance group="Обмен с расчетной организацией" name="Зачисление остатков (загрузка ДФ-01)" destination=""/>
|
||||
<accBlock group="Обмен с расчетной организацией" name="Блокировка счета (загрузка ДФ-12)" destination=""/>
|
||||
<getAllBalance group="Обмен с расчетной организацией" name="Запрос остатков по всем счетам (экспорт ДФ-08)" destination=""/>
|
||||
<addBalance group="Обмен с расчетной организацией" name="Дозачисление/списание остатков (загрузка ДФ-16)" destination=""/>
|
||||
<getBalanceDiff group="Обмен с расчетной организацией" name="Поступление средств (загрузка ДФ-09)" destination=""/>
|
||||
<createOrder group="Обмен с расчетной организацией" name="Формирование сводного платежного поручения (экспорт ДФ-03/ДФ-11)" destination=""/>
|
||||
<createOrderConfirm group="Обмен с расчетной организацией" name="Получение подтверждения переводов (загрузка ДФ-04)" destination=""/>
|
||||
</actions>
|
||||
</taskRunner>
|
||||
<company name="Участник" class="com.spicex.Static.Account.">
|
||||
|
|
@ -425,15 +449,15 @@
|
|||
<clearingMemberCategory name="Категории Участника клиринга" class="com.spicex.Static.Account.">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true" visible="true"/>
|
||||
<companyId type="1" name="Идентификатор Компании" shortname="Идентификатор Компании" searchable="true" sortable="true" visible="true" link="company"/>
|
||||
<clearingMemberCategory type="12" name="Идентификатор категории участника клиринга" shortname="Категория" searchable="true" sortable="true" visible="true" link="clearingCategory"/>
|
||||
<clearingMemberCategory type="12" name="Идентификатор категории участника клиринга" shortname="Категория" searchable="true" sortable="true" visible="true" link="clearingMemberCategory"/>
|
||||
<actions>
|
||||
<post name="Добавление категории участника клиринга" destination="">
|
||||
<companyId type="1" name="Идентификатор Компании" shortname="Идентификатор Компании" link="company" required="true"/>
|
||||
<clearingMemberCategory type="12" name="Идентификатор категории участника клиринга" shortname="Категория" link="clearingCategory" required="true"/>
|
||||
<clearingMemberCategory type="12" name="Идентификатор категории участника клиринга" shortname="Категория" link="clearingMemberCategory" required="true"/>
|
||||
</post>
|
||||
<put name="Изменение категории участника клиринга" destination="">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" link="clearingMemberCategory" linkCode="id" required="true"/>
|
||||
<clearingMemberCategory type="12" name="Идентификатор категории участника клиринга" shortname="Категория" link="clearingCategory"/>
|
||||
<clearingMemberCategory type="12" name="Идентификатор категории участника клиринга" shortname="Категория" link="clearingMemberCategory"/>
|
||||
</put>
|
||||
<delete name="Удаление категории участника клиринга" destination="">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" link="clearingMemberCategory" linkCode="id" required="true"/>
|
||||
|
|
@ -481,6 +505,41 @@
|
|||
</put>
|
||||
</actions>
|
||||
</companySymbols>
|
||||
<clearmemberRegistry name="Реестр участников клиринга" serviceProduct= "MKR">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
<createdAt type="4" name="Дата и время создания записи" shortname="Создано" searchable="true" sortable="true"/>
|
||||
<updatedAt type="4" name="Дата и время изменения записи" shortname="Изменено" searchable="true" sortable="true"/>
|
||||
<tradingCode type="2" length="255" name="Код участника торгов" shortname="Торговый код" searchable="true" sortable="true" visible="true"/>
|
||||
<clearingCode type="2" length="255" name="Код участника клиринга" shortname="Клиринговый код" searchable="true" sortable="true" visible="true"/>
|
||||
<fullName type="2" length="255" name="Полное наименование участника клиринга" shortname="Полное наименование УК" searchable="true" sortable="true" visible="true"/>
|
||||
<shortName type="2" length="255" name="Краткое наименование участника клиринга" shortname="Краткое наименование УК" searchable="true" sortable="true" visible="true"/>
|
||||
<categoryList type="12" name="Идентификатор категории участника клиринга" shortname="Категория" searchable="true" sortable="true" visible="true" link="clearingCategory"/>
|
||||
<corporationSole type="12" name="Идентификатор единоличного исполнительного органа" shortname="Исполнительный орган" searchable="true" sortable="true" visible="true" link="corporationSoleType"/>
|
||||
<account type="2" length="50" name="Cчета" shortname="Счет" searchable="true" sortable="true" visible="true"/>
|
||||
<bank type="1" name="Банк" shortname="Банк" searchable="true" sortable="true" visible="true" link = "bankAccount"/>
|
||||
<bankName type="2" length = "255" name="Наименование банка" shortname="Банк" searchable="true" sortable="true" visible="true"/>
|
||||
<inn type="2" length="255" name="Идентификационный номер налогоплательщика (ИНН)" shortname="ИНН" searchable="true" sortable="true" visible="true"/>
|
||||
<bic type="2" length="255" name="Банковский идентификационный код (БИК)" shortname="БИК" searchable="true" sortable="true" visible="true"/>
|
||||
<ogrn type="2" length="255" name="Основной государственный регистрационный номер" shortname="ОГРН" searchable="true" sortable="true" visible="true"/>
|
||||
<cpp type="2" length="255" name="Код причины постановки (КПП)" shortname="КПП" searchable="true" sortable="true" visible="true"/>
|
||||
<ocpo type="2" length="255" name="Код в Общероссийском классификаторе предприятий" shortname="ОКПО" searchable="true" sortable="true" visible="true"/>
|
||||
<contractNumber type="2" name="Номер договора" shortname="Номер договора" searchable="true" sortable="true" visible="true" length="255"/>
|
||||
<contractDate type="6" name="Дата выдачи" shortname="Дата выдачи" searchable="true" sortable="true"/>
|
||||
<registrationDate type="6" name="Дата регистрации" shortname="Дата" searchable="true" sortable="true" visible="true"/>
|
||||
<systemDate type="6" name="Системная дата" shortname="Создано" searchable="true" sortable="true"/>
|
||||
<accessDate type="4" name="Дата допуска к КО" shortname="Дата допуска к КО" searchable="true" sortable="true"/>
|
||||
<suspentionDate type="4" name="Дата приостановления" shortname="Дата приостановления" searchable="true" sortable="true"/>
|
||||
<reopeningDate type="4" name="Дата возобновления" shortname="Дата возобновления" searchable="true" sortable="true"/>
|
||||
<closeDate type="4" name="Дата прекращения" shortname="Дата прекращения" searchable="true" sortable="true"/>
|
||||
<exclusionDate type="4" name="Дата исключения из реестра" shortname="Дата исключения из реестра" searchable="true" sortable="true"/>
|
||||
<address type="2" length="255" name="Адрес местонахождения" shortname="Адрес" searchable="true" sortable="true" visible="true"/>
|
||||
<email type="2" length="255" name="Электронная почта" shortname="Эл. почта" searchable="true" sortable="true" visible="true"/>
|
||||
</clearmemberRegistry>
|
||||
<clearmemberRegistryChange name="Журнал изменений информации участников клиринга">
|
||||
<date type="4" name="Дата и время изменения записи" shortname="Изменено" searchable="true" sortable="true" ignore="true"/>
|
||||
<clearingCode type="2" length="255" name="Код участника клиринга" shortname="Клиринговый код" searchable="true" sortable="true" visible="true"/>
|
||||
<comment type="2" length="255" name="Комментарий" shortname="Комментарий" searchable="true" sortable="true" visible="true"/>
|
||||
</clearmemberRegistryChange>
|
||||
<keyRate name="Ключевая ставка ЦБ" class="ru.clearing.classes.StaticData.Misc.KeyRate">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true" visible="true"/>
|
||||
<rate type="10" name="Ключевая ставка ЦБ РФ" shortname="Ставка" searchable="true" sortable="true" visible="true"/>
|
||||
|
|
@ -516,10 +575,10 @@
|
|||
<id type="1" name="Идентификатор" shortname="ID" searchable="true" sortable="true" visible="true"/>
|
||||
<createdAt type="4" name="Дата и время создания записи" shortname="Создано" searchable="true" sortable="true"/>
|
||||
<updatedAt type="4" name="Дата и время изменения записи" shortname="Изменено" searchable="true" sortable="true"/>
|
||||
<account type="2" name="Номер счета" shortname="Счёт" searchable="true" sortable="true" length="12" visible="true"/>
|
||||
<account type="2" length="50" name="Номер счета" shortname="Счёт" searchable="true" sortable="true" visible="true"/>
|
||||
<accountType type="12" name="Идентификатор типа счета" shortname="Тип" searchable="true" sortable="true" visible="true" link="accountType"/>
|
||||
<relationId field="relation.id" type="1" name="Идентификатор договорных отношений" shortname="Договор" searchable="true" sortable="true" visible="true" link="relation"/>
|
||||
<status type="12" name="Идентификатор статуса" shortname="Статус" searchable="true" sortable="true" visible="true" link="accountStatus"/>
|
||||
<accountStatus type="12" name="Идентификатор статуса" shortname="Статус" searchable="true" sortable="true" visible="true" link="accountStatus"/>
|
||||
<processingSign type="12" name="Признак обработки счета" shortname="Обработка счета" searchable="true" sortable="true" visible="true" link="allowed"/>
|
||||
</account>
|
||||
<relation name="Договорные отношения" class="com.spicex.Static.company.Relation.Service" logUpdates="true">
|
||||
|
|
@ -547,7 +606,7 @@
|
|||
<swiftCode type="2" length="255" name="Код SWIFT" shortname="SWIFT" searchable="true" sortable="true" visible="true"/>
|
||||
<taxpayerIdentificationNumber type="2" length="255" name="Идентификационный номер налогоплательщика (ИНН)" shortname="ИНН" searchable="true" sortable="true" visible="true"/>
|
||||
<taxRegistrationReasonCode type="2" length="255" name="Код причины постановки (КПП)" shortname="КПП" searchable="true" sortable="true" visible="true"/>
|
||||
<account type="2" name="Номер счета" shortname="Счет" searchable="true" sortable="true" length="12" visible="true" extends="account" link="account" linkCode="account"/>
|
||||
<account type="2" length="50" name="Номер счета" shortname="Счет" searchable="true" sortable="true" visible="true" extends="account"/>
|
||||
<actions>
|
||||
<post name="Банковские реквизиты для перечисления денежных средств" destination="">
|
||||
<bankIdentificationCode type="2" length="255" name="Банковский идентификационный код (БИК)" shortname="БИК" required="true"/>
|
||||
|
|
@ -558,7 +617,7 @@
|
|||
<destination type="2" length="255" name="Назначение" shortname="Назначение" required="true"/>
|
||||
<taxpayerIdentificationNumber type="2" length="255" name="Идентификационный номер налогоплательщика (ИНН)" shortname="ИНН"/>
|
||||
<taxRegistrationReasonCode type="2" length="255" name="Код причины постановки (КПП)" shortname="КПП"/>
|
||||
<account type="2" length="12" name="Номер счета" shortname="Счет" required="true"/>
|
||||
<account type="2" length="50" name="Номер счета" shortname="Счет" required="true"/>
|
||||
</post>
|
||||
<put name="Изменение банковских реквизитов для перечисления денежных средств" destination="">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" link="bankAccount" linkCode="id" required="true"/>
|
||||
|
|
@ -570,7 +629,7 @@
|
|||
<destination type="2" length="255" name="Назначение" shortname="Назначение"/>
|
||||
<taxpayerIdentificationNumber type="2" length="255" name="Идентификационный номер налогоплательщика (ИНН)" shortname="ИНН"/>
|
||||
<taxRegistrationReasonCode type="2" length="255" name="Код причины постановки (КПП)" shortname="КПП"/>
|
||||
<account type="2" length="12" name="Номер счета" shortname="Счет"/>
|
||||
<account type="2" length="50" name="Номер счета" shortname="Счет"/>
|
||||
</put>
|
||||
<delete name="Удаление банковских реквизитов для перечисления денежных средств" destination="">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" link="bankAccount" linkCode="id" required="true"/>
|
||||
|
|
@ -673,8 +732,8 @@
|
|||
<createdAt type="4" name="Дата и время создания записи" shortname="Создано" searchable="true" sortable="true" ignore="true"/>
|
||||
<updatedAt type="4" name="Дата и время изменения записи" shortname="Изменено" searchable="true" sortable="true" ignore="true"/>
|
||||
<accountId type="1" name="Идентификатор счета" shortname="Идентификатор счета" searchable="true" sortable="true" link="account"/>
|
||||
<accountType type="1" name="Тип счета" shortname="Тип счета" searchable="true" sortable="true" link="account" linkCode="accountType"/>
|
||||
<account type="1" name="Счет" shortname="Счет" searchable="true" sortable="true" link="account" linkCode="account"/>
|
||||
<accountType type="12" name="Тип счета" shortname="Тип счета" searchable="true" sortable="true" link="account" linkCode="accountType"/>
|
||||
<account type="2" length="50" name="Счет" shortname="Счет" searchable="true" sortable="true"/>
|
||||
<openBalanceAmount type="10" name="Начальная сумма после расчетной организации" shortname="Начальный баланс" searchable="true" sortable="true"/>
|
||||
<startBalanceAmount type="10" name="Начальная сумма остатков ден. средств на начало работы" shortname="Стартовый баланс" searchable="true" sortable="true"/>
|
||||
<closeBalanceAmount type="10" name="Конечная сумма остатков ден. средств на счете" shortname="Конечный баланс" searchable="true" sortable="true"/>
|
||||
|
|
@ -691,57 +750,97 @@
|
|||
<shortName type="2" name="Короткое наименование Участника" shortname="Участник" searchable="true" sortable="true" visible="true" length="255" link="company" linkCode="shortName"/>
|
||||
<fullName type="2" name="Полное наименование Участника" shortname="Наименование участника" searchable="true" sortable="true" visible="true" length="255" link="company" linkCode="fullName"/>
|
||||
</accountBalance>
|
||||
<balanceRegistry name="Реестр остатков денежных средств" table="balance_registry">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
<createdAt type="4" name="Дата и время создания записи" shortname="Создано" searchable="true" sortable="true"/>
|
||||
<updatedAt type="4" name="Дата и время изменения записи" shortname="Изменено" searchable="true" sortable="true"/>
|
||||
<sDf01Date type="4" name="Дата создания записи в S_DF01" shortname="Дата создания записи в S_DF01" searchable="true" sortable="true"/>
|
||||
<currencyCode type="12" name="Код валюты" shortname="Валюта" link="currencyCode"/>
|
||||
<setHouseName type="2" length="255" name="Наименование РО" shortname="Наименование РО" searchable="true" sortable="true" visible="true"/>
|
||||
<account type="2" length="50" name="Номер торгового/клирингового счета" shortname="Номер торгового/клирингового счета" searchable="true" sortable="true" visible="true"/>
|
||||
<infoAccount type="2" length="50" name="Номер счета внутреннего учета СПВБ" shortname="Номер счета внутреннего учета СПВБ" searchable="true" sortable="true" visible="true"/>
|
||||
<remainderSum type="10" name="Остаток денежных средст" shortname="Остаток" searchable="true" sortable="true"/>
|
||||
<blockedSum type="10" name="Сумма блокированных денежных средств" shortname="Блокированные" searchable="true" sortable="true"/>
|
||||
<unblockedSum type="10" name="Сумма свободных денежных средств" shortname="Свободные" searchable="true" sortable="true"/>
|
||||
<inn type="2" length="255" name="Идентификационный номер налогоплательщика (ИНН)" shortname="ИНН" searchable="true" sortable="true" visible="true"/>
|
||||
<market type="1" name="Сегмент рынка" shortname="Сегмент рынка" searchable="true" sortable="true" visible="true" link="market"/>
|
||||
<marketName type="2" length = "255" name="Наименование сегмента рынка" shortname="Сегмент рынка" searchable="true" sortable="true" visible="true"/>
|
||||
<fullName type="2" length="255" name="Наименование Участника Клиринга" shortname="Участник Клиринга" searchable="true" sortable="true" visible="true"/>
|
||||
<typeRemains type="12" name="Тип остатка" shortname="Тип остатка" searchable="true" sortable="true" visible="true"/>
|
||||
<docNumber type="2" length="255" name="Номер документа" shortname="Номер" searchable="true" sortable="true" visible="true"/>
|
||||
</balanceRegistry>
|
||||
<managementJournal name="Журнал монитора и контроля" class="com.spicex.platform.classes.TransactionData.managementJournal" table="managementJournal">
|
||||
<id type="1" name="Идентификатор" shortname="ID" searchable="true" sortable="true"/>
|
||||
<companyId field="party.id" type="1" name="Участник" shortname="Участник" searchable="true" sortable="true" visible="true" link="company"/>
|
||||
<userId field="user.id" type="1" name="Автор сообщения" shortname="Сотрудник" searchable="true" sortable="true" visible="true" link="user"/>
|
||||
<managementJournalTypeId type="1" name="Тип мониторинга" shortname="Тип" searchable="true" sortable="true" visible="true" link="managementJournalType"/>
|
||||
<managementJournalPurposeId type="1" name="Цель мониторинга" shortname="Цель" searchable="true" sortable="true" visible="true" link="managementJournalPurpose"/>
|
||||
<status type="12" name="Статус" shortname="Статус" searchable="true" sortable="true" visible="true" link="managementJournalStatus"/>
|
||||
<companyId type="1" name="Участник" shortname="Участник" searchable="true" sortable="true" visible="true" link="company"/>
|
||||
<userId type="1" name="Автор сообщения" shortname="Сотрудник" searchable="true" sortable="true" visible="true" link="userCls"/>
|
||||
<managementJournalType type="12" name="Тип мониторинга" shortname="Тип" searchable="true" sortable="true" visible="true" link="managementJournalType"/>
|
||||
<managementJournalPurpose type="12" name="Цель мониторинга" shortname="Цель" searchable="true" sortable="true" visible="true" link="managementJournalPurpose"/>
|
||||
<managementJournalStatus type="12" name="Статус" shortname="Статус" searchable="true" sortable="true" visible="true" link="managementJournalStatus"/>
|
||||
<text type="2" name="Сообщение" shortname="Сообщение" searchable="true" visible="true" sortable="true" length="4096"/>
|
||||
<changeAccessSign type="12" name="Признак изменения доступа" shortname="Признак изменения доступа" searchable="true" sortable="true" visible="true" link="allowed"/>
|
||||
<changeDataSign type="12" name="Признак изменения данных" shortname="Признак изменения данных" searchable="true" sortable="true" visible="true" link="allowed"/>
|
||||
<eventDate type="4" name="Дата события ЕГРЮЛ" shortname="Дата события" searchable="true" sortable="true"/>
|
||||
<updatedAt type="4" name="Изменено" shortname="Изменено" searchable="true" sortable="true"/>
|
||||
<createdAt type="4" name="Создано" shortname="Создано" searchable="true" sortable="true"/>
|
||||
<subscription enabled="true" destination="managementJournal.state"/>
|
||||
<actions>
|
||||
<put name="Изменение журнала монитора и контроля" destination="">
|
||||
<id field="managementJournalId" type="1" name="Идентификатор" required="true" link="notice" linkCode="id"/>
|
||||
<status type="12" name="Статус" required="true" link="managementJournal"/>
|
||||
<post name="Добавление записи в журнал мониторинга и контроля" destination="">
|
||||
<companyId type="1" name="Участник" shortname="Участник" searchable="true" sortable="true" visible="true" link="company" required="true"/>
|
||||
<managementJournalType type="12" name="Тип мониторинга" shortname="Тип" searchable="true" sortable="true" visible="true" link="managementJournalType" required="true"/>
|
||||
<managementJournalPurpose type="12" name="Цель мониторинга" shortname="Цель" searchable="true" sortable="true" visible="true" link="managementJournalPurpose" required="true"/>
|
||||
<statusId type="12" name="Статус" shortname="Статус" searchable="true" sortable="true" visible="true" link="managementJournalStatus" required="true"/>
|
||||
<text type="2" name="Сообщение" shortname="Сообщение" searchable="true" visible="true" sortable="true" length="4096"/>
|
||||
<changeAccessSign type="12" name="Признак изменения доступа" shortname="Признак изменения доступа" searchable="true" sortable="true" visible="true" link="allowed" required="true"/>
|
||||
<changeDataSign type="12" name="Признак изменения данных" shortname="Признак изменения данных" searchable="true" sortable="true" visible="true" link="allowed" required="true"/>
|
||||
<eventDate type="4" name="Дата события ЕГРЮЛ" shortname="Дата события" searchable="true" sortable="true" required="true"/>
|
||||
</post>
|
||||
<put name="Изменение записи журнала мониторинга и контроля" destination="">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" link="managementJournal" linkCode="id" required="true"/>
|
||||
<companyId type="1" name="Участник" shortname="Участник" searchable="true" sortable="true" visible="true" link="company" required="true"/>
|
||||
<managementJournalType type="12" name="Тип мониторинга" shortname="Тип" searchable="true" sortable="true" visible="true" link="managementJournalType" required="true"/>
|
||||
<managementJournalPurpose type="12" name="Цель мониторинга" shortname="Цель" searchable="true" sortable="true" visible="true" link="managementJournalPurpose" required="true"/>
|
||||
<statusId type="12" name="Статус" shortname="Статус" searchable="true" sortable="true" visible="true" link="managementJournalStatus" required="true"/>
|
||||
<text type="2" name="Сообщение" shortname="Сообщение" searchable="true" visible="true" sortable="true" length="4096"/>
|
||||
<changeAccessSign type="12" name="Признак изменения доступа" shortname="Признак изменения доступа" searchable="true" sortable="true" visible="true" link="allowed" required="true"/>
|
||||
<changeDataSign type="12" name="Признак изменения данных" shortname="Признак изменения данных" searchable="true" sortable="true" visible="true" link="allowed" required="true"/>
|
||||
<eventDate type="4" name="Дата события ЕГРЮЛ" shortname="Дата события" searchable="true" sortable="true" required="true"/>
|
||||
</put>
|
||||
<delete name="Удаление записи из журнала мониторинга и контроля" destination="">
|
||||
<id type="1" name="Идентификатор" shortname="ID" link="managementJournal" linkCode="id" required="true"/>
|
||||
</delete>
|
||||
</actions>
|
||||
</managementJournal>
|
||||
<inDocumentJournal name="Журнал входящих документов" class="com.spicex.platform.classes.TransactionData.InDocumentJournal" table="InDocumentJournal">
|
||||
<id type="1" name="Идентификатор" shortname="ID" searchable="true" sortable="true"/>
|
||||
<id type="1" name="Идентификатор" shortname="№п/п" searchable="true" sortable="true"/>
|
||||
<registrationDate type="6" name="Дата регистрации" shortname="Дата" searchable="true" sortable="true" visible="true"/>
|
||||
<registrationTime type="5" name="Время регистрации" shortname="Время" searchable="true" sortable="true" visible="true"/>
|
||||
<registrationNumber type="1" name="Регистационный номер" shortname="Регистационный номер" searchable="true" sortable="true" visible="true"/>
|
||||
<documentName type="2" length="255" name="Наименование документа" shortname="Документ" searchable="true" sortable="true" visible="true"/>
|
||||
<senderId type="1" name="Полное наименование отправителя" shortname="Отправителя" searchable="true" sortable="true" visible="true" link="company"/>
|
||||
<sender type="2" length="255" name="Полное наименование отправителя" shortname="Отправителя" searchable="true" sortable="true" visible="true"/>
|
||||
<quantity type="1" name="Количествово экземпляров" shortname="Кол-во экз." searchable="true" sortable="true" visible="true"/>
|
||||
<clearingCode type="2" length="255" name="Код Участника Клиринга" shortname="Код УК" searchable="true" sortable="true" visible="true"/>
|
||||
<courierType type="12" name="Способ отправки" shortname="Способ отправки" searchable="true" sortable="true" visible="true" link="courierType"/>
|
||||
<emailDate type="6" name="Дата отправки электронной почтой" shortname="Дата отправки эл. почтой" searchable="true" sortable="true" visible="true"/>
|
||||
<amount type="11" name="Сумма" shortname="Сумма" searchable="true" sortable="true" visible="true"/>
|
||||
<dossierNumber type="1" name="Номер дела" shortname="Дело №" searchable="true" sortable="true" visible="true"/>
|
||||
<dossierNumber type="2" length="50" name="Номер дела" shortname="Дело №" searchable="true" sortable="true" visible="true"/>
|
||||
<comment type="2" length="255" name="Комментарий" shortname="Комментарий" searchable="true" sortable="true" visible="true"/>
|
||||
<receiptDate type="6" name="Дата получения оригинала" shortname="Дата получения" searchable="true" sortable="true" visible="true"/>
|
||||
<resultStatus type="12" name="Статус загрузки документа" shortname="Статус" searchable="true" sortable="true" visible="true" link="resultStatus"/>
|
||||
</inDocumentJournal>
|
||||
<outDocumentJournal name="Журнал исходящих документов" class="com.spicex.platform.classes.TransactionData.OutDocumentJournal" table="OutDocumentJournal">
|
||||
<id type="1" name="Идентификатор" shortname="ID" searchable="true" sortable="true"/>
|
||||
<id type="1" name="Идентификатор" shortname="№п/п" searchable="true" sortable="true"/>
|
||||
<registrationDate type="6" name="Дата регистрации" shortname="Дата" searchable="true" sortable="true" visible="true"/>
|
||||
<registrationTime type="5" name="Время регистрации" shortname="Время" searchable="true" sortable="true" visible="true"/>
|
||||
<registrationNumber type="1" name="Регистационный номер" shortname="Регистационный номер" searchable="true" sortable="true" visible="true"/>
|
||||
<documentName type="2" length="255" name="Наименование документа" shortname="Документ" searchable="true" sortable="true" visible="true"/>
|
||||
<addresseeId type="1" name="Полное наименование получателя" shortname="Получатель" searchable="true" sortable="true" visible="true" link="company"/>
|
||||
<addressee type="2" length="255" name="Полное наименование получателя" shortname="Получатель" searchable="true" sortable="true" visible="true"/>
|
||||
<quantity type="1" name="Количествово экземпляров" shortname="Кол-во экз." searchable="true" sortable="true" visible="true"/>
|
||||
<clearingCode type="2" length="255" name="Код Участника Клиринга" shortname="Код УК" searchable="true" sortable="true" visible="true"/>
|
||||
<courierType type="12" name="Способ отправки" shortname="Способ отправки" searchable="true" sortable="true" visible="true" link="courierType"/>
|
||||
<emailDate type="6" name="Дата отправки электронной почтой" shortname="Дата отправки эл. почтой" searchable="true" sortable="true" visible="true"/>
|
||||
<amount type="11" name="Сумма" shortname="Сумма" searchable="true" sortable="true" visible="true"/>
|
||||
<dossierNumber type="1" name="Номер дела" shortname="Дело №" searchable="true" sortable="true" visible="true"/>
|
||||
<dossierNumber type="2" length="50" name="Номер дела" shortname="Дело №" searchable="true" sortable="true" visible="true"/>
|
||||
<postDate type="6" name="Дата почтового отправления" shortname="Дата отправления" searchable="true" sortable="true" visible="true"/>
|
||||
<resultStatus type="12" name="Статус выгрузки документа" shortname="Статус" searchable="true" sortable="true" visible="true" link="resultStatus"/>
|
||||
</outDocumentJournal>
|
||||
<executionDeposit name="Сделки" class="ru.clearing.classes.TransactionData.Execution.DepositExecution" table="ExecutionDeposit">
|
||||
<id type="1" name="ID записи" shortname="ID записи" visible="false" searchable="true" sortable="true"/>
|
||||
|
|
@ -795,12 +894,58 @@
|
|||
<sessionId type="1" name="Сессия" shortname="Сессия" visible="true" searchable="true" sortable="true" link="moneyMarketSession"/>
|
||||
<subscription enabled="true" destination="executionDeposit.state"/>
|
||||
</executionDepositRegister>
|
||||
<reportRegister name="Реестр отчетов" class="ru.clearing.classes.TransactionData.Execution.DepositExecution" table="reportRegister">
|
||||
<admittedDeal name="Реестр сделок, допущенных к клирингу">
|
||||
<companyFullName type="2" length="255" name="Наименование биржи" shortname="Наименование биржи" searchable="true" sortable="true" visible="true"/>
|
||||
<executionDepositRegisterTradingDate type="4" name="Дата заключения сделки" shortname="Дата сделки" searchable="true" sortable="true"/>
|
||||
<exchangeExecutionId type="2" length="255" name="Номер сделки" shortname="Номер" searchable="true" sortable="true" visible="true"/>
|
||||
<exchangeExecutionTime type="5" name="Время заключения сделки" shortname="Время сделки" searchable="false" sortable="false" visible="true"/>
|
||||
<securityId type="1" name="Биржевой код инструмента" shortname="Инструмент" visible="true" searchable="true" sortable="true" link="security" linkCode="shortname"/>
|
||||
<securityName type="2" length = "255" name="Наименование инструмента" shortname="Инструмент" searchable="true" sortable="true" visible="true"/>
|
||||
<sellerFullName type="2" length="255" name="Наименование продавца" shortname="Наименование продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<sellerClearingCode type="2" length="255" name="Код продавца" shortname="Код продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<sellerAccount type="2" name="Счет продавца" shortname="Счет продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<buyerFullName type="2" length="255" name="Наименование продавца" shortname="Наименование продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<buyerClearingCode type="2" length="255" name="Код продавца" shortname="Код продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<buyerAccount type="2" name="Счет продавца" shortname="Счет продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<executionDepositRegisterAmount type="10" name="Сумма сделки" shortname="Сумма сделки" searchable="true" sortable="true"/>
|
||||
</admittedDeal>
|
||||
<dealPassedControl name="Реестр сделок, прошедших процедуру контроля обеспечения" coverageStatus="ALWD">
|
||||
<companyFullName type="2" length="255" name="Наименование биржи" shortname="Наименование биржи" searchable="true" sortable="true" visible="true"/>
|
||||
<executionDepositRegisterTradingDate type="4" name="Дата заключения сделки" shortname="Дата сделки" searchable="true" sortable="true"/>
|
||||
<exchangeExecutionId type="2" length="255" name="Номер сделки" shortname="Номер" searchable="true" sortable="true" visible="true"/>
|
||||
<exchangeExecutionTime type="5" name="Время заключения сделки" shortname="Время сделки" searchable="false" sortable="false" visible="true"/>
|
||||
<securityId type="1" name="Биржевой код инструмента" shortname="Инструмент" visible="true" searchable="true" sortable="true" link="security" linkCode="shortname"/>
|
||||
<securityName type="2" length = "255" name="Наименование инструмента" shortname="Инструмент" searchable="true" sortable="true" visible="true"/>
|
||||
<sellerFullName type="2" length="255" name="Наименование продавца" shortname="Наименование продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<sellerClearingCode type="2" length="255" name="Код продавца" shortname="Код продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<sellerAccount type="2" name="Счет продавца" shortname="Счет продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<buyerFullName type="2" length="255" name="Наименование продавца" shortname="Наименование продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<buyerClearingCode type="2" length="255" name="Код продавца" shortname="Код продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<buyerAccount type="2" name="Счет продавца" shortname="Счет продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<executionDepositRegisterAmount type="10" name="Сумма сделки" shortname="Сумма сделки" searchable="true" sortable="true"/>
|
||||
</dealPassedControl>
|
||||
<dealUnPassedControl name="Реестр сделок, не прошедших процедуру контроля обеспечения" coverageStatus="DEND">
|
||||
<companyFullName type="2" length="255" name="Наименование биржи" shortname="Наименование биржи" searchable="true" sortable="true" visible="true"/>
|
||||
<executionDepositRegisterTradingDate type="4" name="Дата заключения сделки" shortname="Дата сделки" searchable="true" sortable="true"/>
|
||||
<exchangeExecutionId type="2" length="255" name="Номер сделки" shortname="Номер" searchable="true" sortable="true" visible="true"/>
|
||||
<exchangeExecutionTime type="5" name="Время заключения сделки" shortname="Время сделки" searchable="false" sortable="false" visible="true"/>
|
||||
<securityId type="1" name="Биржевой код инструмента" shortname="Инструмент" visible="true" searchable="true" sortable="true" link="security" linkCode="shortname"/>
|
||||
<securityName type="2" length = "255" name="Наименование инструмента" shortname="Инструмент" searchable="true" sortable="true" visible="true"/>
|
||||
<sellerFullName type="2" length="255" name="Наименование продавца" shortname="Наименование продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<sellerClearingCode type="2" length="255" name="Код продавца" shortname="Код продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<sellerAccount type="2" name="Счет продавца" shortname="Счет продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<buyerFullName type="2" length="255" name="Наименование продавца" shortname="Наименование продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<buyerClearingCode type="2" length="255" name="Код продавца" shortname="Код продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<buyerAccount type="2" name="Счет продавца" shortname="Счет продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<executionDepositRegisterAmount type="10" name="Сумма сделки" shortname="Сумма сделки" searchable="true" sortable="true"/>
|
||||
<result type="2" length="3" name="Результат клиринга" shortname="Результат клиринга" searchable="true" sortable="true"/>
|
||||
</dealUnPassedControl>
|
||||
<reportRegister name="Реестр отчетов" class="com.moex.platform.classes.TransactionData.Execution.DepositExecution" table="reportRegister">
|
||||
<id type="1" name="ID записи" shortname="ID записи" visible="false" searchable="true" sortable="true"/>
|
||||
<createdAt type="5" name="Время регистрации" shortname="Время" visible="true" searchable="true" sortable="true"/>
|
||||
<updatedAt type="5" name="Время изменения" shortname="Время изменения" visible="false" searchable="true" sortable="true"/>
|
||||
<clearingDate type="6" name="Дата клиринга" shortname="Дата клиринга" visible="false" searchable="true" sortable="true"/>
|
||||
<companyFullName type="2" length="255" name="Идентификатор участника" shortname="Участник" searchable="true" sortable="true"/>
|
||||
<companyFullName type="2" length="255" name="Наименование участника" shortname="Участник" searchable="true" sortable="true"/>
|
||||
<clearingCode type="2" length="255" name="Код клиринга" shortname="Код участника" searchable="true" sortable="true"/>
|
||||
<sessionId type="1" name="Сессия" shortname="Сессия" visible="true" searchable="true" sortable="true" link="moneyMarketSession"/>
|
||||
<comment type="2" name="Комментарий" shortname="Основание" searchable="true" sortable="true" length="255"/>
|
||||
|
|
@ -826,20 +971,20 @@
|
|||
<closeDate type="6" name="Дата расторжения" shortname="Дата расторжения" searchable="true" sortable="true"/>
|
||||
<comment type="2" length="255" name="Место" shortname="Место" searchable="true" sortable="true" visible="true"/>
|
||||
</contractRegister>
|
||||
<paymentRegister name="Реестра распоряжений" class="ru.clearing.classes.TransactionData.Execution.LiabilitiesClaimsAssets" table="transactionStatus">
|
||||
<orderRegistry name="Реестра распоряжений" class="ru.clearing.classes.TransactionData.Execution.LiabilitiesClaimsAssets" table="transactionStatus">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
<createdAt type="4" name="Дата и время создания записи" shortname="Создано" searchable="true" sortable="true" ignore="true"/>
|
||||
<updatedAt type="4" name="Дата и время изменения записи" shortname="Изменено" searchable="true" sortable="true" ignore="true"/>
|
||||
<clearingDate type="6" name="Дата расчета" shortname="Дата расчета" searchable="true" sortable="true" visible="true"/>
|
||||
<creditLeg_accountId type="1" name="Идентификатор счета отправителя" shortname="Идентификатор счета" searchable="true" sortable="true" link="account"/>
|
||||
<creditLeg_amount type="1" name="Сумма отправителя" shortname="Сумма отправителя" searchable="true" sortable="true" visible="true"/>
|
||||
<creditLeg_currencyCode type="12" name="Код валюты отправителя" shortname="Валюта отправителя" searchable="true" sortable="true" visible="true" link="currency"/>
|
||||
<creditLeg_direction type="1" name="Направление отправителя" shortname="Направление" searchable="true" sortable="true" visible="true" link="inOutDirection"/>
|
||||
<debitLeg_account type="1" name="Счет получателя" shortname="Получатель" searchable="true" sortable="true" visible="true" link="Account"/>
|
||||
<senderId type="1" name="Идентификатор участника отправителя" shortname="Отправитель" searchable="true" sortable="true" link="company"/>
|
||||
<addresseeId type="1" name="Идентификатор участника получателя" shortname="Получатель" searchable="true" sortable="true" link="company"/>
|
||||
<creditLegAccount type="2" lenght = "50" name="Счет отправителя" shortname="Счет отправителя" searchable="true" sortable="true" visible="true"/>
|
||||
<creditLegAmount type="10" name="Сумма отправителя" shortname="Сумма отправителя" searchable="true" sortable="true" visible="true"/>
|
||||
<creditLegCurrencyCode type="12" name="Код валюты отправителя" shortname="Валюта отправителя" searchable="true" sortable="true" visible="true" link="currency"/>
|
||||
<creditLegDirection type="1" name="Направление отправителя" shortname="Направление" searchable="true" sortable="true" visible="true" link="inOutDirection"/>
|
||||
<debitLegAccount type="2" lenght = "50" name="Счет получателя" shortname="Счет получателя" searchable="true" sortable="true" visible="true"/>
|
||||
<sender type="2" length="255" name="Отправитель" shortname="Отправитель" searchable="true" sortable="true" visible="true"/>
|
||||
<addressee type="2" length="255" name="Получатель" shortname="Получатель" searchable="true" sortable="true" visible="true"/>
|
||||
<documentNumber type="2" length="255" name="Номер документа в сторонней системе" shortname="Номер РО" searchable="true" sortable="true"/>
|
||||
</paymentRegister>
|
||||
</orderRegistry>
|
||||
<liabilitiesClaimsMoney name="Требования и обязательства денежных средств" class="ru.clearing.classes.TransactionData.Execution.LiabilitiesClaimsMoney" table="liabilities_claims_money">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
<companyId type="1" name="Идентификатор участника" shortname="Участник" searchable="true" sortable="true" link="company"/>
|
||||
|
|
@ -847,7 +992,7 @@
|
|||
<updatedAt type="4" name="Дата и время изменения записи" shortname="Изменено" searchable="true" sortable="true" ignore="true"/>
|
||||
<accountId type="1" name="Идентификатор счета" shortname="Идентификатор счета" searchable="true" sortable="true" link="account"/>
|
||||
<accountType type="1" name="Тип счета" shortname="Тип счета" searchable="true" sortable="true" link="account" linkCode="accountType"/>
|
||||
<account type="1" name="Счет" shortname="Счет" searchable="true" sortable="true" link="account" linkCode="account"/>
|
||||
<account type="2" length="50" name="Счет" shortname="Счет" searchable="true" sortable="true"/>
|
||||
<liabilitiesAmount type="11" name="Регистр «Обязательства по денежным средствам, сформированные по результатам собственных сделок Участника клиринга», исключая проценты" shortname="Сумма обязательств" searchable="true" sortable="true"/>
|
||||
<refundInterest type="11" name="Проценты к возврату" shortname="Проценты к возврату" searchable="true" sortable="true"/>
|
||||
<accruedInterest type="11" name="Начисленные проценты" shortname="Начисленные проценты" searchable="true" sortable="true"/>
|
||||
|
|
@ -866,7 +1011,7 @@
|
|||
<updatedAt type="4" name="Дата и время изменения записи" shortname="Изменено" searchable="true" sortable="true" ignore="true"/>
|
||||
<accountId type="1" name="Идентификатор счета" shortname="Идентификатор счета" searchable="true" sortable="true" link="account"/>
|
||||
<accountType type="1" name="Тип счета" shortname="Тип счета" searchable="true" sortable="true" link="account" linkCode="accountType"/>
|
||||
<account type="1" name="Счет" shortname="Счет" searchable="true" sortable="true" link="account" linkCode="account"/>
|
||||
<account type="2" length="50" name="Счет" shortname="Счет" searchable="true" sortable="true"/>
|
||||
<liabilitiesQuantity type="10" name="Сумма обязательств" shortname="Сумма обязательств" searchable="true" sortable="true"/>
|
||||
<claimsQuantity type="10" name="Сумма требований" shortname="Сумма требований" searchable="true" sortable="true"/>
|
||||
<currency type="12" name="Код валюты" shortname="Валюта" searchable="true" sortable="true" visible="true" link="currencyCode"/>
|
||||
|
|
@ -895,15 +1040,15 @@
|
|||
<createdAt type="4" name="Дата и время создания записи" shortname="Создано" searchable="true" sortable="true" ignore="true"/>
|
||||
<updatedAt type="4" name="Дата и время изменения записи" shortname="Изменено" searchable="true" sortable="true" ignore="true"/>
|
||||
<clearingDate type="6" name="Дата расчета" shortname="Дата расчета" searchable="true" sortable="true" visible="true"/>
|
||||
<statementTypeId type="1" name="Тип поступления средств" shortname="Тип поступления средств" searchable="true" sortable="true" link="statementType"/>
|
||||
<statementType type="12" name="Тип поступления средств" shortname="Тип поступления средств" searchable="true" sortable="true" link="statementType"/>
|
||||
<comment type="2" length="255" name="Комментарий" shortname="Основание" searchable="true" sortable="true"/>
|
||||
<accountId type="1" name="Идентификатор счета" shortname="Идентификатор счета" searchable="true" sortable="true" link="account"/>
|
||||
<account type="1" name="Счет" shortname="Счет" searchable="true" sortable="true" link="account" linkCode="account"/>
|
||||
<inOutDirection type="1" name="Направление" shortname="Направление" searchable="true" sortable="true" link="inOutDirection"/>
|
||||
<account type="2" length="50" name="Счет" shortname="Счет" searchable="true" sortable="true"/>
|
||||
<inOutDirection type="12" name="Направление" shortname="Направление" searchable="true" sortable="true" link="inOutDirection"/>
|
||||
<settlementDate type="6" name="Дата расчетов" shortname="Дата расчетов" searchable="true" sortable="true"/>
|
||||
<amount type="11" name="Объем" shortname="Объем" searchable="true" sortable="true"/>
|
||||
<cashMovementCurrencyCode type="12" name="Код валюты" shortname="Валюта" searchable="true" sortable="true" visible="true" link="currency"/>
|
||||
<status type="12" name="Cтатус обработки" shortname="Статус" searchable="true" sortable="true" link="operationStatus"/>
|
||||
<operationStatus type="12" name="Cтатус обработки" shortname="Статус" searchable="true" sortable="true" link="operationStatus"/>
|
||||
<errorCode type="12" name="Код ошибки" shortname="Код ошибки" searchable="true" sortable="true" link="errorCode" linkCode="code"/>
|
||||
<errorText type="12" name="Полный текст ошибки" shortname="Ошибка" searchable="true" sortable="true" link="errorText" linkCode="text"/>
|
||||
<inSDfId type="1" name="Идентификатор записи, инициирующей изменения этой таблицы" shortname="Входящая запись" searchable="true" sortable="true" ignore="true"/>
|
||||
|
|
@ -921,8 +1066,8 @@
|
|||
<currencyCode type="12" name="Код валюты" shortname="Валюта" searchable="true" sortable="true" visible="true" link="currency"/>
|
||||
<inOutDirection type="1" name="Направление" shortname="Направление" searchable="true" sortable="true" link="inOutDirection"/>
|
||||
<accountId type="1" name="Идентификатор счета" shortname="Идентификатор счета" searchable="true" sortable="true" link="account"/>
|
||||
<account type="1" name="Счет" shortname="Счет" searchable="true" sortable="true" link="account" linkCode="account"/>
|
||||
<status type="12" name="Cтатус обработки" shortname="Статус" searchable="true" sortable="true" link="operationStatus"/>
|
||||
<account type="2" length="50" name="Счет" shortname="Счет" searchable="true" sortable="true"/>
|
||||
<operationStatus type="12" name="Cтатус обработки" shortname="Статус" searchable="true" sortable="true" link="operationStatus"/>
|
||||
</tradeSettlement>
|
||||
<operation name="Проводки" class="ru.clearing.classes.TransactionData.Execution.LiabilitiesClaimsAssets" table="tradeConfirmation">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
|
|
@ -932,18 +1077,18 @@
|
|||
<updatedAt type="4" name="Дата и время изменения записи" shortname="Изменено" searchable="true" sortable="true" ignore="true"/>
|
||||
<clearingDate type="6" name="Дата расчета" shortname="Дата расчета" searchable="true" sortable="true" visible="true"/>
|
||||
<operationTypeId type="1" name="Тип проводки" shortname="Тип" searchable="true" sortable="true" link="operationType"/>
|
||||
<status type="12" name="Cтатус обработки" shortname="Статус" searchable="true" sortable="true" link="operationStatus"/>
|
||||
<operationStatus type="12" name="Cтатус обработки" shortname="Статус" searchable="true" sortable="true" link="operationStatus"/>
|
||||
</operation>
|
||||
<paymentInstruction name="Информация о денежных средствах" class="ru.clearing.classes.TransactionData.Execution.LiabilitiesClaimsAssets" table="transactionStatus">
|
||||
<paymentInstruction name="Информация о денежных средствах" class="ru.clearing.classes.TransactionData.Execution.LiabilitiesClaimsAssets" table="PaymentInstruction">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
<createdAt type="4" name="Дата и время создания записи" shortname="Создано" searchable="true" sortable="true" ignore="true"/>
|
||||
<updatedAt type="4" name="Дата и время изменения записи" shortname="Изменено" searchable="true" sortable="true" ignore="true"/>
|
||||
<senderId type="1" name="Идентификатор участника отправителя" shortname="Отправитель" searchable="true" sortable="true" link="company"/>
|
||||
<addresseeId type="1" name="Идентификатор участника получателя" shortname="Получатель" searchable="true" sortable="true" link="company"/>
|
||||
<adresseeBIC type="2" length="255" name="Банковский идентификационный код (БИК) получателя" shortname="БИК получателя" searchable="true" sortable="true" visible="true"/>
|
||||
<payeeBankName type="1" name="Банк отправителя" shortname="Отправитель" searchable="true" sortable="true" visible="true" link = "bankAccount"/>
|
||||
<payeeBankName type="2" length="255" name="Банк отправителя" shortname="Отправитель" searchable="true" sortable="true" visible="true"/>
|
||||
<payeeBIC type="2" length="255" name="Банковский идентификационный код (БИК) отправителя" shortname="БИК отправителя" searchable="true" sortable="true" visible="true"/>
|
||||
<addresseeBankName type="1" name="Банк получателя" shortname="Получатель" searchable="true" sortable="true" visible="true" link = "bankAccount"/>
|
||||
<addresseeBankName type="2" length="255" name="Банк получателя" shortname="Получатель" searchable="true" sortable="true" visible="true"/>
|
||||
<paymentDate type="4" name="Дата и время платежа" shortname="Дата и время платежа" searchable="true" sortable="true" ignore="true"/>
|
||||
<PaymentPurpose type="2" name="Назначение платежа" shortname="Назначение" searchable="true" sortable="true" visible="true" length="255"/>
|
||||
<settlementDate type="6" name="Дата расчетов" shortname="Дата расчетов" searchable="true" sortable="true"/>
|
||||
|
|
@ -951,16 +1096,16 @@
|
|||
<debitLeg_amount type="1" name="Сумма получателя" shortname="Сумма получателя" searchable="true" sortable="true" visible="true"/>
|
||||
<creditLeg_accountId type="1" name="Идентификатор счета отправителя" shortname="Идентификатор счета" searchable="true" sortable="true" link="account"/>
|
||||
<credit_csAccount type="2" length="255" name="Корреспондентский счет отправителя" shortname="Корр. счет отправителя" searchable="true" sortable="true" visible="true"/>
|
||||
<creditLeg_account type="1" name="Счет отправителя" shortname="Отправитель" searchable="true" sortable="true" visible="true" link="Account"/>
|
||||
<creditLeg_account type="2" length="50" name="Счет отправителя" shortname="Отправитель" searchable="true" sortable="true" visible="true" link="Account"/>
|
||||
<debitLeg_accountId type="1" name="Идентификатор счета отправителя" shortname="Идентификатор счета" searchable="true" sortable="true" link="account"/>
|
||||
<debit_csAccount type="2" length="255" name="Корреспондентский счет получателя" shortname="Корреспондентский счет" searchable="true" sortable="true" visible="true"/>
|
||||
<debitLeg_account type="1" name="Счет получателя" shortname="Получатель" searchable="true" sortable="true" visible="true" link="Account"/>
|
||||
<debitLeg_account type="2" length="50" name="Счет получателя" shortname="Получатель" searchable="true" sortable="true" visible="true" link="Account"/>
|
||||
<creditLeg_direction type="1" name="Направление отправителя" shortname="Направление" searchable="true" sortable="true" visible="true" link="inOutDirection"/>
|
||||
<debitLeg_direction type="1" name="Направление получателя" shortname="Направление" searchable="true" sortable="true" visible="true" link="inOutDirection"/>
|
||||
<creditLeg_currencyCode type="12" name="Код валюты отправителя" shortname="Валюта отправителя" searchable="true" sortable="true" visible="true" link="currency"/>
|
||||
<debitLeg_currencyCode type="12" name="Код валюты получателя" shortname="Валюта получателя" searchable="true" sortable="true" visible="true" link="currency"/>
|
||||
<clearingDate type="6" name="Дата расчета" shortname="Дата расчета" searchable="true" sortable="true" visible="true"/>
|
||||
<transactionStatusId type="1" name="Cтатус транзакции" shortname="Статус" searchable="true" sortable="true" link="transactionStatus"/>
|
||||
<transactionStatus type="12" name="Cтатус транзакции" shortname="Статус" searchable="true" sortable="true" link="transactionStatus"/>
|
||||
<documentNumber type="2" length="255" name="Номер документа в сторонней системе" shortname="Номер РО" searchable="true" sortable="true"/>
|
||||
</paymentInstruction>
|
||||
<marketData name="Итоги торгов" class="ru.clearing.classes.TransactionData.Execution.MarketData" table="marketData">
|
||||
|
|
@ -984,7 +1129,7 @@
|
|||
<chargeTariff name="Тарифы комиссий" logUpdates="true">
|
||||
<id type="1" name="Идентификатор" shortname="ID" searchable="true" sortable="true" visible="true"/>
|
||||
<market type="12" name="Секция" shortname="Секция" searchable="true" sortable="true" link="market" visible="true"/>
|
||||
<clearingMemberCategory type="12" name="Категория участника клиринга" shortname="Категория" searchable="true" sortable="true" visible="true" link="clearingCategory"/>
|
||||
<clearingMemberCategory type="12" name="Категория участника клиринга" shortname="Категория" searchable="true" sortable="true" visible="true" link="clearingMemberCategory"/>
|
||||
<chargeTypeId type="1" name="Тип комиссии" shortname="Тип комиссии" searchable="true" sortable="true" link="chargeType" visible="true"/>
|
||||
<chargeRate type="10" name="Ставка комиссионного сбора" shortname="Ставка комиссионного сбора" searchable="true" sortable="true" visible="true"/>
|
||||
<currency type="1" name="Валюта начисления комиссии" shortname="Валюта комиссии" searchable="true" sortable="true" link="currencyCode" visible="true"/>
|
||||
|
|
@ -997,7 +1142,7 @@
|
|||
<id type="1" name="Идентификатор" shortname="ID" searchable="true" sortable="true" visible="true"/>
|
||||
<companyId type="1" name="Участник" shortname="Участник" searchable="true" sortable="true" link="company"/>
|
||||
<market type="12" name="Секция" shortname="Секция" searchable="true" sortable="true" link="market" visible="true"/>
|
||||
<clearingMemberCategory type="12" name="Категория участника клиринга" shortname="Категория" searchable="true" sortable="true" visible="true" link="clearingCategory"/>
|
||||
<clearingMemberCategory type="12" name="Категория участника клиринга" shortname="Категория" searchable="true" sortable="true" visible="true" link="clearingMemberCategory"/>
|
||||
<chargeTypeId type="1" name="Тип комиссии" shortname="Тип комиссии" searchable="true" sortable="true" link="chargeType" visible="true"/>
|
||||
<chargeRate type="10" name="Ставка комиссионного сбора" shortname="Ставка комиссионного сбора" searchable="true" sortable="true" visible="true"/>
|
||||
<currency type="1" name="Валюта начисления комиссии" shortname="Валюта комиссии" searchable="true" sortable="true" link="currencyCode" visible="true"/>
|
||||
|
|
@ -1009,7 +1154,7 @@
|
|||
<companyTariff name="Тарифы комиссий в разрезе Участника">
|
||||
<id type="1" name="Идентификатор" shortname="ID" searchable="true" sortable="true" visible="true"/>
|
||||
<market type="12" name="Секция" shortname="Секция" searchable="true" sortable="true" link="market" visible="true"/>
|
||||
<clearingMemberCategory type="12" name="Категория участника клиринга" shortname="Категория" searchable="true" sortable="true" visible="true" link="clearingCategory"/>
|
||||
<clearingMemberCategory type="12" name="Категория участника клиринга" shortname="Категория" searchable="true" sortable="true" visible="true" link="clearingMemberCategory"/>
|
||||
<fullName type="2" name="Полное наименование Участника" shortname="Наименование участника" searchable="true" sortable="true" visible="true" length="255" link="company" linkCode="fullName"/>
|
||||
<contract type="2" name="Номер договора" shortname="Номер договора" searchable="true" sortable="true" visible="true" length="255"/>
|
||||
<chargeTypeId type="1" name="Тип комиссии" shortname="Тип комиссии" searchable="true" sortable="true" link="chargeType" visible="true"/>
|
||||
|
|
@ -1027,7 +1172,7 @@
|
|||
<updatedAt type="4" name="Дата и время изменения записи" shortname="Изменено" searchable="true" sortable="true" ignore="true"/>
|
||||
<errorCode type="12" name="Код ошибки" shortname="Код" searchable="true" sortable="true" visible="true" link="errorCode"/>
|
||||
<text type="2" length="255" name="Полный текст ошибки" shortname="Ошибка" searchable="true" sortable="true" visible="true"/>
|
||||
<userId type="1" name="Автор сообщения" shortname="Сотрудник" searchable="true" sortable="true" visible="true" link="user" ignore="true"/>
|
||||
<userId type="1" name="Автор сообщения" shortname="Сотрудник" searchable="true" sortable="true" visible="true" link="userCls" ignore="true"/>
|
||||
<clearingDate type="6" name="Текущая дата" shortname="Дата" visible="false" searchable="true" sortable="true" ignore="true"/>
|
||||
</errorText>
|
||||
<sDf01 name="ДФ-01 Информация о денежных средствах, находящихся на торговых банковских счетах Участников клиринга" class="com.spicex.Static.">
|
||||
|
|
@ -1166,7 +1311,7 @@
|
|||
<servdate type="2" length="8" name="Дата получения товара, оказания услуг в плат. поручении" shortname="Дата получения товара" searchable="true" sortable="true"/>
|
||||
<doc_result type="2" length="2" name="" shortname="" searchable="true" sortable="true"/>
|
||||
<imp_result type="2" length="3" name="Результат приема" shortname="Результат приема" searchable="true" sortable="true"/>
|
||||
<fileName type = "2" length="255" name="Наименование входящего файла" shortname="Наименование файла" searchable="true" sortable="true"/>
|
||||
<fileName type="2" length="255" name="Наименование входящего файла" shortname="Наименование файла" searchable="true" sortable="true"/>
|
||||
<generationTime type="4" name="Дата и время обработки файла" shortname="Дата и время обработки" searchable="true" sortable="true" />
|
||||
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true"/>
|
||||
</sDf04>
|
||||
|
|
@ -1194,7 +1339,7 @@
|
|||
<type type="2" length="1" name="Код типа платежного документа (операции)" shortname="Код типа платежного документа" searchable="true" sortable="true"/>
|
||||
<number type="10" name="Номер платежного документа (операции)" shortname="Номер запроса" searchable="true" sortable="true"/>
|
||||
<INN type="10" name="ИНН" shortname="ИНН" searchable="true" sortable="true" visible="true"/>
|
||||
<fileName type = "2" length="255" name="Наименование входящего файла" shortname="Наименование файла" searchable="true" sortable="true"/>
|
||||
<fileName type="2" length="255" name="Наименование входящего файла" shortname="Наименование файла" searchable="true" sortable="true"/>
|
||||
<generationTime type="4" name="Дата и время обработки файла" shortname="Дата и время обработки" searchable="true" sortable="true" />
|
||||
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true"/>
|
||||
</sDf09>
|
||||
|
|
@ -1265,12 +1410,12 @@
|
|||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
<account type="2" length="25" name="Код счета участника клиринга" shortname="Код счета УК" searchable="true" sortable="true" visible="true"/>
|
||||
<deal type="2" length="4" name="Биржевой код участника клиринга" shortname="Биржевой код УК" searchable="true" sortable="true" visible="true"/>
|
||||
<status type="10" name="Статус счета" shortname="Статус" searchable="true" sortable="true" visible="true"/>
|
||||
<status type="3" name="Статус счета" shortname="Статус" searchable="true" sortable="true" visible="true"/>
|
||||
<fileName type="2" length="255" name="Наименование входящего файла" shortname="Наименование файла" searchable="true" sortable="true"/>
|
||||
<generationTime type="4" name="Дата и время обработки файла" shortname="Дата и время обработки" searchable="true" sortable="true"/>
|
||||
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true"/>
|
||||
</sDf12>
|
||||
<sDf13 name="ДФ 013 - Вывод свободных средств для инициаторов категории В с клирингового счета 30414/7 - платежное поручение АО СПВБ на вывод средств из РО." class="com.spicex.Static.">
|
||||
<sDf13 name="ДФ-13 Вывод свободных средств для инициаторов категории В с клирингового счета 30414/7 - платежное поручение АО СПВБ на вывод средств из РО" class="com.spicex.Static.">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
<seg_type type="2" length="1" name="Код инициатора в КС" shortname="Инициатор в КС" searchable="true" sortable="true"/>
|
||||
<doc_type type="2" lenght="4" name="Тип документа" shortname="Тип документа" searchable="true" sortable="true"/>
|
||||
|
|
@ -1302,19 +1447,19 @@
|
|||
<sc_code type="2" length="12" name="Код клиента-плательщика" shortname="Код клиента-плательщика" searchable="true" sortable="true"/>
|
||||
<acc_deb type="2" length="35" name="Счет клиента-плательщика(дебет)" shortname="Счет клиента-плательщика(дебет)" searchable="true" sortable="true"/>
|
||||
<rclientn1 type="2" length="35" name="Наименование клиента-получателя" shortname="Наименование клиента-получателя" searchable="true" sortable="true"/>
|
||||
<acc_deb type="2" length="12" name="ИНН клиента-получателя" shortname="ИНН клиента-получателя" searchable="true" sortable="true"/>
|
||||
<inn_cred type="2" length="12" name="ИНН клиента-получателя" shortname="ИНН клиента-получателя" searchable="true" sortable="true"/>
|
||||
<kpp_cred type="2" length="9" name="КПП клиента-получателя" shortname="КПП клиента-получателя" searchable="true" sortable="true"/>
|
||||
<rclientn4 type="2" length="35" name="" shortname="" searchable="true" sortable="true"/>
|
||||
<acc_kr_1 type="2" length="35" name="Счет получателя" shortname="Счет получателя" searchable="true" sortable="true"/>
|
||||
<acc_kr_2 type="2" length="35" name="" shortname="" searchable="true" sortable="true"/>
|
||||
<sp_code type="2" length="2" name="Код назначения платежа" shortname="Код назначения платежа" searchable="true" sortable="true"/>
|
||||
<specif_1 type="2" length="35" name="Назначение платежа" shortname="Назначение платежа" searchable="true" sortable="true"/>
|
||||
<specif_2 type="2" length="35" name="" shortname="" searchable="true" sortable="true"/>
|
||||
<specif_3 type="2" length="35" name="" shortname="" searchable="true" sortable="true"/>
|
||||
<specif_4 type="2" length="35" name="" shortname="" searchable="true" sortable="true"/>
|
||||
<specif_5 type="2" length="35" name="" shortname="" searchable="true" sortable="true"/>
|
||||
<specif_6 type="2" length="35" name="" shortname="" searchable="true" sortable="true"/>
|
||||
<send_type type="2" length="10" name="Вид платежа " shortname="Вид платежа " searchable="true" sortable="true"/>
|
||||
<specif_2 type="2" length="35" name="Назначение платежа" shortname="Назначение платежа" searchable="true" sortable="true"/>
|
||||
<specif_3 type="2" length="35" name="Назначение платежа" shortname="Назначение платежа" searchable="true" sortable="true"/>
|
||||
<specif_4 type="2" length="35" name="Назначение платежа" shortname="Назначение платежа" searchable="true" sortable="true"/>
|
||||
<specif_5 type="2" length="35" name="Назначение платежа" shortname="Назначение платежа" searchable="true" sortable="true"/>
|
||||
<specif_6 type="2" length="35" name="Назначение платежа" shortname="Назначение платежа" searchable="true" sortable="true"/>
|
||||
<send_type type="2" length="10" name="Вид платежа" shortname="Вид платежа" searchable="true" sortable="true"/>
|
||||
<servdate type="2" length="8" name="Дата получения товара, оказания услуг в плат. поручении" shortname="Дата получения товара" searchable="true" sortable="true"/>
|
||||
<doc_result type="2" length="2" name="" shortname="" searchable="true" sortable="true"/>
|
||||
<generationTime type="4" name="Дата и время создания записи" shortname="Дата и время создания" searchable="true" sortable="true" />
|
||||
|
|
@ -1322,7 +1467,6 @@
|
|||
</sDf13>
|
||||
<sDf16 name="ДФ-16 Формат запроса по возврату депозита или дозачисление/списание денежных средств" class="com.spicex.Static.">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
<date type="4" name="Дата обработки записи" shortname="Дата обработки записи" searchable="true" sortable="true"/>
|
||||
<account type="2" length="20" name="Номер счета участника торгов" shortname="Номер счета участника торгов" searchable="true" sortable="true"/>
|
||||
<sum type="10" name="Сумма платежного документа (операции)" shortname="Сумма платежного документа" searchable="true" sortable="true"/>
|
||||
<market type="2" length="1" name="Код сегмента рынка" shortname="Код сегмента рынка" searchable="true" sortable="true"/>
|
||||
|
|
@ -1331,7 +1475,7 @@
|
|||
<BIC type="10" name="БИК" shortname="БИК" searchable="true" sortable="true" visible="true"/>
|
||||
<SPEC type="2" length="255" name="Назначение" shortname="Назначение" searchable="true" sortable="true"/>
|
||||
<number type="10" name="Номер платежного документа (операции)" shortname="Номер платежного документа" searchable="true" sortable="true"/>
|
||||
<fileName type = "2" length="255" name="Наименование входящего файла" shortname="Наименование файла" searchable="true" sortable="true"/>
|
||||
<fileName type="2" length="255" name="Наименование входящего файла" shortname="Наименование файла" searchable="true" sortable="true"/>
|
||||
<generationTime type="4" name="Дата и время обработки файла" shortname="Дата и время обработки" searchable="true" sortable="true" />
|
||||
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true"/>
|
||||
</sDf16>
|
||||
|
|
@ -1345,7 +1489,7 @@
|
|||
<BIC type="10" name="БИК" shortname="БИК" searchable="true" sortable="true" visible="true"/>
|
||||
<SPEC type="2" length="255" name="Назначение" shortname="Назначение" searchable="true" sortable="true"/>
|
||||
<number type="10" name="Номер платежного документа (операции)" shortname="Номер платежного документа" searchable="true" sortable="true"/>
|
||||
<result type="2" length="3" name="Код завершения операции" shortname="Код завершения операции" searchable="true" sortable="true"/>
|
||||
<result type="10" name="Код завершения операции" shortname="Код завершения операции" searchable="true" sortable="true"/>
|
||||
<generationTime type="4" name="Дата и время создания записи" shortname="Дата и время создания" searchable="true" sortable="true"/>
|
||||
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true"/>
|
||||
<inSDf16Id type="1" name="Идентификатор соответствующей записи из таблицы-источника" shortname="Входящая запись" searchable="true" sortable="true"/>
|
||||
|
|
@ -1354,12 +1498,57 @@
|
|||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
<account type="2" length="25" name="Код счета участника клиринга" shortname="Код счета УК" searchable="true" sortable="true" visible="true"/>
|
||||
<deal type="2" length="4" name="Биржевой код участника клиринга" shortname="Биржевой код УК" searchable="true" sortable="true" visible="true"/>
|
||||
<status type="10" name="Статус счета" shortname="Статус" searchable="true" sortable="true" visible="true"/>
|
||||
<status type="3" name="Статус счета" shortname="Статус" searchable="true" sortable="true" visible="true"/>
|
||||
<result type="10" name="Код завершения операции" shortname="Код завершения операции" searchable="true" sortable="true"/>
|
||||
<generationTime type="4" name="Дата и время создания записи" shortname="Дата и время создания" searchable="true" sortable="true"/>
|
||||
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true"/>
|
||||
<inSDf12Id type="1" name="Идентификатор соответствующей записи из таблицы-источника" shortname="Входящая запись" searchable="true" sortable="true"/>
|
||||
</sDf18>
|
||||
<trade_arqa name="Выгрузка сделок из торговой системы" class="com.spicex.Static.">
|
||||
<trade_num type="10" name="Номер сделки" shortname="Номер сделки" searchable="true" sortable="true"/>
|
||||
<sec_code type="2" length="255" name="Код ценной бумаги" shortname="Код ценной бумаги" searchable="true" sortable="true"/>
|
||||
<trade_date_time type="4" name="Дата-время сделки" shortname="Дата-время сделки" searchable="true" sortable="true"/>
|
||||
<settle_date type="6" name="Плановая дата исполнения сделки" shortname="Плановая дата исполнения сделки" searchable="true" sortable="true"/>
|
||||
<price type="10" name="Цена сделки" shortname="Цена сделки" searchable="true" sortable="true"/>
|
||||
<value type="10" name="Сумма сделки" shortname="Сумма сделки" searchable="true" sortable="true"/>
|
||||
<qty type="10" name="Количество лотов по сделке" shortname="Количество лотов по сделке" searchable="true" sortable="true"/>
|
||||
<accruedint type="10" name="НКД за 1 ценную бумагу" shortname="НКД за 1 ценную бумагу" searchable="true" sortable="true"/>
|
||||
<firm_id type="2" length="255" name="ID клиента в КС" shortname="ID клиента в КС" searchable="true" sortable="true"/>
|
||||
<client_code type="2" length="255" name="Код участника торгов = Код участника клиринга = Код участника расчетов" shortname="Участник" searchable="true" sortable="true"/>
|
||||
<exchange_commission type="10" name="Комиссия по сделке" shortname="Комиссия" searchable="true" sortable="true"/>
|
||||
<class_code type="2" length="255" name="Код класса сделки из новой ТС" shortname="Код класса сделки" searchable="true" sortable="true"/>
|
||||
<operation type="2" length="255" name="Тип плеча (Купля/Продажа)" shortname="Тип плеча" searchable="true" sortable="true"/>
|
||||
<issue_account type="2" length="255" name="Счет для учета ценной бумаги" shortname="Счет для учета ценной бумаги" searchable="true" sortable="true"/>
|
||||
<money_account type="2" length="255" name="Счет для учета денежных средств" shortname="Счет для учета денежных средств" searchable="true" sortable="true"/>
|
||||
<trade_type type="12" name="Первичное размещение/торги" shortname="Первичное размещение/торги" searchable="true" sortable="true"/>
|
||||
<days_to_mat_date type="10" name="Количество дней до погашения" shortname="Количество дней до погашения" searchable="true" sortable="true"/>
|
||||
<collateral type="12" name="Признак залога (не используется)" shortname="Признак залога (не используется)" searchable="true" sortable="true"/>
|
||||
<settle_code type="2" length="255" name="Код периода сделки из новой ТС" shortname="Код периода сделки из новой ТС" searchable="true" sortable="true"/>
|
||||
</trade_arqa>
|
||||
<notification name="Сообщения" class="com.spicex.TransactionData.Notification" logUpdates="true" table="Notification">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
<createdAt type="4" name="Дата и время создания записи" shortname="Создано" searchable="true" sortable="true" ignore="true"/>
|
||||
<updatedAt type="4" name="Дата и время изменения записи" shortname="Изменено" searchable="true" sortable="true" ignore="true"/>
|
||||
<clearingDate type="6" name="Дата" shortname="Дата" searchable="true" sortable="true" visible="true"/>
|
||||
<senderId type="1" name="Идентификатор участника отправителя" shortname="Отправитель" searchable="true" sortable="true" link="company"/>
|
||||
<addresseeId type="1" name="Идентификатор участника получателя" shortname="Получатель" searchable="true" sortable="true" link="company"/>
|
||||
<objectType type="12" name="Тип объекта" shortname="Объект" searchable="true" sortable="true" link="objectType"/>
|
||||
<objectId type="4" name="Идентификатор объекта" shortname="ID объекта" searchable="true" sortable="true"/>
|
||||
<notificationStatus type="12" name="Статус сообщения" shortname="Статус" searchable="true" sortable="true" visible="true" link="notificationStatus"/>
|
||||
<actions>
|
||||
<put name="Подтверждение/Отклонение операции дозачисления/списания" destination="">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" link="company" linkCode="id" required="true"/>
|
||||
<notificationStatus type="12" name="Статус сообщения" shortname="Статус" link="notificationStatus" required="true"/>
|
||||
</put>
|
||||
</actions>
|
||||
</notification>
|
||||
<session name="Клиринговая сессия" class="com.spicex.TransactionData.Session" logUpdates="true" table="Session">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
<createdAt type="4" name="Дата и время создания записи" shortname="Создано" searchable="true" sortable="true" ignore="true"/>
|
||||
<updatedAt type="4" name="Дата и время изменения записи" shortname="Изменено" searchable="true" sortable="true" ignore="true"/>
|
||||
<clearingDate type="6" name="Дата" shortname="Дата" searchable="true" sortable="true" visible="true"/>
|
||||
<sessionStatus type="12" name="Статус клиринговой сессии" shortname="Статус" searchable="true" sortable="true" visible="true" link="sessionStatus"/>
|
||||
</session>
|
||||
</objects>
|
||||
<views>
|
||||
<AccountUnion>
|
||||
|
|
@ -1390,77 +1579,102 @@
|
|||
</AccountUnion>
|
||||
</views>
|
||||
<reports>
|
||||
<clearedLiabilities version="0.0.1" code="0420315" name="Сведения об исполненных обязательствах, допущенных к клирингу, за отчетный период, часть 1" startDate="" endDate="dd.MM.YYYY" destination = "BR" clearingMemberCategory="I,V" clearingStatus="OK">
|
||||
<rows сompany_id="" company_fullName="" listing_market = "" contract_qty="" liabilities_amount=""/>
|
||||
<clearedLiabilities version="0.0.1" code="0420315" name="Сведения об исполненных обязательствах, допущенных к клирингу, за отчетный период, часть 1" startDate="" endDate="dd.MM.YYYY" destination="BR" clearingMemberCategory="I,V" clearingStatus="OK">
|
||||
<rows сompany_id="" company_fullName="" listing_market="" contract_qty="" liabilities_amount=""/>
|
||||
</clearedLiabilities>
|
||||
<clearedLiabilitiesTotal version="0.0.1" code="0420315" name="Сведения об исполненных обязательствах, допущенных к клирингу, за отчетный период, часть 2" startDate="" endDate="dd.MM.YYYY" destination = "BR">
|
||||
<clearedLiabilitiesTotal version="0.0.1" code="0420315" name="Сведения об исполненных обязательствах, допущенных к клирингу, за отчетный период, часть 2" startDate="" endDate="dd.MM.YYYY" destination="BR">
|
||||
<rows contract_qty="" liabilities_amount=""/>
|
||||
</clearedLiabilitiesTotal>
|
||||
<clearingServiceStatus version="0.0.1" code="0420317" name="Сведения о предоставлении, прекращении, приостановке, возобновлении допуска к клиринговому обслуживанию" startDate="" endDate="dd.MM.YYYY" destination = "BR">
|
||||
<rows company_clearingCode= "" relation_id = "" relation_serviceStatus = "" relation_updatedAt = "" company_fullName = "" companySymbol_code = "" countryCode_id = "" relation_comment = ""/>
|
||||
<clearingServiceStatus version="0.0.1" code="0420317" name="Сведения о предоставлении, прекращении, приостановке, возобновлении допуска к клиринговому обслуживанию" startDate="" endDate="dd.MM.YYYY" destination="BR">
|
||||
<rows company_clearingCode="" relation_id="" relation_serviceStatus="" relation_updatedAt="" company_fullName="" companySymbol_code="" countryCode_id="" relation_comment=""/>
|
||||
</clearingServiceStatus>
|
||||
<unfundedLiabilities version="0.0.1" code="0420318" name="Сведения о неисполненных обязательствах" startDate="" endDate="dd.MM.YYYY" destination = "BR" clearingStatus = "">
|
||||
<rows liabilitiesClaimsAssets_fullName="" companySymbols_code="" liabilitiesClaimsAssets_countryCode="" liabilitiesClaimsAssets_refundDate = "" liabilitiesClaimsAssets_Contract="" liabilitiesClaimsMoney_currencyCode="" liabilitiesClaimsAssets_liabilitiesQuantity="" liabilitiesClaimsMoney_name="" liabilitiesClaimsAssets_liabilities="" liabilitiesClaimsAssets_comment="" companySymbols_value="" liabilitiesClaimsAssets_fullNames=""/>
|
||||
<unfundedLiabilities version="0.0.1" code="0420318" name="Сведения о неисполненных обязательствах" startDate="" endDate="dd.MM.YYYY" destination="BR" clearingStatus="">
|
||||
<rows liabilitiesClaimsAssets_fullName="" companySymbols_code="" liabilitiesClaimsAssets_countryCode="" liabilitiesClaimsAssets_refundDate="" liabilitiesClaimsAssets_Contract="" liabilitiesClaimsMoney_currencyCode="" liabilitiesClaimsAssets_liabilitiesQuantity="" liabilitiesClaimsMoney_name="" liabilitiesClaimsAssets_liabilities="" liabilitiesClaimsAssets_comment="" companySymbols_value="" liabilitiesClaimsAssets_fullNames=""/>
|
||||
</unfundedLiabilities>
|
||||
<accountTransactionLiabilities version="0.0.1" code="0420314" name="Сведения об УК и операциях, проведенных по торговым счетам, часть 1" startDate="" endDate="dd.MM.YYYY" destination = "BR" clearingStatus ="" >
|
||||
<rows company_clearingCode = "" profileDocument_id = "" company_fullName = "" companySymbols_code = "" companySymbol_value = "" clearingMemberCategory_clearingMemberCategory = "" liabilitiesClaimsAssets_contract = "" liabilitiesClaimsAssets_tradingDate = "" liabilitiesClaimsAssests_liabilitiesQuantity = "" />
|
||||
<accountTransactionLiabilities version="0.0.1" code="0420314" name="Сведения об УК и операциях, проведенных по торговым счетам, часть 1" startDate="" endDate="dd.MM.YYYY" destination="BR" clearingStatus="">
|
||||
<rows company_clearingCode="" profileDocument_id="" company_fullName="" companySymbols_code="" companySymbol_value="" clearingMemberCategory_clearingMemberCategory="" liabilitiesClaimsAssets_contract="" liabilitiesClaimsAssets_tradingDate="" liabilitiesClaimsAssests_liabilitiesQuantity="" />
|
||||
</accountTransactionLiabilities>
|
||||
<accountTransactionTurnover version="0.0.1" code="0420314" name="Сведения об УК и операциях, проведенных по торговым счетам, часть 2 " startDate="" endDate="dd.MM.YYYY" destination = "BR" transactionStatus = "">
|
||||
<rows company_clearingCode = "" profileDocument_documentType = "" accountBalance_openBalanceAmount = "" paymentInstruction_creditLeg_amount = "" paymentInstructiont_debitLeg_amount = "" accountBalance_closeBalanceAmount = "" />
|
||||
<accountTransactionTurnover version="0.0.1" code="0420314" name="Сведения об УК и операциях, проведенных по торговым счетам, часть 2 " startDate="" endDate="dd.MM.YYYY" destination="BR" transactionStatus="">
|
||||
<rows company_clearingCode="" profileDocument_documentType="" accountBalance_openBalanceAmount="" paymentInstruction_creditLeg_amount="" paymentInstructiont_debitLeg_amount="" accountBalance_closeBalanceAmount="" />
|
||||
</accountTransactionTurnover>
|
||||
<clearingCoverage1 version="0.0.1" code="0420312" name="Сведения о клиринговом обеспечении, часть 1" startDate="" endDate="dd.MM.YYYY" destination = "BR">
|
||||
<rows company_clearingCode = "" company_fullName = "" companySymbol_code = "" companySymbol_value = "" countryCode_id = "" clearingMemberCategory_clearingMemberCategory = ""/>
|
||||
<clearingCoverage1 version="0.0.1" code="0420312" name="Сведения о клиринговом обеспечении, часть 1" startDate="" endDate="dd.MM.YYYY" destination="BR">
|
||||
<rows company_clearingCode="" company_fullName="" companySymbol_code="" companySymbol_value="" countryCode_id="" clearingMemberCategory_clearingMemberCategory=""/>
|
||||
</clearingCoverage1>
|
||||
<clearingCoverage2 version="0.0.1" code="0420312" name="Сведения о клиринговом обеспечении, часть 2" startDate="" endDate="dd.MM.YYYY" destination = "BR">
|
||||
<rows liabilitiesClaimsAssets_companyId = "" liabilitiesClaimsAssets_liabilitiesQuantity = "" />
|
||||
<clearingCoverage2 version="0.0.1" code="0420312" name="Сведения о клиринговом обеспечении, часть 2" startDate="" endDate="dd.MM.YYYY" destination="BR">
|
||||
<rows liabilitiesClaimsAssets_companyId="" liabilitiesClaimsAssets_liabilitiesQuantity="" />
|
||||
</clearingCoverage2>
|
||||
<clearingCoverage3 version="0.0.5" code="0420312" name="Сведения о клиринговом обеспечении, часть 3" startDate="" endDate="dd.MM.YYYY" destination = "BR">
|
||||
<rows liabilitiesClaimsAssets_companyId = "" liabilitiesClaimsAssets_liabilities = ""/>
|
||||
<clearingCoverage3 version="0.0.5" code="0420312" name="Сведения о клиринговом обеспечении, часть 3" startDate="" endDate="dd.MM.YYYY" destination="BR">
|
||||
<rows liabilitiesClaimsAssets_companyId="" liabilitiesClaimsAssets_liabilities=""/>
|
||||
</clearingCoverage3>
|
||||
<clearingCoverage4 version="0.0.5" code="0420312" name="Сведения о клиринговом обеспечении, часть 4" startDate="" endDate="dd.MM.YYYY" destination = "BR">
|
||||
<rows liabilities_amount =""/>
|
||||
<clearingCoverage4 version="0.0.5" code="0420312" name="Сведения о клиринговом обеспечении, часть 4" startDate="" endDate="dd.MM.YYYY" destination="BR">
|
||||
<rows liabilities_amount=""/>
|
||||
</clearingCoverage4>
|
||||
<clearingCoverage5 version="0.0.5" code="0420312" name="Сведения о клиринговом обеспечении, часть 5" startDate="" endDate="dd.MM.YYYY" destination = "BR">
|
||||
<rows liabilities_amount = "" />
|
||||
<clearingCoverage5 version="0.0.5" code="0420312" name="Сведения о клиринговом обеспечении, часть 5" startDate="" endDate="dd.MM.YYYY" destination="BR">
|
||||
<rows liabilities_amount="" />
|
||||
</clearingCoverage5>
|
||||
<clearingCoverage6 version="0.0.5" code="0420312" name="Сведения о клиринговом обеспечении, часть 6" startDate="" endDate="dd.MM.YYYY" destination = "BR">
|
||||
<rows liabilities_amount = ""/>
|
||||
<clearingCoverage6 version="0.0.5" code="0420312" name="Сведения о клиринговом обеспечении, часть 6" startDate="" endDate="dd.MM.YYYY" destination="BR">
|
||||
<rows liabilities_amount=""/>
|
||||
</clearingCoverage6>
|
||||
<clearingCoverage7 version="0.0.5" code="0420312" name="Сведения о клиринговом обеспечении, часть 7" startDate="" endDate="dd.MM.YYYY" destination = "BR">
|
||||
<rows liabilities_amount = ""/>
|
||||
<clearingCoverage7 version="0.0.5" code="0420312" name="Сведения о клиринговом обеспечении, часть 7" startDate="" endDate="dd.MM.YYYY" destination="BR">
|
||||
<rows liabilities_amount=""/>
|
||||
</clearingCoverage7>
|
||||
<clearingCoverage8 version="0.0.5" code="0420312" name="Сведения о клиринговом обеспечении, часть 8" startDate="" endDate="dd.MM.YYYY" destination = "BR">
|
||||
<rows currency_id = "" liabilitiesClaimsAssets_companyId = "" liabilitiesClaimsAssets_fullName = "" companySymbol_code = "" companySymbol_value = "" companyInfo_countryCode = "" clearingMemberCategory_clearingMemberCategory = "" />
|
||||
<clearingCoverage8 version="0.0.5" code="0420312" name="Сведения о клиринговом обеспечении, часть 8" startDate="" endDate="dd.MM.YYYY" destination="BR">
|
||||
<rows currency_id="" liabilitiesClaimsAssets_companyId="" liabilitiesClaimsAssets_fullName="" companySymbol_code="" companySymbol_value="" companyInfo_countryCode="" clearingMemberCategory_clearingMemberCategory="" />
|
||||
</clearingCoverage8>
|
||||
<clearingCoverage9 version="0.0.5" code="0420312" name="Сведения о клиринговом обеспечении, часть 9" startDate="" endDate="dd.MM.YYYY" destination = "BR">
|
||||
<rows currency_id= "" liabilitiesClaimsAssets_companyId = "" liabilitiesClaimsMoney_currencyCode = "" liabilitiesClaimsAssets_liabilities = ""/>
|
||||
<clearingCoverage9 version="0.0.5" code="0420312" name="Сведения о клиринговом обеспечении, часть 9" startDate="" endDate="dd.MM.YYYY" destination="BR">
|
||||
<rows currency_id="" liabilitiesClaimsAssets_companyId="" liabilitiesClaimsMoney_currencyCode="" liabilitiesClaimsAssets_liabilities=""/>
|
||||
</clearingCoverage9>
|
||||
<clearingCoverage10 version="0.0.5" code="0420312" name="Сведения о клиринговом обеспечении, часть 10" startDate="" endDate="dd.MM.YYYY" destination = "BR">
|
||||
<rows liabilities_amount = ""/>
|
||||
<clearingCoverage10 version="0.0.5" code="0420312" name="Сведения о клиринговом обеспечении, часть 10" startDate="" endDate="dd.MM.YYYY" destination="BR">
|
||||
<rows liabilities_amount=""/>
|
||||
</clearingCoverage10>
|
||||
<clearingCommissionHead version="0.0.1" code="5" name="Расчет клиринговой комиссии по УК" startDate="" endDate="dd.MM.YYYY" destination = "1С">
|
||||
<rows sysname="" doc_type="" doc_ver="" doc_name="" period_from="" period_to="" doc_date="" doc_time="" author=""/>
|
||||
</clearingCommissionHead>
|
||||
<clearingCommissionBILL version="0.0.1" code="5" name="Расчет клиринговой комиссии по УК" startDate="" endDate="dd.MM.YYYY" destination = "1С">
|
||||
<rows part_code="" part_name="" part_inn="" part_kpp="" agreement_name="" agreement_number="" agreement_date="" bill_from="" bill_to="" bill_summ="" nds_type="" nds_rate="" nds_sum=""/>
|
||||
</clearingCommissionBILL>
|
||||
<clearingCommissionTransac version="0.0.1" code="5" name="Расчет клиринговой комиссии по УК" startDate="" endDate="dd.MM.YYYY" destination = "1С">
|
||||
<rows doc_name="" doc_date="" exec_date="" repaym_date="" pay_length="" segment="" type_finstr="" sum_transac="" sum_com="" sum_comMnds="" sum_nds=""/>
|
||||
</clearingCommissionTransac>
|
||||
<clearingCommissionCRC version="0.0.1" code="5" name="Расчет клиринговой комиссии по УК" startDate="" endDate="dd.MM.YYYY" destination = "1С">
|
||||
<rows crc_type="" crc_value=""/>
|
||||
</clearingCommissionCRC>
|
||||
<netPositionInitiator version="0.0.1" code="BT2" name="Отчет по нетто-позиции участника клиринга в секции МКР (Вкладчик)" startDate=" dd.MM.YYYY " endDate="dd.MM.YYYY" clearingMemberCategory="I,V">
|
||||
<rows id="1" liabilitiesClaimsAssets_fullName = "" company_clearingCode = "" liabilitiesClaimsAssets_settlementDate="" liabilitiesClaimsAssets_refundDate="" liabilitiesClaimsAssets_tradingDate="" liabilitiesClaimsAssets_contract="" liabilitiesClaimsAssets_liabilitiesQuantity="" chargeCommission="" liabilitiesClaimsAssets_ClaimsQuantity="" liabilitiesClaimsAssets_refundPaymentId="" liabilitiesClaimsAssets_clearingStatus=""/>
|
||||
<clearingCommission version="0.0.1" code="BT5" name="Расчет клиринговой комиссии по УК" startDate="" endDate="dd.MM.YYYY" destination="1С">
|
||||
<documents sysname="" doc_type="" doc_ver="" doc_name="" period_from="" period_to="" doc_date="" doc_time="" author=""/>
|
||||
<COM_KS_ALL ver="1.1">
|
||||
<BILL part_code="" part_name="" part_inn="" part_kpp="" agreement_name="" agreement_number="" agreement_date="" bill_from="" bill_to="" bill_summ="" nds_type="" nds_rate="" nds_sum="">
|
||||
<TRANSAC doc_name="" doc_date="" exec_date="" repaym_date="" pay_length="" segment="" type_finstr="" sum_transac="" sum_com="" sum_comMnds="" sum_nds=""/>
|
||||
</BILL>
|
||||
</COM_KS_ALL>
|
||||
<CRC crc_type="" crc_value=""/>
|
||||
</clearingCommission>
|
||||
<netPositionInitiator version="0.0.1" code="BT12.2" name="Отчет по нетто-позиции участника клиринга в секции МКР (Вкладчик)" startDate=" dd.MM.YYYY " endDate="dd.MM.YYYY" clearingMemberCategory="I,V">
|
||||
<rows id="1" liabilitiesClaimsAssets_fullName="" company_clearingCode="" liabilitiesClaimsAssets_settlementDate="" liabilitiesClaimsAssets_refundDate="" liabilitiesClaimsAssets_tradingDate="" liabilitiesClaimsAssets_contract="" liabilitiesClaimsAssets_liabilitiesQuantity="" chargeCommission="" liabilitiesClaimsAssets_ClaimsQuantity="" liabilitiesClaimsAssets_refundPaymentId="" liabilitiesClaimsAssets_clearingStatus="" liabilitiesClaimsAssets_comment=""/>
|
||||
<total claimsAmount="" liabilitiesAmount="" paymentAmount=""/>
|
||||
</netPositionInitiator>
|
||||
<netPositionBank version="0.0.1" code="BT2" name="Отчет по нетто-позиции участника клиринга в секции МКР(Уполномоченный банк)" startDate=" dd.MM.YYYY " endDate="dd.MM.YYYY" clearingMemberCategory="B">
|
||||
<rows id="1" liabilitiesClaimsAssets_fullName = "" company_clearingCode = "" liabilitiesClaimsAssets_settlementDate="" liabilitiesClaimsAssets_refundDate="" liabilitiesClaimsAssets_tradingDate="" liabilitiesClaimsAssets_contract="" liabilitiesClaimsAssets_liabilitiesQuantity="" chargeCommission="" liabilitiesClaimsAssets_ClaimsQuantity="" liabilitiesClaimsAssets_refundPaymentId="" liabilitiesClaimsAssets_clearingStatus=""/>
|
||||
<netPositionBank version="0.0.1" code="BT12.2" name="Отчет по нетто-позиции участника клиринга в секции МКР(Уполномоченный банк)" startDate=" dd.MM.YYYY " endDate="dd.MM.YYYY" clearingMemberCategory="B">
|
||||
<rows id="1" liabilitiesClaimsAssets_fullName="" company_clearingCode="" liabilitiesClaimsAssets_settlementDate="" liabilitiesClaimsAssets_refundDate="" liabilitiesClaimsAssets_tradingDate="" liabilitiesClaimsAssets_contract="" liabilitiesClaimsAssets_liabilitiesQuantity="" chargeCommission="" liabilitiesClaimsAssets_ClaimsQuantity="" liabilitiesClaimsAssets_refundPaymentId="" liabilitiesClaimsAssets_clearingStatus="" liabilitiesClaimsAssets_comment=""/>
|
||||
<total claimsAmount="" liabilitiesAmount="" paymentAmount=""/>
|
||||
</netPositionBank>
|
||||
<infoAccountBalance version="0.0.1" code="BT12.1" name="Отчет о денежных средствах Участника клиринга, находящихся на счете внутреннего учета средств Участника клиринга на клиринговом счете СПВБ" startDate=" dd.MM.YYYY " endDate="dd.MM.YYYY">
|
||||
<rows company_fullName = "" company_fullNameOrg = "" company_clearingCode = "" clearing_sessionId = "" Account_accountCLRN = "" Account_accountINFO = "" sum_statementIn = "" tradeSettlement_amount = "" sum_statementOut = "" />
|
||||
</infoAccountBalance>
|
||||
<rows company_fullName="" company_fullNameOrg="" company_clearingCode="" clearing_sessionId="" Account_accountCLRN="" Account_accountINFO="" sum_statementIn="" tradeSettlement_amount="" sum_statementOut="" />
|
||||
</infoAccountBalance>
|
||||
<reportMarketData version="0.0.1" code="BT17.6" name="Формирование КС Биржевой информации по итогам торгов в секции МКР" startDate=" dd.MM.YYYY " endDate="dd.MM.YYYY">
|
||||
<rows marketData_securitiesDepositId="" company_fullName="" marketData_marketId="" marketData_counterPartyNum="" marketData_tradesNum="" marketData_amount="" marketData_openPrice="" marketData_maxPrice="" marketData_minPrice="" marketData_closePrice="" marketData_avgPrice="" marketData_duration=""/>
|
||||
<total marketTypeA_amount="" marketTypeT_amount="" marketSum=""/>
|
||||
</reportMarketData>
|
||||
<accountBalanceInfo version="0.0.1" code="BT16.5" name=" Отчет о денежных средствах на счете внутреннего учета (клиринговом регистре) Участника клиринга " date="dd.MM.YYYY" time="hh:mm.ss">
|
||||
<rows id="" clearingHouse="" company_clearinCode="" company_fullName="" accountBalance_account="" accountBalance_openAmount="" accountBalance_debitAmount="" accountBalance_creditAmount="" accountBalance_closeAmount=""/>
|
||||
</accountBalanceInfo>
|
||||
<liabilitiesClaimsBank version="0.0.1" code="BT16.3" name="Отчет об обязательствах/требованиях (отчета о нетто-позициях) в разрезе каждого Уполномоченного банка" date="dd.MM.YYYY" time="hh:mm.ss" clearingMemberCategory="">
|
||||
<rows company_clearingCode="" liabilitiesClaimsMoney_account="" liabilitiesClaimsMoney_liabilitiesAmount="" liabilitiesDate=""/>
|
||||
</liabilitiesClaimsBank>
|
||||
<liabilitiesClaimsSingleBank version="0.0.1" code="BT16.4" name="Отчет об обязательствах/требованиях (отчета о нетто-позициях) по соответствующему Уполномоченному банку" date="dd.MM.YYYY" time="hh:mm.ss" clearingMemberCategory="">
|
||||
<rows company_clearingCode="" liabilitiesClaimsMoney_account="" liabilitiesClaimsMoney_liabilitiesAmount="" liabilitiesDate=""/>
|
||||
</liabilitiesClaimsSingleBank>
|
||||
<detailedClearingСommission version="0.0.1" code="BT6" name="Детализированный отчет по начисленной за месяц клиринговой комиссии (новый отчет КО)" startDate=" dd.MM.YYYY " endDate="dd.MM.YYYY" clearingMemberCategory="B">
|
||||
<body>
|
||||
<rows>
|
||||
<row id="1" contract="" settlementDate="" tradingDate="" liabilitiesQuantity="" netCommissionAmount="" duratoin=""/>
|
||||
</rows>
|
||||
<total commissionAmount="" name="Итого"/>
|
||||
</body>
|
||||
<totalCommissions totalCommissionAmount="" name="Сумма комиссионного вознагораждения ВСЕГО"/>
|
||||
</detailedClearingСommission>
|
||||
<outgoingDocuments version="0.0.1" code="BT 13.12" name="Журнал Исходящих документов" date="dd.MM.YYYY" time="hh:mm.ss">
|
||||
<rows id="" outDocumentJournal_registrationDate="" outDocumentJournal_registrationTime="" outDocumentJournal_registrationNumber="" outDocumentJournal_documentName="" outDocumentJournal_addresee="" outDocumentJournal_quantity="" outDocumentJournal_clearingCode="" outDocumentJournal_courierType="" outDocumentJournal_emailDate="" outDocumentJournal_Amount="" outDocumentJournal_dossierNumber="" outDocumentJournal_postDate=""/>
|
||||
</outgoingDocuments>
|
||||
<incomingDocuments version="0.0.1" code="BT 13.11" name="Журнал Входящих документов" date="dd.MM.YYYY" time="hh:mm.ss">
|
||||
<rows id="" inDocumentJournal_registrationDate="" inDocumentJournal_registrationTime="" inDocumentJournal_registrationNumber="" inDocumentJournal_documentName="" inDocumentJournal_sender="" inDocumentJournal_quantity="" inDocumentJournal_clearingCode="" inDocumentJournal_courierType="" inDocumentJournal_emailDate="" inDocumentJournal_Amount="" inDocumentJournal_dossierNumber="" inDocumentJournal_Comment="" inDocumentJournal_receiptDate=""/>
|
||||
</incomingDocuments>
|
||||
</reports>
|
||||
<types>
|
||||
<identity id="1" name="Идентификатор" type="bigint" javatype="Long"/>
|
||||
|
|
|
|||
|
|
@ -4,11 +4,15 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import ru.clearing.classes.statics.data.account.Account;
|
||||
import ru.clearing.classes.statics.data.company.Company;
|
||||
import ru.clearing.classes.statics.data.sdf.SDf01;
|
||||
import ru.spcex.clearing.balance.validation.AccountBalanceValidation;
|
||||
import ru.spcex.clearing.balance.validation.AccountBalanceValidationRule;
|
||||
import ru.spcex.clearing.balance.validation.Sdf01ValidationRule;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.spcex.platform.classes.base.SpcexObjectBase;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
import ru.spcex.platform.imdg.validation.ImdgValidationContext;
|
||||
import ru.spcex.platform.utils.validation.IValidator;
|
||||
import ru.spcex.platform.utils.validation.ValidatorImpl;
|
||||
|
||||
|
|
@ -26,7 +30,9 @@ public class ValidationConfig {
|
|||
context.setValidatedObject(sDf01);
|
||||
BiConsumer<String, Class<? extends SpcexObjectBase>> addImdg = (s, aClass) -> context.addImdg(s, imdgProvider.getImdg(s, aClass));
|
||||
addImdg.accept(IMDGDistributedNames.Map_Account, Account.class);
|
||||
addImdg.accept(IMDGDistributedNames.Map_Company, Company.class);
|
||||
return new ValidatorImpl<>(context,
|
||||
Sdf01ValidationRule.CompanyPresent,
|
||||
Sdf01ValidationRule.AccountPresent,
|
||||
Sdf01ValidationRule.CurrencyCode,
|
||||
Sdf01ValidationRule.CurrentDateOnly,
|
||||
|
|
@ -35,4 +41,21 @@ public class ValidationConfig {
|
|||
};
|
||||
}
|
||||
|
||||
@Autowired
|
||||
@Bean("accountBalanceValidator")
|
||||
public Function<AccountBalanceValidation, IValidator> accountBalanceValidator(ImdgProvider imdgProvider) {
|
||||
return fieldsToValidateWrapper -> {
|
||||
ImdgValidationContext<AccountBalanceValidation> context = new ImdgValidationContext<>();
|
||||
context.setValidatedObject(fieldsToValidateWrapper);
|
||||
BiConsumer<String, Class<? extends SpcexObjectBase>> addImdg = (s, aClass) -> context.addImdg(s, imdgProvider.getImdg(s, aClass));
|
||||
addImdg.accept(IMDGDistributedNames.Map_Account, Account.class);
|
||||
addImdg.accept(IMDGDistributedNames.Map_Company, Company.class);
|
||||
return new ValidatorImpl<>(context,
|
||||
AccountBalanceValidationRule.CompanyPresent,
|
||||
AccountBalanceValidationRule.AccountOk);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@ public enum BalanceError implements IEnumId {
|
|||
CurrentDateOnly(5214L),
|
||||
WrongMarket(5215L),
|
||||
WrongAccount(5215L),
|
||||
AccountNotPresent(-1L);
|
||||
AccountNotPresent(5217L),
|
||||
AccountNotActive(5218L)
|
||||
;
|
||||
private final Long id;
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,79 @@
|
|||
package ru.spcex.clearing.balance.service;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Component;
|
||||
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.spcex.clearing.balance.validation.AccountBalanceValidation;
|
||||
import ru.spcex.clearing.balance.validation.ValidationStored;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.spcex.platform.enumeration.BalanceAccountType;
|
||||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
import ru.spcex.platform.utils.enumeration.EnumMessage;
|
||||
import ru.spcex.platform.utils.validation.IValidator;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.function.Function;
|
||||
|
||||
@Component
|
||||
public class AccountBalanceService {
|
||||
private final ImdgProvider imdgProvider;
|
||||
private final Imdg<AccountBalance> accountBalanceImdg;
|
||||
private final Function<AccountBalanceValidation, IValidator> validationFactory;
|
||||
|
||||
public AccountBalanceService(ImdgProvider imdgProvider,
|
||||
@Qualifier("accountBalanceValidator") Function<AccountBalanceValidation, IValidator> validationFactory) {
|
||||
this.imdgProvider = imdgProvider;
|
||||
this.validationFactory = validationFactory;
|
||||
this.accountBalanceImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_AccountBalance, AccountBalance.class);
|
||||
}
|
||||
|
||||
public AccountResult createAccountBalance(Long addresseeId, Long accountId, BigDecimal amount,
|
||||
String cashMovementCurrencyCode) {
|
||||
IValidator validator = validationFactory.apply(new AccountBalanceValidation(addresseeId, accountId));
|
||||
Optional<EnumMessage> validationError = validator
|
||||
.tillFirstError();
|
||||
if (validationError.isPresent()) return new AccountResult(validationError.get());
|
||||
Account account = validator.getStored(ValidationStored.Account);
|
||||
Company company = validator.getStored(ValidationStored.Company);
|
||||
//которой accountBalance.accountId=statement.accountId и accountBalance.companyId=statement.companyId:
|
||||
|
||||
AccountBalance accountBalance = accountBalanceImdg.getSingleObjectByFieldValues(
|
||||
Map.of("accountId", accountId, "companyId", addresseeId)
|
||||
);
|
||||
if (accountBalance == null) {
|
||||
accountBalance = new AccountBalance();
|
||||
accountBalance.setCompanyId(addresseeId);
|
||||
accountBalance.setCreated(Instant.now());
|
||||
accountBalance.setAccountId(accountId);
|
||||
accountBalance.setAccountType(account.getAccountType());
|
||||
accountBalance.setAccount(account.getAccount());
|
||||
accountBalance.setOpenBalanceAmount(amount);
|
||||
accountBalance.setFreeBalanceAmount(amount);
|
||||
accountBalance.setBalanceAmount(amount);
|
||||
accountBalance.setBalanceAccountType(BalanceAccountType.Active.getKey());
|
||||
accountBalance.setClearingDate(LocalDate.now());
|
||||
accountBalance.setCurrencyCode(cashMovementCurrencyCode);
|
||||
accountBalance.setTradingCode(company.getTradingCode());
|
||||
accountBalance.setShortName(company.getShortName());
|
||||
accountBalance.setFullName(company.getFullName());
|
||||
return new AccountResult(accountBalance);
|
||||
} else {
|
||||
accountBalance.setUpdated(Instant.now());
|
||||
accountBalance.setAccountId(accountId);
|
||||
accountBalance.setAccountType(account.getAccountType());
|
||||
accountBalance.setAccount(account.getAccount());
|
||||
accountBalance.setOpenBalanceAmount(amount);
|
||||
accountBalance.setFreeBalanceAmount(amount);
|
||||
accountBalance.setBalanceAmount(amount);
|
||||
accountBalance.setCurrencyCode(cashMovementCurrencyCode);
|
||||
return new AccountResult(accountBalance);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
package ru.spcex.clearing.balance.service;
|
||||
|
||||
import ru.clearing.classes.statics.data.account.AccountBalance;
|
||||
import ru.spcex.platform.utils.enumeration.EnumMessage;
|
||||
|
||||
public class AccountResult {
|
||||
private EnumMessage error; //if was
|
||||
private AccountBalance account;
|
||||
|
||||
public AccountResult(EnumMessage validationError) {
|
||||
this.error = validationError;
|
||||
}
|
||||
|
||||
public AccountResult(AccountBalance account) {
|
||||
this.account = account;
|
||||
}
|
||||
|
||||
public EnumMessage getError() {
|
||||
return error;
|
||||
}
|
||||
|
||||
public AccountBalance getAccount() {
|
||||
return account;
|
||||
}
|
||||
}
|
||||
|
|
@ -14,6 +14,8 @@ import ru.spcex.clearing.platform.messaging.service.QueueConsumer;
|
|||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
|
||||
//fixme remove
|
||||
@Deprecated
|
||||
@Service
|
||||
public class Sdf02Service extends QueueConsumer implements InitializingBean {
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
|
|
|||
|
|
@ -8,98 +8,236 @@ 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.account.Account;
|
||||
import ru.clearing.classes.statics.data.account.AccountBalance;
|
||||
import ru.clearing.classes.statics.data.company.Company;
|
||||
import ru.clearing.classes.statics.data.sdf.SDf01;
|
||||
import ru.clearing.classes.statics.data.sdf.SDf02;
|
||||
import ru.clearing.classes.statics.data.statement.Statement;
|
||||
import ru.spcex.clearing.balance.errors.BalanceError;
|
||||
import ru.spcex.clearing.balance.validation.ValidationStored;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.spcex.clearing.platform.messaging.domain.BaseRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.Consts;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.account.AccountNewRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.account.sdf01.AccountSdf01Request;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.account.sdf01.AccountSdf01RequestPart;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.balance.ExportToFileRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.balance.StatementRequest;
|
||||
import ru.spcex.clearing.platform.messaging.service.QueueConsumer;
|
||||
import ru.spcex.clearing.platform.messaging.service.sender.KafkaSender;
|
||||
import ru.spcex.platform.classes.base.SpcexObjectBase;
|
||||
import ru.spcex.platform.enumeration.*;
|
||||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
import ru.spcex.platform.utils.enumeration.EnumMessage;
|
||||
import ru.spcex.platform.utils.enumeration.IMessageResolver;
|
||||
import ru.spcex.platform.utils.number.BigDecimalUtil;
|
||||
import ru.spcex.platform.utils.time.TimeUtil;
|
||||
import ru.spcex.platform.utils.validation.IValidator;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
public class StatementService extends QueueConsumer implements InitializingBean {
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
||||
private final static DateTimeFormatter datFormatter = DateTimeFormatter.ofPattern("dd.MM.yy");
|
||||
private final ImdgProvider imdgProvider;
|
||||
private final KafkaSender kafkaReqProducer;
|
||||
private final LoggingService errorLogger;
|
||||
private final Imdg<SDf01> sdf01Imdg;
|
||||
private final Imdg<Company> companyImdg;
|
||||
private final Imdg<Account> accountImdg;
|
||||
private final Imdg<SDf02> sdf02Imdg;
|
||||
private final Imdg<AccountBalance> accountBalanceImdg;
|
||||
private final Imdg<Statement> statementImdg;
|
||||
private final Function<SDf01, IValidator> sDf01Validator;
|
||||
private final AccountBalanceService accountBalanceService;
|
||||
private final IMessageResolver errorResolver;
|
||||
|
||||
@Autowired
|
||||
public StatementService(Consumer<String, Object> kafkaQueue, ImdgProvider imdgProvider, KafkaSender kafkaReqProducer, LoggingService errorLogger,
|
||||
@Qualifier("sdf01Validator") Function<SDf01, IValidator> sDf01Validator) {
|
||||
@Qualifier("sdf01Validator") Function<SDf01, IValidator> sDf01Validator,
|
||||
AccountBalanceService accountBalanceService,
|
||||
IMessageResolver errorResolver) {
|
||||
super(kafkaQueue);
|
||||
this.imdgProvider = imdgProvider;
|
||||
this.sdf01Imdg = imdgProvider.getImdg(IMDGDistributedNames.Map_SDf01, SDf01.class);
|
||||
this.companyImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Company, Company.class);
|
||||
this.accountImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Account, Account.class);
|
||||
this.sdf02Imdg = imdgProvider.getImdg(IMDGDistributedNames.Map_SDf02, SDf02.class);
|
||||
this.accountBalanceService = accountBalanceService;
|
||||
this.statementImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Statement, Statement.class);
|
||||
this.accountBalanceImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_AccountBalance, AccountBalance.class);
|
||||
this.kafkaReqProducer = kafkaReqProducer;
|
||||
this.errorLogger = errorLogger;
|
||||
this.sDf01Validator = sDf01Validator;
|
||||
this.errorResolver = errorResolver;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
callback(StatementRequest.class)
|
||||
.setConsumer(this::process)
|
||||
.forDestination(Consts.DESTINATION_SDF02_NEW, callbacks::put);
|
||||
.forDestination(Consts.STATEMENT_PROCESS, callbacks::put);
|
||||
init();
|
||||
}
|
||||
|
||||
private void process(BaseRequest<StatementRequest> systemRequest) {
|
||||
StatementRequest sdfInfo = systemRequest.getRequestPayload();
|
||||
SDf01 sdf01 = sdf01Imdg.getSingleObjectByID(sdfInfo.getSdf01Id());
|
||||
Company company = companyImdg.getSingleObjectByFieldValues(Map.of("tradingCode", sdf01.getDeal()));
|
||||
if (company == null) {
|
||||
errorLogger.logError("sdf01.id={}", new EnumMessage(BalanceError.CompanyNotFound), sdfInfo.getSdf01Id());
|
||||
return;
|
||||
}
|
||||
IValidator validator = sDf01Validator.apply(sdf01);
|
||||
Optional<EnumMessage> error = validator.tillFirstError();
|
||||
if (BalanceError.AccountNotPresent.equals(error.map(EnumMessage::getSubject).orElse(null))) {
|
||||
kafkaReqProducer.sendRequestToQueue(Consts.ACCOUNT_NEW, createAccountRequest(sdf01.getAccount()));
|
||||
log.info("account not found - send request for creation");
|
||||
return;
|
||||
}
|
||||
if (error.isPresent()) {
|
||||
errorLogger.logError("sdf01.id={}", error.get(), sdf01.getId());
|
||||
return;
|
||||
}
|
||||
Statement statement = statementImdg.getSingleObjectByFieldValues(Map.of("account", sdf01.getAccount()));
|
||||
|
||||
if (statement == null) {
|
||||
createFlow(sdfInfo, validator.getStored(ValidationStored.Sdf01Account));
|
||||
StatementRequest statementRequest = systemRequest.getRequestPayload();
|
||||
Collection<SDf01> sdf01Group;
|
||||
if (statementRequest.getAccountCreationResults().size() == 0) {
|
||||
sdf01Group = sdf01Imdg.getCollectionObjectsByFieldValues(Map.of("generationId", statementRequest.getSdf01GroupId()));
|
||||
} else {
|
||||
// updateFlow(statement);
|
||||
sdf01Group = statementRequest.getAccountCreationResults()
|
||||
.stream()
|
||||
.filter(part -> part.getErrorCode() == null) //fixme эти случае должны попадать в ошибочный sdf02
|
||||
.map(part -> sdf01Imdg.getSingleObjectByID(part.getSdf01Id()))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
sdf01Group = sdf01Group
|
||||
.stream()
|
||||
.sorted(Comparator.comparing(SpcexObjectBase::getId))
|
||||
.collect(Collectors.toList());
|
||||
List<AccountSdf01RequestPart> accountRequests = new ArrayList<>();
|
||||
Long generationIdForGroup = imdgProvider.getImdgIdGenerator().nextId();
|
||||
for (SDf01 sdf01 : sdf01Group) {
|
||||
IValidator validator = sDf01Validator.apply(sdf01);
|
||||
Optional<EnumMessage> error = validator.tillFirstError();
|
||||
Company company = validator.getStored(ValidationStored.Company);
|
||||
if (statementRequest.getAccountCreationResults().size() == 0
|
||||
&& BalanceError.AccountNotPresent.equals(error.map(EnumMessage::getSubject).orElse(null))) {
|
||||
//на данном шаге company существует -> getId ok
|
||||
//формируем пакетный запрос на добавление account
|
||||
//ответ придет в этот же метод, process
|
||||
accountRequests.add(createAccountRequestPart(sdf01.getId(), sdf01.getAccount(), company.getId()));
|
||||
log.info("account {} for sdf01.id={} not found - send request for creation", sdf01.getAccount(), sdf01.getId());
|
||||
} else if (BalanceError.AccountNotPresent.equals(error.map(EnumMessage::getSubject).orElse(null))) {
|
||||
log.error("fatal error: resumed processing after generating accounts, but no account found for sdf01.id={}", sdf01.getId());
|
||||
}
|
||||
if (error.isPresent()) {
|
||||
errorLogger.logError("sdf01.id={}", error.get(), sdf01.getId());
|
||||
sdf02Imdg.insert(createErrorSdf02(sdf01, error.get(), generationIdForGroup));
|
||||
continue;
|
||||
}
|
||||
Statement statement = statementImdg.getSingleObjectByFieldValues(Map.of("account", sdf01.getAccount()));
|
||||
if (statement == null) {
|
||||
statement = createFlow(sdf01,
|
||||
company,
|
||||
validator.getStored(ValidationStored.Account));
|
||||
} else {
|
||||
updateFlow(statement, sdf01,
|
||||
validator.getStored(ValidationStored.Account));
|
||||
}
|
||||
SDf02 sdf02New = createSuccessSdf02(sdf01, generationIdForGroup);
|
||||
sdf02Imdg.insert(sdf02New);
|
||||
statement.setOutSDfId(sdf02New.getId());
|
||||
AccountResult accountResult = accountBalanceService.createAccountBalance(statement.getAddresseeId(), statement.getAccountId(), statement.getAmount(), statement.getCashMovementCurrencyCode());
|
||||
if (accountResult.getError() != null) {
|
||||
statement.setErrorCode(accountResult.getError().getSubject().getId().toString());
|
||||
statement.setErrorText(errorResolver.resolve(accountResult.getError()));
|
||||
} else {
|
||||
accountBalanceImdg.insert(accountResult.getAccount()); //insert == update?
|
||||
statement.setStatus(OperationStatus.Executed.getKey());
|
||||
}
|
||||
statementImdg.update(statement);
|
||||
|
||||
if (accountRequests.size() > 0) {
|
||||
kafkaReqProducer.sendRequestToQueue(Consts.ACCOUNT_NEW, createAccountsRequest(sdf01.getGenerationId(), accountRequests));
|
||||
}
|
||||
}
|
||||
ExportToFileRequest exportRequest = new ExportToFileRequest();
|
||||
exportRequest.setSdfGroupId(generationIdForGroup);
|
||||
exportRequest.setNameOfTable("DF-02");
|
||||
kafkaReqProducer.sendRequestToQueue(Consts.EXPORT_PROCESS, exportRequest);
|
||||
}
|
||||
|
||||
private void createFlow(StatementRequest sdfInfo, Account storedObject) {
|
||||
|
||||
private Statement createFlow(SDf01 sdf01, Company company, Account account) {
|
||||
Statement statement = new Statement();
|
||||
statement.setAddresseeId(company.getId());
|
||||
statement.setSenderId(Sender.Prc.getId());
|
||||
statement.setCreated(Instant.now());
|
||||
statement.setClearingDate(TimeUtil.today());
|
||||
statement.setStatementType(StatementType.full.getKey());
|
||||
statement.setAccountId(account.getId());
|
||||
statement.setAccount(sdf01.getAccount());
|
||||
statement.setInOutDirection(InOutDirection.in.getKey());
|
||||
statement.setSettlementDate(TimeUtil.localDateToInstant(LocalDate.parse(sdf01.getDat(), datFormatter)));
|
||||
statement.setAmount(BigDecimalUtil.parse(sdf01.getRemainder()));
|
||||
statement.setCashMovementCurrencyCode(CurrencyCode.RUB.getKey());
|
||||
statement.setStatus(OperationStatus.Pending.getKey());
|
||||
statement.setInSDfId(sdf01.getId());
|
||||
statement.setInOutSDfType(InOutSDfType.type1.getKey());
|
||||
statementImdg.insert(statement);
|
||||
return statement;
|
||||
}
|
||||
|
||||
private AccountNewRequest createAccountRequest(String account) {
|
||||
AccountNewRequest req = new AccountNewRequest();
|
||||
private void updateFlow(Statement statement, SDf01 sdf01, Account account) {
|
||||
statement.setUpdated(Instant.now());
|
||||
statement.setAccountId(account.getId());
|
||||
statement.setAccount(sdf01.getAccount());
|
||||
statement.setInOutDirection(InOutDirection.in.getKey());
|
||||
statement.setSettlementDate(TimeUtil.localDateToInstant(LocalDate.parse(sdf01.getDat(), datFormatter)));
|
||||
statement.setAmount(BigDecimalUtil.parse(sdf01.getRemainder()));
|
||||
statement.setCashMovementCurrencyCode(CurrencyCode.RUB.getKey());
|
||||
statementImdg.update(statement);
|
||||
}
|
||||
|
||||
private AccountSdf01RequestPart createAccountRequestPart(Long sdf01Id, String account, Long companyId) {
|
||||
AccountSdf01RequestPart req = new AccountSdf01RequestPart();
|
||||
req.setAccount(account);
|
||||
req.setCompanyId(companyId);
|
||||
req.setSdf01Id(sdf01Id);
|
||||
return req;
|
||||
}
|
||||
|
||||
private AccountSdf01Request createAccountsRequest(Long sdf01GroupingId, List<AccountSdf01RequestPart> accountRequests) {
|
||||
AccountSdf01Request r = new AccountSdf01Request();
|
||||
r.setGroupingSdf01Id(sdf01GroupingId);
|
||||
r.setAccounts(accountRequests);
|
||||
return r;
|
||||
}
|
||||
|
||||
private SDf02 createErrorSdf02(SDf01 sdf01, EnumMessage error, Long generationIdForGroup) {
|
||||
SDf02 sDf02 = new SDf02();
|
||||
sDf02.setCurr_code(sdf01.getCurr_code());
|
||||
sDf02.setAccount(sdf01.getAccount());
|
||||
sDf02.setRemainder(sdf01.getRemainder());
|
||||
sDf02.setDeal(sdf01.getDeal());
|
||||
sDf02.setAcc_code(sdf01.getAcc_code());
|
||||
sDf02.setDat(sdf01.getDat());
|
||||
sDf02.setMarket(sdf01.getMarket());
|
||||
sDf02.setAcc_name(sdf01.getAcc_name());
|
||||
sDf02.setAcc_type(sdf01.getAcc_type());
|
||||
sDf02.setSumengage(sdf01.getSumengage());
|
||||
sDf02.setSumunblock(sdf01.getSumunblock());
|
||||
sDf02.setFile_type(sdf01.getFile_type());
|
||||
sDf02.setInSDf01Id(sdf01.getId());
|
||||
String errorId = error.getSubject().getId().toString();
|
||||
sDf02.setResult(errorId.substring(errorId.length() - 3));
|
||||
sDf02.setGenerationId(generationIdForGroup);
|
||||
sDf02.setGenerationTime(Instant.now());
|
||||
return sDf02;
|
||||
}
|
||||
|
||||
private SDf02 createSuccessSdf02(SDf01 sdf01, Long generationIdForGroup) {
|
||||
SDf02 sDf02 = new SDf02();
|
||||
sDf02.setCurr_code(sdf01.getCurr_code());
|
||||
sDf02.setAccount(sdf01.getAccount());
|
||||
sDf02.setRemainder(sdf01.getRemainder());
|
||||
sDf02.setDeal(sdf01.getDeal());
|
||||
sDf02.setAcc_code(sdf01.getAcc_code());
|
||||
sDf02.setDat(sdf01.getDat());
|
||||
sDf02.setMarket(sdf01.getMarket());
|
||||
sDf02.setAcc_name(sdf01.getAcc_name());
|
||||
sDf02.setAcc_type(sdf01.getAcc_type());
|
||||
sDf02.setSumengage(sdf01.getSumengage());
|
||||
sDf02.setSumunblock(sdf01.getSumunblock());
|
||||
sDf02.setFile_type(sdf01.getFile_type());
|
||||
sDf02.setInSDf01Id(sdf01.getId());
|
||||
sDf02.setGenerationId(generationIdForGroup);
|
||||
sDf02.setGenerationTime(Instant.now());
|
||||
sDf02.setResult("OK!");
|
||||
return sDf02;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
package ru.spcex.clearing.balance.validation;
|
||||
|
||||
public record AccountBalanceValidation(Long addresseeId, Long accountId) {}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
package ru.spcex.clearing.balance.validation;
|
||||
|
||||
import ru.clearing.classes.statics.data.account.Account;
|
||||
import ru.clearing.classes.statics.data.company.Company;
|
||||
import ru.spcex.clearing.balance.errors.BalanceError;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.spcex.platform.enumeration.AccountType;
|
||||
import ru.spcex.platform.enumeration.Status;
|
||||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
import ru.spcex.platform.imdg.validation.ImdgValidationContext;
|
||||
import ru.spcex.platform.utils.enumeration.EnumMessage;
|
||||
import ru.spcex.platform.utils.validation.IValidationRule;
|
||||
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
public enum AccountBalanceValidationRule implements IValidationRule<ImdgValidationContext<AccountBalanceValidation>> {
|
||||
CompanyPresent() {
|
||||
@Override
|
||||
public Optional<EnumMessage> validate(ImdgValidationContext<AccountBalanceValidation> context) {
|
||||
AccountBalanceValidation validatedObject = context.getValidatedObject();
|
||||
Imdg<Company> companyImdg = context.obtainMap(IMDGDistributedNames.Map_Company, Company.class);
|
||||
Company company = companyImdg.getSingleObjectByID(validatedObject.addresseeId());
|
||||
if (company == null) {
|
||||
return of( BalanceError.CompanyNotFound);
|
||||
}
|
||||
context.storeObject(ValidationStored.Company, company);
|
||||
return empty();
|
||||
}
|
||||
},
|
||||
AccountOk() {
|
||||
@Override
|
||||
public Optional<EnumMessage> validate(ImdgValidationContext<AccountBalanceValidation> context) {
|
||||
AccountBalanceValidation validatedObject = context.getValidatedObject();
|
||||
Imdg<Account> accountImdg = context.obtainMap(IMDGDistributedNames.Map_Account, Account.class);
|
||||
Account account = accountImdg.getSingleObjectByFieldValues(Map.of("id", validatedObject.accountId(),
|
||||
"accountType", AccountType.Clrn.getKey()));
|
||||
if (account == null) {
|
||||
return of(BalanceError.AccountNotPresent);
|
||||
}
|
||||
if (!Status.Active.equalsByKey(account.getStatus())) {
|
||||
return of(BalanceError.AccountNotActive, account.getId());
|
||||
}
|
||||
context.storeObject(ValidationStored.Account, account);
|
||||
return empty();
|
||||
}
|
||||
};
|
||||
private final static DateTimeFormatter datFormatter = DateTimeFormatter.ofPattern("dd.MM.yy");
|
||||
|
||||
@Override
|
||||
public String ruleName() {
|
||||
return "Sdf01ValidationRule." + name();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,20 +1,35 @@
|
|||
package ru.spcex.clearing.balance.validation;
|
||||
|
||||
import ru.clearing.classes.statics.data.account.Account;
|
||||
import ru.clearing.classes.statics.data.company.Company;
|
||||
import ru.clearing.classes.statics.data.sdf.SDf01;
|
||||
import ru.spcex.clearing.balance.config.ImdgValidationContext;
|
||||
import ru.spcex.clearing.balance.errors.BalanceError;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.spcex.platform.enumeration.AccountType;
|
||||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
import ru.spcex.platform.imdg.validation.ImdgValidationContext;
|
||||
import ru.spcex.platform.utils.enumeration.EnumMessage;
|
||||
import ru.spcex.platform.utils.validation.IValidationRule;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
public enum Sdf01ValidationRule implements IValidationRule<ImdgValidationContext<SDf01>> {
|
||||
CompanyPresent() {
|
||||
@Override
|
||||
public Optional<EnumMessage> validate(ImdgValidationContext<SDf01> context) {
|
||||
SDf01 sdf01 = context.getValidatedObject();
|
||||
Imdg<Company> companyImdg = context.obtainMap(IMDGDistributedNames.Map_Company, Company.class);
|
||||
Company company = companyImdg.getSingleObjectByFieldValues(Map.of("tradingCode", sdf01.getDeal()));
|
||||
if (company == null) {
|
||||
return of( BalanceError.CompanyNotFound);
|
||||
}
|
||||
context.storeObject(ValidationStored.Company, company);
|
||||
return empty();
|
||||
}
|
||||
},
|
||||
AccountPresent() {
|
||||
@Override
|
||||
public Optional<EnumMessage> validate(ImdgValidationContext<SDf01> context) {
|
||||
|
|
@ -25,7 +40,7 @@ public enum Sdf01ValidationRule implements IValidationRule<ImdgValidationContext
|
|||
if (account == null) {
|
||||
return of(BalanceError.AccountNotPresent);
|
||||
}
|
||||
context.storeObject(ValidationStored.Sdf01Account, account);
|
||||
context.storeObject(ValidationStored.Account, account);
|
||||
return empty();
|
||||
}
|
||||
},
|
||||
|
|
@ -44,7 +59,7 @@ public enum Sdf01ValidationRule implements IValidationRule<ImdgValidationContext
|
|||
public Optional<EnumMessage> validate(ImdgValidationContext<SDf01> context) {
|
||||
SDf01 sdf01 = context.getValidatedObject();
|
||||
//fixme string format???
|
||||
if (!LocalDate.now().toString().equals(sdf01.getDat())) {
|
||||
if (!LocalDate.now().equals(LocalDate.parse(sdf01.getDat(), datFormatter))) {
|
||||
return of(BalanceError.CurrentDateOnly);
|
||||
}
|
||||
return empty();
|
||||
|
|
@ -70,6 +85,8 @@ public enum Sdf01ValidationRule implements IValidationRule<ImdgValidationContext
|
|||
return empty();
|
||||
}
|
||||
};
|
||||
private final static DateTimeFormatter datFormatter = DateTimeFormatter.ofPattern("dd.MM.yy");
|
||||
|
||||
@Override
|
||||
public String ruleName() {
|
||||
return "Sdf01ValidationRule." + name();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
package ru.spcex.clearing.balance.validation;
|
||||
|
||||
public enum ValidationStored {
|
||||
Sdf01Account;
|
||||
Account, Company;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
spring.main.web-application-type=none
|
||||
balance-service.hazelcast.cluster-members=127.0.0.1
|
||||
balance-service.hazelcast.cluster-members=127.0.0.1:5701
|
||||
balance-service.hazelcast.login=dev
|
||||
balance-service.hazelcast.password=dev-pass
|
||||
|
||||
balance-service.kafka-consumer.bootstrap-servers=localhost:9092
|
||||
balance-service.kafka-consumer.group-id=dev-group
|
||||
balance-service.kafka-consumer.group-id=dev-group-balance-service
|
||||
balance-service.kafka-consumer.enable-auto-commit=false
|
||||
balance-service.kafka-consumer.session-timeout-ms=30000
|
||||
balance-service.kafka-consumer.auto-offset-reset=latest
|
||||
|
|
|
|||
|
|
@ -18,15 +18,16 @@ public class InDocumentJournal extends SpcexObjectBase {
|
|||
private Instant registrationTime;
|
||||
private Long registrationNumber;
|
||||
private String documentName;
|
||||
private Long senderId;
|
||||
private String sender;
|
||||
private Long quantity;
|
||||
private String clearingCode;
|
||||
private String courierType;
|
||||
private Instant emailDate;
|
||||
private BigDecimal amount;
|
||||
private Long dossierNumber;
|
||||
private String dossierNumber;
|
||||
private String comment;
|
||||
private Instant receiptDate;
|
||||
private String resultStatus;
|
||||
|
||||
public Instant getRegistrationDate() {
|
||||
return registrationDate;
|
||||
|
|
@ -60,12 +61,12 @@ public class InDocumentJournal extends SpcexObjectBase {
|
|||
this.documentName = value;
|
||||
}
|
||||
|
||||
public Long getSenderId() {
|
||||
return senderId;
|
||||
public String getSender() {
|
||||
return sender;
|
||||
}
|
||||
|
||||
public void setSenderId(Long value) {
|
||||
this.senderId = value;
|
||||
public void setSender(String value) {
|
||||
this.sender = value;
|
||||
}
|
||||
|
||||
public Long getQuantity() {
|
||||
|
|
@ -108,11 +109,11 @@ public class InDocumentJournal extends SpcexObjectBase {
|
|||
this.amount = value;
|
||||
}
|
||||
|
||||
public Long getDossierNumber() {
|
||||
public String getDossierNumber() {
|
||||
return dossierNumber;
|
||||
}
|
||||
|
||||
public void setDossierNumber(Long value) {
|
||||
public void setDossierNumber(String value) {
|
||||
this.dossierNumber = value;
|
||||
}
|
||||
|
||||
|
|
@ -132,4 +133,11 @@ public class InDocumentJournal extends SpcexObjectBase {
|
|||
this.receiptDate = value;
|
||||
}
|
||||
|
||||
public String getResultStatus() {
|
||||
return resultStatus;
|
||||
}
|
||||
|
||||
public void setResultStatus(String resultStatus) {
|
||||
this.resultStatus = resultStatus;
|
||||
}
|
||||
}
|
||||
|
|
@ -18,14 +18,15 @@ public class OutDocumentJournal extends SpcexObjectBase {
|
|||
private Instant registrationTime;
|
||||
private Long registrationNumber;
|
||||
private String documentName;
|
||||
private Long addresseeId;
|
||||
private String addressee;
|
||||
private Long quantity;
|
||||
private String clearingCode;
|
||||
private String courierType;
|
||||
private Instant emailDate;
|
||||
private BigDecimal amount;
|
||||
private Long dossierNumber;
|
||||
private String dossierNumber;
|
||||
private Instant postDate;
|
||||
private String resultStatus;
|
||||
|
||||
public Instant getRegistrationDate() {
|
||||
return registrationDate;
|
||||
|
|
@ -59,12 +60,12 @@ public class OutDocumentJournal extends SpcexObjectBase {
|
|||
this.documentName = value;
|
||||
}
|
||||
|
||||
public Long getAddresseeId() {
|
||||
return addresseeId;
|
||||
public String getAddressee() {
|
||||
return addressee;
|
||||
}
|
||||
|
||||
public void setAddresseeId(Long value) {
|
||||
this.addresseeId = value;
|
||||
public void setAddressee(String value) {
|
||||
this.addressee = value;
|
||||
}
|
||||
|
||||
public Long getQuantity() {
|
||||
|
|
@ -107,11 +108,11 @@ public class OutDocumentJournal extends SpcexObjectBase {
|
|||
this.amount = value;
|
||||
}
|
||||
|
||||
public Long getDossierNumber() {
|
||||
public String getDossierNumber() {
|
||||
return dossierNumber;
|
||||
}
|
||||
|
||||
public void setDossierNumber(Long value) {
|
||||
public void setDossierNumber(String value) {
|
||||
this.dossierNumber = value;
|
||||
}
|
||||
|
||||
|
|
@ -123,4 +124,11 @@ public class OutDocumentJournal extends SpcexObjectBase {
|
|||
this.postDate = value;
|
||||
}
|
||||
|
||||
public String getResultStatus() {
|
||||
return resultStatus;
|
||||
}
|
||||
|
||||
public void setResultStatus(String resultStatus) {
|
||||
this.resultStatus = resultStatus;
|
||||
}
|
||||
}
|
||||
|
|
@ -16,7 +16,7 @@ public class SDf12 extends SpcexObjectBase {
|
|||
|
||||
private String account;
|
||||
private String deal;
|
||||
private BigDecimal status;
|
||||
private Long status;
|
||||
private String fileName;
|
||||
private Instant generationTime;
|
||||
private Long generationId;
|
||||
|
|
@ -37,11 +37,11 @@ public class SDf12 extends SpcexObjectBase {
|
|||
this.deal = value;
|
||||
}
|
||||
|
||||
public BigDecimal getStatus() {
|
||||
public Long getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(BigDecimal value) {
|
||||
public void setStatus(Long value) {
|
||||
this.status = value;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,9 +6,8 @@ import ru.spcex.platform.classes.base.SpcexObjectBase;
|
|||
import java.time.Instant;
|
||||
|
||||
/**
|
||||
* ДФ 013 - Вывод свободных средств для инициаторов категории В
|
||||
* с клирингового счета 30414/7 - платежное поручение АО СПВБ на вывод средств из РО.
|
||||
*
|
||||
* ДФ-13 Вывод свободных средств для инициаторов категории В с клирингового счета 30414/7 - платежное поручение АО СПВБ на вывод средств из РО
|
||||
* <p>
|
||||
* DB table: S_DF13
|
||||
**/
|
||||
public class SDf13 extends SpcexObjectBase {
|
||||
|
|
@ -44,6 +43,7 @@ public class SDf13 extends SpcexObjectBase {
|
|||
private String sc_code;
|
||||
private String acc_deb;
|
||||
private String rclientn1;
|
||||
private String inn_cred;
|
||||
private String kpp_cred;
|
||||
private String rclientn4;
|
||||
private String acc_kr_1;
|
||||
|
|
@ -301,6 +301,14 @@ public class SDf13 extends SpcexObjectBase {
|
|||
this.rclientn1 = rclientn1;
|
||||
}
|
||||
|
||||
public String getInn_cred() {
|
||||
return inn_cred;
|
||||
}
|
||||
|
||||
public void setInn_cred(String inn_cred) {
|
||||
this.inn_cred = inn_cred;
|
||||
}
|
||||
|
||||
public String getKpp_cred() {
|
||||
return kpp_cred;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,14 +7,13 @@ import java.math.BigDecimal;
|
|||
import java.time.Instant;
|
||||
|
||||
/**
|
||||
* ДФ 16 - Ответ КС на запрос на дозачисление/списание денежных средств
|
||||
* ДФ-16 Формат запроса по возврату депозита или дозачисление/списание денежных средств
|
||||
* <p>
|
||||
* DB table: S_DF16
|
||||
**/
|
||||
public class SDf16 extends SpcexObjectBase {
|
||||
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||
|
||||
private Instant date;
|
||||
private String account;
|
||||
private BigDecimal sum;
|
||||
private String market;
|
||||
|
|
@ -23,19 +22,10 @@ public class SDf16 extends SpcexObjectBase {
|
|||
private BigDecimal BIC;
|
||||
private String SPEC;
|
||||
private BigDecimal number;
|
||||
private String resultCode;
|
||||
private String fileName;
|
||||
private Instant generationTime;
|
||||
private Long generationId;
|
||||
|
||||
public Instant getDate() {
|
||||
return date;
|
||||
}
|
||||
|
||||
public void setDate(Instant value) {
|
||||
this.date = value;
|
||||
}
|
||||
|
||||
public String getAccount() {
|
||||
return account;
|
||||
}
|
||||
|
|
@ -100,14 +90,6 @@ public class SDf16 extends SpcexObjectBase {
|
|||
this.number = value;
|
||||
}
|
||||
|
||||
public String getResultCode() {
|
||||
return resultCode;
|
||||
}
|
||||
|
||||
public void setResultCode(String value) {
|
||||
this.resultCode = value;
|
||||
}
|
||||
|
||||
public String getFileName() {
|
||||
return fileName;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import java.time.Instant;
|
|||
|
||||
/**
|
||||
* ДФ-17 Формат ответа на запрос по возврату депозита или дозачисление/списание денежных средств
|
||||
*
|
||||
* <p>
|
||||
* DB table: S_DF17
|
||||
**/
|
||||
public class SDf17 extends SpcexObjectBase {
|
||||
|
|
@ -22,105 +22,105 @@ public class SDf17 extends SpcexObjectBase {
|
|||
private BigDecimal BIC;
|
||||
private String SPEC;
|
||||
private BigDecimal number;
|
||||
private String result;
|
||||
private BigDecimal result;
|
||||
private Instant generationTime;
|
||||
private Long generationId;
|
||||
private Long in_s_df16_id;
|
||||
|
||||
private Long inSDf16Id;
|
||||
|
||||
public String getAccount() {
|
||||
return account;
|
||||
}
|
||||
|
||||
public void setAccount(String account) {
|
||||
this.account = account;
|
||||
public void setAccount(String value) {
|
||||
this.account = value;
|
||||
}
|
||||
|
||||
public BigDecimal getSum() {
|
||||
return sum;
|
||||
}
|
||||
|
||||
public void setSum(BigDecimal sum) {
|
||||
this.sum = sum;
|
||||
public void setSum(BigDecimal value) {
|
||||
this.sum = value;
|
||||
}
|
||||
|
||||
public String getMarket() {
|
||||
return market;
|
||||
}
|
||||
|
||||
public void setMarket(String market) {
|
||||
this.market = market;
|
||||
public void setMarket(String value) {
|
||||
this.market = value;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
public void setType(String value) {
|
||||
this.type = value;
|
||||
}
|
||||
|
||||
public BigDecimal getINN() {
|
||||
return INN;
|
||||
}
|
||||
|
||||
public void setINN(BigDecimal INN) {
|
||||
this.INN = INN;
|
||||
public void setINN(BigDecimal value) {
|
||||
this.INN = value;
|
||||
}
|
||||
|
||||
public BigDecimal getBIC() {
|
||||
return BIC;
|
||||
}
|
||||
|
||||
public void setBIC(BigDecimal BIC) {
|
||||
this.BIC = BIC;
|
||||
public void setBIC(BigDecimal value) {
|
||||
this.BIC = value;
|
||||
}
|
||||
|
||||
public String getSPEC() {
|
||||
return SPEC;
|
||||
}
|
||||
|
||||
public void setSPEC(String SPEC) {
|
||||
this.SPEC = SPEC;
|
||||
public void setSPEC(String value) {
|
||||
this.SPEC = value;
|
||||
}
|
||||
|
||||
public BigDecimal getNumber() {
|
||||
return number;
|
||||
}
|
||||
|
||||
public void setNumber(BigDecimal number) {
|
||||
this.number = number;
|
||||
public void setNumber(BigDecimal value) {
|
||||
this.number = value;
|
||||
}
|
||||
|
||||
public String getResult() {
|
||||
public BigDecimal getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(String result) {
|
||||
this.result = result;
|
||||
public void setResult(BigDecimal value) {
|
||||
this.result = value;
|
||||
}
|
||||
|
||||
public Instant getGenerationTime() {
|
||||
return generationTime;
|
||||
}
|
||||
|
||||
public void setGenerationTime(Instant generationTime) {
|
||||
this.generationTime = generationTime;
|
||||
public void setGenerationTime(Instant value) {
|
||||
this.generationTime = value;
|
||||
}
|
||||
|
||||
public Long getGenerationId() {
|
||||
return generationId;
|
||||
}
|
||||
|
||||
public void setGenerationId(Long generationId) {
|
||||
this.generationId = generationId;
|
||||
public void setGenerationId(Long value) {
|
||||
this.generationId = value;
|
||||
}
|
||||
|
||||
public Long getIn_s_df16_id() {
|
||||
return in_s_df16_id;
|
||||
public Long getInSDf16Id() {
|
||||
return inSDf16Id;
|
||||
}
|
||||
|
||||
public void setIn_s_df16_id(Long in_s_df16_id) {
|
||||
this.in_s_df16_id = in_s_df16_id;
|
||||
public void setInSDf16Id(Long value) {
|
||||
this.inSDf16Id = value;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -16,7 +16,7 @@ public class SDf18 extends SpcexObjectBase {
|
|||
|
||||
private String account;
|
||||
private String deal;
|
||||
private BigDecimal status;
|
||||
private Long status;
|
||||
private BigDecimal result;
|
||||
private Instant generationTime;
|
||||
private Long generationId;
|
||||
|
|
@ -38,11 +38,11 @@ public class SDf18 extends SpcexObjectBase {
|
|||
this.deal = value;
|
||||
}
|
||||
|
||||
public BigDecimal getStatus() {
|
||||
public Long getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(BigDecimal value) {
|
||||
public void setStatus(Long value) {
|
||||
this.status = value;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ public class KafkaConfig {
|
|||
@Autowired
|
||||
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
|
||||
@Bean
|
||||
public Consumer<String, Object> createProducer(CompanyServiceSettings settings) {
|
||||
public Consumer<String, Object> createConsumer(CompanyServiceSettings settings) {
|
||||
return KafkaConsumerFactory.consumer(settings.getKafka());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import org.slf4j.LoggerFactory;
|
|||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import ru.clearing.classes.statics.data.company.Company;
|
||||
import ru.clearing.classes.statics.data.profile.CompanyInfo;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.spcex.clearing.platform.messaging.domain.BaseRequest;
|
||||
|
|
@ -18,13 +19,15 @@ import ru.spcex.platform.imdg.api.ImdgProvider;
|
|||
@Service
|
||||
public class CompanyInfoService extends QueueConsumer implements InitializingBean {
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
private final Imdg<CompanyInfo> companyInfoMap;
|
||||
// private final Imdg<CompanyInfo> companyInfoMap;
|
||||
private final Imdg<Company> companyMap;
|
||||
|
||||
@Autowired
|
||||
public CompanyInfoService(Consumer<String, Object> kafkaQueue,
|
||||
ImdgProvider imdgProvider) {
|
||||
super(kafkaQueue);
|
||||
this.companyInfoMap = imdgProvider.getImdg(IMDGDistributedNames.Map_Company, CompanyInfo.class);
|
||||
// this.companyInfoMap = imdgProvider.getImdg(IMDGDistributedNames.Map_CompanyInfo, CompanyInfo.class);
|
||||
this.companyMap = imdgProvider.getImdg(IMDGDistributedNames.Map_Company, Company.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -38,7 +41,9 @@ public class CompanyInfoService extends QueueConsumer implements InitializingBea
|
|||
public void companyInfoUpdate(BaseRequest<CompanyInfoUpdateRequest> userRequest) {
|
||||
CompanyInfoUpdateRequest req = userRequest.getRequestPayload();
|
||||
log.debug("CompanyInfoUpdateRequest received");
|
||||
CompanyInfo companyInfo = companyInfoMap.getSingleObjectByID(req.getId());
|
||||
// CompanyInfo companyInfo = companyInfoMap.getSingleObjectByID(req.getId());
|
||||
Company company = companyMap.getSingleObjectByID(req.getId());
|
||||
CompanyInfo companyInfo = company == null ? null : company.getProfile();
|
||||
|
||||
companyInfo.setCorporationSoleType(req.getCorporationSoleType());
|
||||
companyInfo.setCountryCode(req.getCountryCode());
|
||||
|
|
@ -51,7 +56,8 @@ public class CompanyInfoService extends QueueConsumer implements InitializingBea
|
|||
companyInfo.setFullNameEng(req.getFullNameEng());
|
||||
companyInfo.setShortName(req.getShortName());
|
||||
companyInfo.setFullName(req.getFullName());
|
||||
companyInfoMap.update(companyInfo);
|
||||
// companyInfoMap.update(companyInfo);
|
||||
companyMap.update(company);
|
||||
log.debug("successfully processed, id {}", companyInfo.getId());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
spring.main.web-application-type=none
|
||||
company-service.hazelcast.cluster-members=127.0.0.1
|
||||
company-service.hazelcast.cluster-members=127.0.0.1:5701
|
||||
company-service.hazelcast.login=dev
|
||||
company-service.hazelcast.password=dev-pass
|
||||
company-service.kafka.bootstrap-servers=localhost:9092
|
||||
company-service.kafka.group-id=dev-group
|
||||
company-service.kafka.enable-auto-commit=false
|
||||
company-service.kafka.group-id=dev-group-company-service
|
||||
company-service.kafka.enable-auto-commit=true
|
||||
company-service.kafka.session-timeout-ms=30000
|
||||
company-service.kafka.auto-offset-reset=latest
|
||||
company-service.kafka.linger-ms=1
|
||||
|
|
|
|||
|
|
@ -2,13 +2,7 @@
|
|||
-- DATA version: 0.0.0.0
|
||||
/* Dictionaries */
|
||||
|
||||
INSERT INTO COURIER_TYPE_DICTIONARY(ID, CODE, NAME) values (1, 'POST', 'Почтой');
|
||||
|
||||
INSERT INTO COURIER_TYPE_DICTIONARY(ID, CODE, NAME) values (2, 'CAB', 'Личный кабинет с ЭЦП');
|
||||
|
||||
INSERT INTO COURIER_TYPE_DICTIONARY(ID, CODE, NAME) values (3, 'ORIG', 'Оригинал на бумаге');
|
||||
|
||||
INSERT INTO COURIER_TYPE_DICTIONARY(ID, CODE, NAME) values (3, 'STHS', 'Модуль обмена с Расчетной Организацией');
|
||||
INSERT INTO COURIER_TYPE_DICTIONARY(ID, CODE, NAME) values (1, 'STHS', 'ЭДО с Расчетной Организацией');
|
||||
|
||||
INSERT INTO TERM_TYPE_DICTIONARY(ID, CODE, NAME) values (1, 'S', 'Срочный');
|
||||
|
||||
|
|
@ -18,12 +12,24 @@ INSERT INTO TERM_TYPE_DICTIONARY(ID, CODE, NAME) values (3, 'V', 'До вост
|
|||
|
||||
INSERT INTO TASK_DICTIONARY(ID, CODE, NAME) values (1, 'GBAL', 'Зачисление остатков');
|
||||
|
||||
INSERT INTO TASK_DICTIONARY(ID, CODE, NAME) values (2, '', '');
|
||||
INSERT INTO TASK_DICTIONARY(ID, CODE, NAME) values (2, 'GBLC', 'Подтверждение зачисления остатков');
|
||||
|
||||
INSERT INTO TASK_DICTIONARY(ID, CODE, NAME) values (3, 'ABLK', 'Блокировка счета');
|
||||
|
||||
INSERT INTO TASK_DICTIONARY(ID, CODE, NAME) values (4, 'GALB', 'Запрос остатков по всем счетам');
|
||||
|
||||
INSERT INTO TASK_DICTIONARY(ID, CODE, NAME) values (5, 'ADBL', 'Дозачисление/списание остатков');
|
||||
|
||||
INSERT INTO TASK_DICTIONARY(ID, CODE, NAME) values (6, 'ADBC', 'Подтверждение дозачисления/списания остатков');
|
||||
|
||||
INSERT INTO TASK_DICTIONARY(ID, CODE, NAME) values (7, 'CORD', 'Формирование сводного платежного поручения');
|
||||
|
||||
INSERT INTO TASK_DICTIONARY(ID, CODE, NAME) values (8, 'CORC', 'Получение подтверждения переводов');
|
||||
|
||||
INSERT INTO TASK_DICTIONARY(ID, CODE, NAME) values (34, 'GBLD', 'Поступление средств');
|
||||
|
||||
INSERT INTO TASK_DICTIONARY(ID, CODE, NAME) values (35, 'GBDC', 'Подтверждение поступления средств');
|
||||
|
||||
INSERT INTO TASK_STATUS_DICTIONARY(ID, CODE, NAME) values (1, 'ACTV', 'Активна');
|
||||
|
||||
INSERT INTO TASK_STATUS_DICTIONARY(ID, CODE, NAME) values (2, 'BLKD', 'Не активна');
|
||||
|
|
@ -34,6 +40,14 @@ INSERT INTO TRADING_STATUS_DICTIONARY(ID, CODE, NAME) values (1, 'TRAD', 'Тор
|
|||
|
||||
INSERT INTO TRADING_STATUS_DICTIONARY(ID, CODE, NAME) values (2, 'NTRD', 'Неторговый');
|
||||
|
||||
INSERT INTO TRANSACTION_STATUS_DICTIONARY(ID, CODE, NAME) values (1, 'STLD', 'Рассчитан');
|
||||
|
||||
INSERT INTO TRANSACTION_STATUS_DICTIONARY(ID, CODE, NAME) values (2, 'SENT', 'Отправлен в ПРЦ');
|
||||
|
||||
INSERT INTO TRANSACTION_STATUS_DICTIONARY(ID, CODE, NAME) values (3, 'OK', 'Обработан ПРЦ');
|
||||
|
||||
INSERT INTO TRANSACTION_STATUS_DICTIONARY(ID, CODE, NAME) values (4, 'FAIL', 'Ошибка ПРЦ');
|
||||
|
||||
INSERT INTO SOURCE_DICTIONARY(ID, CODE, NAME) values (1, 'TIMT', 'Расписание');
|
||||
|
||||
INSERT INTO SOURCE_DICTIONARY(ID, CODE, NAME) values (2, 'SCHD', 'Планировщик');
|
||||
|
|
@ -62,9 +76,11 @@ INSERT INTO WORKFLOW_STATUS_DICTIONARY(ID, CODE, NAME) values (1, 'ACTV', 'Ак
|
|||
|
||||
INSERT INTO WORKFLOW_STATUS_DICTIONARY(ID, CODE, NAME) values (2, 'BLKD', 'Не активен');
|
||||
|
||||
INSERT INTO MONEY_FLOW_SIDE_DICTIONARY(ID, CODE, NAME) values (1, 'SELL', 'Привлечь');
|
||||
INSERT INTO ACCOUNT_STATUS_DICTIONARY(ID, CODE, NAME) values (1, 'ACTV', 'Активен');
|
||||
|
||||
INSERT INTO MONEY_FLOW_SIDE_DICTIONARY(ID, CODE, NAME) values (2, 'BUY', 'Разместить');
|
||||
INSERT INTO ACCOUNT_STATUS_DICTIONARY(ID, CODE, NAME) values (2, 'BLKD', 'Заблокирован');
|
||||
|
||||
INSERT INTO ACCOUNT_STATUS_DICTIONARY(ID, CODE, NAME) values (3, 'CLOS', 'Закрыт');
|
||||
|
||||
INSERT INTO BALANCE_ACCOUNT_TYPE_DICTIONARY(ID, CODE, NAME) values (1, 'ACNT', 'Остатки по счетам');
|
||||
|
||||
|
|
@ -88,7 +104,7 @@ INSERT INTO SERVICE_STATUS_DICTIONARY(ID, CODE, NAME) values (3, 'SSPD', 'При
|
|||
|
||||
INSERT INTO SERVICE_STATUS_DICTIONARY(ID, CODE, NAME) values (4, 'CLOS', 'Закрыт');
|
||||
|
||||
INSERT INTO SERVICE_STATUS_DICTIONARY(ID, CODE, NAME) values (4, 'ROPN', 'Возобновлен');
|
||||
INSERT INTO SERVICE_STATUS_DICTIONARY(ID, CODE, NAME) values (5, 'ROPN', 'Возобновлен');
|
||||
|
||||
INSERT INTO STATEMENT_TYPE_DICTIONARY(ID, CODE, NAME) values (1, 'FULL', 'Установка суммы');
|
||||
|
||||
|
|
@ -108,21 +124,23 @@ INSERT INTO SERVICE_DICTIONARY(ID, CODE, NAME) values (1, 'MKR', 'Денежны
|
|||
|
||||
INSERT INTO SERVICE_PRODUCT_DICTIONARY(ID, CODE, NAME) values (1, 'PRNT', 'Расчет обязательств с процентом');
|
||||
|
||||
INSERT INTO SERVICE_PRODUCT_DICTIONARY(ID, CODE, NAME) values (2, 'ZERO', 'Расчет обязательств без процента');
|
||||
INSERT INTO SERVICE_PRODUCT_DICTIONARY(ID, CODE, NAME) values (2, 'ZERO', 'Расчет обязательств без процента (по умолчанию)');
|
||||
|
||||
INSERT INTO CLEARING_CATEGORY_DICTIONARY(ID, CODE, NAME) values (1, 'C', 'Категория «Ц» - Банк России');
|
||||
INSERT INTO SECTOR_DICTIONARY(ID, CODE, NAME) values (1, 'MKR', 'Секция Денежного рынка МКР');
|
||||
|
||||
INSERT INTO CLEARING_CATEGORY_DICTIONARY(ID, CODE, NAME) values (2, 'B', 'Категория «Б» - Кредитная организация ДР');
|
||||
INSERT INTO CLEARING_MEMBER_CATEGORY_DICTIONARY(ID, CODE, NAME) values (1, 'C', 'Категория «Ц» - Банк России');
|
||||
|
||||
INSERT INTO CLEARING_CATEGORY_DICTIONARY(ID, CODE, NAME) values (3, 'F', 'Категория «Ф» - Участник рынка РЦБ');
|
||||
INSERT INTO CLEARING_MEMBER_CATEGORY_DICTIONARY(ID, CODE, NAME) values (2, 'B', 'Категория «Б» - Кредитная организация ДР');
|
||||
|
||||
INSERT INTO CLEARING_CATEGORY_DICTIONARY(ID, CODE, NAME) values (4, 'I', 'Категория «И» - Инициатор по ТБС');
|
||||
INSERT INTO CLEARING_MEMBER_CATEGORY_DICTIONARY(ID, CODE, NAME) values (3, 'F', 'Категория «Ф» - Участник рынка РЦБ');
|
||||
|
||||
INSERT INTO CLEARING_CATEGORY_DICTIONARY(ID, CODE, NAME) values (5, 'V', 'Категория «В» - Инициатор по ТКС');
|
||||
INSERT INTO CLEARING_MEMBER_CATEGORY_DICTIONARY(ID, CODE, NAME) values (4, 'I', 'Категория «И» - Инициатор по ТБС');
|
||||
|
||||
INSERT INTO CLEARING_CATEGORY_DICTIONARY(ID, CODE, NAME) values (6, 'T', 'Категория «Т» - Участник товарного рынка');
|
||||
INSERT INTO CLEARING_MEMBER_CATEGORY_DICTIONARY(ID, CODE, NAME) values (5, 'V', 'Категория «В» - Инициатор по ТКС');
|
||||
|
||||
INSERT INTO CLEARING_CATEGORY_DICTIONARY(ID, CODE, NAME) values (7, 'K', 'Категория «К» - Участник клиринга - Контроллер');
|
||||
INSERT INTO CLEARING_MEMBER_CATEGORY_DICTIONARY(ID, CODE, NAME) values (6, 'T', 'Категория «Т» - Участник товарного рынка');
|
||||
|
||||
INSERT INTO CLEARING_MEMBER_CATEGORY_DICTIONARY(ID, CODE, NAME) values (7, 'K', 'Категория «К» - Участник клиринга - Контроллер');
|
||||
|
||||
INSERT INTO MANAGEMENT_JOURNAL_TYPE_DICTIONARY(ID, CODE, NAME) values (1, 'CRPA', 'Корпоративное событие, связанное с допуском');
|
||||
|
||||
|
|
@ -268,147 +286,187 @@ INSERT INTO RESULT_STATUS_DICTIONARY(ID, CODE, NAME) values (1, 'NACK', 'Неу
|
|||
|
||||
INSERT INTO RESULT_STATUS_DICTIONARY(ID, CODE, NAME) values (2, 'ACK', 'Успешно');
|
||||
|
||||
INSERT INTO IN_OUT_S_DF_TYPE_DICTIONARY(ID, CODE, NAME) values (1, '0102', 'Входящий DF-01/Исходящий DF-02');
|
||||
INSERT INTO IN_OUT_S_DF_TYPE_DICTIONARY(ID, CODE, NAME) values (1, '0102', 'Входящий ДФ-01/Исходящий ДФ-02');
|
||||
|
||||
INSERT INTO IN_OUT_S_DF_TYPE_DICTIONARY(ID, CODE, NAME) values (2, '1617', 'Входящий ДФ-16/Исходящий ДФ-17');
|
||||
|
||||
INSERT INTO IN_OUT_S_DF_TYPE_DICTIONARY(ID, CODE, NAME) values (3, '0910', 'Входящий ДФ-09/Исходящий ДФ-10');
|
||||
|
||||
INSERT INTO SESSION_STATUS_DICTIONARY(ID, CODE, NAME) values (1, 'ACTV', 'Сессия активна');
|
||||
|
||||
INSERT INTO SESSION_STATUS_DICTIONARY(ID, CODE, NAME) values (2, 'CLRN', 'Идет клиринг');
|
||||
|
||||
INSERT INTO OBJECT_TYPE_DICTIONARY(ID, CODE, NAME) values (1, 'STMT', 'STATEMENT');
|
||||
|
||||
INSERT INTO NOTIFICATION_STATUS_DICTIONARY(ID, CODE, NAME) values (1, 'ACPT', 'Принято');
|
||||
|
||||
INSERT INTO NOTIFICATION_STATUS_DICTIONARY(ID, CODE, NAME) values (2, 'CNCL', 'Отменено');
|
||||
|
||||
INSERT INTO CURRENCY_CODE_DICTIONARY(ID, CODE, NAME) values (643, 'RUB', 'Российский рубль');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (1000, '1 000', 'Общая ошибка модуля securities_services.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (1000, '1000', 'Общая ошибка модуля securities_services.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (1001, '1 001', 'Нет прав на проведение данной операции.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (1001, '1001', 'Нет прав на проведение данной операции.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (1002, '1 002', 'Не заданы обязательные поля.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (1002, '1002', 'Не заданы обязательные поля.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (1003, '1 003', 'Запись с указанным идентификатором в справочнике %s не найдена.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (1003, '1003', 'Запись с указанным идентификатором в справочнике %s не найдена.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (1004, '1 004', 'Неверное значение поля %s.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (1004, '1004', 'Неверное значение поля %s.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (1005, '1 005', 'Такая запись уже существует.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (1005, '1005', 'Такая запись уже существует.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (1006, '1 006', 'Запись не найдена.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (1006, '1006', 'Запись не найдена.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (1007, '1 007', 'Пользователь не найден.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (1007, '1007', 'Пользователь не найден.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (1008, '1 008', 'Пользователь неактивен.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (1008, '1008', 'Пользователь неактивен.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (1010, '1 010', 'Такой Инструмент уже существует.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (1010, '1010', 'Такой Инструмент уже существует.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (1011, '1 011', 'Инструмент не найден.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (1011, '1011', 'Инструмент не найден.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (1012, '1 012', 'Инструмент неактивен.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (1012, '1012', 'Инструмент неактивен.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (2000, '2 000', 'Общая ошибка модуля utility_service');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (2000, '2000', 'Общая ошибка модуля utility_service');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (2001, '2 001', 'Нет прав на проведение данной операции.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (2001, '2001', 'Нет прав на проведение данной операции.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (2002, '2 002', 'Не заданы обязательные поля.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (2002, '2002', 'Не заданы обязательные поля.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (2003, '2 003', 'Запись с указанным идентификатором в справочнике %s не найдена.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (2003, '2003', 'Запись с указанным идентификатором в справочнике %s не найдена.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (2004, '2 004', 'Неверное значение поля %s.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (2004, '2004', 'Неверное значение поля %s.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (2005, '2 005', 'Такая запись уже существует.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (2005, '2005', 'Такая запись уже существует.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (2006, '2 006', 'Запись не найдена.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (2006, '2006', 'Запись не найдена.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (3000, '3 000', 'Общая ошибка модуля company_services');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (3000, '3000', 'Общая ошибка модуля company_services');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (3001, '3 001', 'Нет прав на проведение данной операции.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (3001, '3001', 'Нет прав на проведение данной операции.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (3002, '3 002', 'Не заданы обязательные поля.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (3002, '3002', 'Не заданы обязательные поля.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (3003, '3 003', 'Запись с указанным идентификатором в справочнике %s не найдена.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (3003, '3003', 'Запись с указанным идентификатором в справочнике %s не найдена.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (3004, '3 004', 'Неверное значение поля %s.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (3004, '3004', 'Неверное значение поля %s.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (3005, '3 005', 'Такая запись уже существует.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (3005, '3005', 'Такая запись уже существует.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (3006, '3 006', 'Запись не найдена.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (3006, '3006', 'Запись не найдена.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (3010, '3 010', 'Такая Компания уже существует');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (3010, '3010', 'Такая Компания уже существует');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (3011, '3 011', 'Компания не найдена.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (3011, '3011', 'Компания не найдена.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (3012, '3 012', 'Компания неактивна.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (3012, '3012', 'Компания неактивна.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (3013, '3 013', 'Профиль Компании не найден.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (3013, '3013', 'Профиль Компании не найден.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (3014, '3 014', 'Реквизит Компании не найден.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (3014, '3014', 'Реквизит Компании не найден.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (3015, '3 015', 'Контакт Компании не найден.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (3015, '3015', 'Контакт Компании не найден.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (3016, '3 016', 'Категория Компании не найдена.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (3016, '3016', 'Категория Компании не найдена.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (3017, '3 017', 'Компании уже присвоена Категория %s.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (3017, '3017', 'Компании уже присвоена Категория %s.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (4000, '4 000', 'Общая ошибка модуля report_serivces');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (4000, '4000', 'Общая ошибка модуля report_serivces');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5000, '5 000', 'Общая ошибка модуля account_services');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5000, '5000', 'Общая ошибка модуля account_services');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5001, '5 001', 'Нет прав на проведение данной операции.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5001, '5001', 'Нет прав на проведение данной операции.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5002, '5 002', 'Не заданы обязательные поля.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5002, '5002', 'Не заданы обязательные поля.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5003, '5 003', 'Запись с указанным идентификатором в справочнике %s не найдена.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5003, '5003', 'Запись с указанным идентификатором в справочнике %s не найдена.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5004, '5 004', 'Неверное значение поля %s.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5004, '5004', 'Неверное значение поля %s.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5005, '5 005', 'Такая запись уже существует.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5005, '5005', 'Такая запись уже существует.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5006, '5 006', 'Запись не найдена.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5006, '5006', 'Запись не найдена.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5010, '5 010', 'Счет %s уже существует.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5010, '5010', 'Счет %s уже существует.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5011, '5 011', 'Счет %s не найден.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5011, '5011', 'Счет %s не найден.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5012, '5 012', 'Счет %s неактивен.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5012, '5012', 'Счет %s неактивен.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5200, '5 200', 'Общая ошибка модуля balance_services');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5013, '5013', 'Компания не найдена.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5211, '5 211', 'Компания не найдена.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5014, '5014', 'Компания неактивна.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5212, '5 212', 'Компания неактивна.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5200, '5200', 'Общая ошибка модуля balance_services');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5213, '5 213', 'Валюта не найдена.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5210, '5210', 'Клиринговая сессия неактивна.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5214, '5 214', 'Загрузка остатков возможна только на текущую дату.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5211, '5211', 'Компания не найдена.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5215, '5 215', 'Загрузка остатков возможна только по рынку МКР.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5212, '5212', 'Компания неактивна.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5216, '5 216', 'Загрузка остатков возможна только по собственным счетам.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5213, '5213', 'Валюта не найдена.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5217, '5 217', 'Счет %s не найден.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5214, '5214', 'Загрузка остатков возможна только на текущую дату.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5218, '5 218', 'Счет %s неактивен.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5215, '5215', 'Загрузка остатков возможна только по рынку МКР.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5400, '5 400', 'Общая ошибка модуля проведения расчетов');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5216, '5216', 'Загрузка остатков возможна только по собственным счетам.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5600, '5 600', 'Общая ошибка модуля dbf-loader');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5217, '5217', 'Счет %s не найден.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5800, '5 800', 'Общая ошибка модуля dbf-export');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5218, '5218', 'Счет %s неактивен.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (6000, '6 000', 'Общая ошибка модуля api-lk-company');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5219, '5219', 'Дозачисления/списания возможны только по рынку МКР.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (7000, '7 000', 'Общая ошибка модуля scheduler_service');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5220, '5220', 'Сумма списания превышает сумму средств на счете.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (7001, '7 001', 'Нет прав на проведение данной операции.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5221, '5221', 'Поступление средств возможно только по рынку МКР.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (7002, '7 002', 'Не заданы обязательные поля.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5400, '5400', 'Общая ошибка модуля проведения расчетов');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (7003, '7 003', 'Запись с указанным идентификатором в справочнике %s не найдена.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5600, '5600', 'Общая ошибка модуля dbf-loader');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (7004, '7 004', 'Неверное значение поля %s.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (5800, '5800', 'Общая ошибка модуля dbf-export');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (7005, '7 005', 'Такая запись уже существует.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (6000, '6000', 'Общая ошибка модуля api-lk-company');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (7006, '7 006', 'Запись не найдена.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (7000, '7000', 'Общая ошибка модуля scheduler_service');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (7010, '7 010', 'Невозможно добавить задачу на прошедшую дату.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (7001, '7001', 'Нет прав на проведение данной операции.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (7011, '7 011', 'Невозможно добавить задачу на прошедшее время.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (7002, '7002', 'Не заданы обязательные поля.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (7012, '7 012', 'Указанный в задаче нструмент не найден.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (7003, '7003', 'Запись с указанным идентификатором в справочнике %s не найдена.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (7013, '7 013', 'Указанный инструмент неактивен.');
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (7004, '7004', 'Неверное значение поля %s.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (7005, '7005', 'Такая запись уже существует.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (7006, '7006', 'Запись не найдена.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (7010, '7010', 'Невозможно добавить задачу на прошедшую дату.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (7011, '7011', 'Невозможно добавить задачу на прошедшее время.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (7012, '7012', 'Указанный в задаче нструмент не найден.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (7013, '7013', 'Указанный инструмент неактивен.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (8000, '8000', 'Общая ошибка модуля utility_service');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (8001, '8001', 'Нет прав на проведение данной операции.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (8002, '8002', 'Не заданы обязательные поля.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (8003, '8003', 'Запись с указанным идентификатором в справочнике %s не найдена.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (8004, '8004', 'Неверное значение поля %s.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (8005, '8005', 'Такая запись уже существует.');
|
||||
|
||||
INSERT INTO ERROR_CODE_DICTIONARY(ID, CODE, NAME) values (8006, '8006', 'Запись не найдена.');
|
||||
|
||||
/* Business objects */
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -41,6 +41,10 @@
|
|||
<groupId>ru.spcex.platform</groupId>
|
||||
<artifactId>platform-imdg-api-hazelcast-impl</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ru.spcex.platform</groupId>
|
||||
<artifactId>platform-messaging</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<artifactId>classes</artifactId>
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@ import org.springframework.context.annotation.Bean;
|
|||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
import ru.spcex.clearing.dbf.exporter.config.settings.ExportDBFServiceSettings;
|
||||
import ru.spcex.clearing.dbf.exporter.logic.stages.ExportFromHazelcast;
|
||||
import ru.spcex.clearing.dbf.exporter.logic.stages.PrepareDBFFile;
|
||||
import ru.spcex.clearing.dbf.exporter.logic.stages.Stage;
|
||||
import ru.spcex.clearing.dbf.exporter.properties.AProperties;
|
||||
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;
|
||||
|
|
@ -22,13 +22,6 @@ import java.util.List;
|
|||
@EnableConfigurationProperties
|
||||
@ComponentScan(basePackages = {"ru.spcex.clearing.dbf.exporter"})
|
||||
public class DBFExporterConfig {
|
||||
private final AProperties properties;
|
||||
private final ApplicationContext context;
|
||||
|
||||
public DBFExporterConfig(@Qualifier("dbfExporterProperties") AProperties properties, ApplicationContext context) {
|
||||
this.properties = properties;
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
@Bean("taskExecutorHazelcastClientInitializer")
|
||||
public ThreadPoolTaskExecutor taskExecutorHazelcastClientInitializer() {
|
||||
|
|
@ -43,17 +36,16 @@ public class DBFExporterConfig {
|
|||
@Bean("imdgProvider")
|
||||
public ImdgProvider imdgProvider(@Qualifier("taskExecutorHazelcastClientInitializer") ThreadPoolTaskExecutor taskExecutorHazelcastClientInitializer,
|
||||
@Qualifier("taskExecutorIdGeneratorAwaiter") ThreadPoolTaskExecutor taskExecutorIdGeneratorAwaiter,
|
||||
AProperties properties) {
|
||||
ExportDBFServiceSettings settings) {
|
||||
HazelcastClientParams params = new HazelcastClientParams();
|
||||
params.setClusterMembers(properties.getHazelcastClusterMembers());
|
||||
params.setLogin(properties.getHazelcastLogin());
|
||||
params.setPassword(properties.getHazelcastPassword());
|
||||
// params.setInstanceName("dbf-exporter");
|
||||
params.setClusterMembers(settings.getHazelcast().getClusterMembers());
|
||||
params.setLogin(settings.getHazelcast().getLogin());
|
||||
params.setPassword(settings.getHazelcast().getPassword());
|
||||
return new HazelcastService(taskExecutorHazelcastClientInitializer, taskExecutorIdGeneratorAwaiter, params);
|
||||
}
|
||||
|
||||
@Bean("pipeline")
|
||||
public List<Stage> pipeline() {
|
||||
public List<Stage> pipeline(ApplicationContext context) {
|
||||
List<Stage> pipeline = new LinkedList<>();
|
||||
|
||||
pipeline.add(context.getBean(PrepareDBFFile.class));
|
||||
|
|
@ -63,11 +55,11 @@ public class DBFExporterConfig {
|
|||
}
|
||||
|
||||
@Bean("executor")
|
||||
public ThreadPoolTaskExecutor executor() {
|
||||
public ThreadPoolTaskExecutor executor(ExportDBFServiceSettings settings) {
|
||||
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
||||
executor.setMaxPoolSize(properties.getThreadsCount());
|
||||
executor.setCorePoolSize(properties.getThreadsCount());
|
||||
executor.setThreadNamePrefix("dbf-exporter-thread-");
|
||||
executor.setMaxPoolSize(settings.getCommon().getThreadsCount());
|
||||
executor.setCorePoolSize(settings.getCommon().getThreadsCount());
|
||||
executor.setThreadNamePrefix("dbf-exporter");
|
||||
executor.setWaitForTasksToCompleteOnShutdown(true);
|
||||
executor.setAwaitTerminationSeconds(300);
|
||||
executor.initialize();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,21 @@
|
|||
package ru.spcex.clearing.dbf.exporter.config;
|
||||
|
||||
import org.apache.kafka.clients.consumer.Consumer;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
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.spcex.clearing.dbf.exporter.config.settings.ExportDBFServiceSettings;
|
||||
import ru.spcex.clearing.platform.messaging.config.KafkaConsumerFactory;
|
||||
|
||||
@Configuration
|
||||
public class KafkaConfig {
|
||||
|
||||
@Autowired
|
||||
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
|
||||
@Bean
|
||||
public Consumer<String, Object> createConsumer(ExportDBFServiceSettings settings) {
|
||||
return KafkaConsumerFactory.consumer(settings.getKafkaConsumer());
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package ru.spcex.clearing.dbf.exporter.config.settings;
|
||||
|
||||
public class Common {
|
||||
|
||||
private String encoding;
|
||||
private int insertBatchSize;
|
||||
private int threadsCount;
|
||||
|
||||
public String getEncoding() {
|
||||
return encoding;
|
||||
}
|
||||
|
||||
public void setEncoding(String encoding) {
|
||||
this.encoding = encoding;
|
||||
}
|
||||
|
||||
public int getInsertBatchSize() {
|
||||
return insertBatchSize;
|
||||
}
|
||||
|
||||
public void setInsertBatchSize(int insertBatchSize) {
|
||||
this.insertBatchSize = insertBatchSize;
|
||||
}
|
||||
|
||||
public int getThreadsCount() {
|
||||
return threadsCount;
|
||||
}
|
||||
|
||||
public void setThreadsCount(int threadsCount) {
|
||||
this.threadsCount = threadsCount;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package ru.spcex.clearing.dbf.exporter.config.settings;
|
||||
|
||||
public class Cron {
|
||||
|
||||
private String checkSrcDirCron;
|
||||
|
||||
public String getCheckSrcDirCron() {
|
||||
return checkSrcDirCron;
|
||||
}
|
||||
|
||||
public void setCheckSrcDirCron(String checkSrcDirCron) {
|
||||
this.checkSrcDirCron = checkSrcDirCron;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
package ru.spcex.clearing.dbf.exporter.config.settings;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.spcex.clearing.platform.messaging.config.element.KafkaConsumerSettings;
|
||||
import ru.spcex.platform.imdg.iml.hazelcast.config.HazelcastClientParams;
|
||||
|
||||
@Component
|
||||
@PropertySource("file:${spring.config.location}/application.properties")
|
||||
@ConfigurationProperties("export-dbf-service")
|
||||
public class ExportDBFServiceSettings {
|
||||
private HazelcastClientParams hazelcast;
|
||||
private KafkaConsumerSettings kafkaConsumer;
|
||||
private Common common;
|
||||
private Store store;
|
||||
private Cron cron;
|
||||
|
||||
public HazelcastClientParams getHazelcast() {
|
||||
return hazelcast;
|
||||
}
|
||||
|
||||
public void setHazelcast(HazelcastClientParams hazelcast) {
|
||||
this.hazelcast = hazelcast;
|
||||
}
|
||||
|
||||
public KafkaConsumerSettings getKafkaConsumer() {
|
||||
return kafkaConsumer;
|
||||
}
|
||||
|
||||
public void setKafkaConsumer(KafkaConsumerSettings kafkaConsumer) {
|
||||
this.kafkaConsumer = kafkaConsumer;
|
||||
}
|
||||
|
||||
public Common getCommon() {
|
||||
return common;
|
||||
}
|
||||
|
||||
public void setCommon(Common common) {
|
||||
this.common = common;
|
||||
}
|
||||
|
||||
public Store getStore() {
|
||||
return store;
|
||||
}
|
||||
|
||||
public void setStore(Store store) {
|
||||
this.store = store;
|
||||
}
|
||||
|
||||
public Cron getCron() {
|
||||
return cron;
|
||||
}
|
||||
|
||||
public void setCron(Cron cron) {
|
||||
this.cron = cron;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package ru.spcex.clearing.dbf.exporter.config.settings;
|
||||
|
||||
public class Store {
|
||||
|
||||
private String outDir;
|
||||
|
||||
public String getOutDir() {
|
||||
return outDir;
|
||||
}
|
||||
|
||||
public void setOutDir(String outDir) {
|
||||
this.outDir = outDir;
|
||||
}
|
||||
}
|
||||
|
|
@ -10,37 +10,23 @@ 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.spcex.clearing.dbf.exporter.logic.data.IFilter;
|
||||
import ru.spcex.clearing.dbf.exporter.logic.data.enums.Table;
|
||||
import ru.spcex.clearing.dbf.exporter.services.DBFExportService;
|
||||
|
||||
import java.util.EnumMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Controller("/")
|
||||
public class DefaultController implements InitializingBean {
|
||||
public class ExporterController implements InitializingBean {
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
private final DBFExportService dbfExportService;
|
||||
|
||||
public DefaultController(@Qualifier("dbfExportService") DBFExportService dbfExportService) {
|
||||
public ExporterController(@Qualifier("dbfExportService") DBFExportService dbfExportService) {
|
||||
this.dbfExportService = dbfExportService;
|
||||
}
|
||||
|
||||
@RequestMapping(method = RequestMethod.GET, path = "/test", produces = MediaType.TEXT_PLAIN_VALUE)
|
||||
@ResponseBody
|
||||
public String processGet() {
|
||||
log.info("Call test method for exporter controller");
|
||||
return "exporter controller test method";
|
||||
}
|
||||
|
||||
@RequestMapping(method = RequestMethod.GET, path = "/export", produces = MediaType.TEXT_PLAIN_VALUE)
|
||||
@ResponseBody
|
||||
public String exportTables() {
|
||||
log.info("Call export method for exporter controller");
|
||||
Map<Table, IFilter> tablesForExport = new EnumMap<>(Table.class);
|
||||
for (Table table : Table.values()) tablesForExport.put(table, null);
|
||||
dbfExportService.run(tablesForExport);
|
||||
return "export done, see log";
|
||||
dbfExportService.run();
|
||||
return "export done";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
package ru.spcex.clearing.dbf.exporter.logic.data;
|
||||
|
||||
/**
|
||||
* Фильтр записей для экспорта
|
||||
*/
|
||||
public interface IFilter {
|
||||
|
||||
}
|
||||
|
|
@ -11,15 +11,14 @@ import java.util.UUID;
|
|||
public class ResultContainer {
|
||||
private UUID uuid;
|
||||
private Table tableForExport;
|
||||
private IFilter filter;
|
||||
private File fileForExport;
|
||||
private Long groupId;
|
||||
|
||||
protected ResultContainer() {}
|
||||
|
||||
public static ResultContainer createNewTask(Table tableForExport, IFilter filter) {
|
||||
public static ResultContainer createNewTask(Table tableForExport) {
|
||||
ResultContainer container = new ResultContainer();
|
||||
container.tableForExport = tableForExport;
|
||||
container.filter = filter;
|
||||
container.uuid = UUID.randomUUID();
|
||||
return container;
|
||||
}
|
||||
|
|
@ -32,14 +31,6 @@ public class ResultContainer {
|
|||
this.tableForExport = tableForExport;
|
||||
}
|
||||
|
||||
public IFilter getFilter() {
|
||||
return filter;
|
||||
}
|
||||
|
||||
public void setFilter(IFilter filter) {
|
||||
this.filter = filter;
|
||||
}
|
||||
|
||||
public File getFileForExport() {
|
||||
return fileForExport;
|
||||
}
|
||||
|
|
@ -55,4 +46,12 @@ public class ResultContainer {
|
|||
public void setUuid(UUID uuid) {
|
||||
this.uuid = uuid;
|
||||
}
|
||||
|
||||
public Long getGroupId() {
|
||||
return groupId;
|
||||
}
|
||||
|
||||
public void setGroupId(Long groupId) {
|
||||
this.groupId = groupId;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,12 +6,11 @@ import org.springframework.beans.factory.InitializingBean;
|
|||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.clearing.classes.statics.data.sdf.*;
|
||||
import ru.spcex.clearing.dbf.exporter.config.settings.ExportDBFServiceSettings;
|
||||
import ru.spcex.clearing.dbf.exporter.exceptions.ConfigException;
|
||||
import ru.spcex.clearing.dbf.exporter.logic.data.IFilter;
|
||||
import ru.spcex.clearing.dbf.exporter.logic.data.ResultContainer;
|
||||
import ru.spcex.clearing.dbf.exporter.logic.data.enums.StageResult;
|
||||
import ru.spcex.clearing.dbf.exporter.logic.data.enums.Table;
|
||||
import ru.spcex.clearing.dbf.exporter.properties.AProperties;
|
||||
import ru.spcex.clearing.dbf.exporter.services.converters.*;
|
||||
import ru.spcex.platform.classes.base.SpcexObjectBase;
|
||||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
|
|
@ -29,7 +28,7 @@ import java.util.Objects;
|
|||
*/
|
||||
@Component
|
||||
public class ExportFromHazelcast extends Stage implements InitializingBean {
|
||||
private final AProperties properties;
|
||||
private final ExportDBFServiceSettings settings;
|
||||
private final ImdgProvider imdgProvider;
|
||||
|
||||
private final S_DF02_Converter s_df02_converter;
|
||||
|
|
@ -41,14 +40,14 @@ public class ExportFromHazelcast extends Stage implements InitializingBean {
|
|||
private final Map<Table, DBFField[]> dbfFieldsForTable = new HashMap<>();
|
||||
private Charset dbfCharset;
|
||||
|
||||
public ExportFromHazelcast(@Qualifier("dbfExporterProperties") AProperties properties,
|
||||
public ExportFromHazelcast(ExportDBFServiceSettings settings,
|
||||
@Qualifier("imdgProvider") ImdgProvider imdgProvider,
|
||||
S_DF02_Converter s_df02_converter,
|
||||
S_DF08_Converter s_df08_converter,
|
||||
S_DF18_Converter s_df18_converter,
|
||||
S_DF10_Converter s_df10_converter,
|
||||
S_DF17_Converter s_df17_converter) {
|
||||
this.properties = properties;
|
||||
this.settings = settings;
|
||||
this.imdgProvider = imdgProvider;
|
||||
this.s_df02_converter = s_df02_converter;
|
||||
this.s_df08_converter = s_df08_converter;
|
||||
|
|
@ -63,20 +62,24 @@ public class ExportFromHazelcast extends Stage implements InitializingBean {
|
|||
Objects.requireNonNull(resultContainer.getFileForExport());
|
||||
|
||||
Table table = resultContainer.getTableForExport();
|
||||
IFilter filter = resultContainer.getFilter();
|
||||
|
||||
Imdg<? extends SpcexObjectBase> map = imdgProvider.getImdg(table.getHazelcastMapName(), table.getEntityClass());
|
||||
File dbfFile = resultContainer.getFileForExport();
|
||||
boolean writeOk = false;
|
||||
boolean emptyMap = true;
|
||||
try (DBFWriter dbfWriter = new DBFWriter(dbfFile, dbfCharset)) {
|
||||
dbfWriter.setFields(dbfFieldsForTable.get(table));
|
||||
Collection<? extends SpcexObjectBase> allValues = map.getAllValues();
|
||||
if (allValues.isEmpty()) {
|
||||
Collection<? extends SpcexObjectBase> tableRows;
|
||||
if (resultContainer.getGroupId() != null) {
|
||||
Map<String, Long> queryParams = Map.of("generationId", resultContainer.getGroupId());
|
||||
tableRows = map.getCollectionObjectsByFieldValues(queryParams);
|
||||
} else {
|
||||
tableRows = map.getAllValues();
|
||||
}
|
||||
if (tableRows.isEmpty()) {
|
||||
log.info("uuid {}. Map {} is empty.", resultContainer.getUuid(), resultContainer.getTableForExport().getHazelcastMapName());
|
||||
return StageResult.COMPLETE;
|
||||
}
|
||||
for (SpcexObjectBase value : allValues) {
|
||||
for (SpcexObjectBase value : tableRows) {
|
||||
Object[] values;
|
||||
if (value instanceof SDf02 sDf02Value) values = s_df02_converter.toObjectArray(sDf02Value);
|
||||
else if (value instanceof SDf08 sDf08Value) values = s_df08_converter.toObjectArray(sDf08Value);
|
||||
|
|
@ -87,7 +90,7 @@ public class ExportFromHazelcast extends Stage implements InitializingBean {
|
|||
dbfWriter.addRecord(values);
|
||||
}
|
||||
writeOk = true;
|
||||
emptyMap = allValues.isEmpty();
|
||||
emptyMap = tableRows.isEmpty();
|
||||
} catch (Exception e) {
|
||||
log.error(String.format("uuid %s. Can't export table %s to file %s. Table was skipped.", resultContainer.getUuid(), table, dbfFile), e);
|
||||
return StageResult.ERROR;
|
||||
|
|
@ -126,9 +129,9 @@ public class ExportFromHazelcast extends Stage implements InitializingBean {
|
|||
|
||||
private void initDBFCharset() {
|
||||
try {
|
||||
dbfCharset = Charset.forName(properties.getDbfEncoding());
|
||||
dbfCharset = Charset.forName(settings.getCommon().getEncoding());
|
||||
} catch (Exception e) {
|
||||
throw new ConfigException("В properties файле содержится неизвестная кодировка: " + properties.getDbfEncoding(), e);
|
||||
throw new ConfigException("В properties файле содержится неизвестная кодировка: " + settings.getCommon().getEncoding(), e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,11 @@
|
|||
package ru.spcex.clearing.dbf.exporter.logic.stages;
|
||||
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.spcex.clearing.dbf.exporter.config.settings.ExportDBFServiceSettings;
|
||||
import ru.spcex.clearing.dbf.exporter.logic.data.ResultContainer;
|
||||
import ru.spcex.clearing.dbf.exporter.logic.data.enums.StageResult;
|
||||
import ru.spcex.clearing.dbf.exporter.logic.data.enums.Table;
|
||||
import ru.spcex.clearing.dbf.exporter.properties.AProperties;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
|
@ -24,13 +23,13 @@ import java.util.Objects;
|
|||
public class PrepareDBFFile extends Stage implements InitializingBean {
|
||||
private static final String SECTION = "U";
|
||||
private static final String CODE_OF_MEMBER = null;
|
||||
private static DateTimeFormatter tsFormatter = DateTimeFormatter.ofPattern("yyMMddHHmm");
|
||||
private static DateTimeFormatter utilFormatter = DateTimeFormatter.ofPattern("yyMMdd");
|
||||
private final AProperties properties;
|
||||
private static final DateTimeFormatter tsFormatter = DateTimeFormatter.ofPattern("yyMMddHHmm");
|
||||
private static final DateTimeFormatter utilFormatter = DateTimeFormatter.ofPattern("yyMMdd");
|
||||
private final ExportDBFServiceSettings settings;
|
||||
private String outDir;
|
||||
|
||||
public PrepareDBFFile(@Qualifier("dbfExporterProperties") AProperties properties) {
|
||||
this.properties = properties;
|
||||
public PrepareDBFFile(ExportDBFServiceSettings settings) {
|
||||
this.settings = settings;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -54,7 +53,7 @@ public class PrepareDBFFile extends Stage implements InitializingBean {
|
|||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
String outDirPath = properties.getOutDir();
|
||||
String outDirPath = settings.getStore().getOutDir();
|
||||
File outDirFile = new File(outDirPath);
|
||||
if (outDirFile.exists() && !outDirFile.isDirectory())
|
||||
throw new IOException("Output directory " + outDirPath + " is file.");
|
||||
|
|
|
|||
|
|
@ -1,74 +0,0 @@
|
|||
package ru.spcex.clearing.dbf.exporter.properties;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component("dbfExporterProperties")
|
||||
public class AProperties {
|
||||
|
||||
@Value("${hazelcast.cluster-members}")
|
||||
private String hazelcastClusterMembers;
|
||||
|
||||
@Value("${hazelcast.login}")
|
||||
private String hazelcastLogin;
|
||||
|
||||
@Value("${hazelcast.password}")
|
||||
private String hazelcastPassword;
|
||||
|
||||
@Value("${dbf.out-dir}")
|
||||
private String outDir;
|
||||
|
||||
@Value("${dbf.encoding}")
|
||||
private String dbfEncoding;
|
||||
|
||||
@Value("${dbf.threads-count}")
|
||||
private int threadsCount;
|
||||
|
||||
public String getHazelcastClusterMembers() {
|
||||
return hazelcastClusterMembers;
|
||||
}
|
||||
|
||||
public void setHazelcastClusterMembers(String hazelcastClusterMembers) {
|
||||
this.hazelcastClusterMembers = hazelcastClusterMembers;
|
||||
}
|
||||
|
||||
public String getHazelcastLogin() {
|
||||
return hazelcastLogin;
|
||||
}
|
||||
|
||||
public void setHazelcastLogin(String hazelcastLogin) {
|
||||
this.hazelcastLogin = hazelcastLogin;
|
||||
}
|
||||
|
||||
public String getHazelcastPassword() {
|
||||
return hazelcastPassword;
|
||||
}
|
||||
|
||||
public void setHazelcastPassword(String hazelcastPassword) {
|
||||
this.hazelcastPassword = hazelcastPassword;
|
||||
}
|
||||
|
||||
public String getOutDir() {
|
||||
return outDir;
|
||||
}
|
||||
|
||||
public void setOutDir(String outDir) {
|
||||
this.outDir = outDir;
|
||||
}
|
||||
|
||||
public String getDbfEncoding() {
|
||||
return dbfEncoding;
|
||||
}
|
||||
|
||||
public void setDbfEncoding(String dbfEncoding) {
|
||||
this.dbfEncoding = dbfEncoding;
|
||||
}
|
||||
|
||||
public int getThreadsCount() {
|
||||
return threadsCount;
|
||||
}
|
||||
|
||||
public void setThreadsCount(int threadsCount) {
|
||||
this.threadsCount = threadsCount;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
package ru.spcex.clearing.dbf.exporter.services;
|
||||
|
||||
import org.apache.kafka.clients.consumer.Consumer;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.stereotype.Service;
|
||||
import ru.spcex.clearing.dbf.exporter.logic.data.ResultContainer;
|
||||
import ru.spcex.clearing.dbf.exporter.logic.data.enums.Table;
|
||||
import ru.spcex.clearing.dbf.exporter.logic.stages.Processor;
|
||||
import ru.spcex.clearing.platform.messaging.domain.BaseRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.Consts;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.balance.ExportToFileRequest;
|
||||
import ru.spcex.clearing.platform.messaging.service.QueueConsumer;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Optional;
|
||||
|
||||
@Service
|
||||
public class CommandService extends QueueConsumer implements InitializingBean {
|
||||
|
||||
private final ImdgProvider imdgProvider;
|
||||
private final Processor processor;
|
||||
|
||||
public CommandService(Consumer<String, Object> kafkaQueue,
|
||||
ImdgProvider imdgProvider,
|
||||
Processor processor) {
|
||||
super(kafkaQueue);
|
||||
this.imdgProvider = imdgProvider;
|
||||
this.processor = processor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
callback(ExportToFileRequest.class)
|
||||
.setConsumer(this::process)
|
||||
.forDestination(Consts.EXPORT_PROCESS, callbacks::put);
|
||||
init();
|
||||
}
|
||||
|
||||
private void process(BaseRequest<ExportToFileRequest> systemRequest) {
|
||||
ExportToFileRequest request = systemRequest.getRequestPayload();
|
||||
Optional<Table> tableForExport = Arrays.stream(Table.values()).
|
||||
filter(table -> table.getFilePrefix().equalsIgnoreCase(request.getNameOfTable())).findFirst();
|
||||
if (tableForExport.isEmpty()) {
|
||||
throw new IllegalStateException("Unsupported table prefix");
|
||||
}
|
||||
ResultContainer resultContainer = ResultContainer.createNewTask(tableForExport.get());
|
||||
resultContainer.setGroupId(request.getSdfGroupId());
|
||||
processor.process(resultContainer);
|
||||
}
|
||||
}
|
||||
|
|
@ -3,13 +3,10 @@ package ru.spcex.clearing.dbf.exporter.services;
|
|||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import ru.spcex.clearing.dbf.exporter.logic.data.IFilter;
|
||||
import ru.spcex.clearing.dbf.exporter.logic.data.ResultContainer;
|
||||
import ru.spcex.clearing.dbf.exporter.logic.data.enums.Table;
|
||||
import ru.spcex.clearing.dbf.exporter.logic.stages.Processor;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Service("dbfExportService")
|
||||
public class DBFExportService {
|
||||
private final ThreadPoolTaskExecutor executor;
|
||||
|
|
@ -21,11 +18,9 @@ public class DBFExportService {
|
|||
this.processor = processor;
|
||||
}
|
||||
|
||||
public void run(Map<Table, IFilter> tablesForExport) {
|
||||
for (Map.Entry<Table, IFilter> tableForExport : tablesForExport.entrySet()) {
|
||||
Table table = tableForExport.getKey();
|
||||
IFilter filter = tableForExport.getValue();
|
||||
executor.submit(() -> processor.process(ResultContainer.createNewTask(table, filter)));
|
||||
public void run() {
|
||||
for (Table tableForExport : Table.values()) {
|
||||
executor.submit(() -> processor.process(ResultContainer.createNewTask(tableForExport)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,11 +2,19 @@ server.port=8080
|
|||
server.servlet.context-path=/exporter
|
||||
spring.main.web-application-type=servlet
|
||||
|
||||
hazelcast.cluster-members=127.0.0.1:5701
|
||||
hazelcast.login=dev
|
||||
hazelcast.password=dev-pass
|
||||
export-dbf-service.hazelcast.cluster-members=10.200.200.181:5701
|
||||
export-dbf-service.hazelcast.login=dev
|
||||
export-dbf-service.hazelcast.password=dev-pass
|
||||
|
||||
dbf.encoding=cp866
|
||||
dbf.threads-count=10
|
||||
export-dbf-service.common.encoding=cp866
|
||||
export-dbf-service.common.threads-count=10
|
||||
|
||||
dbf.out-dir=D:\\dbf\\out
|
||||
export-dbf-service.store.out-dir=/opt/clearing/file/exporter/
|
||||
|
||||
export-dbf-service.kafka-consumer.bootstrap-servers=localhost:9092
|
||||
export-dbf-service.kafka-consumer.group-id=dev-group-balance-service
|
||||
export-dbf-service.kafka-consumer.enable-auto-commit=false
|
||||
export-dbf-service.kafka-consumer.session-timeout-ms=30000
|
||||
export-dbf-service.kafka-consumer.auto-offset-reset=latest
|
||||
export-dbf-service.kafka-consumer.linger-ms=1
|
||||
export-dbf-service.kafka-consumer.buffer-memory=33554432
|
||||
|
|
|
|||
|
|
@ -62,6 +62,10 @@
|
|||
<groupId>ru.spcex.clearing</groupId>
|
||||
<artifactId>classes</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ru.spcex.platform</groupId>
|
||||
<artifactId>platform-messaging</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
|||
|
|
@ -5,13 +5,13 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
|
||||
@SpringBootApplication
|
||||
public class DBFLoaderApplication {
|
||||
public class DBFImporterApplication {
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
SpringApplicationBuilder builder = new SpringApplicationBuilder(DBFLoaderApplication.class);
|
||||
SpringApplicationBuilder builder = new SpringApplicationBuilder(DBFImporterApplication.class);
|
||||
builder.run(args);
|
||||
} catch (Exception e) {
|
||||
LoggerFactory.getLogger(DBFLoaderApplication.class).error("DBF-Loader start failed: {} -> {}", e.getClass().getSimpleName(), e.getMessage());
|
||||
LoggerFactory.getLogger(DBFImporterApplication.class).error("DBF-Loader start failed: {} -> {}", e.getClass().getSimpleName(), e.getMessage());
|
||||
System.exit(-1);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +1,15 @@
|
|||
package ru.spcex.clearing.dbf.importer.config;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
import ru.spcex.clearing.dbf.importer.config.settings.ImportDBFServiceSettings;
|
||||
import ru.spcex.clearing.dbf.importer.logic.data.enums.ETable;
|
||||
import ru.spcex.clearing.dbf.importer.logic.data.tables.*;
|
||||
import ru.spcex.clearing.dbf.importer.logic.stages.*;
|
||||
import ru.spcex.clearing.dbf.importer.properties.AProperties;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
|
|
@ -21,12 +20,12 @@ import java.util.Map;
|
|||
@EnableConfigurationProperties
|
||||
@ComponentScan(basePackages = {"ru.spcex.clearing.dbf.importer"})
|
||||
public class DBFImporterConfig {
|
||||
private final AProperties properties;
|
||||
private final ImportDBFServiceSettings settings;
|
||||
private final ApplicationContext context;
|
||||
|
||||
|
||||
public DBFImporterConfig(@Qualifier("dbfImporterProperties") AProperties properties, ApplicationContext context) {
|
||||
this.properties = properties;
|
||||
public DBFImporterConfig(ImportDBFServiceSettings settings, ApplicationContext context) {
|
||||
this.settings = settings;
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
|
|
@ -45,8 +44,8 @@ public class DBFImporterConfig {
|
|||
@Bean("executor")
|
||||
public ThreadPoolTaskExecutor executor() {
|
||||
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
||||
executor.setMaxPoolSize(properties.getThreadsCount());
|
||||
executor.setCorePoolSize(properties.getThreadsCount());
|
||||
executor.setMaxPoolSize(settings.getCommon().getThreadsCount());
|
||||
executor.setCorePoolSize(settings.getCommon().getThreadsCount());
|
||||
executor.setThreadNamePrefix("dbf-importer-thread-");
|
||||
executor.setWaitForTasksToCompleteOnShutdown(true);
|
||||
executor.setAwaitTerminationSeconds(300);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,37 @@
|
|||
package ru.spcex.clearing.dbf.importer.config;
|
||||
|
||||
import org.apache.kafka.clients.producer.Producer;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import ru.spcex.clearing.dbf.importer.config.settings.ImportDBFServiceSettings;
|
||||
import ru.spcex.clearing.platform.messaging.config.KafkaProducerFactory;
|
||||
import ru.spcex.clearing.platform.messaging.service.RequestInfo;
|
||||
import ru.spcex.clearing.platform.messaging.service.sender.KafkaSender;
|
||||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
import ru.spcex.platform.imdg.api.ImdgId;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
@Configuration
|
||||
public class KafkaConfig {
|
||||
|
||||
@Autowired
|
||||
@Bean
|
||||
public Supplier<KafkaSender> kafkaSender(ImportDBFServiceSettings settings, ImdgProvider imdgProvider) {
|
||||
return () -> {
|
||||
Producer<String, Object> kafkaProducer = KafkaProducerFactory.producer(settings.getKafkaProducer());
|
||||
ImdgId imdgIdGenerator = imdgProvider.getImdgIdGenerator();
|
||||
return KafkaSender
|
||||
.setup()
|
||||
.producer(kafkaProducer)
|
||||
.idGenerator(imdgIdGenerator::nextId)
|
||||
.imdgProvider(s -> {
|
||||
Imdg<RequestInfo> imdg = imdgProvider.getImdg(s, RequestInfo.class);
|
||||
return imdg::insert;
|
||||
})
|
||||
.build();
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package ru.spcex.clearing.dbf.importer.config.settings;
|
||||
|
||||
public class Common {
|
||||
|
||||
private String encodingSource;
|
||||
private int insertBatchSize;
|
||||
private int threadsCount;
|
||||
|
||||
public String getEncodingSource() {
|
||||
return encodingSource;
|
||||
}
|
||||
|
||||
public void setEncodingSource(String encodingSource) {
|
||||
this.encodingSource = encodingSource;
|
||||
}
|
||||
|
||||
public int getInsertBatchSize() {
|
||||
return insertBatchSize;
|
||||
}
|
||||
|
||||
public void setInsertBatchSize(int insertBatchSize) {
|
||||
this.insertBatchSize = insertBatchSize;
|
||||
}
|
||||
|
||||
public int getThreadsCount() {
|
||||
return threadsCount;
|
||||
}
|
||||
|
||||
public void setThreadsCount(int threadsCount) {
|
||||
this.threadsCount = threadsCount;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package ru.spcex.clearing.dbf.importer.config.settings;
|
||||
|
||||
public class Cron {
|
||||
|
||||
private String checkSrcDirCron;
|
||||
|
||||
public String getCheckSrcDirCron() {
|
||||
return checkSrcDirCron;
|
||||
}
|
||||
|
||||
public void setCheckSrcDirCron(String checkSrcDirCron) {
|
||||
this.checkSrcDirCron = checkSrcDirCron;
|
||||
}
|
||||
}
|
||||
|
|
@ -3,6 +3,7 @@ package ru.spcex.clearing.dbf.importer.config.settings;
|
|||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.spcex.clearing.platform.messaging.config.element.KafkaProducerSettings;
|
||||
import ru.spcex.platform.imdg.iml.hazelcast.config.HazelcastClientParams;
|
||||
|
||||
@Component
|
||||
|
|
@ -10,6 +11,10 @@ import ru.spcex.platform.imdg.iml.hazelcast.config.HazelcastClientParams;
|
|||
@ConfigurationProperties("import-dbf-service")
|
||||
public class ImportDBFServiceSettings {
|
||||
private HazelcastClientParams hazelcast;
|
||||
private KafkaProducerSettings kafkaProducer;
|
||||
private Common common;
|
||||
private Store store;
|
||||
private Cron cron;
|
||||
|
||||
public HazelcastClientParams getHazelcast() {
|
||||
return hazelcast;
|
||||
|
|
@ -18,4 +23,36 @@ public class ImportDBFServiceSettings {
|
|||
public void setHazelcast(HazelcastClientParams hazelcast) {
|
||||
this.hazelcast = hazelcast;
|
||||
}
|
||||
|
||||
public KafkaProducerSettings getKafkaProducer() {
|
||||
return kafkaProducer;
|
||||
}
|
||||
|
||||
public void setKafkaProducer(KafkaProducerSettings kafkaProducer) {
|
||||
this.kafkaProducer = kafkaProducer;
|
||||
}
|
||||
|
||||
public Common getCommon() {
|
||||
return common;
|
||||
}
|
||||
|
||||
public void setCommon(Common common) {
|
||||
this.common = common;
|
||||
}
|
||||
|
||||
public Store getStore() {
|
||||
return store;
|
||||
}
|
||||
|
||||
public void setStore(Store store) {
|
||||
this.store = store;
|
||||
}
|
||||
|
||||
public Cron getCron() {
|
||||
return cron;
|
||||
}
|
||||
|
||||
public void setCron(Cron cron) {
|
||||
this.cron = cron;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
package ru.spcex.clearing.dbf.importer.config.settings;
|
||||
|
||||
public class Store {
|
||||
|
||||
private String srcDir;
|
||||
private String outDir;
|
||||
private boolean deleteSrcFiles = true;
|
||||
|
||||
public String getSrcDir() {
|
||||
return srcDir;
|
||||
}
|
||||
|
||||
public void setSrcDir(String srcDir) {
|
||||
this.srcDir = srcDir;
|
||||
}
|
||||
|
||||
public String getOutDir() {
|
||||
return outDir;
|
||||
}
|
||||
|
||||
public void setOutDir(String outDir) {
|
||||
this.outDir = outDir;
|
||||
}
|
||||
|
||||
public boolean isDeleteSrcFiles() {
|
||||
return deleteSrcFiles;
|
||||
}
|
||||
|
||||
public void setDeleteSrcFiles(boolean deleteSrcFiles) {
|
||||
this.deleteSrcFiles = deleteSrcFiles;
|
||||
}
|
||||
}
|
||||
|
|
@ -21,13 +21,6 @@ public class ImporterController implements InitializingBean {
|
|||
this.importerService = importerService;
|
||||
}
|
||||
|
||||
@RequestMapping(method = RequestMethod.GET, path = "/test", produces = MediaType.TEXT_PLAIN_VALUE)
|
||||
@ResponseBody
|
||||
public String processGet() {
|
||||
log.info("Call test method for importer controller");
|
||||
return "importer controller test method";
|
||||
}
|
||||
|
||||
@RequestMapping(method = RequestMethod.GET, path = "/import", produces = MediaType.TEXT_PLAIN_VALUE)
|
||||
@ResponseBody
|
||||
public String checkFolder() {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ public class SDf12Table extends AbstractTable<SDf12> {
|
|||
SDf12 result = new SDf12();
|
||||
result.setAccount((String) entity[0]);
|
||||
result.setDeal((String) entity[1]);
|
||||
result.setStatus((BigDecimal) entity[2]);
|
||||
result.setStatus((Long) entity[2]);
|
||||
result.setFileName(filename);
|
||||
result.setGenerationTime(Instant.now());
|
||||
result.setGenerationId(fileId);
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ public class SDf16Table extends AbstractTable<SDf16> {
|
|||
@Override
|
||||
public SDf16 getEntity(Object[] entity) {
|
||||
SDf16 result = new SDf16();
|
||||
result.setDate(TimeUtil.strToInstant((String) entity[0]));
|
||||
// result.setDate(TimeUtil.strToInstant((String) entity[0]));
|
||||
result.setAccount((String) entity[1]);
|
||||
result.setSum((BigDecimal) entity[2]);
|
||||
result.setMarket((String) entity[3]);
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@ package ru.spcex.clearing.dbf.importer.logic.stages;
|
|||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.spcex.clearing.dbf.importer.config.settings.ImportDBFServiceSettings;
|
||||
import ru.spcex.clearing.dbf.importer.logic.data.ResultContainer;
|
||||
import ru.spcex.clearing.dbf.importer.logic.data.enums.StageResult;
|
||||
import ru.spcex.clearing.dbf.importer.properties.AProperties;
|
||||
import ru.spcex.platform.utils.time.TimeUtil;
|
||||
|
||||
import java.io.File;
|
||||
|
|
@ -20,18 +20,18 @@ import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
|
|||
public class ChangeDirOfFileStage extends Stage {
|
||||
|
||||
private static final DateTimeFormatter FORMATTER = DateTimeFormatter.ofPattern("yyyy.MM.dd HH.mm.ss");
|
||||
private final AProperties properties;
|
||||
private final ImportDBFServiceSettings settings;
|
||||
|
||||
@Autowired
|
||||
public ChangeDirOfFileStage(AProperties properties) {
|
||||
this.properties = properties;
|
||||
public ChangeDirOfFileStage(ImportDBFServiceSettings settings) {
|
||||
this.settings = settings;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public StageResult process(ResultContainer resultContainer) {
|
||||
File srcDir = new File(properties.getSrcDir());
|
||||
File outDir = new File(properties.getOutDir());
|
||||
File srcDir = new File(settings.getStore().getSrcDir());
|
||||
File outDir = new File(settings.getStore().getOutDir());
|
||||
File dbfFile = resultContainer.getDbfFile();
|
||||
|
||||
if (!srcDir.exists()) {
|
||||
|
|
|
|||
|
|
@ -3,11 +3,14 @@ package ru.spcex.clearing.dbf.importer.logic.stages;
|
|||
import com.linuxense.javadbf.DBFReader;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.spcex.clearing.dbf.importer.config.settings.ImportDBFServiceSettings;
|
||||
import ru.spcex.clearing.dbf.importer.logic.data.ResultContainer;
|
||||
import ru.spcex.clearing.dbf.importer.logic.data.enums.ETable;
|
||||
import ru.spcex.clearing.dbf.importer.logic.data.enums.StageResult;
|
||||
import ru.spcex.clearing.dbf.importer.logic.data.tables.AbstractTable;
|
||||
import ru.spcex.clearing.dbf.importer.properties.AProperties;
|
||||
import ru.spcex.clearing.platform.messaging.domain.Consts;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.balance.StatementRequest;
|
||||
import ru.spcex.clearing.platform.messaging.service.sender.KafkaSender;
|
||||
import ru.spcex.platform.imdg.iml.hazelcast.service.HazelcastService;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
|
|
@ -15,39 +18,48 @@ import java.io.IOException;
|
|||
import java.io.InputStream;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.Map;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/**
|
||||
* Заливка проверенных данных в базу
|
||||
*/
|
||||
@Component
|
||||
public class ImportToDB extends Stage {
|
||||
private final AProperties properties;
|
||||
private final ImportDBFServiceSettings settings;
|
||||
private final HazelcastService hazelcastService;
|
||||
private final Map<ETable, AbstractTable> mappingEnumTableObjectTable;
|
||||
private final Supplier<KafkaSender> kafka;
|
||||
|
||||
public ImportToDB(@Qualifier("dbfImporterProperties") AProperties properties,
|
||||
HazelcastService hazelcastService, @Qualifier("mapOfTable") Map<ETable, AbstractTable> mappingEnumTableObjectTable) {
|
||||
this.properties = properties;
|
||||
public ImportToDB(ImportDBFServiceSettings settings,
|
||||
HazelcastService hazelcastService,
|
||||
@Qualifier("mapOfTable") Map<ETable, AbstractTable> mappingEnumTableObjectTable,
|
||||
Supplier<KafkaSender> kafka) {
|
||||
this.settings = settings;
|
||||
this.hazelcastService = hazelcastService;
|
||||
this.mappingEnumTableObjectTable = mappingEnumTableObjectTable;
|
||||
this.kafka = kafka;
|
||||
}
|
||||
|
||||
@Override
|
||||
public StageResult process(ResultContainer resultContainer) {
|
||||
ETable currTable = resultContainer.getDbfTable();
|
||||
byte[] source = resultContainer.getDbfSource();
|
||||
Charset sourceCharset = Charset.forName(properties.getDbfEncoding());
|
||||
Charset sourceCharset = Charset.forName(settings.getCommon().getEncodingSource());
|
||||
|
||||
try (InputStream is = new ByteArrayInputStream(source);
|
||||
DBFReader dbfReader = new DBFReader(is, sourceCharset)) {
|
||||
AbstractTable table = mappingEnumTableObjectTable.get(currTable);
|
||||
table.setHazelcastService(hazelcastService);
|
||||
table.setFilename(resultContainer.getDbfFile().getName());
|
||||
table.setFileId(hazelcastService.getImdgIdGenerator().nextId());
|
||||
Long fileId = hazelcastService.getImdgIdGenerator().nextId();
|
||||
table.setFileId(fileId);
|
||||
for (int i = 0; i < dbfReader.getRecordCount(); i++) {
|
||||
Object[] entity = dbfReader.nextRecord();
|
||||
table.injectEntity(table.getEntity(entity));
|
||||
}
|
||||
if (ETable.DF_01.equals(currTable)) {
|
||||
sendStatementRequest(fileId);
|
||||
}
|
||||
} catch (IOException exception) {
|
||||
log.warn(exception.getMessage());
|
||||
return StageResult.ERROR;
|
||||
|
|
@ -56,4 +68,10 @@ public class ImportToDB extends Stage {
|
|||
|
||||
return StageResult.OK;
|
||||
}
|
||||
|
||||
private void sendStatementRequest(Long fileId) {
|
||||
StatementRequest statementRequest = new StatementRequest();
|
||||
statementRequest.setSdf01GroupId(fileId);
|
||||
kafka.get().sendRequestToQueue(Consts.STATEMENT_PROCESS, statementRequest);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
package ru.spcex.clearing.dbf.importer.logic.stages;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.spcex.clearing.dbf.importer.config.settings.ImportDBFServiceSettings;
|
||||
import ru.spcex.clearing.dbf.importer.logic.data.ResultContainer;
|
||||
import ru.spcex.clearing.dbf.importer.logic.data.enums.StageResult;
|
||||
import ru.spcex.clearing.dbf.importer.properties.AProperties;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
|
@ -15,10 +14,10 @@ import java.util.UUID;
|
|||
|
||||
@Component
|
||||
public class LoadFileFromDisk extends Stage {
|
||||
private final AProperties properties;
|
||||
private final ImportDBFServiceSettings settings;
|
||||
|
||||
public LoadFileFromDisk(@Qualifier("dbfImporterProperties") AProperties properties) {
|
||||
this.properties = properties;
|
||||
public LoadFileFromDisk(ImportDBFServiceSettings settings) {
|
||||
this.settings = settings;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -32,7 +31,7 @@ public class LoadFileFromDisk extends Stage {
|
|||
log.debug("uuid {}. Read all bytes from source file {}", taskUuid, resultContainer.getDbfFile().getName());
|
||||
fileBytes = Files.readAllBytes(Paths.get(dbfFile.getAbsolutePath()));
|
||||
if (fileBytes.length == 0) throw new IOException("Empty file");
|
||||
if (properties.isDeleteSrcFiles()) Files.delete(dbfFile.toPath());
|
||||
if (settings.getStore().isDeleteSrcFiles()) Files.delete(dbfFile.toPath());
|
||||
} catch (IOException e) {
|
||||
log.error(String.format("uuid %s. Can't read file %s", taskUuid, resultContainer.getDbfFile().getName()), e);
|
||||
return StageResult.ERROR;
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@ package ru.spcex.clearing.dbf.importer.logic.stages;
|
|||
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.spcex.clearing.dbf.importer.config.settings.ImportDBFServiceSettings;
|
||||
import ru.spcex.clearing.dbf.importer.exceptions.ConfigException;
|
||||
import ru.spcex.clearing.dbf.importer.logic.data.ResultContainer;
|
||||
import ru.spcex.clearing.dbf.importer.logic.data.enums.StageResult;
|
||||
import ru.spcex.clearing.dbf.importer.properties.AProperties;
|
||||
|
||||
import java.nio.charset.Charset;
|
||||
|
||||
|
|
@ -14,11 +14,11 @@ import java.nio.charset.Charset;
|
|||
*/
|
||||
@Component
|
||||
public class ValidateFields extends Stage implements InitializingBean {
|
||||
private final AProperties properties;
|
||||
private final ImportDBFServiceSettings settings;
|
||||
private Charset dbfCharset;
|
||||
|
||||
public ValidateFields(AProperties properties) {
|
||||
this.properties = properties;
|
||||
public ValidateFields(ImportDBFServiceSettings settings) {
|
||||
this.settings = settings;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -36,9 +36,9 @@ public class ValidateFields extends Stage implements InitializingBean {
|
|||
|
||||
private void initDBFCharset() {
|
||||
try {
|
||||
dbfCharset = Charset.forName(properties.getDbfEncoding());
|
||||
dbfCharset = Charset.forName(settings.getCommon().getEncodingSource());
|
||||
} catch (Exception e) {
|
||||
throw new ConfigException("Unknown encoding from properties: " + properties.getDbfEncoding(), e);
|
||||
throw new ConfigException("Unknown encoding from properties: " + settings.getCommon().getEncodingSource(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,45 +0,0 @@
|
|||
package ru.spcex.clearing.dbf.importer.properties;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component("dbfImporterProperties")
|
||||
public class AProperties {
|
||||
|
||||
@Value("${dbf.src-dir}")
|
||||
private String srcDir;
|
||||
@Value("${dbf.out-dir}")
|
||||
private String outDir;
|
||||
@Value("${dbf.delete-src-files}")
|
||||
private boolean deleteSrcFiles = true;
|
||||
@Value("${dbf.encoding-source}")
|
||||
private String dbfEncoding;
|
||||
@Value("${dbf.insert-batch-size}")
|
||||
private int insertBatchSize;
|
||||
@Value("${dbf.threads-count}")
|
||||
private int threadsCount;
|
||||
|
||||
public String getOutDir() {
|
||||
return outDir;
|
||||
}
|
||||
|
||||
public String getSrcDir() {
|
||||
return srcDir;
|
||||
}
|
||||
|
||||
public boolean isDeleteSrcFiles() {
|
||||
return deleteSrcFiles;
|
||||
}
|
||||
|
||||
public String getDbfEncoding() {
|
||||
return dbfEncoding;
|
||||
}
|
||||
|
||||
public int getInsertBatchSize() {
|
||||
return insertBatchSize;
|
||||
}
|
||||
|
||||
public int getThreadsCount() {
|
||||
return threadsCount;
|
||||
}
|
||||
}
|
||||
|
|
@ -28,7 +28,7 @@ public class DBFImporterService {
|
|||
this.processor = processor;
|
||||
}
|
||||
|
||||
@Scheduled(cron = "${dbf.check-src-dir-cron}")
|
||||
@Scheduled(cron = "${import-dbf-service.scheduler.check-src-dir-cron}")
|
||||
public void run() {
|
||||
Map<ETable, List<File>> newFiles = fileChecker.checkNewFiles();
|
||||
for (Map.Entry<ETable, List<File>> newFilesEntry : newFiles.entrySet()) {
|
||||
|
|
|
|||
|
|
@ -1,24 +1,24 @@
|
|||
package ru.spcex.clearing.dbf.importer.services;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import ru.spcex.clearing.dbf.importer.config.settings.ImportDBFServiceSettings;
|
||||
import ru.spcex.clearing.dbf.importer.logic.data.enums.ETable;
|
||||
import ru.spcex.clearing.dbf.importer.properties.AProperties;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.*;
|
||||
|
||||
@Service("fileChecker")
|
||||
public class FileChecker {
|
||||
private final AProperties properties;
|
||||
private final ImportDBFServiceSettings settings;
|
||||
|
||||
public FileChecker(AProperties properties) {
|
||||
this.properties = properties;
|
||||
public FileChecker(ImportDBFServiceSettings settings) {
|
||||
this.settings = settings;
|
||||
}
|
||||
|
||||
public Map<ETable, List<File>> checkNewFiles() {
|
||||
Map<ETable, List<File>> newFiles = new EnumMap<>(ETable.class);
|
||||
|
||||
String srcDir = properties.getSrcDir();
|
||||
String srcDir = settings.getStore().getSrcDir();
|
||||
List<File> dbfFiles = lsDBF(srcDir);
|
||||
if (dbfFiles.isEmpty()) return newFiles;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,17 +1,25 @@
|
|||
server.port=8080
|
||||
server.servlet.context-path=/importer
|
||||
spring.main.web-application-type=servlet
|
||||
db.jdbc-url=jdbc:postgresql://10.200.200.133:5432/postgres
|
||||
db.driver=org.postgresql.Driver
|
||||
db.login=clearing
|
||||
db.password=Aa111111
|
||||
dbf.check-src-dir-cron=* * * * 1 ?
|
||||
dbf.encoding-source=cp866
|
||||
dbf.insert-batch-size=100
|
||||
dbf.delete-src-files=false
|
||||
dbf.src-dir=D:\\dbf\\
|
||||
dbf.out-dir=D:\\dbf\\out
|
||||
dbf.threads-count=10
|
||||
import-dbf-service.hazelcast.cluster-members=127.0.0.1
|
||||
|
||||
import-dbf-service.scheduler.check-src-dir-cron=* * * * 1 ?
|
||||
|
||||
import-dbf-service.store.delete-src-files=false
|
||||
import-dbf-service.store.src-dir=/opt/clearing/file/importer/
|
||||
import-dbf-service.store.out-dir=/opt/clearing/file/importer/loaded/
|
||||
|
||||
import-dbf-service.common.encoding-source=cp866
|
||||
import-dbf-service.common.insert-batch-size=100
|
||||
import-dbf-service.common.threads-count=10
|
||||
|
||||
import-dbf-service.hazelcast.cluster-members=10.200.200.181:5701
|
||||
import-dbf-service.hazelcast.login=dev
|
||||
import-dbf-service.hazelcast.password=dev-pass
|
||||
import-dbf-service.hazelcast.password=dev-pass
|
||||
|
||||
|
||||
import-dbf-service.kafka-producer.bootstrap-servers=localhost:9092
|
||||
import-dbf-service.kafka-producer.acks=all
|
||||
import-dbf-service.kafka-producer.retries=0
|
||||
import-dbf-service.kafka-producer.batch-size=16384
|
||||
import-dbf-service.kafka-producer.linger-ms=1
|
||||
import-dbf-service.kafka-producer.buffer-memory=33554432
|
||||
|
|
@ -9,7 +9,7 @@ public class IMDGApplication {
|
|||
|
||||
public static void main(String[] args) {
|
||||
SpringApplicationBuilder builder = new SpringApplicationBuilder(IMDGApplication.class);
|
||||
ConfigurableApplicationContext configurableApplicationContext = builder.run(args);
|
||||
builder.run(args);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,9 @@ public class CompanyMapStore extends BusinessObjectMapStore<Company> {
|
|||
return namedParameterJdbcTemplate.query("select * from " + getTableName() + " where id in (:ids)", paramMap,
|
||||
(resultSet, i) -> {
|
||||
Company company = new Company();
|
||||
fillBusinessObjectFields(company, resultSet);
|
||||
company.setId(resultSet.getObject("ID", Long.class));
|
||||
company.setCreated(getInstantFromTimestamp(resultSet, "CREATED_AT"));
|
||||
company.setUpdated(getInstantFromTimestamp(resultSet, "UPDATED_AT"));
|
||||
company.setTradingCode(resultSet.getObject("TRADING_CODE", String.class));
|
||||
company.setClearingCode(resultSet.getObject("CLEARING_CODE", String.class));
|
||||
company.setRegistrationCode(resultSet.getObject("REGISTRATION_CODE", String.class));
|
||||
|
|
|
|||
|
|
@ -1,48 +0,0 @@
|
|||
package ru.spcex.clearing.imdg.config;
|
||||
|
||||
|
||||
/**
|
||||
* Корневой элемент конфигурации
|
||||
*/
|
||||
|
||||
@SuppressWarnings("DefaultAnnotationParam")
|
||||
public class ConfigurationRootElement /*extends ConfigurationRootBaseElement*/ {
|
||||
|
||||
/**
|
||||
* Конфигурация БД
|
||||
*/
|
||||
// @JsonProperty(value = "Database", required = true)
|
||||
private SettingsElementDatabase database = new SettingsElementDatabase();
|
||||
|
||||
// @JsonProperty(value = "Settings", required = false)
|
||||
private SettingsElement settings = new SettingsElement();
|
||||
|
||||
/**
|
||||
* Конфигурация Hazelcast
|
||||
*/
|
||||
// @JsonProperty(value = "HazelcastServer", required = true)
|
||||
// private HazelcastServerElement hazelcast = new HazelcastServerElement();
|
||||
|
||||
/**
|
||||
* Конфигурация сервисов Core
|
||||
*/
|
||||
// @JsonProperty(value = "Services")
|
||||
private ServicesElement servicesElement = new ServicesElement();
|
||||
|
||||
public SettingsElementDatabase getDatabase() {
|
||||
return database;
|
||||
}
|
||||
|
||||
// public HazelcastServerElement getHazelcast() {
|
||||
// return hazelcast;
|
||||
// }
|
||||
|
||||
public SettingsElement getSettings() {
|
||||
return settings;
|
||||
}
|
||||
|
||||
public ServicesElement getServicesElement() {
|
||||
return servicesElement;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -6,6 +6,8 @@ import org.slf4j.LoggerFactory;
|
|||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import ru.spcex.clearing.imdg.config.element.DatabaseSettings;
|
||||
import ru.spcex.clearing.imdg.config.element.ImdgSettings;
|
||||
import ru.spcex.clearing.imdg.error.ModuleInitializeException;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
|
@ -16,8 +18,7 @@ import java.sql.Connection;
|
|||
public class DbConnectionConfig {
|
||||
private final Logger log = LoggerFactory.getLogger(this.getClass());
|
||||
|
||||
private ConfigurationRootElement configRoot = DfaConfig.get().getRoot();
|
||||
private final DatabaseConnectionElement settings;
|
||||
private final DatabaseSettings settings;
|
||||
|
||||
public DbConnectionConfig(ImdgSettings settings) {
|
||||
this.settings = settings.getDatabase();
|
||||
|
|
@ -30,7 +31,7 @@ public class DbConnectionConfig {
|
|||
String password = settings.getPassword();
|
||||
String logTimeoutPart = "";
|
||||
String dbPath = settings.getUrl();
|
||||
int timeoutSec = configRoot.getDatabase().getConnectionAcquireTimeoutSeconds();
|
||||
int timeoutSec = 30;
|
||||
|
||||
ComboPooledDataSource cpds = new ComboPooledDataSource();
|
||||
try {
|
||||
|
|
@ -41,11 +42,12 @@ public class DbConnectionConfig {
|
|||
cpds.setJdbcUrl(dbPath);
|
||||
cpds.setUser(login);
|
||||
cpds.setPassword(password);
|
||||
cpds.setInitialPoolSize(configRoot.getDatabase().getMinPoolSize());
|
||||
cpds.setMinPoolSize(configRoot.getDatabase().getMinPoolSize());
|
||||
cpds.setMaxPoolSize(configRoot.getDatabase().getMaxPoolSize());
|
||||
cpds.setNumHelperThreads(configRoot.getDatabase().getNumHelperThreads());
|
||||
cpds.setCheckoutTimeout(timeoutSec * 1000/*todo common 1000==ConstsCommon.SECOND*/);
|
||||
cpds.setInitialPoolSize(10);
|
||||
cpds.setMinPoolSize(10);
|
||||
cpds.setMaxPoolSize(30);
|
||||
int numHelperThreads = Runtime.getRuntime().availableProcessors() * 2;
|
||||
cpds.setNumHelperThreads(numHelperThreads);
|
||||
cpds.setCheckoutTimeout(timeoutSec * 1000);
|
||||
logTimeoutPart = String.format(" (timeout=%ds)", timeoutSec);
|
||||
result = cpds;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,34 +0,0 @@
|
|||
package ru.spcex.clearing.imdg.config;
|
||||
|
||||
|
||||
public class DfaConfig {
|
||||
protected static DfaConfig self;
|
||||
|
||||
|
||||
ConfigurationRootElement root = new ConfigurationRootElement();
|
||||
|
||||
protected String defaultLogFileName() {
|
||||
return "storage";
|
||||
}
|
||||
|
||||
|
||||
public String appName() {
|
||||
return "clearing-storage";
|
||||
}
|
||||
|
||||
|
||||
protected Class parsedClazz() {
|
||||
return ConfigurationRootElement.class;
|
||||
}
|
||||
|
||||
public static DfaConfig get() {
|
||||
if (self == null) {
|
||||
self = new DfaConfig();
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
public ConfigurationRootElement getRoot() {
|
||||
return root;
|
||||
}
|
||||
}
|
||||
|
|
@ -6,6 +6,8 @@ import com.hazelcast.core.HazelcastInstance;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import ru.spcex.clearing.imdg.config.element.HazelcastServerSettings;
|
||||
import ru.spcex.clearing.imdg.config.element.ImdgSettings;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -13,11 +15,12 @@ import java.util.List;
|
|||
public class HazelcastConfiguration {
|
||||
|
||||
private final PoolMapConfigs poolMapConfigs;
|
||||
private final HazelcastServerElement hzSettings;
|
||||
private final HazelcastServerSettings hzSettings;
|
||||
private final ConfigurationRootElement configRoot = DfaConfig.get().getRoot();
|
||||
|
||||
@Autowired
|
||||
public HazelcastConfiguration(PoolMapConfigs poolMapConfigs, ImdgSettings imdgSettings) {
|
||||
public HazelcastConfiguration(PoolMapConfigs poolMapConfigs,
|
||||
ImdgSettings imdgSettings) {
|
||||
this.poolMapConfigs = poolMapConfigs;
|
||||
this.hzSettings = imdgSettings.getHazelcast();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import ru.spcex.clearing.imdg.base.AutoconfiguredMap;
|
|||
import ru.spcex.clearing.imdg.base.DictionaryTMapStore;
|
||||
import ru.spcex.clearing.imdg.businessevent.CompanyHistoryMapStore;
|
||||
import ru.spcex.clearing.imdg.businessobject.CompanyMapStore;
|
||||
import ru.spcex.clearing.imdg.dictionary.*;
|
||||
import ru.spcex.clearing.imdg.object.CompanySymbolsMapStore;
|
||||
import ru.spcex.clearing.imdg.object.ContactMapStore;
|
||||
import ru.spcex.clearing.imdg.object.ProfileDocumentMapStore;
|
||||
|
|
@ -23,29 +24,12 @@ import java.util.List;
|
|||
|
||||
@Configuration
|
||||
public class PoolMapConfigs {
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
||||
private final ConfigurationRootElement configRoot = DfaConfig.get().getRoot();
|
||||
@Autowired
|
||||
private List<AutoconfiguredMap<?>> listOfAutopluginStores;
|
||||
@Autowired
|
||||
private CompanySymbolsMapStore companySymbolsMapStore;
|
||||
@Autowired
|
||||
private ProfileDocumentMapStore profileDocumentMapStore;
|
||||
@Autowired
|
||||
private ContactMapStore contactMapStore;
|
||||
@Autowired
|
||||
private CompanyMapStore companyMapStore;
|
||||
// @Autowired
|
||||
private CompanyHistoryMapStore companyHistoryMapStore;
|
||||
|
||||
public PoolMapConfigs() {
|
||||
}
|
||||
private Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
||||
private MapStoreConfig makeDefaultMapStoreConfig(MapLoader<Long, ?> mapBean) {
|
||||
return new MapStoreConfig()
|
||||
.setImplementation(mapBean)
|
||||
;//todo config: .setWriteDelaySeconds(configRoot.getIMDG().getDbSyncSeconds());
|
||||
;//todo config: .setWriteDelaySeconds(configRoot.getIMDG().getDbSyncSeconds());
|
||||
}
|
||||
|
||||
public ScheduledExecutorConfig makeDefaultScheduledExecutorConfig(String name) {
|
||||
|
|
@ -83,13 +67,82 @@ public class PoolMapConfigs {
|
|||
return makeMapIndexConfig(attributeName, false);
|
||||
}
|
||||
|
||||
// @Autowired todo эксперимент с мапстором, см. ниже autoconfiguratorOfMapstorage.
|
||||
// private CompanyRoleSetMapStore companyRoleSetMapStore;
|
||||
//
|
||||
// public MapConfig map_CompanyRoleSet() {
|
||||
// return makeDefaultMapConfig(IMDGDistributedNames.Map_CompanyRoleSet, companyRoleSetMapStore)
|
||||
// .addMapIndexConfig(makeMapIndexConfig("companyId"));
|
||||
// }
|
||||
|
||||
|
||||
@Autowired private AllowedDictionaryMapStore allowedDictionaryMapStore;
|
||||
public MapConfig map_AllowedDictionary() {
|
||||
return makeDefaultMapConfig(IMDGDistributedNames.Map_AllowedDictionary, allowedDictionaryMapStore)
|
||||
.setNearCacheConfig(makeDefaultNearCacheConfig())
|
||||
.addMapIndexConfig(makeMapIndexConfig("code"));
|
||||
}
|
||||
@Autowired private CompanyRoleDictionaryMapStore companyRoleDictionaryMapStore;
|
||||
public MapConfig map_CompanyRoleDictionary() {
|
||||
return makeDefaultMapConfig(IMDGDistributedNames.Map_CompanyRoleDictionary, companyRoleDictionaryMapStore)
|
||||
.setNearCacheConfig(makeDefaultNearCacheConfig())
|
||||
.addMapIndexConfig(makeMapIndexConfig("code"));
|
||||
}
|
||||
@Autowired private CompanySymbolDictionaryMapStore companySymbolDictionaryMapStore;
|
||||
public MapConfig map_CompanySymbolDictionary() {
|
||||
return makeDefaultMapConfig(IMDGDistributedNames.Map_CompanySymbolDictionary, companySymbolDictionaryMapStore)
|
||||
.setNearCacheConfig(makeDefaultNearCacheConfig())
|
||||
.addMapIndexConfig(makeMapIndexConfig("code"));
|
||||
}
|
||||
@Autowired private ContactTypeDictionaryMapStore contactTypeDictionaryMapStore;
|
||||
public MapConfig map_ContactTypeDictionary() {
|
||||
return makeDefaultMapConfig(IMDGDistributedNames.Map_ContactTypeDictionary, contactTypeDictionaryMapStore)
|
||||
.setNearCacheConfig(makeDefaultNearCacheConfig())
|
||||
.addMapIndexConfig(makeMapIndexConfig("code"));
|
||||
}
|
||||
@Autowired private CorporationSoleTypeDictionaryMapStore corporationSoleTypeDictionaryMapStore;
|
||||
public MapConfig map_CorporationSoleTypeDictionary() {
|
||||
return makeDefaultMapConfig(IMDGDistributedNames.Map_CorporationSoleTypeDictionary, corporationSoleTypeDictionaryMapStore)
|
||||
.setNearCacheConfig(makeDefaultNearCacheConfig())
|
||||
.addMapIndexConfig(makeMapIndexConfig("code"));
|
||||
}
|
||||
@Autowired private CountryCodeDictionaryMapStore countryCodeDictionaryMapStore;
|
||||
public MapConfig map_CountryCodeDictionary() {
|
||||
return makeDefaultMapConfig(IMDGDistributedNames.Map_CountryCodeDictionary, countryCodeDictionaryMapStore)
|
||||
.setNearCacheConfig(makeDefaultNearCacheConfig())
|
||||
.addMapIndexConfig(makeMapIndexConfig("code"));
|
||||
}
|
||||
@Autowired private DocumentTypeDictionaryMapStore documentTypeDictionaryMapStore;
|
||||
public MapConfig map_DocumentTypeDictionary() {
|
||||
return makeDefaultMapConfig(IMDGDistributedNames.Map_DocumentTypeDictionary, documentTypeDictionaryMapStore)
|
||||
.setNearCacheConfig(makeDefaultNearCacheConfig())
|
||||
.addMapIndexConfig(makeMapIndexConfig("code"));
|
||||
}
|
||||
@Autowired private LegalKindDictionaryMapStore legalKindDictionaryMapStore;
|
||||
public MapConfig map_LegalKindDictionary() {
|
||||
return makeDefaultMapConfig(IMDGDistributedNames.Map_LegalKindDictionary, legalKindDictionaryMapStore)
|
||||
.setNearCacheConfig(makeDefaultNearCacheConfig())
|
||||
.addMapIndexConfig(makeMapIndexConfig("code"));
|
||||
}
|
||||
@Autowired private OrganizationTypeDictionaryMapStore organizationTypeDictionaryMapStore;
|
||||
public MapConfig map_OrganizationTypeDictionary() {
|
||||
return makeDefaultMapConfig(IMDGDistributedNames.Map_OrganizationTypeDictionary, organizationTypeDictionaryMapStore)
|
||||
.setNearCacheConfig(makeDefaultNearCacheConfig())
|
||||
.addMapIndexConfig(makeMapIndexConfig("code"));
|
||||
}
|
||||
@Autowired private WorkflowStatusDictionaryMapStore workflowStatusDictionaryMapStore;
|
||||
public MapConfig map_WorkflowStatusDictionary() {
|
||||
return makeDefaultMapConfig(IMDGDistributedNames.Map_WorkflowStatusDictionary, workflowStatusDictionaryMapStore)
|
||||
.setNearCacheConfig(makeDefaultNearCacheConfig())
|
||||
.addMapIndexConfig(makeMapIndexConfig("code"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Autowired
|
||||
private CompanyMapStore companyMapStore;
|
||||
|
||||
public MapConfig map_Company() {
|
||||
return makeDefaultMapConfig(IMDGDistributedNames.Map_Company, companyMapStore);
|
||||
}
|
||||
|
||||
|
||||
// Автоконфигурируемые мапсторы:
|
||||
@Autowired
|
||||
private List<AutoconfiguredMap<?>> listOfAutopluginStores;
|
||||
|
||||
// @Qualifier("AutoconfiguredMapStore")
|
||||
public List<MapConfig> autoconfiguratorOfMapstorages() {
|
||||
|
|
@ -120,35 +173,10 @@ public class PoolMapConfigs {
|
|||
}
|
||||
out.add(mapCfg);
|
||||
} catch (RuntimeException e) {
|
||||
throw new RuntimeException("Can not configure MapStore " + mapStore.getMapName() + "(" + mapStore + "): " + e, e);
|
||||
throw new RuntimeException("Can not configure MapStore " + mapStore.getMapName() + "(" + mapStore.toString() + "): " + e, e);
|
||||
}
|
||||
}
|
||||
log.debug("Configured {} mapStore's", out.size());
|
||||
return out;
|
||||
}
|
||||
|
||||
public MapConfig map_CompanySymbols() {
|
||||
return makeDefaultMapConfig(IMDGDistributedNames.Map_CompanySymbols, companySymbolsMapStore)
|
||||
.addMapIndexConfig(makeMapIndexConfig("companyId"))
|
||||
.addMapIndexConfig(makeMapIndexConfig("companySymbol"));
|
||||
}
|
||||
|
||||
public MapConfig map_ProfileDocument() {
|
||||
return makeDefaultMapConfig(IMDGDistributedNames.Map_ProfileDocument, profileDocumentMapStore)
|
||||
.addMapIndexConfig(makeMapIndexConfig("companyId"));
|
||||
}
|
||||
|
||||
public MapConfig map_Contact() {
|
||||
return makeDefaultMapConfig(IMDGDistributedNames.Map_Contact, contactMapStore)
|
||||
.addMapIndexConfig(makeMapIndexConfig("companyId"));
|
||||
}
|
||||
|
||||
public MapConfig map_Company() {
|
||||
return makeDefaultMapConfig(IMDGDistributedNames.Map_Company, companyMapStore)
|
||||
.addMapIndexConfig(makeMapIndexConfig("Id"));
|
||||
}
|
||||
|
||||
public MapConfig map_CompanyUpdate() {
|
||||
return makeDefaultMapConfig(IMDGDistributedNames.Map_CompanyHistory, companyHistoryMapStore);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,34 +0,0 @@
|
|||
package ru.spcex.clearing.imdg.config;
|
||||
|
||||
//import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
//import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Настройка сервисов
|
||||
*/
|
||||
public class ServicesElement implements Serializable {
|
||||
|
||||
/**
|
||||
* Время, через которое выставленная заявка будет снята, в миллисекундах.
|
||||
*/
|
||||
// @JsonProperty(value = "ExpirationDelay")
|
||||
private Integer ExpirationDelay = 5 * 60 * 1000;
|
||||
|
||||
public Integer getExpirationDelay() {
|
||||
return ExpirationDelay;
|
||||
}
|
||||
|
||||
/**
|
||||
* Время окончания торговой сессии
|
||||
*/
|
||||
// @JsonProperty(value = "SessionEndTime")
|
||||
// @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "HH:mm:ss", timezone = "Europe/Moscow")
|
||||
private Date SessionEndTime = null;
|
||||
|
||||
public Date getSessionEndTime() {
|
||||
return SessionEndTime;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
package ru.spcex.clearing.imdg.config;
|
||||
|
||||
//import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@SuppressWarnings({"DefaultAnnotationParam", "unused", "FieldCanBeLocal"})
|
||||
public class SettingsElement implements Serializable {
|
||||
// @JsonProperty(value = "InitHazelcastThreadMultiplier", required = false)
|
||||
private int initHazelcastThreadMultiplier = 2;
|
||||
|
||||
// @JsonProperty(value = "RecoveryLogPath", required = false)
|
||||
private String recoveryLogPath;
|
||||
|
||||
// @JsonProperty(value = "ExecutionLimitationPeriod", required = false)
|
||||
private Integer executionLimitationPeriod = 10;
|
||||
|
||||
public int getInitHazelcastThreadMultiplier() {
|
||||
return initHazelcastThreadMultiplier;
|
||||
}
|
||||
|
||||
public Integer getExecutionLimitationPeriod() {
|
||||
return executionLimitationPeriod;
|
||||
}
|
||||
|
||||
public String getRecoveryLogPath() {
|
||||
return recoveryLogPath;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,89 +0,0 @@
|
|||
package ru.spcex.clearing.imdg.config;
|
||||
|
||||
//import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@SuppressWarnings({"FieldCanBeLocal", "unused", "DefaultAnnotationParam"})
|
||||
public class SettingsElementDatabase implements Serializable {
|
||||
|
||||
// @JsonProperty(value = "Driver")
|
||||
private String driver = "org.firebirdsql.jdbc.FBDriver";
|
||||
|
||||
// @JsonProperty(value = "JdbcConnectionString", required = true)
|
||||
private String jdbcConnectionString;
|
||||
|
||||
// @JsonProperty(value = "Login", required = true)
|
||||
private String login;
|
||||
|
||||
// @JsonProperty(value = "Password", required = true)
|
||||
private String password;
|
||||
|
||||
// @JsonProperty(value = "MaxPoolSize")
|
||||
private int maxPoolSize = 30;
|
||||
|
||||
// @JsonProperty(value = "MinPoolSize")
|
||||
private int minPoolSize = 10;
|
||||
|
||||
// @JsonProperty(value = "EmbeddedFilePath", required = false)
|
||||
private String embeddedFilePath;
|
||||
|
||||
// @JsonProperty(value = "NumHelperThreads", required = false)
|
||||
private int numHelperThreads = Runtime.getRuntime().availableProcessors() * 2;
|
||||
|
||||
// @JsonProperty(value = "ConnectionAcquireTimeoutSeconds", required = false)
|
||||
private int connectionAcquireTimeoutSeconds = 30;
|
||||
|
||||
public String getDriver() {
|
||||
return driver;
|
||||
}
|
||||
|
||||
public String getJdbcConnectionString() {
|
||||
return jdbcConnectionString;
|
||||
}
|
||||
|
||||
public String getLogin() {
|
||||
return login;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public int getMaxPoolSize() {
|
||||
return maxPoolSize;
|
||||
}
|
||||
|
||||
public int getMinPoolSize() {
|
||||
return minPoolSize;
|
||||
}
|
||||
|
||||
public String getEmbeddedFilePath() {
|
||||
return embeddedFilePath;
|
||||
}
|
||||
|
||||
public int getNumHelperThreads() {
|
||||
return numHelperThreads;
|
||||
}
|
||||
|
||||
public int getConnectionAcquireTimeoutSeconds() {
|
||||
return connectionAcquireTimeoutSeconds;
|
||||
}
|
||||
|
||||
// для поддержки интеграционных тестов otc-test:
|
||||
public void setJdbcConnectionString(String jdbcConnectionString) {
|
||||
this.jdbcConnectionString = jdbcConnectionString;
|
||||
}
|
||||
|
||||
public void setLogin(String login) {
|
||||
this.login = login;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public void setEmbeddedFilePath(String embeddedFilePath) {
|
||||
this.embeddedFilePath = embeddedFilePath;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package ru.spcex.clearing.imdg.config;
|
||||
package ru.spcex.clearing.imdg.config.element;
|
||||
|
||||
public class DatabaseConnectionElement {
|
||||
public class DatabaseSettings {
|
||||
private String login;
|
||||
private String password;
|
||||
private String url;
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
package ru.spcex.clearing.imdg.config;
|
||||
package ru.spcex.clearing.imdg.config.element;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class HazelcastServerElement {
|
||||
public class HazelcastServerSettings {
|
||||
|
||||
private int listenPort = 5071;
|
||||
private String login = "dev";
|
||||
private String password = "dev-pass";
|
||||
private int listenPort = 5701;
|
||||
private String login;
|
||||
private String password;
|
||||
private List<String> clusterMembers;
|
||||
|
||||
public int getListenPort() {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ru.spcex.clearing.imdg.config;
|
||||
package ru.spcex.clearing.imdg.config.element;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
|
|
@ -8,23 +8,22 @@ import org.springframework.stereotype.Component;
|
|||
@PropertySource("file:${spring.config.location}/application.properties")
|
||||
@ConfigurationProperties("imdg")
|
||||
public class ImdgSettings {
|
||||
private HazelcastServerSettings hazelcast;
|
||||
private DatabaseSettings database;
|
||||
|
||||
private HazelcastServerElement hazelcast;
|
||||
private DatabaseConnectionElement database;
|
||||
|
||||
public DatabaseConnectionElement getDatabase() {
|
||||
return database;
|
||||
}
|
||||
|
||||
public void setDatabase(DatabaseConnectionElement database) {
|
||||
this.database = database;
|
||||
}
|
||||
|
||||
public HazelcastServerElement getHazelcast() {
|
||||
public HazelcastServerSettings getHazelcast() {
|
||||
return hazelcast;
|
||||
}
|
||||
|
||||
public void setHazelcast(HazelcastServerElement hazelcast) {
|
||||
public void setHazelcast(HazelcastServerSettings hazelcast) {
|
||||
this.hazelcast = hazelcast;
|
||||
}
|
||||
|
||||
public DatabaseSettings getDatabase() {
|
||||
return database;
|
||||
}
|
||||
|
||||
public void setDatabase(DatabaseSettings database) {
|
||||
this.database = database;
|
||||
}
|
||||
}
|
||||
|
|
@ -31,7 +31,7 @@ public class InDocumentJournalMapStore extends TemplateMapStore<InDocumentJourna
|
|||
@Override
|
||||
public String[] getFields() {
|
||||
return new String[]{
|
||||
"ID", "REGISTRATION_DATE", "REGISTRATION_TIME", "REGISTRATION_NUMBER", "DOCUMENT_NAME", "SENDER_ID", "QUANTITY", "CLEARING_CODE", "COURIER_TYPE", "EMAIL_DATE", "AMOUNT", "DOSSIER_NUMBER", "COMMENT", "RECEIPT_DATE"
|
||||
"ID", "REGISTRATION_DATE", "REGISTRATION_TIME", "REGISTRATION_NUMBER", "DOCUMENT_NAME", "SENDER", "QUANTITY", "CLEARING_CODE", "COURIER_TYPE", "EMAIL_DATE", "AMOUNT", "DOSSIER_NUMBER", "COMMENT", "RECEIPT_DATE", "RESULT_STATUS"
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -43,13 +43,14 @@ public class InDocumentJournalMapStore extends TemplateMapStore<InDocumentJourna
|
|||
object.setRegistrationTime(getInstantFromTimestamp(resultSet, "REGISTRATION_TIME"));
|
||||
object.setRegistrationNumber(resultSet.getObject("REGISTRATION_NUMBER", Long.class));
|
||||
object.setDocumentName(resultSet.getObject("DOCUMENT_NAME", String.class));
|
||||
object.setSenderId(resultSet.getObject("SENDER_ID", Long.class));
|
||||
object.setSender(resultSet.getObject("SENDER", String.class));
|
||||
object.setQuantity(resultSet.getObject("QUANTITY", Long.class));
|
||||
object.setClearingCode(resultSet.getObject("CLEARING_CODE", String.class));
|
||||
object.setCourierType(resultSet.getObject("COURIER_TYPE", String.class));
|
||||
object.setEmailDate(getInstantFromTimestamp(resultSet, "EMAIL_DATE"));
|
||||
object.setAmount(resultSet.getObject("AMOUNT", BigDecimal.class));
|
||||
object.setDossierNumber(resultSet.getObject("DOSSIER_NUMBER", Long.class));
|
||||
object.setDossierNumber(resultSet.getObject("DOSSIER_NUMBER", String.class));
|
||||
object.setResultStatus(resultSet.getObject("RESULT_STATUS", String.class));
|
||||
object.setComment(resultSet.getObject("COMMENT", String.class));
|
||||
object.setReceiptDate(getInstantFromTimestamp(resultSet, "RECEIPT_DATE"));
|
||||
return object;
|
||||
|
|
@ -63,7 +64,7 @@ public class InDocumentJournalMapStore extends TemplateMapStore<InDocumentJourna
|
|||
TimeUtil.toDateFromInstant(object.getRegistrationTime()),
|
||||
object.getRegistrationNumber(),
|
||||
object.getDocumentName(),
|
||||
object.getSenderId(),
|
||||
object.getSender(),
|
||||
object.getQuantity(),
|
||||
object.getClearingCode(),
|
||||
object.getCourierType(),
|
||||
|
|
@ -71,7 +72,8 @@ public class InDocumentJournalMapStore extends TemplateMapStore<InDocumentJourna
|
|||
object.getAmount(),
|
||||
object.getDossierNumber(),
|
||||
object.getComment(),
|
||||
TimeUtil.toDateFromInstant(object.getReceiptDate())
|
||||
TimeUtil.toDateFromInstant(object.getReceiptDate()),
|
||||
object.getResultStatus()
|
||||
};
|
||||
return args;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public class OutDocumentJournalMapStore extends TemplateMapStore<OutDocumentJour
|
|||
@Override
|
||||
public String[] getFields() {
|
||||
return new String[]{
|
||||
"ID", "REGISTRATION_DATE", "REGISTRATION_TIME", "REGISTRATION_NUMBER", "DOCUMENT_NAME", "ADDRESSEE_ID", "QUANTITY", "CLEARING_CODE", "COURIER_TYPE", "EMAIL_DATE", "AMOUNT", "DOSSIER_NUMBER", "POST_DATE"
|
||||
"ID", "REGISTRATION_DATE", "REGISTRATION_TIME", "REGISTRATION_NUMBER", "DOCUMENT_NAME", "ADDRESSEE", "QUANTITY", "CLEARING_CODE", "COURIER_TYPE", "EMAIL_DATE", "AMOUNT", "DOSSIER_NUMBER", "POST_DATE", "RESULT_STATUS"
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -43,13 +43,14 @@ public class OutDocumentJournalMapStore extends TemplateMapStore<OutDocumentJour
|
|||
object.setRegistrationTime(getInstantFromTimestamp(resultSet, "REGISTRATION_TIME"));
|
||||
object.setRegistrationNumber(resultSet.getObject("REGISTRATION_NUMBER", Long.class));
|
||||
object.setDocumentName(resultSet.getObject("DOCUMENT_NAME", String.class));
|
||||
object.setAddresseeId(resultSet.getObject("ADDRESSEE_ID", Long.class));
|
||||
object.setAddressee(resultSet.getObject("ADDRESSEE", String.class));
|
||||
object.setQuantity(resultSet.getObject("QUANTITY", Long.class));
|
||||
object.setClearingCode(resultSet.getObject("CLEARING_CODE", String.class));
|
||||
object.setCourierType(resultSet.getObject("COURIER_TYPE", String.class));
|
||||
object.setEmailDate(getInstantFromTimestamp(resultSet, "EMAIL_DATE"));
|
||||
object.setAmount(resultSet.getObject("AMOUNT", BigDecimal.class));
|
||||
object.setDossierNumber(resultSet.getObject("DOSSIER_NUMBER", Long.class));
|
||||
object.setDossierNumber(resultSet.getObject("DOSSIER_NUMBER", String.class));
|
||||
object.setResultStatus(resultSet.getObject("RESULT_STATUS", String.class));
|
||||
object.setPostDate(getInstantFromTimestamp(resultSet, "POST_DATE"));
|
||||
return object;
|
||||
}
|
||||
|
|
@ -62,14 +63,15 @@ public class OutDocumentJournalMapStore extends TemplateMapStore<OutDocumentJour
|
|||
TimeUtil.toDateFromInstant(object.getRegistrationTime()),
|
||||
object.getRegistrationNumber(),
|
||||
object.getDocumentName(),
|
||||
object.getAddresseeId(),
|
||||
object.getAddressee(),
|
||||
object.getQuantity(),
|
||||
object.getClearingCode(),
|
||||
object.getCourierType(),
|
||||
TimeUtil.toDateFromInstant(object.getEmailDate()),
|
||||
object.getAmount(),
|
||||
object.getDossierNumber(),
|
||||
TimeUtil.toDateFromInstant(object.getPostDate())
|
||||
TimeUtil.toDateFromInstant(object.getPostDate()),
|
||||
object.getResultStatus()
|
||||
};
|
||||
return args;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ public class SDf12MapStore extends TemplateMapStore<SDf12> {
|
|||
object.setId(resultSet.getObject("ID", Long.class));
|
||||
object.setAccount(resultSet.getObject("ACCOUNT", String.class));
|
||||
object.setDeal(resultSet.getObject("DEAL", String.class));
|
||||
object.setStatus(resultSet.getObject("STATUS", BigDecimal.class));
|
||||
object.setStatus(resultSet.getObject("STATUS", Long.class));
|
||||
object.setFileName(resultSet.getObject("FILE_NAME", String.class));
|
||||
object.setGenerationTime(getInstantFromTimestamp(resultSet, "GENERATION_TIME"));
|
||||
object.setGenerationId(resultSet.getObject("GENERATION_ID", Long.class));
|
||||
|
|
|
|||
|
|
@ -29,13 +29,13 @@ public class SDf13MapStore extends TemplateMapStore<SDf13> {
|
|||
|
||||
@Override
|
||||
public String[] getFields() {
|
||||
return new String[] {
|
||||
return new String[]{
|
||||
"ID", "SEG_TYPE", "DOC_TYPE", "DOCNM_REF", "DOCNMPREV", "PRIORITY", "SBANKCODE", "C_ACC_DEB", "SBANKNAM1",
|
||||
"SBANKNAM2", "SBANKNAM3", "SBANKNAM4", "SBANKNAM5", "RBANKCODE", "C_ACC_CRED", "RBANKNAM1", "OP_TYPE",
|
||||
"OP_ORDER", "RBANKNAM4", "RBANKNAM5", "PAY_DATE", "EXT_DATE", "PAY_VAL", "SUM_DEB", "SCLIENTN1", "INN_DEB",
|
||||
"KPP_DEB", "SCLIENTN4", "SC_CODE", "ACC_DEB", "RCLIENTN1", "KPP_CRED", "RCLIENTN4",
|
||||
"ACC_KR_1", "ACC_KR_2", "SP_CODE", "SPECIF_1", "SPECIF_2", "SPECIF_3", "SPECIF_4", "SPECIF_5",
|
||||
"SPECIF_6", "SEND_TYPE", "SERVDATE", "DOC_RESULT", "GENERATION_TIME", "GENERATION_ID"
|
||||
"KPP_DEB", "SCLIENTN4", "SC_CODE", "ACC_DEB", "RCLIENTN1", "INN_CRED", "KPP_CRED", "RCLIENTN4", "ACC_KR_1",
|
||||
"ACC_KR_2", "SP_CODE", "SPECIF_1", "SPECIF_2", "SPECIF_3", "SPECIF_4", "SPECIF_5", "SPECIF_6", "SEND_TYPE",
|
||||
"SERVDATE", "DOC_RESULT", "GENERATION_TIME", "GENERATION_ID"
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -73,6 +73,7 @@ public class SDf13MapStore extends TemplateMapStore<SDf13> {
|
|||
object.setSc_code(resultSet.getObject("SC_CODE", String.class));
|
||||
object.setAcc_deb(resultSet.getObject("ACC_DEB", String.class));
|
||||
object.setRclientn1(resultSet.getObject("RCLIENTN1", String.class));
|
||||
object.setInn_cred(resultSet.getObject("INN_CRED", String.class));
|
||||
object.setKpp_cred(resultSet.getObject("KPP_CRED", String.class));
|
||||
object.setRclientn4(resultSet.getObject("RCLIENTN4", String.class));
|
||||
object.setAcc_kr_1(resultSet.getObject("ACC_KR_1", String.class));
|
||||
|
|
@ -97,49 +98,50 @@ public class SDf13MapStore extends TemplateMapStore<SDf13> {
|
|||
Object[] args = new Object[]{
|
||||
object.getId(),
|
||||
object.getSeg_type(),
|
||||
object.getDoc_type(),
|
||||
object.getDocnm_ref(),
|
||||
object.getDoc_type(),
|
||||
object.getDocnm_ref(),
|
||||
object.getDocnmprev(),
|
||||
object.getPriority(),
|
||||
object.getSbankcode(),
|
||||
object.getC_acc_deb(),
|
||||
object.getSbanknam1(),
|
||||
object.getSbanknam2(),
|
||||
object.getSbanknam3(),
|
||||
object.getSbanknam4(),
|
||||
object.getSbanknam5(),
|
||||
object.getRbankcode(),
|
||||
object.getC_acc_cred(),
|
||||
object.getRbanknam1(),
|
||||
object.getOp_type(),
|
||||
object.getOp_order(),
|
||||
object.getRbanknam4(),
|
||||
object.getRbanknam5(),
|
||||
object.getPay_date(),
|
||||
object.getExt_date(),
|
||||
object.getPay_val(),
|
||||
object.getSum_deb(),
|
||||
object.getSclientn1(),
|
||||
object.getInn_deb(),
|
||||
object.getKpp_deb(),
|
||||
object.getSclientn4(),
|
||||
object.getSc_code(),
|
||||
object.getAcc_deb(),
|
||||
object.getRclientn1(),
|
||||
object.getKpp_cred(),
|
||||
object.getRclientn4(),
|
||||
object.getAcc_kr_1(),
|
||||
object.getAcc_kr_2(),
|
||||
object.getSp_code(),
|
||||
object.getSpecif_1(),
|
||||
object.getSpecif_2(),
|
||||
object.getSpecif_3(),
|
||||
object.getSpecif_4(),
|
||||
object.getSpecif_5(),
|
||||
object.getSpecif_6(),
|
||||
object.getSend_type(),
|
||||
object.getServdate(),
|
||||
object.getDoc_result(),
|
||||
object.getPriority(),
|
||||
object.getSbankcode(),
|
||||
object.getC_acc_deb(),
|
||||
object.getSbanknam1(),
|
||||
object.getSbanknam2(),
|
||||
object.getSbanknam3(),
|
||||
object.getSbanknam4(),
|
||||
object.getSbanknam5(),
|
||||
object.getRbankcode(),
|
||||
object.getC_acc_cred(),
|
||||
object.getRbanknam1(),
|
||||
object.getOp_type(),
|
||||
object.getOp_order(),
|
||||
object.getRbanknam4(),
|
||||
object.getRbanknam5(),
|
||||
object.getPay_date(),
|
||||
object.getExt_date(),
|
||||
object.getPay_val(),
|
||||
object.getSum_deb(),
|
||||
object.getSclientn1(),
|
||||
object.getInn_deb(),
|
||||
object.getKpp_deb(),
|
||||
object.getSclientn4(),
|
||||
object.getSc_code(),
|
||||
object.getAcc_deb(),
|
||||
object.getRclientn1(),
|
||||
object.getInn_cred(),
|
||||
object.getKpp_cred(),
|
||||
object.getRclientn4(),
|
||||
object.getAcc_kr_1(),
|
||||
object.getAcc_kr_2(),
|
||||
object.getSp_code(),
|
||||
object.getSpecif_1(),
|
||||
object.getSpecif_2(),
|
||||
object.getSpecif_3(),
|
||||
object.getSpecif_4(),
|
||||
object.getSpecif_5(),
|
||||
object.getSpecif_6(),
|
||||
object.getSend_type(),
|
||||
object.getServdate(),
|
||||
object.getDoc_result(),
|
||||
TimeUtil.toDateFromInstant(object.getGenerationTime()),
|
||||
object.getGenerationId()
|
||||
};
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public class SDf16MapStore extends TemplateMapStore<SDf16> {
|
|||
@Override
|
||||
public String[] getFields() {
|
||||
return new String[]{
|
||||
"ID", "DATE", "ACCOUNT", "SUM", "MARKET", "TYPE", "_I_N_N", "_B_I_C", "_S_P_E_C", "NUMBER", "RESULT_CODE", "FILE_NAME", "GENERATION_TIME", "GENERATION_ID"
|
||||
"ID", "ACCOUNT", "SUM", "MARKET", "TYPE", "_I_N_N", "_B_I_C", "_S_P_E_C", "NUMBER", "FILE_NAME", "GENERATION_TIME", "GENERATION_ID"
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -39,7 +39,6 @@ public class SDf16MapStore extends TemplateMapStore<SDf16> {
|
|||
public SDf16 objectReader(ResultSet resultSet) throws SQLException {
|
||||
SDf16 object = new SDf16();
|
||||
object.setId(resultSet.getObject("ID", Long.class));
|
||||
object.setDate(getInstantFromTimestamp(resultSet, "DATE"));
|
||||
object.setAccount(resultSet.getObject("ACCOUNT", String.class));
|
||||
object.setSum(resultSet.getObject("SUM", BigDecimal.class));
|
||||
object.setMarket(resultSet.getObject("MARKET", String.class));
|
||||
|
|
@ -48,7 +47,6 @@ public class SDf16MapStore extends TemplateMapStore<SDf16> {
|
|||
object.setBIC(resultSet.getObject("_B_I_C", BigDecimal.class));
|
||||
object.setSPEC(resultSet.getObject("_S_P_E_C", String.class));
|
||||
object.setNumber(resultSet.getObject("NUMBER", BigDecimal.class));
|
||||
object.setResultCode(resultSet.getObject("RESULT_CODE", String.class));
|
||||
object.setFileName(resultSet.getObject("FILE_NAME", String.class));
|
||||
object.setGenerationTime(getInstantFromTimestamp(resultSet, "GENERATION_TIME"));
|
||||
object.setGenerationId(resultSet.getObject("GENERATION_ID", Long.class));
|
||||
|
|
@ -59,7 +57,6 @@ public class SDf16MapStore extends TemplateMapStore<SDf16> {
|
|||
public Object[] objectToField(SDf16 object) {
|
||||
Object[] args = new Object[]{
|
||||
object.getId(),
|
||||
TimeUtil.toDateFromInstant(object.getDate()),
|
||||
object.getAccount(),
|
||||
object.getSum(),
|
||||
object.getMarket(),
|
||||
|
|
@ -68,7 +65,6 @@ public class SDf16MapStore extends TemplateMapStore<SDf16> {
|
|||
object.getBIC(),
|
||||
object.getSPEC(),
|
||||
object.getNumber(),
|
||||
object.getResultCode(),
|
||||
object.getFileName(),
|
||||
TimeUtil.toDateFromInstant(object.getGenerationTime()),
|
||||
object.getGenerationId()
|
||||
|
|
|
|||
|
|
@ -47,10 +47,10 @@ public class SDf17MapStore extends TemplateMapStore<SDf17> {
|
|||
object.setBIC(resultSet.getObject("_B_I_C", BigDecimal.class));
|
||||
object.setSPEC(resultSet.getObject("_S_P_E_C", String.class));
|
||||
object.setNumber(resultSet.getObject("NUMBER", BigDecimal.class));
|
||||
object.setResult(resultSet.getObject("RESULT_CODE", String.class));
|
||||
object.setResult(resultSet.getObject("RESULT", BigDecimal.class));
|
||||
object.setGenerationTime(getInstantFromTimestamp(resultSet, "GENERATION_TIME"));
|
||||
object.setGenerationId(resultSet.getObject("GENERATION_ID", Long.class));
|
||||
object.setIn_s_df16_id(resultSet.getObject("IN_S_DF16_ID", Long.class));
|
||||
object.setInSDf16Id(resultSet.getObject("IN_S_DF16_ID", Long.class));
|
||||
return object;
|
||||
}
|
||||
|
||||
|
|
@ -69,7 +69,7 @@ public class SDf17MapStore extends TemplateMapStore<SDf17> {
|
|||
object.getResult(),
|
||||
TimeUtil.toDateFromInstant(object.getGenerationTime()),
|
||||
object.getGenerationId(),
|
||||
object.getIn_s_df16_id()
|
||||
object.getInSDf16Id()
|
||||
};
|
||||
return args;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public class SDf18MapStore extends TemplateMapStore<SDf18> {
|
|||
object.setId(resultSet.getObject("ID", Long.class));
|
||||
object.setAccount(resultSet.getObject("ACCOUNT", String.class));
|
||||
object.setDeal(resultSet.getObject("DEAL", String.class));
|
||||
object.setStatus(resultSet.getObject("STATUS", BigDecimal.class));
|
||||
object.setStatus(resultSet.getObject("STATUS", Long.class));
|
||||
object.setResult(resultSet.getObject("RESULT", BigDecimal.class));
|
||||
object.setGenerationTime(getInstantFromTimestamp(resultSet, "GENERATION_TIME"));
|
||||
object.setGenerationId(resultSet.getObject("GENERATION_ID", Long.class));
|
||||
|
|
|
|||
|
|
@ -4,24 +4,20 @@ import com.hazelcast.config.MapStoreConfig;
|
|||
import com.hazelcast.core.HazelcastInstance;
|
||||
import com.hazelcast.core.IMap;
|
||||
import com.hazelcast.core.IdGenerator;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.DisposableBean;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import ru.clearing.classes.objects.BusinessObject;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.spcex.clearing.imdg.base.DictionaryMapStore;
|
||||
import ru.spcex.clearing.imdg.base.SimpleObjectMapStore;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.spcex.platform.imdg.iml.hazelcast.util.HazelcastHelper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.*;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
//todo почистить класс
|
||||
public abstract class AbstractHazelcastLifecycleSupport implements InitializingBean, DisposableBean {
|
||||
|
|
@ -108,103 +104,19 @@ public abstract class AbstractHazelcastLifecycleSupport implements InitializingB
|
|||
log.info("IDGenerator {} already initialized in other node", IMDGDistributedNames.MAP_SEQUENCE_NAME);
|
||||
}
|
||||
|
||||
// MapStoreConfig mapStoreConfig = hazelcastServerInstance.getConfig().getMapConfig(HazelcastDistributedNames.Map_FixedIncomeProductExecution).getMapStoreConfig();
|
||||
// FixedIncomeProductExecutionMapStore fixedIncomeProductExecutionMapStore = (FixedIncomeProductExecutionMapStore) mapStoreConfig.getImplementation();
|
||||
// Long maxExecutionNumber = jdbcTemplate.queryForObject("select max(executionnumber) from " + fixedIncomeProductExecutionMapStore.getTableName(), Long.class);
|
||||
// log.info("{} max(executionnumber)={}", fixedIncomeProductExecutionMapStore.getTableName(), maxExecutionNumber);
|
||||
// if (maxExecutionNumber != null) {
|
||||
// if (Integer.MAX_VALUE - maxExecutionNumber < 1000000)
|
||||
// log.error("max(executionnumber) close to int32 max value");
|
||||
// IAtomicLong executionNumberAtomicLong = hazelcastServerInstance.getAtomicLong(HazelcastDistributedNames.AtomicLong_ExecutionNumber);
|
||||
// executionNumberAtomicLong.set(maxExecutionNumber);
|
||||
// }
|
||||
//
|
||||
// if (startupTasksAdministrator != null) {
|
||||
// startupTasksAdministrator.createTasks();
|
||||
// }
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
throw new RuntimeException("MapStore multithreaded not complete.", e);
|
||||
}
|
||||
|
||||
HazelcastHelper.otcSystem_setStorageState(true, hazelcastServerInstance);
|
||||
// hazelcastServerInstance.getClientService().addClientListener(clientListener);
|
||||
loadTime = System.currentTimeMillis() - loadTime;
|
||||
log.info("All map load time {} ms", loadTime);
|
||||
|
||||
// TextErrorService.setHazelcast(hazelcastServerInstance);
|
||||
|
||||
// clusterStatistic();
|
||||
}
|
||||
|
||||
// /**
|
||||
// * Подсчитывает кол-во запусков, первый запуск. Пишет в лог.
|
||||
// * Storage note status: ...
|
||||
// */
|
||||
// protected void clusterStatistic() {
|
||||
// try {
|
||||
// boolean isFirstNodeReady = HazelcastCommon.otcSystem_setStorageInfo(new Date(), true, hazelcastServerInstance);
|
||||
// String msg = "Storage node status: " + (isFirstNodeReady ? "first Storage node" : "second node")
|
||||
// + ", first node start at " + HazelcastCommon.otcSystem_getFirstStorageTime(hazelcastServerInstance);
|
||||
// String firstOtcVersion = HazelcastCommon.otcSystem_getFirstStorageVersion(hazelcastServerInstance);
|
||||
// if (firstOtcVersion != null)
|
||||
// msg += "(OTC " + firstOtcVersion + ")";
|
||||
// msg += ", count of all storage connection " + HazelcastCommon.otcSystem_getStorageConnectCount(hazelcastServerInstance) + ".";
|
||||
// msg += " Hazelcast cluster members: " + hazelcastServerInstance.getCluster().getMembers().size() + ".";
|
||||
// log.info(msg);
|
||||
// } catch (Exception e) {
|
||||
// log.warn("Error at print Storage cluster info.", e);
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
hazelcastServerInstance.shutdown();
|
||||
}
|
||||
|
||||
protected void databaseVersionCheck() throws RuntimeException, IllegalArgumentException {
|
||||
log.debug("Validate DB version, expected \"{}\"", getCheckDbVersion());
|
||||
String dbVersion = null;
|
||||
try {
|
||||
dbVersion = jdbcTemplate.queryForObject("select version from VERSIONEDID", String.class);
|
||||
log.info("DB version is \"{}\"", dbVersion);
|
||||
if (StringUtils.isBlank(dbVersion)) {
|
||||
String msg = "Database not contain version information (table VERSIONEDID)";//TextErrorService.text(StorageErrors.StorageErrors_WrongDBVersion) + " Database not contain version information (table VERSIONEDID)";
|
||||
log.error(msg);
|
||||
throw new RuntimeException(msg);
|
||||
}
|
||||
if (!isAllowDBVersion(getCheckDbVersion(), dbVersion)) {
|
||||
String msg = " platform " + getCheckDbVersion() + ", db " + dbVersion;//TextErrorService.text(StorageErrors.StorageErrors_WrongDBVersion) + " platform " + getCheckDbVersion() + ", db " + dbVersion;
|
||||
log.error(msg);
|
||||
throw new RuntimeException(msg);
|
||||
}
|
||||
} catch (DataAccessException | IllegalArgumentException e) { // EmptyResultDataAccessException
|
||||
String msg = e.toString();//TextErrorService.text(StorageErrors.StorageErrors_WrongDBVersion) + " platform " + getCheckDbVersion() + ", db " + dbVersion;
|
||||
log.error(msg);
|
||||
throw new RuntimeException(msg, e); // Ошибка 10002 - Версия Бд не поддерживается
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Првоерка версии. Формат: 1.2.*
|
||||
*
|
||||
* @param moduleVersion версия кода
|
||||
* @param dbVersion версия базы
|
||||
* @return true - версии правильные, false - версия БД устарела или не совпадает.
|
||||
* @throws IllegalArgumentException если неправильно распарсилась версия, в частности может случиться NumberFormatException.
|
||||
*/
|
||||
static boolean isAllowDBVersion(String moduleVersion, String dbVersion) throws IllegalArgumentException {
|
||||
Pattern versionPattern = Pattern.compile("(\\d+)\\.(\\d+)(\\..*){0,1}"); // (\d+)\.(\d+)(\..*){0,1}
|
||||
Matcher mModule = versionPattern.matcher(moduleVersion);
|
||||
Matcher mDB = versionPattern.matcher(dbVersion);
|
||||
if (!mModule.find())
|
||||
throw new IllegalArgumentException("Module version have wrong format: " + moduleVersion);
|
||||
if (!mDB.find())
|
||||
throw new IllegalArgumentException("Version from database have wrong format: " + moduleVersion);
|
||||
int majorModule = Integer.parseInt(mModule.group(1));
|
||||
int minorModule = Integer.parseInt(mModule.group(2));
|
||||
int majorDB = Integer.parseInt(mDB.group(1));
|
||||
int minorDB = Integer.parseInt(mDB.group(2));
|
||||
return majorDB == majorModule && minorDB >= minorModule;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
spring.main.web-application-type=none
|
||||
|
||||
securities-service.hazelcast.cluster-members=127.0.0.1
|
||||
securities-service.hazelcast.cluster-members=127.0.0.1:5701
|
||||
securities-service.hazelcast.login=dev
|
||||
securities-service.hazelcast.password=dev-pass
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,59 @@
|
|||
package ru.spcex.clearing.utility.service;
|
||||
|
||||
import org.apache.kafka.clients.consumer.Consumer;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import ru.clearing.classes.statics.data.user.UserSettings;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.spcex.clearing.platform.messaging.domain.BaseRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.Consts;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.utilities.UserSettingsUpdateRequest;
|
||||
import ru.spcex.clearing.platform.messaging.service.QueueConsumer;
|
||||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class UserSettingService extends QueueConsumer implements InitializingBean {
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
private final Imdg<UserSettings> userSettingsMap;
|
||||
|
||||
@Autowired
|
||||
public UserSettingService(Consumer<String, Object> kafkaQueue, ImdgProvider imdgProvider) {
|
||||
super(kafkaQueue);
|
||||
this.userSettingsMap = imdgProvider.getImdg(IMDGDistributedNames.Map_UserSettings, UserSettings.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() {
|
||||
callback(UserSettingsUpdateRequest.class)
|
||||
.setConsumer(this::updateUserSettings)
|
||||
.forDestination(Consts.USER_SETTINGS_UPDATE, callbacks::put);
|
||||
init();
|
||||
}
|
||||
|
||||
private void updateUserSettings(BaseRequest<UserSettingsUpdateRequest> userRequest) {
|
||||
UserSettingsUpdateRequest req = userRequest.getRequestPayload();
|
||||
log.debug("UserSettingsUpdateRequest received userId = {}", req.getUserId());
|
||||
UserSettings settings = userSettingsMap.getSingleObjectByFieldValues(Map.of("userId", req.getUserId()));
|
||||
if (settings != null) {
|
||||
log.debug("found user settings for userId={}, id={}...", req.getUserId(), settings.getId());
|
||||
settings.setVersion(req.getVersion());
|
||||
settings.setJson(req.getJson());
|
||||
userSettingsMap.update(settings);
|
||||
log.debug("updated user settings for userId={}, id={}", req.getUserId(), settings.getId());
|
||||
} else {
|
||||
log.debug("creating user settings for userId={}...", req.getUserId());
|
||||
settings = new UserSettings();
|
||||
settings.setUserId(req.getUserId());
|
||||
settings.setVersion(req.getVersion());
|
||||
settings.setJson(req.getJson());
|
||||
userSettingsMap.insert(settings);
|
||||
log.debug("created user settings for userId={}, id={}", req.getUserId(), settings.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
spring.main.web-application-type=none
|
||||
|
||||
utility-service.hazelcast.cluster-members=127.0.0.1
|
||||
utility-service.hazelcast.cluster-members=127.0.0.1:5701
|
||||
utility-service.hazelcast.login=dev
|
||||
utility-service.hazelcast.password=dev-pass
|
||||
|
||||
utility-service.kafka.bootstrap-servers=localhost:9092
|
||||
utility-service.kafka.group-id=dev-group-utility-service
|
||||
utility-service.kafka.enable-auto-commit=false
|
||||
utility-service.kafka.enable-auto-commit=true
|
||||
utility-service.kafka.session-timeout-ms=30000
|
||||
utility-service.kafka.auto-offset-reset=latest
|
||||
utility-service.kafka.linger-ms=1
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
package ru.spcex.platform.enumeration;
|
||||
|
||||
import ru.spcex.platform.utils.enumeration.IEnumKey;
|
||||
|
||||
public enum BalanceAccountType implements IEnumKey {
|
||||
Active("ACTV"), Blocked("BLKD");
|
||||
|
||||
private final String key;
|
||||
|
||||
BalanceAccountType(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package ru.spcex.platform.enumeration;
|
||||
|
||||
import ru.spcex.platform.utils.enumeration.IEnumKey;
|
||||
|
||||
public enum CurrencyCode implements IEnumKey {
|
||||
RUB("RUB");
|
||||
|
||||
private final String key;
|
||||
|
||||
CurrencyCode(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package ru.spcex.platform.enumeration;
|
||||
|
||||
import ru.spcex.platform.utils.enumeration.IEnumKey;
|
||||
|
||||
public enum InOutDirection implements IEnumKey {
|
||||
in("IN");
|
||||
|
||||
private final String key;
|
||||
|
||||
InOutDirection(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package ru.spcex.platform.enumeration;
|
||||
|
||||
import ru.spcex.platform.utils.enumeration.IEnumKey;
|
||||
|
||||
public enum InOutSDfType implements IEnumKey {
|
||||
type1("0102");
|
||||
|
||||
private final String key;
|
||||
|
||||
InOutSDfType(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue