| Line 132... |
Line 132... |
| 132 |
TransactionClient transactionServiceClient = null;
|
132 |
TransactionClient transactionServiceClient = null;
|
| 133 |
CatalogClient catalogServiceClient = null;
|
133 |
CatalogClient catalogServiceClient = null;
|
| 134 |
try {
|
134 |
try {
|
| 135 |
inventoryServiceClient = new InventoryClient();
|
135 |
inventoryServiceClient = new InventoryClient();
|
| 136 |
transactionServiceClient = new TransactionClient();
|
136 |
transactionServiceClient = new TransactionClient();
|
| 137 |
catalogServiceClient = new CatalogClient();
|
137 |
//catalogServiceClient = new CatalogClient();
|
| 138 |
//catalogServiceClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port");
|
138 |
catalogServiceClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port");
|
| 139 |
} catch (Exception e) {
|
139 |
} catch (Exception e) {
|
| 140 |
// TODO Auto-generated catch block
|
140 |
// TODO Auto-generated catch block
|
| 141 |
e.printStackTrace();
|
141 |
e.printStackTrace();
|
| 142 |
}
|
142 |
}
|
| 143 |
in.shop2020.model.v1.inventory.InventoryService.Client inventoryClient = inventoryServiceClient.getClient();
|
143 |
in.shop2020.model.v1.inventory.InventoryService.Client inventoryClient = inventoryServiceClient.getClient();
|
| Line 277... |
Line 277... |
| 277 |
}
|
277 |
}
|
| 278 |
else{
|
278 |
else{
|
| 279 |
oos=false;
|
279 |
oos=false;
|
| 280 |
}
|
280 |
}
|
| 281 |
Long item_id = entry1.getKey();
|
281 |
Long item_id = entry1.getKey();
|
| - |
|
282 |
Amazonlisted amazon_item=catalogClient.getAmazonItemDetails(item_id);
|
| - |
|
283 |
if(amazon_item.getItemid()==0){
|
| - |
|
284 |
continue;
|
| - |
|
285 |
}
|
| 282 |
System.out.println(orderDate +","+entry1.getKey()+","+entry1.getValue()+","+ inventory +","+ oos+","+itemIdSalePriceMap.get(item_id)+","+itemIdminFBAPriceMap.get(item_id)+","+itemIdminMFNPriceMap.get(item_id));
|
286 |
System.out.println(orderDate +","+entry1.getKey()+","+entry1.getValue()+","+ inventory +","+ oos+","+itemIdSalePriceMap.get(item_id)+","+itemIdminFBAPriceMap.get(item_id)+","+itemIdminMFNPriceMap.get(item_id));
|
| 283 |
AmazonFbaSalesSnapshot amazonfbasalessnapshot = new AmazonFbaSalesSnapshot();
|
287 |
AmazonFbaSalesSnapshot amazonfbasalessnapshot = new AmazonFbaSalesSnapshot();
|
| 284 |
amazonfbasalessnapshot.setDateOfSale(orderDate.getTime());
|
288 |
amazonfbasalessnapshot.setDateOfSale(orderDate.getTime());
|
| 285 |
amazonfbasalessnapshot.setItem_id(entry1.getKey());
|
289 |
amazonfbasalessnapshot.setItem_id(entry1.getKey());
|
| 286 |
amazonfbasalessnapshot.setTotalOrderCount(entry1.getValue().getPromotionOrderCount());
|
290 |
amazonfbasalessnapshot.setTotalOrderCount(entry1.getValue().getPromotionOrderCount());
|
| 287 |
amazonfbasalessnapshot.setTotalOrderCount(entry1.getValue().getTotalOrderCount());
|
291 |
amazonfbasalessnapshot.setTotalOrderCount(entry1.getValue().getTotalOrderCount());
|
| 288 |
amazonfbasalessnapshot.setTotalSale(entry1.getValue().getTotalSale());
|
292 |
amazonfbasalessnapshot.setTotalSale(entry1.getValue().getTotalSale());
|
| 289 |
amazonfbasalessnapshot.setPromotionSale(entry1.getValue().getTotalPromotionSale());
|
293 |
amazonfbasalessnapshot.setPromotionSale(entry1.getValue().getTotalPromotionSale());
|
| 290 |
amazonfbasalessnapshot.setIsOutOfStock(oos);
|
294 |
amazonfbasalessnapshot.setIsOutOfStock(oos);
|
| 291 |
Amazonlisted amazon_item=null;
|
- |
|
| 292 |
if(catalogClient.getAmazonItemDetails(item_id).getItemid()!=0){
|
- |
|
| 293 |
amazon_item = catalogClient.getAmazonItemDetails(item_id);
|
- |
|
| 294 |
}
|
- |
|
| 295 |
else{
|
- |
|
| 296 |
continue;
|
- |
|
| 297 |
}
|
- |
|
| 298 |
if(itemIdSalePriceMap.containsKey(item_id) && itemIdSalePriceMap.get(item_id).getPrice()!=0){
|
295 |
if(itemIdSalePriceMap.containsKey(item_id) && itemIdSalePriceMap.get(item_id).getPrice()!=0){
|
| 299 |
amazonfbasalessnapshot.setSalePrice(itemIdSalePriceMap.get(item_id).getPrice());
|
296 |
amazonfbasalessnapshot.setSalePrice(itemIdSalePriceMap.get(item_id).getPrice());
|
| 300 |
amazonfbasalessnapshot.setSalePriceSnapshotDate(itemIdSalePriceMap.get(item_id).getDate().getTime());
|
297 |
amazonfbasalessnapshot.setSalePriceSnapshotDate(itemIdSalePriceMap.get(item_id).getDate().getTime());
|
| 301 |
}
|
298 |
}
|
| 302 |
else{
|
299 |
else{
|