Skip to content

Commit

Permalink
Merge pull request #2 from maltaesousa/productid
Browse files Browse the repository at this point in the history
Merging as this was tested against existing orders from order fetch to FME export
  • Loading branch information
maltaesousa authored Feb 19, 2021
2 parents b976b29 + a00d74c commit f8e36e1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion connectors/extract-connector-geoshop/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.easysdi</groupId>
<artifactId>extract-connector-geoshop</artifactId>
<version>1.2.1</version>
<version>1.2.2</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1305,19 +1305,25 @@ private ConnectorImportResult addImportedProductsToResult(final String responseS

final JSONObject productNode = productsArray.getJSONObject(productIndex).getJSONObject("product");
final String productLabel = productNode.getString("label");
final String productOrganism = productNode.getString("provider");
final int catalogProductId = productNode.getInt("id");

product.setOrderGuid(String.valueOf(orderId));
product.setOrderLabel(orderLabel);
product.setOrganism(organism);
product.setOrganism(productOrganism);
product.setOrganismGuid(productOrganism);
product.setClient(clientName);
product.setClientGuid(String.valueOf(clientId));
product.setClientDetails(clientAddress);
product.setTiers(tiersName);
product.setTiersDetails(tiersAddress);
product.setProductGuid(String.valueOf(productId));
product.setProductLabel(productLabel);
product.setOthersParameters("{\"data_format\" : \"" + productsArray.getJSONObject(productIndex)
.getString("data_format") + "\",\n" + "\"order_type\" : \"" + orderType + "\"}");
product.setOthersParameters(
"{\"data_format\" : \"" +
productsArray.getJSONObject(productIndex).getString("data_format") + "\",\n" +
"\"order_type\" : \"" + orderType + "\",\n" +
"\"product_id\" : " + String.valueOf(catalogProductId) + "}");
product.setPerimeter(orderNode.getString("geom"));
product.setSurface(orderNode.getDouble("geom_area"));

Expand Down
2 changes: 1 addition & 1 deletion plugin-interface/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.easysdi</groupId>
<artifactId>extract-plugin-interface</artifactId>
<version>1.2.1</version>
<version>1.2.2</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
Expand Down

0 comments on commit f8e36e1

Please sign in to comment.