Updated code

This commit is contained in:
rajesh
2025-01-15 15:11:29 +05:30
parent 60af83221e
commit f14cf4a380

View File

@@ -143,17 +143,20 @@ public class CompanyDao {
entity.setNumberOfEmployees(request.getNumberOfEmployees()); entity.setNumberOfEmployees(request.getNumberOfEmployees());
entity.setAnnualRevenue(request.getAnnualRevenue()); entity.setAnnualRevenue(request.getAnnualRevenue());
entity.setHub(userEntity.getHub()); entity.setHub(userEntity.getHub());
Map<String, Object> vatCheckResponse = request.getVatCheckResponse();
if (request.getVatCheckResponse() != null) { if (request.getVatCheckResponse() != null) {
if (vatCheckResponse.containsKey("dettaglio")) { Map<String, Object> vatCheckResponse = request.getVatCheckResponse();
Map<String, Object> dettaglio = (Map<String, Object>) vatCheckResponse.get("dettaglio"); Map<String, Object> data = (Map<String, Object>) vatCheckResponse.get("data");
if (dettaglio != null) { if (data != null) {
if (dettaglio.containsKey("codice_ateco")) { if (data.containsKey("dettaglio")) {
Object codiceAtecoObj = dettaglio.get("codice_ateco"); Map<String, Object> dettaglio = (Map<String, Object>) data.get("dettaglio");
String codiceAteco = (codiceAtecoObj != null) ? codiceAtecoObj.toString() : null; if (dettaglio != null) {
if (dettaglio.containsKey("codice_ateco")) {
Object codiceAtecoObj = dettaglio.get("codice_ateco");
String codiceAteco = (codiceAtecoObj != null) ? codiceAtecoObj.toString() : null;
if (codiceAteco != null) { if (codiceAteco != null) {
entity.setCodiceAteco(codiceAteco); entity.setCodiceAteco(codiceAteco);
}
} }
} }
} }