This commit is contained in:
parent
492943e4d5
commit
306d20ce0d
3 changed files with 25 additions and 5 deletions
|
|
@ -107,6 +107,7 @@ public class CompanyInfoService extends QueueConsumer implements InitializingBea
|
||||||
companyInfo.setLegalKind(req.getLegalKind());
|
companyInfo.setLegalKind(req.getLegalKind());
|
||||||
companyInfo.setOrganizationType(req.getOrganizationType());
|
companyInfo.setOrganizationType(req.getOrganizationType());
|
||||||
companyInfo.setResidence(req.getResidence());
|
companyInfo.setResidence(req.getResidence());
|
||||||
|
companyInfo.setResidenceCode(req.getResidenceCode());
|
||||||
|
|
||||||
companyInfo.setCorporationSoleType(req.getCorporationSoleType());
|
companyInfo.setCorporationSoleType(req.getCorporationSoleType());
|
||||||
companyInfo.setDescription(req.getDescription());
|
companyInfo.setDescription(req.getDescription());
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,13 @@ public class CompanyInfo implements WithCompanyId {
|
||||||
)
|
)
|
||||||
private String residence;
|
private String residence;
|
||||||
|
|
||||||
|
@JsonProperty("Признак резидентства: RES; NORES; MO")
|
||||||
|
@ApiModelProperty(
|
||||||
|
value = "Признак резидентства",
|
||||||
|
example = "RES"
|
||||||
|
)
|
||||||
|
private String residenceType;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public UUID getCompanyId() {
|
public UUID getCompanyId() {
|
||||||
return companyId;
|
return companyId;
|
||||||
|
|
@ -105,4 +112,12 @@ public class CompanyInfo implements WithCompanyId {
|
||||||
public void setProfessionalSign(String professionalSign) {
|
public void setProfessionalSign(String professionalSign) {
|
||||||
this.professionalSign = professionalSign;
|
this.professionalSign = professionalSign;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getResidenceType() {
|
||||||
|
return residenceType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResidenceType(String residenceType) {
|
||||||
|
this.residenceType = residenceType;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,15 +50,19 @@ public class CompanyRequestAdapter {
|
||||||
companyInfoUpdateRequest.setLegalKind(companyInfo.getLegalKind());
|
companyInfoUpdateRequest.setLegalKind(companyInfo.getLegalKind());
|
||||||
companyInfoUpdateRequest.setOrganizationType(companyInfo.getOrganizationType());
|
companyInfoUpdateRequest.setOrganizationType(companyInfo.getOrganizationType());
|
||||||
|
|
||||||
|
|
||||||
String residence;
|
String residence;
|
||||||
if (counterCodeId == 643L) {
|
if (companyInfo.getResidenceType() != null) {
|
||||||
residence = "RUS";
|
switch (companyInfo.getResidenceType()) {
|
||||||
} else if (counterCodeId == 998L) {
|
case "NORES" -> residence = "XTRN";
|
||||||
residence = "WRLD";
|
case "MO" -> residence = "WRLD";
|
||||||
|
default -> residence = "RUS";
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
residence = "XTRN";
|
residence = "RUS";
|
||||||
}
|
}
|
||||||
companyInfoUpdateRequest.setResidence(residence);
|
companyInfoUpdateRequest.setResidence(residence);
|
||||||
|
companyInfoUpdateRequest.setResidenceCode(companyInfo.getResidence());
|
||||||
return companyInfoUpdateRequest;
|
return companyInfoUpdateRequest;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue