This commit is contained in:
ialbert 2022-10-10 14:48:30 +03:00
parent 25cbd0e47e
commit 5beea2d551

View file

@ -53,23 +53,25 @@ public class CompanyBackendGetAll extends BasicSpcexResponse {
singleItem.setUpdated(company.getUpdated()); singleItem.setUpdated(company.getUpdated());
CompanyBackendGetFields.CompanyInfoFields companyInfoFields = new CompanyBackendGetFields.CompanyInfoFields(); CompanyBackendGetFields.CompanyInfoFields companyInfoFields = new CompanyBackendGetFields.CompanyInfoFields();
CompanyInfo profile = company.getProfile(); CompanyInfo profile = company.getProfile();
companyInfoFields.setId(profile.getId()); if (profile != null) {
companyInfoFields.setCompanyId(profile.getCompanyId()); companyInfoFields.setId(profile.getId());
companyInfoFields.setCorporationSoleType(profile.getCorporationSoleType()); companyInfoFields.setCompanyId(profile.getCompanyId());
companyInfoFields.setCountryCode(profile.getCountryCode()); companyInfoFields.setCorporationSoleType(profile.getCorporationSoleType());
companyInfoFields.setDescription(profile.getDescription()); companyInfoFields.setCountryCode(profile.getCountryCode());
companyInfoFields.setProfessionalSign(profile.getProfessionalSign()); companyInfoFields.setDescription(profile.getDescription());
companyInfoFields.setLegalKind(profile.getLegalKind()); companyInfoFields.setProfessionalSign(profile.getProfessionalSign());
companyInfoFields.setOrganizationType(profile.getOrganizationType()); companyInfoFields.setLegalKind(profile.getLegalKind());
companyInfoFields.setResidence(profile.getResidence()); companyInfoFields.setOrganizationType(profile.getOrganizationType());
companyInfoFields.setShortName(profile.getShortName()); companyInfoFields.setResidence(profile.getResidence());
companyInfoFields.setFullName(profile.getFullName()); companyInfoFields.setShortName(profile.getShortName());
companyInfoFields.setShortNameEng(profile.getShortNameEng()); companyInfoFields.setFullName(profile.getFullName());
companyInfoFields.setFullNameEng(profile.getFullNameEng()); companyInfoFields.setShortNameEng(profile.getShortNameEng());
companyInfoFields.setTradingCode(profile.getTradingCode()); companyInfoFields.setFullNameEng(profile.getFullNameEng());
companyInfoFields.setClearingCode(profile.getClearingCode()); companyInfoFields.setTradingCode(profile.getTradingCode());
companyInfoFields.setRegistrationCode(profile.getRegistrationCode()); companyInfoFields.setClearingCode(profile.getClearingCode());
singleItem.setProfile(companyInfoFields); companyInfoFields.setRegistrationCode(profile.getRegistrationCode());
singleItem.setProfile(companyInfoFields);
}
payload.getItems().add(singleItem); payload.getItems().add(singleItem);
} }
} }