Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
b0b4f294ec
7 changed files with 151 additions and 6 deletions
|
|
@ -1,10 +1,15 @@
|
||||||
package ru.spcex.clearing.backendapi.controller.request.cud.company;
|
package ru.spcex.clearing.backendapi.controller.request.cud.company;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import java.time.LocalDate;
|
||||||
import ru.spcex.clearing.backendapi.domain.actions.IAction;
|
import ru.spcex.clearing.backendapi.domain.actions.IAction;
|
||||||
import ru.spcex.clearing.platform.messaging.domain.ActionType;
|
import ru.spcex.clearing.platform.messaging.domain.ActionType;
|
||||||
import ru.spcex.clearing.platform.messaging.domain.cud.company.CompanyInfoUpdateRequest;
|
import ru.spcex.clearing.platform.messaging.domain.cud.company.CompanyInfoUpdateRequest;
|
||||||
|
import ru.spcex.clearing.platform.messaging.domain.json.deserialize.LocalDateDeserializer;
|
||||||
|
import ru.spcex.clearing.platform.messaging.domain.json.serialize.LocalDateSerializer;
|
||||||
|
|
||||||
public class CompanyInfoUpdateAction implements IAction<CompanyInfoUpdateRequest> {
|
public class CompanyInfoUpdateAction implements IAction<CompanyInfoUpdateRequest> {
|
||||||
@ApiModelProperty(hidden = true)
|
@ApiModelProperty(hidden = true)
|
||||||
|
|
@ -47,6 +52,14 @@ public class CompanyInfoUpdateAction implements IAction<CompanyInfoUpdateRequest
|
||||||
@ApiModelProperty(value = "Наименование статуса", example = "ACTV")
|
@ApiModelProperty(value = "Наименование статуса", example = "ACTV")
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private String workflowStatus;
|
private String workflowStatus;
|
||||||
|
@ApiModelProperty(value = "Налоговый номер", example = "ACTV")
|
||||||
|
@JsonProperty
|
||||||
|
private String taxNumber;
|
||||||
|
@ApiModelProperty(value = "Дата гос. регистрации", example = "2022-12-25")
|
||||||
|
@JsonSerialize(using = LocalDateSerializer.class)
|
||||||
|
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||||
|
@JsonProperty
|
||||||
|
private LocalDate registrationDate;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CompanyInfoUpdateRequest toRequest() {
|
public CompanyInfoUpdateRequest toRequest() {
|
||||||
|
|
@ -63,7 +76,9 @@ public class CompanyInfoUpdateAction implements IAction<CompanyInfoUpdateRequest
|
||||||
request.setFullNameEng(this.fullNameEng);
|
request.setFullNameEng(this.fullNameEng);
|
||||||
request.setShortName(this.shortName);
|
request.setShortName(this.shortName);
|
||||||
request.setFullName(this.fullName);
|
request.setFullName(this.fullName);
|
||||||
request.setWorkflowStatus(workflowStatus);
|
request.setWorkflowStatus(this.workflowStatus);
|
||||||
|
request.setTaxNumber(this.taxNumber);
|
||||||
|
request.setRegistrationDate(this.registrationDate);
|
||||||
return request;
|
return request;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -176,4 +191,20 @@ public class CompanyInfoUpdateAction implements IAction<CompanyInfoUpdateRequest
|
||||||
public void setWorkflowStatus(String workflowStatus) {
|
public void setWorkflowStatus(String workflowStatus) {
|
||||||
this.workflowStatus = workflowStatus;
|
this.workflowStatus = workflowStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getTaxNumber() {
|
||||||
|
return taxNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTaxNumber(String taxNumber) {
|
||||||
|
this.taxNumber = taxNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getRegistrationDate() {
|
||||||
|
return registrationDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRegistrationDate(LocalDate registrationDate) {
|
||||||
|
this.registrationDate = registrationDate;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,14 @@
|
||||||
package ru.spcex.clearing.backendapi.controller.response.entity.company;
|
package ru.spcex.clearing.backendapi.controller.response.entity.company;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import java.time.LocalDate;
|
||||||
import ru.clearing.classes.statics.data.company.Company;
|
import ru.clearing.classes.statics.data.company.Company;
|
||||||
import ru.clearing.classes.statics.data.profile.CompanyInfo;
|
import ru.clearing.classes.statics.data.profile.CompanyInfo;
|
||||||
|
import ru.spcex.clearing.platform.messaging.domain.json.deserialize.LocalDateDeserializer;
|
||||||
|
import ru.spcex.clearing.platform.messaging.domain.json.serialize.LocalDateSerializer;
|
||||||
|
|
||||||
public class CompanyInfoBackendGetFields {
|
public class CompanyInfoBackendGetFields {
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
|
|
@ -57,6 +62,14 @@ public class CompanyInfoBackendGetFields {
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@ApiModelProperty(value = "Наименование статуса")
|
@ApiModelProperty(value = "Наименование статуса")
|
||||||
private String workflowStatus;
|
private String workflowStatus;
|
||||||
|
@JsonProperty
|
||||||
|
@ApiModelProperty(value = "Номер")
|
||||||
|
private String taxNumber;
|
||||||
|
@JsonSerialize(using = LocalDateSerializer.class)
|
||||||
|
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||||
|
@JsonProperty
|
||||||
|
@ApiModelProperty(value = "Дата регистрации")
|
||||||
|
private LocalDate registrationDate;
|
||||||
|
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
|
|
@ -194,6 +207,22 @@ public class CompanyInfoBackendGetFields {
|
||||||
this.workflowStatus = workflowStatus;
|
this.workflowStatus = workflowStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getTaxNumber() {
|
||||||
|
return taxNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTaxNumber(String taxNumber) {
|
||||||
|
this.taxNumber = taxNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getRegistrationDate() {
|
||||||
|
return registrationDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRegistrationDate(LocalDate registrationDate) {
|
||||||
|
this.registrationDate = registrationDate;
|
||||||
|
}
|
||||||
|
|
||||||
public static CompanyInfoBackendGetFields fromEntity(Company company) {
|
public static CompanyInfoBackendGetFields fromEntity(Company company) {
|
||||||
if (company == null || company.getProfile() == null) {
|
if (company == null || company.getProfile() == null) {
|
||||||
return null;
|
return null;
|
||||||
|
|
@ -211,6 +240,8 @@ public class CompanyInfoBackendGetFields {
|
||||||
fields.setResidence(info.getResidence());
|
fields.setResidence(info.getResidence());
|
||||||
fields.setShortNameEng(info.getShortNameEng());
|
fields.setShortNameEng(info.getShortNameEng());
|
||||||
fields.setFullNameEng(info.getFullNameEng());
|
fields.setFullNameEng(info.getFullNameEng());
|
||||||
|
fields.setTaxNumber(info.getTaxNumber());
|
||||||
|
fields.setRegistrationDate(info.getRegistrationDate());
|
||||||
|
|
||||||
fields.setShortName(company.getShortName());
|
fields.setShortName(company.getShortName());
|
||||||
fields.setFullName(company.getFullName());
|
fields.setFullName(company.getFullName());
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
"version": "3.19.250.137",
|
"version": "3.20.260.139",
|
||||||
|
|
||||||
"enums": {
|
"enums": {
|
||||||
|
|
||||||
|
|
@ -1544,6 +1544,29 @@
|
||||||
|
|
||||||
"table": "unit_measurement_dictionary",
|
"table": "unit_measurement_dictionary",
|
||||||
|
|
||||||
|
"fields": [
|
||||||
|
{"code": "id",
|
||||||
|
"name": "Идентификатор записи","shortname": "ID","type": 1
|
||||||
|
}
|
||||||
|
,
|
||||||
|
{"code": "code",
|
||||||
|
"name": "Код","shortname": "Код","type": 12
|
||||||
|
}
|
||||||
|
,
|
||||||
|
{"code": "name",
|
||||||
|
"name": "Наименование","shortname": "Наименование","type": 2,"length": 255
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
,
|
||||||
|
"residenceDictionary": {
|
||||||
|
|
||||||
|
"name": "Справочник резидентства",
|
||||||
|
|
||||||
|
"class": "ru.clearing.platform.dictionary.ResidenceDictionary",
|
||||||
|
|
||||||
|
"table": "residence_dictionary",
|
||||||
|
|
||||||
"fields": [
|
"fields": [
|
||||||
{"code": "id",
|
{"code": "id",
|
||||||
"name": "Идентификатор записи","shortname": "ID","type": 1
|
"name": "Идентификатор записи","shortname": "ID","type": 1
|
||||||
|
|
@ -1981,6 +2004,14 @@
|
||||||
{"code": "workflowStatus",
|
{"code": "workflowStatus",
|
||||||
"type": 12,"name": "Наименование статуса","shortname": "Статус","searchable": true,"sortable": true,"link": "workflowStatus","extends": "company"
|
"type": 12,"name": "Наименование статуса","shortname": "Статус","searchable": true,"sortable": true,"link": "workflowStatus","extends": "company"
|
||||||
}
|
}
|
||||||
|
,
|
||||||
|
{"code": "taxNumber",
|
||||||
|
"type": 2,"length": 255,"name": "Налоговый номер в стране регистрации","shortname": "Налоговый номер","searchable": true,"sortable": true,"visible": true
|
||||||
|
}
|
||||||
|
,
|
||||||
|
{"code": "registrationDate",
|
||||||
|
"type": 6,"name": "Дата государственной регистрации","shortname": "Дата гос. регистрации","searchable": true,"sortable": true,"visible": true
|
||||||
|
}
|
||||||
,
|
,
|
||||||
{"code": "id",
|
{"code": "id",
|
||||||
"type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true
|
"type": 1,"name": "Идентификатор записи","shortname": "ID","searchable": true,"sortable": true
|
||||||
|
|
@ -2043,6 +2074,14 @@
|
||||||
{"code": "workflowStatus",
|
{"code": "workflowStatus",
|
||||||
"type": 12,"name": "Наименование статуса","shortname": "Статус","link": "workflowStatus"
|
"type": 12,"name": "Наименование статуса","shortname": "Статус","link": "workflowStatus"
|
||||||
}
|
}
|
||||||
|
,
|
||||||
|
{"code": "taxNumber",
|
||||||
|
"type": 2,"length": 255,"name": "Налоговый номер в стране регистрации","shortname": "Налоговый номер"
|
||||||
|
}
|
||||||
|
,
|
||||||
|
{"code": "registrationDate",
|
||||||
|
"type": 6,"name": "Дата государственной регистрации","shortname": "Дата гос. регистрации"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!--?xml-stylesheet type="text/xsl" href="\..\corp-reports\src\data\meta\meta.server.xslt"?-->
|
<!--?xml-stylesheet type="text/xsl" href="\..\corp-reports\src\data\meta\meta.server.xslt"?-->
|
||||||
<meta version="3.20.260.138">
|
<meta version="3.20.260.139">
|
||||||
<!-- _xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" _xsi:noNamespaceSchemaLocation="file:///E:/d/projects/meta/from/meta.xsd" -->
|
<!-- _xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" _xsi:noNamespaceSchemaLocation="file:///E:/d/projects/meta/from/meta.xsd" -->
|
||||||
<!--Здесь словари-->
|
<!--Здесь словари-->
|
||||||
<enums>
|
<enums>
|
||||||
|
|
@ -344,6 +344,11 @@
|
||||||
<code name="Код" shortname="Код" type="12"/>
|
<code name="Код" shortname="Код" type="12"/>
|
||||||
<name name="Наименование" shortname="Наименование" type="2" length="255"/>
|
<name name="Наименование" shortname="Наименование" type="2" length="255"/>
|
||||||
</unitMeasurement>
|
</unitMeasurement>
|
||||||
|
<residenceDictionary name="Справочник резидентства" class="ru.clearing.platform.dictionary.ResidenceDictionary" table="residence_dictionary">
|
||||||
|
<id name="Идентификатор записи" shortname="ID" type="1"/>
|
||||||
|
<code name="Код" shortname="Код" type="12"/>
|
||||||
|
<name name="Наименование" shortname="Наименование" type="2" length="255"/>
|
||||||
|
</residenceDictionary>
|
||||||
</enums>
|
</enums>
|
||||||
<objects>
|
<objects>
|
||||||
<dbVersion name="Версия базы данных" destination="db-versions" class="ru.clearing.classes.statics.data.misc.DbVersion" table="db_version">
|
<dbVersion name="Версия базы данных" destination="db-versions" class="ru.clearing.classes.statics.data.misc.DbVersion" table="db_version">
|
||||||
|
|
@ -444,6 +449,8 @@
|
||||||
<clearingCode type="2" length="255" name="Код участника клиринга" shortname="Клиринговый код" searchable="true" sortable="true" visible="true" extends="company"/>
|
<clearingCode type="2" length="255" name="Код участника клиринга" shortname="Клиринговый код" searchable="true" sortable="true" visible="true" extends="company"/>
|
||||||
<registrationCode type="2" length="255" name="Регистрационный код участника" shortname="Регистрационный код" searchable="true" sortable="true" visible="true" extends="company"/>
|
<registrationCode type="2" length="255" name="Регистрационный код участника" shortname="Регистрационный код" searchable="true" sortable="true" visible="true" extends="company"/>
|
||||||
<workflowStatus type="12" name="Наименование статуса" shortname="Статус" searchable="true" sortable="true" link="workflowStatus" extends="company"/>
|
<workflowStatus type="12" name="Наименование статуса" shortname="Статус" searchable="true" sortable="true" link="workflowStatus" extends="company"/>
|
||||||
|
<taxNumber type="2" length="255" name="Налоговый номер в стране регистрации" shortname="Налоговый номер" searchable="true" sortable="true" visible="true"/>
|
||||||
|
<registrationDate type="6" name="Дата государственной регистрации" shortname="Дата гос. регистрации" searchable="true" sortable="true" visible="true"/>
|
||||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||||
<actions>
|
<actions>
|
||||||
<put name="Изменение профиля компании">
|
<put name="Изменение профиля компании">
|
||||||
|
|
@ -460,6 +467,8 @@
|
||||||
<professionalSign type="12" name="Признак профессионального участника" shortname="Проф. участника" link="allowed"/>
|
<professionalSign type="12" name="Признак профессионального участника" shortname="Проф. участника" link="allowed"/>
|
||||||
<description type="2" length="255" name="Описание компании" shortname="Описание компании" visible="false"/>
|
<description type="2" length="255" name="Описание компании" shortname="Описание компании" visible="false"/>
|
||||||
<workflowStatus type="12" name="Наименование статуса" shortname="Статус" link="workflowStatus"/>
|
<workflowStatus type="12" name="Наименование статуса" shortname="Статус" link="workflowStatus"/>
|
||||||
|
<taxNumber type="2" length="255" name="Налоговый номер в стране регистрации" shortname="Налоговый номер"/>
|
||||||
|
<registrationDate type="6" name="Дата государственной регистрации" shortname="Дата гос. регистрации"/>
|
||||||
</put>
|
</put>
|
||||||
</actions>
|
</actions>
|
||||||
</companyInfo>
|
</companyInfo>
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,8 @@ public class CompanyInfoService extends QueueConsumer implements InitializingBea
|
||||||
companyInfo.setDescription(req.getDescription());
|
companyInfo.setDescription(req.getDescription());
|
||||||
companyInfo.setShortNameEng(req.getShortNameEng());
|
companyInfo.setShortNameEng(req.getShortNameEng());
|
||||||
companyInfo.setFullNameEng(req.getFullNameEng());
|
companyInfo.setFullNameEng(req.getFullNameEng());
|
||||||
|
companyInfo.setTaxNumber(req.getTaxNumber());
|
||||||
|
companyInfo.setRegistrationDate(req.getRegistrationDate());
|
||||||
|
|
||||||
boolean simpleUpdate = true;
|
boolean simpleUpdate = true;
|
||||||
if (req.getWorkflowStatus() != null) {
|
if (req.getWorkflowStatus() != null) {
|
||||||
|
|
|
||||||
|
|
@ -185,19 +185,25 @@ public class TradeImporterService {
|
||||||
* returns OK - everything is kk
|
* returns OK - everything is kk
|
||||||
*/
|
*/
|
||||||
private boolean fillNessessaryFields(STrades tradesDb) {
|
private boolean fillNessessaryFields(STrades tradesDb) {
|
||||||
Consumer<String> logErr = (st) -> log.error("strades {} {} {}", tradesDb.getTradeDate(), tradesDb.getTradeNum(), st);
|
Consumer<String> log = (st) -> {
|
||||||
|
if (tradesDb.getClassCode().contains("INSTR"))
|
||||||
|
this.log.warn("strades {} {} {}", tradesDb.getTradeDate(), tradesDb.getTradeNum(), st);
|
||||||
|
else {
|
||||||
|
this.log.error("strades {} {} {}", tradesDb.getTradeDate(), tradesDb.getTradeNum(), st);
|
||||||
|
}
|
||||||
|
};
|
||||||
try {
|
try {
|
||||||
Market market = marketImdg.getFirstObjectBySQL("code = '%s'".formatted(tradesDb.getClassCode()));
|
Market market = marketImdg.getFirstObjectBySQL("code = '%s'".formatted(tradesDb.getClassCode()));
|
||||||
if (market == null) {
|
if (market == null) {
|
||||||
if (blacklistMarketImdg.getFirstObjectByFieldValues(Map.of("code", tradesDb.getClassCode())) == null) {
|
if (blacklistMarketImdg.getFirstObjectByFieldValues(Map.of("code", tradesDb.getClassCode())) == null) {
|
||||||
logErr.accept("couldn't find market.section for classCode " + tradesDb.getClassCode());
|
log.accept("couldn't find market.section for classCode " + tradesDb.getClassCode());
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
tradesDb.setSection(market.getSection());
|
tradesDb.setSection(market.getSection());
|
||||||
return true;
|
return true;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logErr.accept(ExceptionUtils.getStackTrace(e));
|
log.accept(ExceptionUtils.getStackTrace(e));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,11 @@
|
||||||
package ru.spcex.clearing.platform.messaging.domain.cud.company;
|
package ru.spcex.clearing.platform.messaging.domain.cud.company;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import ru.spcex.clearing.platform.messaging.domain.json.deserialize.LocalDateDeserializer;
|
||||||
|
import ru.spcex.clearing.platform.messaging.domain.json.serialize.LocalDateSerializer;
|
||||||
|
|
||||||
public class CompanyInfoUpdateRequest {
|
public class CompanyInfoUpdateRequest {
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
|
|
@ -30,6 +35,12 @@ public class CompanyInfoUpdateRequest {
|
||||||
private String fullName;
|
private String fullName;
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private String workflowStatus;
|
private String workflowStatus;
|
||||||
|
@JsonProperty
|
||||||
|
private String taxNumber;
|
||||||
|
@JsonSerialize(using = LocalDateSerializer.class)
|
||||||
|
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||||
|
@JsonProperty
|
||||||
|
private LocalDate registrationDate;
|
||||||
|
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
|
|
@ -134,4 +145,20 @@ public class CompanyInfoUpdateRequest {
|
||||||
public void setWorkflowStatus(String workflowStatus) {
|
public void setWorkflowStatus(String workflowStatus) {
|
||||||
this.workflowStatus = workflowStatus;
|
this.workflowStatus = workflowStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getTaxNumber() {
|
||||||
|
return taxNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTaxNumber(String taxNumber) {
|
||||||
|
this.taxNumber = taxNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getRegistrationDate() {
|
||||||
|
return registrationDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRegistrationDate(LocalDate registrationDate) {
|
||||||
|
this.registrationDate = registrationDate;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue