Merge pull request #159 from Kitzanos/feature/GEPAFINBE-140
GEPAFINBE-140 (Added codice_ateco field to company data)
This commit is contained in:
@@ -124,7 +124,6 @@ public class CompanyDao {
|
||||
userWithCompanyEntity.setContactEmail(companyRequest.getContactEmail());
|
||||
userWithCompanyEntity.setJson(Utils.convertMapIntoJsonString(companyRequest.getVatCheckResponse()) );
|
||||
UserWithCompanyEntity userWithCompany = userWithCompanyRepository.save(userWithCompanyEntity);
|
||||
|
||||
/** This code is responsible for adding a version history log for the "adding user with company" operation. **/
|
||||
loggingUtil.addVersionHistory(VersionHistoryRequest.builder().request(request).actionType(VersionActionTypeEnum.INSERT).oldData(null).newData(userWithCompany).build());
|
||||
return userWithCompany;
|
||||
@@ -144,6 +143,22 @@ public class CompanyDao {
|
||||
entity.setNumberOfEmployees(request.getNumberOfEmployees());
|
||||
entity.setAnnualRevenue(request.getAnnualRevenue());
|
||||
entity.setHub(userEntity.getHub());
|
||||
Map<String, Object> vatCheckResponse = request.getVatCheckResponse();
|
||||
if (request.getVatCheckResponse() != null) {
|
||||
if (vatCheckResponse.containsKey("dettaglio")) {
|
||||
Map<String, Object> dettaglio = (Map<String, Object>) vatCheckResponse.get("dettaglio");
|
||||
if (dettaglio != null) {
|
||||
if (dettaglio.containsKey("codice_ateco")) {
|
||||
Object codiceAtecoObj = dettaglio.get("codice_ateco");
|
||||
String codiceAteco = (codiceAtecoObj != null) ? codiceAtecoObj.toString() : null;
|
||||
|
||||
if (codiceAteco != null) {
|
||||
entity.setCodiceAteco(codiceAteco);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
|
||||
@@ -165,6 +180,7 @@ public class CompanyDao {
|
||||
response.setAnnualRevenue(entity.getAnnualRevenue());
|
||||
if(userWithCompanyEntity!=null) {
|
||||
response.setIsLegalRepresentant(userWithCompanyEntity.getIsLegalRepresentant());
|
||||
response.setCodiceAteco(entity.getCodiceAteco());
|
||||
}
|
||||
response.setCreatedDate(entity.getCreatedDate());
|
||||
response.setUpdatedDate(entity.getUpdatedDate());
|
||||
|
||||
@@ -56,4 +56,7 @@ public class CompanyEntity extends BaseEntity{
|
||||
|
||||
@Column(name = "NDG")
|
||||
private String ndg;
|
||||
|
||||
@Column(name = "CODICE_ATECO")
|
||||
private String codiceAteco;
|
||||
}
|
||||
|
||||
@@ -24,4 +24,5 @@ public class CompanyResponse extends BaseBean{
|
||||
private Boolean isLegalRepresentant;
|
||||
private String contactName;
|
||||
private String contactEmail;
|
||||
private String codiceAteco;
|
||||
}
|
||||
|
||||
@@ -2188,6 +2188,12 @@
|
||||
<sqlFile dbms="postgresql"
|
||||
path="db/dump/insert_expiration_scheduler_data_07_01_2025.sql"/>
|
||||
</changeSet>
|
||||
<changeSet id="13-01-2025_RK_191315" author="Rajesh Khore">
|
||||
<addColumn tableName="company">
|
||||
<column name="CODICE_ATECO" type="VARCHAR(286)">
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="08-01-2025_NK_075410" author="Nisha kashyap">
|
||||
<addColumn tableName="application">
|
||||
|
||||
Reference in New Issue
Block a user