etreschenkov 2025-09-25 13:01:24 +03:00
parent 492943e4d5
commit 306d20ce0d
3 changed files with 25 additions and 5 deletions

View file

@ -107,6 +107,7 @@ public class CompanyInfoService extends QueueConsumer implements InitializingBea
companyInfo.setLegalKind(req.getLegalKind());
companyInfo.setOrganizationType(req.getOrganizationType());
companyInfo.setResidence(req.getResidence());
companyInfo.setResidenceCode(req.getResidenceCode());
companyInfo.setCorporationSoleType(req.getCorporationSoleType());
companyInfo.setDescription(req.getDescription());

View file

@ -57,6 +57,13 @@ public class CompanyInfo implements WithCompanyId {
)
private String residence;
@JsonProperty("Признак резидентства: RES; NORES; MO")
@ApiModelProperty(
value = "Признак резидентства",
example = "RES"
)
private String residenceType;
@Override
public UUID getCompanyId() {
return companyId;
@ -105,4 +112,12 @@ public class CompanyInfo implements WithCompanyId {
public void setProfessionalSign(String professionalSign) {
this.professionalSign = professionalSign;
}
public String getResidenceType() {
return residenceType;
}
public void setResidenceType(String residenceType) {
this.residenceType = residenceType;
}
}

View file

@ -50,15 +50,19 @@ public class CompanyRequestAdapter {
companyInfoUpdateRequest.setLegalKind(companyInfo.getLegalKind());
companyInfoUpdateRequest.setOrganizationType(companyInfo.getOrganizationType());
String residence;
if (counterCodeId == 643L) {
residence = "RUS";
} else if (counterCodeId == 998L) {
residence = "WRLD";
if (companyInfo.getResidenceType() != null) {
switch (companyInfo.getResidenceType()) {
case "NORES" -> residence = "XTRN";
case "MO" -> residence = "WRLD";
default -> residence = "RUS";
}
} else {
residence = "XTRN";
residence = "RUS";
}
companyInfoUpdateRequest.setResidence(residence);
companyInfoUpdateRequest.setResidenceCode(companyInfo.getResidence());
return companyInfoUpdateRequest;
}