| Line 52... |
Line 52... |
| 52 |
import order.SaholicAPI;
|
52 |
import order.SaholicAPI;
|
| 53 |
import order.SaholicAPI.Order;
|
53 |
import order.SaholicAPI.Order;
|
| 54 |
|
54 |
|
| 55 |
public class ProcessSnapdealOrder {
|
55 |
public class ProcessSnapdealOrder {
|
| 56 |
private static final int SNAPDEAL_SOURCE_ID = 7;
|
56 |
private static final int SNAPDEAL_SOURCE_ID = 7;
|
| 57 |
private static final String FIRSTFLIGHT = "First Flight";
|
57 |
/*private static final String FIRSTFLIGHT = "First Flight";
|
| 58 |
private static final String DELHIVERY = "DELHIVERY";
|
58 |
private static final String DELHIVERY = "DELHIVERY";
|
| 59 |
private static final String BLUEDART = "Bluedart";
|
59 |
private static final String BLUEDART = "Bluedart";
|
| 60 |
private static final String CHHOTU = "CHHOTU";
|
60 |
private static final String CHHOTU = "CHHOTU";
|
| 61 |
private static final String LAST_MILE = "LAST_MILE";
|
61 |
private static final String LAST_MILE = "LAST_MILE";
|
| 62 |
private static final String ECOMM_EXP = "Ecom Express";
|
62 |
private static final String ECOMM_EXP = "Ecom Express";
|
| Line 82... |
Line 82... |
| 82 |
private static final String BIBHA_CARGO = "BIBHA CARGO AND COURIER PVT LTD";
|
82 |
private static final String BIBHA_CARGO = "BIBHA CARGO AND COURIER PVT LTD";
|
| 83 |
private static final String FF_DELHI = "FF-Delhi";
|
83 |
private static final String FF_DELHI = "FF-Delhi";
|
| 84 |
private static final String FF_GURGAON = "FF-GURGAON";
|
84 |
private static final String FF_GURGAON = "FF-GURGAON";
|
| 85 |
private static final String TANVI_EXPRESS = "Tanvi Express";
|
85 |
private static final String TANVI_EXPRESS = "Tanvi Express";
|
| 86 |
private static final String VELIX = "Velex Logistics Pvt. Ltd";
|
86 |
private static final String VELIX = "Velex Logistics Pvt. Ltd";
|
| 87 |
private static final String XPRESSBEES = "XPRESSBEES";
|
87 |
private static final String XPRESSBEES = "XPRESSBEES";*/
|
| 88 |
private static String transactionId;
|
88 |
private static String transactionId;
|
| 89 |
private static long paymentId;
|
89 |
private static long paymentId;
|
| 90 |
private static final int SNAPDEAL_GATEWAY_ID = 18;
|
90 |
private static final int SNAPDEAL_GATEWAY_ID = 18;
|
| 91 |
private static Logger logger;
|
91 |
private static Logger logger;
|
| 92 |
|
92 |
|
| Line 310... |
Line 310... |
| 310 |
} catch (CatalogServiceException e) {
|
310 |
} catch (CatalogServiceException e) {
|
| 311 |
logger.error("Exception with Catalog Service for suborderid " + order.getSuborderId() + " while getting item " + lineItem.getItem_id(), e);
|
311 |
logger.error("Exception with Catalog Service for suborderid " + order.getSuborderId() + " while getting item " + lineItem.getItem_id(), e);
|
| 312 |
sb.append(order.getSuborderId() + " Exception in Catalog Service" + " " + "\n");
|
312 |
sb.append(order.getSuborderId() + " Exception in Catalog Service" + " " + "\n");
|
| 313 |
continue;
|
313 |
continue;
|
| 314 |
}
|
314 |
}
|
| 315 |
if(order.getCourier().equalsIgnoreCase(FIRSTFLIGHT)) {
|
315 |
/*if(order.getCourier().equalsIgnoreCase(FIRSTFLIGHT)) {
|
| 316 |
t_order.setLogistics_provider_id(12);
|
316 |
t_order.setLogistics_provider_id(12);
|
| 317 |
} else if(order.getCourier().equalsIgnoreCase(DELHIVERY)) {
|
317 |
} else if(order.getCourier().equalsIgnoreCase(DELHIVERY)) {
|
| 318 |
t_order.setLogistics_provider_id(13);
|
318 |
t_order.setLogistics_provider_id(13);
|
| 319 |
} else if(order.getCourier().equalsIgnoreCase(BLUEDART)) {
|
319 |
} else if(order.getCourier().equalsIgnoreCase(BLUEDART)) {
|
| 320 |
t_order.setLogistics_provider_id(14);
|
320 |
t_order.setLogistics_provider_id(14);
|
| Line 401... |
Line 401... |
| 401 |
}
|
401 |
}
|
| 402 |
else if(order.getCourier().trim().equalsIgnoreCase(XPRESSBEES)){
|
402 |
else if(order.getCourier().trim().equalsIgnoreCase(XPRESSBEES)){
|
| 403 |
t_order.setLogistics_provider_id(43);
|
403 |
t_order.setLogistics_provider_id(43);
|
| 404 |
}
|
404 |
}
|
| 405 |
|
405 |
|
| 406 |
else {
|
406 |
else {*/
|
| 407 |
t_order.setLogistics_provider_id(44);
|
407 |
t_order.setLogistics_provider_id(44);
|
| 408 |
/*logger.error("Error No Courier Match please add courier to our system for suborderid " + order.getSuborderId() + "Courier Name " + order.getCourier());
|
408 |
/*logger.error("Error No Courier Match please add courier to our system for suborderid " + order.getSuborderId() + "Courier Name " + order.getCourier());
|
| 409 |
sb.append(order.getSuborderId() + " Error No Courier Match " + order.getCourier() +"\n");
|
409 |
sb.append(order.getSuborderId() + " Error No Courier Match " + order.getCourier() +"\n");
|
| 410 |
continue;
|
410 |
continue;
|
| 411 |
*/
|
411 |
*/
|
| 412 |
}
|
412 |
//}
|
| 413 |
|
413 |
|
| 414 |
t_order.setAirwaybill_no(String.valueOf(order.getAWBNumber()));
|
414 |
t_order.setAirwaybill_no(String.valueOf(order.getAWBNumber()));
|
| 415 |
t_order.setTracking_id(String.valueOf(order.getAWBNumber()));
|
415 |
t_order.setTracking_id(String.valueOf(order.getAWBNumber()));
|
| 416 |
t_order.setTotal_amount(SellingPrice);
|
416 |
t_order.setTotal_amount(SellingPrice);
|
| 417 |
t_order.setOrderType(OrderType.B2C);
|
417 |
t_order.setOrderType(OrderType.B2C);
|