| Line 516... |
Line 516... |
| 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 |
Item item = new CatalogClient().getClient().getItem(lineItem.getItem_id());
|
519 |
Item item = new CatalogClient().getClient().getItem(lineItem.getItem_id());
|
| 520 |
if(fulfillmentWarehouse.getId()==7) {
|
520 |
if(fulfillmentWarehouse.getId()==7) {
|
| 521 |
|
521 |
|
| 522 |
try{
|
522 |
try{
|
| 523 |
vendorItemPricing = inventoryClient.getItemPricing(lineItem.getItem_id(), item.getPreferredVendor());
|
523 |
vendorItemPricing = inventoryClient.getItemPricing(lineItem.getItem_id(), item.getPreferredVendor());
|
| 524 |
}
|
524 |
}
|
| 525 |
catch(TTransportException e){
|
525 |
catch(TTransportException e){
|
| 526 |
inventoryClient = new InventoryClient().getClient();
|
526 |
inventoryClient = new InventoryClient().getClient();
|
| Line 571... |
Line 571... |
| 571 |
} catch (TransactionServiceException e) {
|
571 |
} catch (TransactionServiceException e) {
|
| 572 |
logger.error(orderId+" "+subOrderId + " Could not create transaction " , e);
|
572 |
logger.error(orderId+" "+subOrderId + " Could not create transaction " , e);
|
| 573 |
sb.append(orderId+" "+subOrderId + " Could not create transaction" +"\n");
|
573 |
sb.append(orderId+" "+subOrderId + " Could not create transaction" +"\n");
|
| 574 |
continue;
|
574 |
continue;
|
| 575 |
} catch (TException e) {
|
575 |
} catch (TException e) {
|
| - |
|
576 |
transaction_client = new TransactionClient().getClient();
|
| - |
|
577 |
try {
|
| - |
|
578 |
transactionId = String.valueOf(transaction_client.createTransaction(txn));
|
| - |
|
579 |
} catch (TransactionServiceException e1) {
|
| 576 |
sb.append(orderId+" "+subOrderId + " Transaction Service Exception could not create transaction" +"\n");
|
580 |
sb.append(orderId+" "+subOrderId + " Transaction Service Exception could not create transaction" +"\n");
|
| 577 |
logger.info(orderId+" "+subOrderId + " Transaction Service Exception could not create transaction" +"\n" , e);
|
581 |
logger.info(orderId+" "+subOrderId + " Transaction Service Exception could not create transaction" +"\n" , e);
|
| 578 |
continue;
|
582 |
continue;
|
| - |
|
583 |
}
|
| 579 |
}
|
584 |
}
|
| 580 |
try{
|
585 |
try{
|
| 581 |
logger.info("Creating payment for suborder id " + subOrderId +" ");
|
586 |
logger.info("Creating payment for suborder id " + subOrderId +" ");
|
| 582 |
paymentId = createPayment(user,subOrderId,total_price);
|
587 |
paymentId = createPayment(user,subOrderId,total_price);
|
| 583 |
}
|
588 |
}
|
| Line 675... |
Line 680... |
| 675 |
java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("yyyy-MM-dd-HH:mm:ss");
|
680 |
java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("yyyy-MM-dd-HH:mm:ss");
|
| 676 |
Calendar cal=GregorianCalendar.getInstance();
|
681 |
Calendar cal=GregorianCalendar.getInstance();
|
| 677 |
String emailFromAddress = "build@shop2020.in";
|
682 |
String emailFromAddress = "build@shop2020.in";
|
| 678 |
String password = "cafe@nes";
|
683 |
String password = "cafe@nes";
|
| 679 |
GmailUtils mailer = new GmailUtils();
|
684 |
GmailUtils mailer = new GmailUtils();
|
| 680 |
//String sendTo[] = new String[]{"vikram.raghav@shop2020.in"};
|
685 |
String sendTo[] = new String[]{"vikram.raghav@shop2020.in"};
|
| 681 |
String sendTo[] = new String[]{ "sandeep.sachdeva@shop2020.in", "vikram.raghav@shop2020.in", "rajneesh.arora@shop2020.in",
|
686 |
/*String sendTo[] = new String[]{ "sandeep.sachdeva@shop2020.in", "vikram.raghav@shop2020.in", "rajneesh.arora@shop2020.in",
|
| 682 |
"khushal.bhatia@shop2020.in","manoj.kumar@saholic.com","chaitnaya.vats@saholic.com",
|
687 |
"khushal.bhatia@shop2020.in","manoj.kumar@saholic.com","chaitnaya.vats@saholic.com",
|
| 683 |
"yukti.jain@shop2020.in","manisha.sharma@shop2020.in","chandan.kumar@shop2020.in","ankush.dhingra@shop2020.in"};
|
688 |
"yukti.jain@shop2020.in","manisha.sharma@shop2020.in","chandan.kumar@shop2020.in","ankush.dhingra@shop2020.in"};
|
| 684 |
try {
|
689 |
*/try {
|
| 685 |
logger.info("Before Sending Emails");
|
690 |
logger.info("Before Sending Emails");
|
| 686 |
String ordersProcessingStatus = "Total Orders : " + total_orders +"\n"+
|
691 |
String ordersProcessingStatus = "Total Orders : " + total_orders +"\n"+
|
| 687 |
"Processed Orders : " + orders_processed +"\n"+
|
692 |
"Processed Orders : " + orders_processed +"\n"+
|
| 688 |
"Existing Orders : " + duplicate_orders +"\n"+
|
693 |
"Existing Orders : " + duplicate_orders +"\n"+
|
| 689 |
"Failed Orders :" + (total_orders - orders_processed - duplicate_orders - not_approved)+"\n"+
|
694 |
"Failed Orders :" + (total_orders - orders_processed - duplicate_orders - not_approved)+"\n"+
|