diff --git a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/misc/ListingController.java b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/misc/ListingController.java index 583801df2..45cf6dd43 100644 --- a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/misc/ListingController.java +++ b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/queue/misc/ListingController.java @@ -1,22 +1,29 @@ package ru.spcex.clearing.backendapi.controller.queue.misc; import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.MediaType; import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.*; import ru.clearing.classes.statics.data.misc.Listing; import ru.spcex.clearing.backendapi.controller.queue.AbstractQueueController; +import ru.spcex.clearing.backendapi.controller.request.cud.common.CommonDeleteAction; +import ru.spcex.clearing.backendapi.controller.request.cud.company.ListingNewAction; +import ru.spcex.clearing.backendapi.controller.request.cud.company.ListingUpdateAction; +import ru.spcex.clearing.backendapi.controller.response.BasicSpcexResponse; +import ru.spcex.clearing.backendapi.controller.response.cud.CudResponse; import ru.spcex.clearing.backendapi.controller.response.entity.CommonGetAllResponse; import ru.spcex.clearing.backendapi.service.IOperator; import ru.spcex.clearing.backendapi.service.IStateLoader; import ru.spcex.clearing.imdg.IMDGDistributedNames; +import ru.spcex.clearing.platform.messaging.domain.Consts; import java.util.Collection; import java.util.Map; +import java.util.concurrent.ExecutionException; @Controller @RequestMapping("/listings") @@ -39,4 +46,40 @@ public class ListingController extends AbstractQueueController { response.fromEntity(all); return response; } + + + + @ApiOperation(value = "create Listing.") + @ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CudResponse.class), @ApiResponse(code = 400, message = "Ошибка валидации", response = BasicSpcexResponse.class)}) + @RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE) + @ResponseBody + public CudResponse create( + @ApiParam(value = "Значения полей нового объекта.", required = true) + @RequestBody ListingNewAction listingNewAction) throws ExecutionException, InterruptedException { + return processRequest(Consts.LISTING_NEW, listingNewAction); + } + + @ApiOperation(value = "update Listing.") + @ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CudResponse.class), @ApiResponse(code = 400, message = "Ошибка валидации", response = BasicSpcexResponse.class)}) + @RequestMapping(value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE) + @ResponseBody + public CudResponse update( + @ApiParam(value = "Идентификатор изменяемого объекта.", required = true, example = "1234") + @PathVariable("id") Long id, + @ApiParam(value = "Новые значения полей объекта.", required = true) + @RequestBody ListingUpdateAction listingUpdateAction) throws ExecutionException, InterruptedException { + listingUpdateAction.setId(id); + return processRequest(Consts.LISTING_UPDATE, listingUpdateAction); + } + + @ApiOperation(value = "delete Listing.") + @ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CudResponse.class)}) + @RequestMapping(value = "/{id}", method = RequestMethod.DELETE) + @ResponseBody + public CudResponse delete(@ApiParam(value = "Идентификатор удаляемого объекта", required = true, example = "1234") + @PathVariable("id") Long id) throws ExecutionException, InterruptedException { + CommonDeleteAction deleteAction = new CommonDeleteAction(); + deleteAction.setId(id); + return processRequest(Consts.LISTING_DELETE, deleteAction); + } } diff --git a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/company/ListingNewAction.java b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/company/ListingNewAction.java new file mode 100644 index 000000000..ca4768af3 --- /dev/null +++ b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/company/ListingNewAction.java @@ -0,0 +1,86 @@ +package ru.spcex.clearing.backendapi.controller.request.cud.company; + +import com.fasterxml.jackson.annotation.JsonProperty; +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.company.CompanySymbolUpdateRequest; +import ru.spcex.clearing.platform.messaging.domain.cud.securitites.ListingNewRequest; + +import java.math.BigDecimal; + +public class ListingNewAction implements IAction { + @ApiModelProperty(value = "Наименование инструмента", example = "1234") + @JsonProperty + private Long securityId; + @ApiModelProperty(value = "Наименование режима", example = "ABCD") + @JsonProperty + private String market; + @ApiModelProperty(value = "Размер лота", example = "1234.56") + @JsonProperty + private BigDecimal lotSize; + @ApiModelProperty(value = "Наименование валюты расчета", example = "RUB") + @JsonProperty + private String tradingCurrency; + @ApiModelProperty(value = "Наименование статуса листинга в системе", example = "ACTV") + @JsonProperty + private String workflowStatus; + + @Override + public ListingNewRequest toRequest() { + ListingNewRequest request = new ListingNewRequest(); + request.setSecurityId(this.securityId); + request.setMarket(this.market); + request.setLotSize(this.lotSize); + request.setTradingCurrency(this.tradingCurrency); + request.setWorkflowStatus(this.workflowStatus); + return request; + } + + @ApiModelProperty(hidden = true) + @Override + public ActionType getActionType() { + return ActionType.NEW; + } + + + public Long getSecurityId() { + return securityId; + } + + public void setSecurityId(Long securityId) { + this.securityId = securityId; + } + + public String getMarket() { + return market; + } + + public void setMarket(String market) { + this.market = market; + } + + public BigDecimal getLotSize() { + return lotSize; + } + + public void setLotSize(BigDecimal lotSize) { + this.lotSize = lotSize; + } + + public String getTradingCurrency() { + return tradingCurrency; + } + + public void setTradingCurrency(String tradingCurrency) { + this.tradingCurrency = tradingCurrency; + } + + public String getWorkflowStatus() { + return workflowStatus; + } + + public void setWorkflowStatus(String workflowStatus) { + this.workflowStatus = workflowStatus; + } +} diff --git a/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/company/ListingUpdateAction.java b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/company/ListingUpdateAction.java new file mode 100644 index 000000000..afaf2591f --- /dev/null +++ b/clearing-parent/backend-api/src/main/java/ru/spcex/clearing/backendapi/controller/request/cud/company/ListingUpdateAction.java @@ -0,0 +1,97 @@ +package ru.spcex.clearing.backendapi.controller.request.cud.company; + +import com.fasterxml.jackson.annotation.JsonProperty; +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.company.ContactUpdateRequest; +import ru.spcex.clearing.platform.messaging.domain.cud.securitites.ListingUpdateRequest; + +import java.math.BigDecimal; + +public class ListingUpdateAction implements IAction { + @ApiModelProperty(hidden = true) + @JsonProperty + public Long id; + @ApiModelProperty(value = "Наименование инструмента", example = "1234") + @JsonProperty + private Long securityId; + @ApiModelProperty(value = "Наименование режима", example = "ABCD") + @JsonProperty + private String market; + @ApiModelProperty(value = "Размер лота", example = "1234.56") + @JsonProperty + private BigDecimal lotSize; + @ApiModelProperty(value = "Наименование валюты расчета", example = "RUB") + @JsonProperty + private String tradingCurrency; + @ApiModelProperty(value = "Наименование статуса листинга в системе", example = "ACTV") + @JsonProperty + private String workflowStatus; + + @Override + public ListingUpdateRequest toRequest() { + ListingUpdateRequest request = new ListingUpdateRequest(); + request.setId(this.id); + request.setSecurityId(this.securityId); + request.setMarket(this.market); + request.setLotSize(this.lotSize); + request.setTradingCurrency(this.tradingCurrency); + request.setWorkflowStatus(this.workflowStatus); + return request; + } + + @ApiModelProperty(hidden = true) + @Override + public ActionType getActionType() { + return ActionType.UPDATE; + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getSecurityId() { + return securityId; + } + + public void setSecurityId(Long securityId) { + this.securityId = securityId; + } + + public String getMarket() { + return market; + } + + public void setMarket(String market) { + this.market = market; + } + + public BigDecimal getLotSize() { + return lotSize; + } + + public void setLotSize(BigDecimal lotSize) { + this.lotSize = lotSize; + } + + public String getTradingCurrency() { + return tradingCurrency; + } + + public void setTradingCurrency(String tradingCurrency) { + this.tradingCurrency = tradingCurrency; + } + + public String getWorkflowStatus() { + return workflowStatus; + } + + public void setWorkflowStatus(String workflowStatus) { + this.workflowStatus = workflowStatus; + } +} diff --git a/clearing-parent/backend-api/src/main/resources/meta/meta.json b/clearing-parent/backend-api/src/main/resources/meta/meta.json index 7b96718d8..84394d492 100644 --- a/clearing-parent/backend-api/src/main/resources/meta/meta.json +++ b/clearing-parent/backend-api/src/main/resources/meta/meta.json @@ -1,6 +1,6 @@ { - "version": "3.5.0.24", + "version": "3.5.0.25", "enums": { @@ -2502,6 +2502,10 @@ "confirmation": "securitySymbol,shortName,fullName,lotSize,nominalValue,nominalCurrency", "fields": [ + {"code": "instrumentType", + "type": 12,"name": "Наименование типа инструмента","shortname": "Тип инструмента","link": "instrumentType","required": true,"enabled": false + } + , {"code": "securitySymbol", "type": 2,"length": 255,"name": "Код инструмента","shortname": "Код","required": true } @@ -2539,7 +2543,7 @@ } , {"code": "termType", - "type": 12,"name": "Наименование вида инструмента","shortname": "Вид инструмента","link": "termType","visible": false + "type": 12,"name": "Наименование вида инструмента","shortname": "Вид инструмента","link": "termType" } , {"code": "description", @@ -2565,10 +2569,6 @@ {"code": "workflowStatus", "type": 12,"name": "Наименование статуса","shortname": "Статус","link": "workflowStatus" } - , - {"code": "instrumentType", - "type": 12,"name": "Наименование типа инструмента","shortname": "Тип инструмента","link": "instrumentType","required": true,"visible": false - } ] } , @@ -2582,6 +2582,10 @@ {"code": "id", "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "moneyMarketSecurity","linkCode": "id","required": true } + , + {"code": "instrumentType", + "type": 12,"name": "Наименование типа инструмента","shortname": "Тип инструмента","link": "instrumentType","required": true,"enabled": false + } , {"code": "securitySymbol", "type": 2,"length": 255,"name": "Код инструмента","shortname": "Код","enabled": false @@ -2600,7 +2604,7 @@ } , {"code": "lotSize", - "field": "securityId","type": 11,"name": "Размер лота","shortname": "Лот","linkKeyCode": "securityId","linkCode": "lotSize","link": "listing" + "field": "securityId","type": 11,"name": "Размер лота","shortname": "Лот","linkKeyCode": "securityId","linkCode": "lotSize","link": "listing","required": true } , {"code": "nominalValue", @@ -2646,10 +2650,6 @@ {"code": "workflowStatus", "type": 12,"name": "Наименование статуса","shortname": "Статус","link": "workflowStatus" } - , - {"code": "instrumentType", - "type": 12,"name": "Наименование типа инструмента","shortname": "Тип инструмента","link": "instrumentType","visible": false - } ] } , @@ -2768,9 +2768,13 @@ "name": "Добавление акции", - "confirmation": "securitySymbol,shortName,fullName,isin,shareType,lotSize", + "confirmation": "securitySymbol,shortName,fullName,isin,shareType", "fields": [ + {"code": "instrumentType", + "type": 12,"name": "Наименование типа инструмента","shortname": "Тип инструмента","link": "instrumentType","required": true,"enabled": false + } + , {"code": "securitySymbol", "type": 2,"length": 255,"name": "Код инструмента","shortname": "Код","required": true } @@ -2792,7 +2796,7 @@ } , {"code": "lotSize", - "type": 11,"name": "Размер лота","shortname": "Лот","required": true + "type": 11,"name": "Размер лота","shortname": "Лот","visible": false } , {"code": "issuerId", @@ -2810,10 +2814,6 @@ {"code": "workflowStatus", "type": 12,"name": "Наименование статуса","shortname": "Статус","link": "workflowStatus" } - , - {"code": "instrumentType", - "type": 12,"name": "Наименование типа инструмента","shortname": "Тип инструмента","link": "instrumentType","required": true,"visible": false - } ] } , @@ -2821,12 +2821,16 @@ "name": "Изменение акции", - "confirmation": "securitySymbol,shortName,fullName,isin,shareType,lotSize", + "confirmation": "securitySymbol,shortName,fullName,isin,shareType", "fields": [ {"code": "id", "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "equitySecurity","linkCode": "id","required": true } + , + {"code": "instrumentType", + "type": 12,"name": "Наименование типа инструмента","shortname": "Тип инструмента","link": "instrumentType","required": true,"enabled": false + } , {"code": "securitySymbol", "type": 2,"length": 255,"name": "Код инструмента","shortname": "Код","enabled": false @@ -2849,7 +2853,7 @@ } , {"code": "lotSize", - "field": "securityId","type": 11,"name": "Размер лота","shortname": "Лот","linkKeyCode": "securityId","linkCode": "lotSize","link": "listing" + "field": "securityId","type": 11,"name": "Размер лота","shortname": "Лот","linkKeyCode": "securityId","linkCode": "lotSize","link": "listing","visible": false } , {"code": "issuerId", @@ -2867,10 +2871,6 @@ {"code": "workflowStatus", "type": 12,"name": "Наименование статуса","shortname": "Статус","link": "workflowStatus" } - , - {"code": "instrumentType", - "type": 12,"name": "Наименование типа инструмента","shortname": "Тип инструмента","link": "instrumentType","visible": false - } ] } , @@ -2979,9 +2979,13 @@ "name": "Добавление облигации", - "confirmation": "securitySymbol,shortName,fullName,isin,bondType,lotSize,nominalValue,nominalCurrency", + "confirmation": "securitySymbol,shortName,fullName,isin,bondType,nominalValue,nominalCurrency", "fields": [ + {"code": "instrumentType", + "type": 12,"name": "Наименование типа инструмента","shortname": "Тип инструмента","link": "instrumentType","required": true,"enabled": false + } + , {"code": "securitySymbol", "type": 2,"length": 255,"name": "Код инструмента","shortname": "Код","required": true } @@ -3003,7 +3007,7 @@ } , {"code": "lotSize", - "type": 11,"name": "Размер лота","shortname": "Лот","required": true + "type": 11,"name": "Размер лота","shortname": "Лот","visible": false } , {"code": "nominalValue", @@ -3041,10 +3045,6 @@ {"code": "workflowStatus", "type": 12,"name": "Наименование статуса","shortname": "Статус","link": "workflowStatus" } - , - {"code": "instrumentType", - "type": 12,"name": "Наименование типа инструмента","shortname": "Тип инструмента","link": "instrumentType","required": true,"visible": false - } ] } , @@ -3052,12 +3052,16 @@ "name": "Изменение облигации", - "confirmation": "securitySymbol,shortName,fullName,isin,bondType,lotSize,nominalValue,nominalCurrency", + "confirmation": "securitySymbol,shortName,fullName,isin,bondType,nominalValue,nominalCurrency", "fields": [ {"code": "id", "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "fixedIncomeSecurity","linkCode": "id","required": true } + , + {"code": "instrumentType", + "type": 12,"name": "Наименование типа инструмента","shortname": "Тип инструмента","link": "instrumentType","required": true,"enabled": false + } , {"code": "securitySymbol", "type": 2,"length": 255,"name": "Код инструмента","shortname": "Код","enabled": false @@ -3080,7 +3084,7 @@ } , {"code": "lotSize", - "field": "securityId","type": 11,"name": "Размер лота","shortname": "Лот","linkKeyCode": "securityId","linkCode": "lotSize","link": "listing" + "field": "securityId","type": 11,"name": "Размер лота","shortname": "Лот","linkKeyCode": "securityId","linkCode": "lotSize","link": "listing","visible": false } , {"code": "nominalValue", @@ -3118,10 +3122,6 @@ {"code": "workflowStatus", "type": 12,"name": "Наименование статуса","shortname": "Статус","link": "workflowStatus" } - , - {"code": "instrumentType", - "type": 12,"name": "Наименование типа инструмента","shortname": "Тип инструмента","link": "instrumentType","visible": false - } ] } , @@ -3222,7 +3222,7 @@ , "listing": { - "name": "Листинг инструментов", + "name": "Инструменты на режимах", "destination": "listings", @@ -3236,21 +3236,21 @@ {"code": "securityId", "type": 1,"dbname": "Идентификатор инструмента","name": "Наименование инструмента","shortname": "Инструмент","searchable": true,"sortable": true,"link": "security","linkCode": "shortName" } + , + {"code": "market", + "type": 12,"dbname": "Код торговой секции","name": "Наименование режима","shortname": "Режим","searchable": true,"sortable": true,"link": "market","linkCode": "description" + } , {"code": "lotSize", "type": 11,"name": "Размер лота","shortname": "Лот","searchable": true,"sortable": true } - , - {"code": "market", - "type": 12,"dbname": "Код торговой секции","name": "Наименование торговой секции","shortname": "Секция","searchable": true,"sortable": true,"link": "market","linkCode": "name" - } , {"code": "symbolCode", - "type": 2,"length": 255,"name": "Код инструмента на торговой площадке","shortname": "Код инструмента на торговой площадке","searchable": true,"sortable": true + "type": 2,"length": 255,"name": "Код инструмента на торговой площадке","shortname": "Код инструмента на режиме","searchable": true,"sortable": true } , {"code": "symbolName", - "type": 2,"length": 255,"name": "Наименование инструмента на торговой площадке","shortname": "Инструмент на торговой площадке","searchable": true,"sortable": true + "type": 2,"length": 255,"name": "Наименование инструмента на торговой площадке","shortname": "Наименование инструмента на режиме","searchable": true,"sortable": true } , {"code": "tradingCurrency", @@ -3273,7 +3273,82 @@ "field": "updated","type": 4,"webtype": "5","dbname": "Дата-время изменения записи","name": "Время изменения записи","shortname": "Изменено","searchable": true,"sortable": true,"ignore": true } ] - + ,"actions":[ + {"method":"post", + + "name": "Добавление инструмента на режимах", + + "confirmation": "securityId,market,lotSize,tradingCurrency,workflowStatus", + + "fields": [ + {"code": "securityId", + "type": 1,"name": "Наименование инструмента","shortname": "Инструмент","link": "security","linkCode": "shortName","required": true + } + , + {"code": "market", + "type": 12,"name": "Наименование режима","shortname": "Режим","link": "market","required": true,"linkCode": "code" + } + , + {"code": "lotSize", + "type": 11,"name": "Размер лота","shortname": "Лот","required": true + } + , + {"code": "tradingCurrency", + "type": 12,"name": "Наименование валюты расчета","shortname": "Валюта","link": "currencyCode","linkCode": "code","required": true + } + , + {"code": "workflowStatus", + "type": 12,"name": "Наименование статуса листинга в системе","shortname": "Статус","link": "workflowStatus","required": true + } + ] + } + , + {"method":"put", + + "name": "Изменение инструмента на режимах", + + "confirmation": "securityId,market,lotSize,tradingCurrency,workflowStatus", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "listing","linkCode": "id","required": true + } + , + {"code": "securityId", + "type": 1,"name": "Наименование инструмента","shortname": "Инструмент","link": "security","linkCode": "shortName","required": true,"enabled": false + } + , + {"code": "market", + "type": 12,"name": "Наименование режима","shortname": "Режим","link": "market","linkCode": "code","required": true,"enabled": false + } + , + {"code": "lotSize", + "type": 11,"name": "Размер лота","shortname": "Лот","required": true + } + , + {"code": "tradingCurrency", + "type": 12,"name": "Наименование валюты расчета","shortname": "Валюта","link": "currencyCode","linkCode": "code","required": true + } + , + {"code": "workflowStatus", + "type": 12,"name": "Наименование статуса листинга в системе","shortname": "Статус","link": "workflowStatus","required": true + } + ] + } + , + {"method":"delete", + + "name": "Блокировка инструмента на режимах", + + "confirmation": "securityId,market", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "listing","linkCode": "id","required": true + } + ] + } + ] } , "market": { @@ -5235,7 +5310,7 @@ , "session": { - "name": "Клиринговая сессия", + "name": "Клиринговые сессии", "destination": "sessions", diff --git a/clearing-parent/backend-api/src/main/resources/meta/meta.xml b/clearing-parent/backend-api/src/main/resources/meta/meta.xml index 7735e5c00..d7d11b810 100644 --- a/clearing-parent/backend-api/src/main/resources/meta/meta.xml +++ b/clearing-parent/backend-api/src/main/resources/meta/meta.xml @@ -1,6 +1,6 @@ - + @@ -579,6 +579,7 @@ + @@ -588,22 +589,22 @@ - + - + - + @@ -615,7 +616,6 @@ - @@ -643,32 +643,32 @@ - + + - + - - + + - + - @@ -695,13 +695,14 @@ - + + - + @@ -711,16 +712,16 @@ - - + + - + @@ -730,7 +731,6 @@ - @@ -753,17 +753,37 @@ - + + - - - + + + + + + + + + + + + + + + + + + + + + + @@ -1218,7 +1238,7 @@ - + diff --git a/clearing-parent/backend-api/src/test/resources/meta.json b/clearing-parent/backend-api/src/test/resources/meta.json index 7b96718d8..84394d492 100644 --- a/clearing-parent/backend-api/src/test/resources/meta.json +++ b/clearing-parent/backend-api/src/test/resources/meta.json @@ -1,6 +1,6 @@ { - "version": "3.5.0.24", + "version": "3.5.0.25", "enums": { @@ -2502,6 +2502,10 @@ "confirmation": "securitySymbol,shortName,fullName,lotSize,nominalValue,nominalCurrency", "fields": [ + {"code": "instrumentType", + "type": 12,"name": "Наименование типа инструмента","shortname": "Тип инструмента","link": "instrumentType","required": true,"enabled": false + } + , {"code": "securitySymbol", "type": 2,"length": 255,"name": "Код инструмента","shortname": "Код","required": true } @@ -2539,7 +2543,7 @@ } , {"code": "termType", - "type": 12,"name": "Наименование вида инструмента","shortname": "Вид инструмента","link": "termType","visible": false + "type": 12,"name": "Наименование вида инструмента","shortname": "Вид инструмента","link": "termType" } , {"code": "description", @@ -2565,10 +2569,6 @@ {"code": "workflowStatus", "type": 12,"name": "Наименование статуса","shortname": "Статус","link": "workflowStatus" } - , - {"code": "instrumentType", - "type": 12,"name": "Наименование типа инструмента","shortname": "Тип инструмента","link": "instrumentType","required": true,"visible": false - } ] } , @@ -2582,6 +2582,10 @@ {"code": "id", "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "moneyMarketSecurity","linkCode": "id","required": true } + , + {"code": "instrumentType", + "type": 12,"name": "Наименование типа инструмента","shortname": "Тип инструмента","link": "instrumentType","required": true,"enabled": false + } , {"code": "securitySymbol", "type": 2,"length": 255,"name": "Код инструмента","shortname": "Код","enabled": false @@ -2600,7 +2604,7 @@ } , {"code": "lotSize", - "field": "securityId","type": 11,"name": "Размер лота","shortname": "Лот","linkKeyCode": "securityId","linkCode": "lotSize","link": "listing" + "field": "securityId","type": 11,"name": "Размер лота","shortname": "Лот","linkKeyCode": "securityId","linkCode": "lotSize","link": "listing","required": true } , {"code": "nominalValue", @@ -2646,10 +2650,6 @@ {"code": "workflowStatus", "type": 12,"name": "Наименование статуса","shortname": "Статус","link": "workflowStatus" } - , - {"code": "instrumentType", - "type": 12,"name": "Наименование типа инструмента","shortname": "Тип инструмента","link": "instrumentType","visible": false - } ] } , @@ -2768,9 +2768,13 @@ "name": "Добавление акции", - "confirmation": "securitySymbol,shortName,fullName,isin,shareType,lotSize", + "confirmation": "securitySymbol,shortName,fullName,isin,shareType", "fields": [ + {"code": "instrumentType", + "type": 12,"name": "Наименование типа инструмента","shortname": "Тип инструмента","link": "instrumentType","required": true,"enabled": false + } + , {"code": "securitySymbol", "type": 2,"length": 255,"name": "Код инструмента","shortname": "Код","required": true } @@ -2792,7 +2796,7 @@ } , {"code": "lotSize", - "type": 11,"name": "Размер лота","shortname": "Лот","required": true + "type": 11,"name": "Размер лота","shortname": "Лот","visible": false } , {"code": "issuerId", @@ -2810,10 +2814,6 @@ {"code": "workflowStatus", "type": 12,"name": "Наименование статуса","shortname": "Статус","link": "workflowStatus" } - , - {"code": "instrumentType", - "type": 12,"name": "Наименование типа инструмента","shortname": "Тип инструмента","link": "instrumentType","required": true,"visible": false - } ] } , @@ -2821,12 +2821,16 @@ "name": "Изменение акции", - "confirmation": "securitySymbol,shortName,fullName,isin,shareType,lotSize", + "confirmation": "securitySymbol,shortName,fullName,isin,shareType", "fields": [ {"code": "id", "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "equitySecurity","linkCode": "id","required": true } + , + {"code": "instrumentType", + "type": 12,"name": "Наименование типа инструмента","shortname": "Тип инструмента","link": "instrumentType","required": true,"enabled": false + } , {"code": "securitySymbol", "type": 2,"length": 255,"name": "Код инструмента","shortname": "Код","enabled": false @@ -2849,7 +2853,7 @@ } , {"code": "lotSize", - "field": "securityId","type": 11,"name": "Размер лота","shortname": "Лот","linkKeyCode": "securityId","linkCode": "lotSize","link": "listing" + "field": "securityId","type": 11,"name": "Размер лота","shortname": "Лот","linkKeyCode": "securityId","linkCode": "lotSize","link": "listing","visible": false } , {"code": "issuerId", @@ -2867,10 +2871,6 @@ {"code": "workflowStatus", "type": 12,"name": "Наименование статуса","shortname": "Статус","link": "workflowStatus" } - , - {"code": "instrumentType", - "type": 12,"name": "Наименование типа инструмента","shortname": "Тип инструмента","link": "instrumentType","visible": false - } ] } , @@ -2979,9 +2979,13 @@ "name": "Добавление облигации", - "confirmation": "securitySymbol,shortName,fullName,isin,bondType,lotSize,nominalValue,nominalCurrency", + "confirmation": "securitySymbol,shortName,fullName,isin,bondType,nominalValue,nominalCurrency", "fields": [ + {"code": "instrumentType", + "type": 12,"name": "Наименование типа инструмента","shortname": "Тип инструмента","link": "instrumentType","required": true,"enabled": false + } + , {"code": "securitySymbol", "type": 2,"length": 255,"name": "Код инструмента","shortname": "Код","required": true } @@ -3003,7 +3007,7 @@ } , {"code": "lotSize", - "type": 11,"name": "Размер лота","shortname": "Лот","required": true + "type": 11,"name": "Размер лота","shortname": "Лот","visible": false } , {"code": "nominalValue", @@ -3041,10 +3045,6 @@ {"code": "workflowStatus", "type": 12,"name": "Наименование статуса","shortname": "Статус","link": "workflowStatus" } - , - {"code": "instrumentType", - "type": 12,"name": "Наименование типа инструмента","shortname": "Тип инструмента","link": "instrumentType","required": true,"visible": false - } ] } , @@ -3052,12 +3052,16 @@ "name": "Изменение облигации", - "confirmation": "securitySymbol,shortName,fullName,isin,bondType,lotSize,nominalValue,nominalCurrency", + "confirmation": "securitySymbol,shortName,fullName,isin,bondType,nominalValue,nominalCurrency", "fields": [ {"code": "id", "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "fixedIncomeSecurity","linkCode": "id","required": true } + , + {"code": "instrumentType", + "type": 12,"name": "Наименование типа инструмента","shortname": "Тип инструмента","link": "instrumentType","required": true,"enabled": false + } , {"code": "securitySymbol", "type": 2,"length": 255,"name": "Код инструмента","shortname": "Код","enabled": false @@ -3080,7 +3084,7 @@ } , {"code": "lotSize", - "field": "securityId","type": 11,"name": "Размер лота","shortname": "Лот","linkKeyCode": "securityId","linkCode": "lotSize","link": "listing" + "field": "securityId","type": 11,"name": "Размер лота","shortname": "Лот","linkKeyCode": "securityId","linkCode": "lotSize","link": "listing","visible": false } , {"code": "nominalValue", @@ -3118,10 +3122,6 @@ {"code": "workflowStatus", "type": 12,"name": "Наименование статуса","shortname": "Статус","link": "workflowStatus" } - , - {"code": "instrumentType", - "type": 12,"name": "Наименование типа инструмента","shortname": "Тип инструмента","link": "instrumentType","visible": false - } ] } , @@ -3222,7 +3222,7 @@ , "listing": { - "name": "Листинг инструментов", + "name": "Инструменты на режимах", "destination": "listings", @@ -3236,21 +3236,21 @@ {"code": "securityId", "type": 1,"dbname": "Идентификатор инструмента","name": "Наименование инструмента","shortname": "Инструмент","searchable": true,"sortable": true,"link": "security","linkCode": "shortName" } + , + {"code": "market", + "type": 12,"dbname": "Код торговой секции","name": "Наименование режима","shortname": "Режим","searchable": true,"sortable": true,"link": "market","linkCode": "description" + } , {"code": "lotSize", "type": 11,"name": "Размер лота","shortname": "Лот","searchable": true,"sortable": true } - , - {"code": "market", - "type": 12,"dbname": "Код торговой секции","name": "Наименование торговой секции","shortname": "Секция","searchable": true,"sortable": true,"link": "market","linkCode": "name" - } , {"code": "symbolCode", - "type": 2,"length": 255,"name": "Код инструмента на торговой площадке","shortname": "Код инструмента на торговой площадке","searchable": true,"sortable": true + "type": 2,"length": 255,"name": "Код инструмента на торговой площадке","shortname": "Код инструмента на режиме","searchable": true,"sortable": true } , {"code": "symbolName", - "type": 2,"length": 255,"name": "Наименование инструмента на торговой площадке","shortname": "Инструмент на торговой площадке","searchable": true,"sortable": true + "type": 2,"length": 255,"name": "Наименование инструмента на торговой площадке","shortname": "Наименование инструмента на режиме","searchable": true,"sortable": true } , {"code": "tradingCurrency", @@ -3273,7 +3273,82 @@ "field": "updated","type": 4,"webtype": "5","dbname": "Дата-время изменения записи","name": "Время изменения записи","shortname": "Изменено","searchable": true,"sortable": true,"ignore": true } ] - + ,"actions":[ + {"method":"post", + + "name": "Добавление инструмента на режимах", + + "confirmation": "securityId,market,lotSize,tradingCurrency,workflowStatus", + + "fields": [ + {"code": "securityId", + "type": 1,"name": "Наименование инструмента","shortname": "Инструмент","link": "security","linkCode": "shortName","required": true + } + , + {"code": "market", + "type": 12,"name": "Наименование режима","shortname": "Режим","link": "market","required": true,"linkCode": "code" + } + , + {"code": "lotSize", + "type": 11,"name": "Размер лота","shortname": "Лот","required": true + } + , + {"code": "tradingCurrency", + "type": 12,"name": "Наименование валюты расчета","shortname": "Валюта","link": "currencyCode","linkCode": "code","required": true + } + , + {"code": "workflowStatus", + "type": 12,"name": "Наименование статуса листинга в системе","shortname": "Статус","link": "workflowStatus","required": true + } + ] + } + , + {"method":"put", + + "name": "Изменение инструмента на режимах", + + "confirmation": "securityId,market,lotSize,tradingCurrency,workflowStatus", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "listing","linkCode": "id","required": true + } + , + {"code": "securityId", + "type": 1,"name": "Наименование инструмента","shortname": "Инструмент","link": "security","linkCode": "shortName","required": true,"enabled": false + } + , + {"code": "market", + "type": 12,"name": "Наименование режима","shortname": "Режим","link": "market","linkCode": "code","required": true,"enabled": false + } + , + {"code": "lotSize", + "type": 11,"name": "Размер лота","shortname": "Лот","required": true + } + , + {"code": "tradingCurrency", + "type": 12,"name": "Наименование валюты расчета","shortname": "Валюта","link": "currencyCode","linkCode": "code","required": true + } + , + {"code": "workflowStatus", + "type": 12,"name": "Наименование статуса листинга в системе","shortname": "Статус","link": "workflowStatus","required": true + } + ] + } + , + {"method":"delete", + + "name": "Блокировка инструмента на режимах", + + "confirmation": "securityId,market", + + "fields": [ + {"code": "id", + "type": 1,"name": "Идентификатор записи","shortname": "ID","link": "listing","linkCode": "id","required": true + } + ] + } + ] } , "market": { @@ -5235,7 +5310,7 @@ , "session": { - "name": "Клиринговая сессия", + "name": "Клиринговые сессии", "destination": "sessions", diff --git a/platform-parent/platform-messaging/src/main/java/ru/spcex/clearing/platform/messaging/domain/Consts.java b/platform-parent/platform-messaging/src/main/java/ru/spcex/clearing/platform/messaging/domain/Consts.java index f19bf4da3..e0197d92c 100644 --- a/platform-parent/platform-messaging/src/main/java/ru/spcex/clearing/platform/messaging/domain/Consts.java +++ b/platform-parent/platform-messaging/src/main/java/ru/spcex/clearing/platform/messaging/domain/Consts.java @@ -16,6 +16,10 @@ public interface Consts { String DESTINATION_FIXED_INCOME_CASH_FLOW_NEW = "fixed-income-cash-flow-new"; String DESTINATION_FIXED_INCOME_CASH_FLOW_UPDATE = "fixed-income-cash-flow-update"; + String LISTING_NEW = "listing-new"; + String LISTING_UPDATE = "listing-update"; + String LISTING_DELETE = "listing-delete"; + String DESTINATION_CURRENCY_NEW = "currency-new"; String DESTINATION_CURRENCY_UPDATE = "currency-update"; String DESTINATION_COUPON_PERIOD_NEW = "coupon_period-new"; diff --git a/platform-parent/platform-messaging/src/main/java/ru/spcex/clearing/platform/messaging/domain/cud/securitites/ListingNewRequest.java b/platform-parent/platform-messaging/src/main/java/ru/spcex/clearing/platform/messaging/domain/cud/securitites/ListingNewRequest.java new file mode 100644 index 000000000..d5784e5c4 --- /dev/null +++ b/platform-parent/platform-messaging/src/main/java/ru/spcex/clearing/platform/messaging/domain/cud/securitites/ListingNewRequest.java @@ -0,0 +1,58 @@ +package ru.spcex.clearing.platform.messaging.domain.cud.securitites; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.math.BigDecimal; + +public class ListingNewRequest { + @JsonProperty + private Long securityId; + @JsonProperty + private String market; + @JsonProperty + private BigDecimal lotSize; + @JsonProperty + private String tradingCurrency; + @JsonProperty + private String workflowStatus; + + public Long getSecurityId() { + return securityId; + } + + public void setSecurityId(Long securityId) { + this.securityId = securityId; + } + + public String getMarket() { + return market; + } + + public void setMarket(String market) { + this.market = market; + } + + public BigDecimal getLotSize() { + return lotSize; + } + + public void setLotSize(BigDecimal lotSize) { + this.lotSize = lotSize; + } + + public String getTradingCurrency() { + return tradingCurrency; + } + + public void setTradingCurrency(String tradingCurrency) { + this.tradingCurrency = tradingCurrency; + } + + public String getWorkflowStatus() { + return workflowStatus; + } + + public void setWorkflowStatus(String workflowStatus) { + this.workflowStatus = workflowStatus; + } +} diff --git a/platform-parent/platform-messaging/src/main/java/ru/spcex/clearing/platform/messaging/domain/cud/securitites/ListingUpdateRequest.java b/platform-parent/platform-messaging/src/main/java/ru/spcex/clearing/platform/messaging/domain/cud/securitites/ListingUpdateRequest.java new file mode 100644 index 000000000..fc414f37b --- /dev/null +++ b/platform-parent/platform-messaging/src/main/java/ru/spcex/clearing/platform/messaging/domain/cud/securitites/ListingUpdateRequest.java @@ -0,0 +1,68 @@ +package ru.spcex.clearing.platform.messaging.domain.cud.securitites; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.math.BigDecimal; + +public class ListingUpdateRequest { + @JsonProperty + private Long id; + @JsonProperty + private Long securityId; + @JsonProperty + private String market; + @JsonProperty + private BigDecimal lotSize; + @JsonProperty + private String tradingCurrency; + @JsonProperty + private String workflowStatus; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getSecurityId() { + return securityId; + } + + public void setSecurityId(Long securityId) { + this.securityId = securityId; + } + + public String getMarket() { + return market; + } + + public void setMarket(String market) { + this.market = market; + } + + public BigDecimal getLotSize() { + return lotSize; + } + + public void setLotSize(BigDecimal lotSize) { + this.lotSize = lotSize; + } + + public String getTradingCurrency() { + return tradingCurrency; + } + + public void setTradingCurrency(String tradingCurrency) { + this.tradingCurrency = tradingCurrency; + } + + public String getWorkflowStatus() { + return workflowStatus; + } + + public void setWorkflowStatus(String workflowStatus) { + this.workflowStatus = workflowStatus; + } +}