| Line 418... |
Line 418... |
| 418 |
if(sku==0){
|
418 |
if(sku==0){
|
| 419 |
System.out.println("SKU Mapping doesnt exists " + skuAtFlipkart);
|
419 |
System.out.println("SKU Mapping doesnt exists " + skuAtFlipkart);
|
| 420 |
sb.append(orderId + " "+ subOrderId + " SKU Mapping doesnt exist" + " " +skuAtFlipkart+ "\n");
|
420 |
sb.append(orderId + " "+ subOrderId + " SKU Mapping doesnt exist" + " " +skuAtFlipkart+ "\n");
|
| 421 |
continue;
|
421 |
continue;
|
| 422 |
}
|
422 |
}
|
| 423 |
|
423 |
|
| 424 |
Transaction txn = new Transaction();
|
424 |
Transaction txn = new Transaction();
|
| 425 |
txn.setShoppingCartid(user.getActiveCartId());
|
425 |
txn.setShoppingCartid(user.getActiveCartId());
|
| 426 |
txn.setCustomer_id(user.getUserId());
|
426 |
txn.setCustomer_id(user.getUserId());
|
| 427 |
System.out.println("User Id is " + user.getUserId());
|
427 |
System.out.println("User Id is " + user.getUserId());
|
| 428 |
txn.setCreatedOn(new Date().getTime());
|
428 |
txn.setCreatedOn(new Date().getTime());
|
| Line 514... |
Line 514... |
| 514 |
}
|
514 |
}
|
| 515 |
|
515 |
|
| 516 |
//logger.info("Billing warehouse id for suborderid " + order.getSuborderId() + " is " + fulfillmentWarehouse.getBillingWarehouseId());
|
516 |
//logger.info("Billing warehouse id for suborderid " + order.getSuborderId() + " is " + fulfillmentWarehouse.getBillingWarehouseId());
|
| 517 |
t_order.setWarehouse_id(billingWarehouseId);
|
517 |
t_order.setWarehouse_id(billingWarehouseId);
|
| 518 |
VendorItemPricing vendorItemPricing = new VendorItemPricing();
|
518 |
VendorItemPricing vendorItemPricing = new VendorItemPricing();
|
| 519 |
inventoryClient = new InventoryClient().getClient();
|
519 |
Item item = new CatalogClient().getClient().getItem(lineItem.getItem_id());
|
| 520 |
if(fulfillmentWarehouse.getId()==7) {
|
520 |
if(fulfillmentWarehouse.getId()==7) {
|
| - |
|
521 |
|
| - |
|
522 |
try{
|
| 521 |
Item item = new CatalogClient().getClient().getItem(lineItem.getItem_id());
|
523 |
vendorItemPricing = inventoryClient.getItemPricing(lineItem.getItem_id(), item.getPreferredVendor());
|
| - |
|
524 |
}
|
| - |
|
525 |
catch(TTransportException e){
|
| - |
|
526 |
inventoryClient = new InventoryClient().getClient();
|
| 522 |
vendorItemPricing = inventoryClient.getItemPricing(lineItem.getItem_id(), item.getPreferredVendor());
|
527 |
vendorItemPricing = inventoryClient.getItemPricing(lineItem.getItem_id(), item.getPreferredVendor());
|
| - |
|
528 |
}
|
| - |
|
529 |
}
|
| 523 |
} else {
|
530 |
else {
|
| - |
|
531 |
try{
|
| - |
|
532 |
vendorItemPricing = inventoryClient.getItemPricing(lineItem.getItem_id(), item.getPreferredVendor());
|
| - |
|
533 |
}
|
| - |
|
534 |
catch(TTransportException e){
|
| - |
|
535 |
inventoryClient = new InventoryClient().getClient();
|
| 524 |
vendorItemPricing = inventoryClient.getItemPricing(lineItem.getItem_id(), fulfillmentWarehouse.getVendor().getId());
|
536 |
vendorItemPricing = inventoryClient.getItemPricing(lineItem.getItem_id(), fulfillmentWarehouse.getVendor().getId());
|
| - |
|
537 |
}
|
| 525 |
}
|
538 |
}
|
| 526 |
t_order.getLineitems().get(0).setTransfer_price(vendorItemPricing.getTransferPrice());
|
539 |
t_order.getLineitems().get(0).setTransfer_price(vendorItemPricing.getTransferPrice());
|
| 527 |
t_order.getLineitems().get(0).setNlc(vendorItemPricing.getNlc());
|
540 |
t_order.getLineitems().get(0).setNlc(vendorItemPricing.getNlc());
|
| 528 |
} catch (InventoryServiceException e) {
|
541 |
} catch (InventoryServiceException e) {
|
| 529 |
logger.error("Error connecting inventory service for suborderid " + orderId + " " + subOrderId , e);
|
542 |
logger.error("Error connecting inventory service for suborderid " + orderId + " " + subOrderId , e);
|
| Line 648... |
Line 661... |
| 648 |
sb.append(orderId+" "+subOrderId + " Problem with inventory service while reserving inventory for sku "+ sku +"\n");
|
661 |
sb.append(orderId+" "+subOrderId + " Problem with inventory service while reserving inventory for sku "+ sku +"\n");
|
| 649 |
continue;
|
662 |
continue;
|
| 650 |
}
|
663 |
}
|
| 651 |
orders_processed++;
|
664 |
orders_processed++;
|
| 652 |
}
|
665 |
}
|
| 653 |
|
666 |
|
| 654 |
}
|
667 |
}
|
| 655 |
|
668 |
|
| 656 |
if(orders_processed==1){
|
669 |
if(orders_processed==1){
|
| 657 |
order_string = "Order";
|
670 |
order_string = "Order";
|
| 658 |
}
|
671 |
}
|