etreschenkov 2026-04-27 13:02:40 +03:00
parent 8f4f1a1a9a
commit 233a46209f
7 changed files with 344 additions and 9 deletions

View file

@ -5,9 +5,7 @@ import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.ExecutionException;
@ -32,6 +30,7 @@ import ru.clearing.classes.statics.data.registry.Registry;
import ru.spcex.clearing.backendapi.controller.queue.AbstractQueueController;
import ru.spcex.clearing.backendapi.controller.request.cud.registry.ChangeRefundDateActionNew;
import ru.spcex.clearing.backendapi.controller.request.cud.registry.ChangeStatusExtractActionNew;
import ru.spcex.clearing.backendapi.controller.request.cud.registry.DmauRegistryActionNew;
import ru.spcex.clearing.backendapi.controller.request.cud.registry.IdentificationFundsActionNew;
import ru.spcex.clearing.backendapi.controller.request.cud.registry.RSplitDepositActionNew;
import ru.spcex.clearing.backendapi.controller.request.cud.registry.ReturnDepositActionNew;
@ -43,11 +42,9 @@ import ru.spcex.clearing.backendapi.service.IStateLoader;
import ru.spcex.clearing.imdg.IMDGDistributedNames;
import ru.spcex.clearing.platform.messaging.domain.Consts;
import ru.spcex.platform.enumeration.RegistryDesignation;
import ru.spcex.platform.enumeration.RegistryStatus;
import ru.spcex.platform.imdg.api.ImdgProvider;
import ru.spcex.platform.imdg.api.predicate.ImdgPredicate;
import ru.spcex.platform.imdg.api.predicate.ImdgPredicateBuilder;
import ru.spcex.platform.utils.enumeration.IEnumKey;
@Controller
@RequestMapping("/registries")
@ -193,4 +190,13 @@ public class RegistryController extends AbstractQueueController {
return processRequest(Consts.REGISTRY_CHANGE_STATUS_EXTRACT_ACTION, changeStatusExtractAction);
}
@ApiOperation(value = "Вывод средств с регистра невыясненных активов")
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CudResponse.class), @ApiResponse(code = 400, message = "Ошибка валидации", response = BasicSpcexResponse.class)})
@RequestMapping(value = "/withdrawalFunds", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseBody
public CudResponse dmauRegistryNew(
@ApiParam(value = "Параметры команды в JSON формате.", required = true)
@RequestBody DmauRegistryActionNew dmauRegistryActionNew) throws ExecutionException, InterruptedException {
return processRequest(Consts.REGISTRY_DMAU_CREATE_ACTION, dmauRegistryActionNew);
}
}

View file

@ -0,0 +1,68 @@
package ru.spcex.clearing.backendapi.controller.request.cud.registry;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
import ru.spcex.clearing.backendapi.domain.actions.IAction;
import ru.spcex.clearing.platform.messaging.domain.ActionType;
import ru.spcex.clearing.platform.messaging.domain.cud.registry.DmauRegistryRequest;
public class DmauRegistryActionNew implements IAction<DmauRegistryRequest> {
@JsonProperty
private BigDecimal balance;
@JsonProperty
private Long securityId;
@JsonProperty
private String securitySymbol;
@JsonProperty
private BigDecimal amount;
@JsonProperty
private String paymentPurpose;
@JsonProperty
private Long senderId;
@JsonProperty
private Long creditLegAccountId;
@JsonProperty
private String debitCorrAccount;
@JsonProperty
private String debitLegAccount;
@JsonProperty
private String debitCompanyName;
@JsonProperty
private String debitBankName;
@JsonProperty
private String debitBIC;
@JsonProperty
private String debitSwiftCode;
@JsonProperty
private String debitIntSwiftCode;
@JsonProperty
private String debitINN;
@JsonProperty
private String debitKPP;
@Override
public DmauRegistryRequest toRequest() {
DmauRegistryRequest request = new DmauRegistryRequest();
request.setBalance(balance);
request.setSecurityId(securityId);
request.setSecuritySymbol(securitySymbol);
request.setAmount(amount);
request.setPaymentPurpose(paymentPurpose);
request.setSenderId(senderId);
request.setCreditLegAccountId(creditLegAccountId);
request.setDebitCorrAccount(debitCorrAccount);
request.setDebitLegAccount(debitLegAccount);
request.setDebitCompanyName(debitCompanyName);
request.setDebitBankName(debitBankName);
request.setDebitBIC(debitBIC);
request.setDebitSwiftCode(debitSwiftCode);
request.setDebitIntSwiftCode(debitIntSwiftCode);
request.setDebitINN(debitINN);
request.setDebitKPP(debitKPP);
return request;
}
@Override
public ActionType getActionType() {
return ActionType.NEW;
}
}

View file

@ -1,7 +1,7 @@
{
"realm" : "master",
"resource" : "clearing",
"auth-server-url" : "http://10.200.200.147:8080",
"auth-server-url" : "http://10.200.200.181:8090",
"ssl-required" : "none",
"use-resource-role-mappings" : false,
"enable-cors" : true,

View file

@ -1,6 +1,6 @@
{
"version": "3.23.295.158",
"version": "3.23.295.159",
"enums": {
@ -4869,6 +4869,81 @@
}
]
}
,
{"method":"post",
"name": "Вывод средств с регистра невыясненных активов",
"destination": "registries/withdrawalFunds",
"class": "ru.spcex.clearing.backendapi.controller.request.cud.registry.DmauRegistryActionNew",
"fields": [
{"code": "balance",
"type": 10,"name": "Текущий баланс","shortname": "Текущие средства","enabled": false
}
,
{"code": "securityId",
"type": 1,"name": "Наименование инструмента/валюты","shortname": "Инструмент","visible": false
}
,
{"code": "securitySymbol",
"type": 12,"name": "Наименование инструмента/валюты","shortname": "Валюта","required": true,"enabled": false
}
,
{"code": "amount",
"type": 10,"name": "Сумма отправителя","shortname": "Сумма","required": true
}
,
{"code": "paymentPurpose",
"type": 2,"length": 255,"name": "Назначение платежа","shortname": "Основание"
}
,
{"code": "senderId",
"type": 1,"group": "Отправитель","name": "Участник отправитель","shortname": "Отправитель","link": "company","linkCode": "shortName","required": true,"enabled": false
}
,
{"code": "creditLegAccountId",
"type": 1,"group": "Отправитель","name": "Наименование счета отправителя","shortname": "Регистр списания","link": "account","linkCode": "account","required": true,"enabled": false
}
,
{"code": "debitCorrAccount",
"type": 2,"length": 255,"group": "Получатель","name": "Корреспондентский счет","shortname": "Корр. счет"
}
,
{"code": "debitLegAccount",
"type": 2,"length": 255,"group": "Получатель","name": "Счет получателя","shortname": "Счет","required": true
}
,
{"code": "debitCompanyName",
"type": 2,"length": 255,"group": "Получатель","name": "Наименование компании-получателя","shortname": "Наименование компании"
}
,
{"code": "debitBankName",
"type": 2,"length": 255,"group": "Получатель","name": "Наименование банка-получателя","shortname": "Наименование банка"
}
,
{"code": "debitBIC",
"type": 2,"length": 255,"group": "Получатель","name": "БИК получателя","shortname": "БИК","required": true
}
,
{"code": "debitSwiftCode",
"type": 2,"length": 255,"group": "Получатель","shortname": "SWIFT"
}
,
{"code": "debitIntSwiftCode",
"type": 2,"length": 255,"group": "Получатель","shortname": "SWIFT посредника"
}
,
{"code": "debitINN",
"type": 2,"length": 255,"group": "Получатель","name": "ИНН получателя","shortname": "ИНН"
}
,
{"code": "debitKPP",
"type": 2,"length": 255,"group": "Получатель","name": "КПП получателя","shortname": "КПП"
}
]
}
]
}
,
@ -5174,7 +5249,7 @@
}
,
{"code": "bankIdentificationCode",
"type": 2,"length": 255,"name": "Банковский идентификационный код (БИК)","shortname": "БИК","required": true
"type": 2,"length": 255,"name": "Банковский идентификационный код (БИК)","shortname": "БИК","required": false
}
,
{"code": "bankName",

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--?xml-stylesheet type="text/xsl" href="\..\corp-reports\src\data\meta\meta.server.xslt"?-->
<meta version="3.23.295.158">
<meta version="3.23.295.159">
<!-- _xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" _xsi:noNamespaceSchemaLocation="file:///E:/d/projects/meta/from/meta.xsd" -->
<!--Здесь словари-->
<enums>
@ -1130,6 +1130,24 @@
<balance type="10" name="Текущий баланс" shortname="Баланс" enabled="false"/>
<registryStatus type="12" dbname="Код статуса" name="Наименование статуса" shortname="Статус" link="registryStatus" visible="false"/>
</put>
<post name="Вывод средств с регистра невыясненных активов" destination="registries/withdrawalFunds" class="ru.spcex.clearing.backendapi.controller.request.cud.registry.DmauRegistryActionNew">
<balance type="10" name="Текущий баланс" shortname="Текущие средства" enabled="false"/>
<securityId type="1" name="Наименование инструмента/валюты" shortname="Инструмент" visible="false"/>
<securitySymbol type="12" name="Наименование инструмента/валюты" shortname="Валюта" required="true" enabled="false"/>
<amount type="10" name="Сумма отправителя" shortname="Сумма" required="true"/>
<paymentPurpose type="2" length="255" name="Назначение платежа" shortname="Основание"/>
<senderId type="1" group="Отправитель" name="Участник отправитель" shortname="Отправитель" link="company" linkCode="shortName" required="true" enabled="false"/>
<creditLegAccountId type="1" group="Отправитель" name="Наименование счета отправителя" shortname="Регистр списания" link="account" linkCode="account" required="true" enabled="false"/>
<debitCorrAccount type="2" length="255" group="Получатель" name="Корреспондентский счет" shortname="Корр. счет"/>
<debitLegAccount type="2" length="255" group="Получатель" name="Счет получателя" shortname="Счет" required="true"/>
<debitCompanyName type="2" length="255" group="Получатель" name="Наименование компании-получателя" shortname="Наименование компании"/>
<debitBankName type="2" length="255" group="Получатель" name="Наименование банка-получателя" shortname="Наименование банка"/>
<debitBIC type="2" length="255" group="Получатель" name="БИК получателя" shortname="БИК" required="true"/>
<debitSwiftCode type="2" length="255" group="Получатель" shortname="SWIFT"/>
<debitIntSwiftCode type="2" length="255" group="Получатель" shortname="SWIFT посредника"/>
<debitINN type="2" length="255" group="Получатель" name="ИНН получателя" shortname="ИНН"/>
<debitKPP type="2" length="255" group="Получатель" name="КПП получателя" shortname="КПП"/>
</post>
</actions>
</registry>
<account name="Счета" destination="accounting/accounts" class="ru.clearing.classes.statics.data.account.Account" logUpdates="true" table="account">
@ -1202,7 +1220,7 @@
<actions>
<post name="Добавление счета вывода средств" confirmation="currency,bankIdentificationCode,bankName,correspondentAccount,correspondentAccountName,taxpayerIdentificationNumber,taxRegistrationReasonCode,account" class="ru.spcex.clearing.backendapi.controller.request.cud.account.BankAccountNewAction">
<currency type="12" name="Код валюты" shortname="Валюта" required="true" link="currencyCode" linkCode="code"/>
<bankIdentificationCode type="2" length="255" name="Банковский идентификационный код (БИК)" shortname="БИК" required="true"/>
<bankIdentificationCode type="2" length="255" name="Банковский идентификационный код (БИК)" shortname="БИК" required="false"/>
<bankName type="2" length="255" name="Наименование компании в банке" shortname="Наименование компании" required="true"/>
<correspondentAccount type="2" length="255" name="Корреспондентский счет" shortname="Корр. счет"/>
<correspondentAccountName type="2" length="255" name="Наименование корреспондентского счета" shortname="Наименование корр. счета"/>

View file

@ -207,6 +207,7 @@ public interface Consts {
String REGISTRY_RETURN_DEPOSIT_ACTION = "registry-return-deposit-action";
String REGISTRY_CHANGE_REFUND_DATE_ACTION = "registry-change-refund-date-action";
String REGISTRY_CHANGE_STATUS_EXTRACT_ACTION = "registry-change-status-extract-action";
String REGISTRY_DMAU_CREATE_ACTION = "registry-create-dmau-registry-action";
@Deprecated String REGISTRY_COVERED_DEAL_REGISTER_NEW = "registry-covered-deal-register-new";
@Deprecated String REGISTRY_ADMITTED_DEAL_REGISTER_NEW = "registry-admitted-deal-register-new";
String REGISTRY_DEAL_REGISTER_NEW = "registry-deal-register-new";

View file

@ -0,0 +1,167 @@
package ru.spcex.clearing.platform.messaging.domain.cud.registry;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
public class DmauRegistryRequest {
@JsonProperty
private BigDecimal balance;
@JsonProperty
private Long securityId;
@JsonProperty
private String securitySymbol;
@JsonProperty
private BigDecimal amount;
@JsonProperty
private String paymentPurpose;
@JsonProperty
private Long senderId;
@JsonProperty
private Long creditLegAccountId;
@JsonProperty
private String debitCorrAccount;
@JsonProperty
private String debitLegAccount;
@JsonProperty
private String debitCompanyName;
@JsonProperty
private String debitBankName;
@JsonProperty
private String debitBIC;
@JsonProperty
private String debitSwiftCode;
@JsonProperty
private String debitIntSwiftCode;
@JsonProperty
private String debitINN;
@JsonProperty
private String debitKPP;
public BigDecimal getBalance() {
return balance;
}
public void setBalance(BigDecimal balance) {
this.balance = balance;
}
public Long getSecurityId() {
return securityId;
}
public void setSecurityId(Long securityId) {
this.securityId = securityId;
}
public String getSecuritySymbol() {
return securitySymbol;
}
public void setSecuritySymbol(String securitySymbol) {
this.securitySymbol = securitySymbol;
}
public BigDecimal getAmount() {
return amount;
}
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
public String getPaymentPurpose() {
return paymentPurpose;
}
public void setPaymentPurpose(String paymentPurpose) {
this.paymentPurpose = paymentPurpose;
}
public Long getSenderId() {
return senderId;
}
public void setSenderId(Long senderId) {
this.senderId = senderId;
}
public Long getCreditLegAccountId() {
return creditLegAccountId;
}
public void setCreditLegAccountId(Long creditLegAccountId) {
this.creditLegAccountId = creditLegAccountId;
}
public String getDebitCorrAccount() {
return debitCorrAccount;
}
public void setDebitCorrAccount(String debitCorrAccount) {
this.debitCorrAccount = debitCorrAccount;
}
public String getDebitLegAccount() {
return debitLegAccount;
}
public void setDebitLegAccount(String debitLegAccount) {
this.debitLegAccount = debitLegAccount;
}
public String getDebitCompanyName() {
return debitCompanyName;
}
public void setDebitCompanyName(String debitCompanyName) {
this.debitCompanyName = debitCompanyName;
}
public String getDebitBankName() {
return debitBankName;
}
public void setDebitBankName(String debitBankName) {
this.debitBankName = debitBankName;
}
public String getDebitBIC() {
return debitBIC;
}
public void setDebitBIC(String debitBIC) {
this.debitBIC = debitBIC;
}
public String getDebitSwiftCode() {
return debitSwiftCode;
}
public void setDebitSwiftCode(String debitSwiftCode) {
this.debitSwiftCode = debitSwiftCode;
}
public String getDebitIntSwiftCode() {
return debitIntSwiftCode;
}
public void setDebitIntSwiftCode(String debitIntSwiftCode) {
this.debitIntSwiftCode = debitIntSwiftCode;
}
public String getDebitINN() {
return debitINN;
}
public void setDebitINN(String debitINN) {
this.debitINN = debitINN;
}
public String getDebitKPP() {
return debitKPP;
}
public void setDebitKPP(String debitKPP) {
this.debitKPP = debitKPP;
}
}