| Line 51... |
Line 51... |
| 51 |
public class ProcessSnapdealOrder {
|
51 |
public class ProcessSnapdealOrder {
|
| 52 |
private static final int SNAPDEAL_SOURCE_ID = 7;
|
52 |
private static final int SNAPDEAL_SOURCE_ID = 7;
|
| 53 |
private static final String FIRSTFLIGHT = "First Flight";
|
53 |
private static final String FIRSTFLIGHT = "First Flight";
|
| 54 |
private static final String DELHIVERY = "DELHIVERY";
|
54 |
private static final String DELHIVERY = "DELHIVERY";
|
| 55 |
private static final String BLUEDART = "Bluedart";
|
55 |
private static final String BLUEDART = "Bluedart";
|
| 56 |
private static final String CHHOTU = "CHHOTU";
|
56 |
private static final String CHHOTU = "CHHOTU";
|
| - |
|
57 |
private static final String LAST_MILE = "LAST_MILE";
|
| - |
|
58 |
private static final String ECOMM_EXP = "ECOMM_EXP";
|
| - |
|
59 |
private static final String EWINGS = "EWINGS";
|
| - |
|
60 |
private static final String DTDC = "DTDC";
|
| - |
|
61 |
private static final String WAREOLOG = "DTDC";
|
| - |
|
62 |
private static final String MIRAKLE = "MIRAKLE";
|
| - |
|
63 |
private static final String RAJIV_TRANSPORT = "RAJIV_TRANSPORT";
|
| - |
|
64 |
private static final String BLUEDART_HIGH_VALUE = "BLUEDART_HIGH_VALUE";
|
| - |
|
65 |
private static final String BLUEDART_SURFACE = "BLUEDART_SURFACE";
|
| - |
|
66 |
private static final String BLUEDART_APEX = "BLUEDART_APEX";
|
| - |
|
67 |
private static final String ARAMEX = "ARAMEX";
|
| - |
|
68 |
private static final String GATI = "GATI";
|
| - |
|
69 |
private static final String INDIA_POST = "INDIA_POST";
|
| - |
|
70 |
private static final String FEDEX = "FEDEX";
|
| - |
|
71 |
private static final String IOT = "IOT";
|
| - |
|
72 |
private static final String RED_EXP = "RED_EXP";
|
| - |
|
73 |
private static final String GHARPAY = "GHARPAY";
|
| - |
|
74 |
private static final String QUANTIUM = "QUANTIUM";
|
| - |
|
75 |
private static final String GATI_AIR = "GATI_AIR`";
|
| - |
|
76 |
private static final String VDELIVER = "VDELIVER";
|
| 57 |
private static String transactionId;
|
77 |
private static String transactionId;
|
| 58 |
private static final int SNAPDEAL_GATEWAY_ID = 18;
|
78 |
private static final int SNAPDEAL_GATEWAY_ID = 18;
|
| 59 |
private static Logger logger;
|
79 |
private static Logger logger;
|
| 60 |
|
80 |
|
| 61 |
public static void processSnapdealOrders(File file) throws JAXBException{
|
81 |
public static void processSnapdealOrders(File file) throws JAXBException{
|
| Line 190... |
Line 210... |
| 190 |
t_order.setLogistics_provider_id(13);
|
210 |
t_order.setLogistics_provider_id(13);
|
| 191 |
} else if(order.getCourier().equalsIgnoreCase(BLUEDART)) {
|
211 |
} else if(order.getCourier().equalsIgnoreCase(BLUEDART)) {
|
| 192 |
t_order.setLogistics_provider_id(14);
|
212 |
t_order.setLogistics_provider_id(14);
|
| 193 |
}else if(order.getCourier().equalsIgnoreCase(CHHOTU)) {
|
213 |
}else if(order.getCourier().equalsIgnoreCase(CHHOTU)) {
|
| 194 |
t_order.setLogistics_provider_id(16);
|
214 |
t_order.setLogistics_provider_id(16);
|
| - |
|
215 |
}
|
| - |
|
216 |
else if(order.getCourier().equalsIgnoreCase(LAST_MILE)){
|
| - |
|
217 |
t_order.setLogistics_provider_id(17);
|
| - |
|
218 |
}
|
| - |
|
219 |
else if(order.getCourier().equalsIgnoreCase(ECOMM_EXP)){
|
| - |
|
220 |
t_order.setLogistics_provider_id(18);
|
| - |
|
221 |
}
|
| - |
|
222 |
else if(order.getCourier().equalsIgnoreCase(EWINGS)){
|
| - |
|
223 |
t_order.setLogistics_provider_id(19);
|
| - |
|
224 |
}
|
| - |
|
225 |
else if(order.getCourier().equalsIgnoreCase(DTDC)){
|
| - |
|
226 |
t_order.setLogistics_provider_id(20);
|
| - |
|
227 |
}
|
| - |
|
228 |
else if(order.getCourier().equalsIgnoreCase(WAREOLOG)){
|
| - |
|
229 |
t_order.setLogistics_provider_id(21);
|
| - |
|
230 |
}
|
| - |
|
231 |
else if(order.getCourier().equalsIgnoreCase(MIRAKLE)){
|
| - |
|
232 |
t_order.setLogistics_provider_id(22);
|
| - |
|
233 |
}
|
| - |
|
234 |
else if(order.getCourier().equalsIgnoreCase(RAJIV_TRANSPORT)){
|
| - |
|
235 |
t_order.setLogistics_provider_id(23);
|
| - |
|
236 |
}
|
| - |
|
237 |
else if(order.getCourier().equalsIgnoreCase(BLUEDART_HIGH_VALUE)){
|
| - |
|
238 |
t_order.setLogistics_provider_id(24);
|
| - |
|
239 |
}
|
| - |
|
240 |
else if(order.getCourier().equalsIgnoreCase(BLUEDART_SURFACE)){
|
| - |
|
241 |
t_order.setLogistics_provider_id(25);
|
| - |
|
242 |
}
|
| - |
|
243 |
else if(order.getCourier().equalsIgnoreCase(BLUEDART_APEX)){
|
| - |
|
244 |
t_order.setLogistics_provider_id(26);
|
| - |
|
245 |
}
|
| - |
|
246 |
else if(order.getCourier().equalsIgnoreCase(ARAMEX)){
|
| - |
|
247 |
t_order.setLogistics_provider_id(27);
|
| - |
|
248 |
}
|
| - |
|
249 |
else if(order.getCourier().equalsIgnoreCase(GATI)){
|
| - |
|
250 |
t_order.setLogistics_provider_id(28);
|
| - |
|
251 |
}
|
| - |
|
252 |
else if(order.getCourier().equalsIgnoreCase(INDIA_POST)){
|
| - |
|
253 |
t_order.setLogistics_provider_id(29);
|
| - |
|
254 |
}
|
| - |
|
255 |
else if(order.getCourier().equalsIgnoreCase(FEDEX)){
|
| - |
|
256 |
t_order.setLogistics_provider_id(30);
|
| - |
|
257 |
}
|
| - |
|
258 |
else if(order.getCourier().equalsIgnoreCase(IOT)){
|
| - |
|
259 |
t_order.setLogistics_provider_id(31);
|
| - |
|
260 |
}
|
| - |
|
261 |
else if(order.getCourier().equalsIgnoreCase(RED_EXP)){
|
| - |
|
262 |
t_order.setLogistics_provider_id(32);
|
| - |
|
263 |
}
|
| - |
|
264 |
else if(order.getCourier().equalsIgnoreCase(VDELIVER)){
|
| - |
|
265 |
t_order.setLogistics_provider_id(33);
|
| - |
|
266 |
}
|
| - |
|
267 |
else if(order.getCourier().equalsIgnoreCase(GHARPAY)){
|
| - |
|
268 |
t_order.setLogistics_provider_id(34);
|
| - |
|
269 |
}
|
| - |
|
270 |
else if(order.getCourier().equalsIgnoreCase(QUANTIUM)){
|
| - |
|
271 |
t_order.setLogistics_provider_id(35);
|
| - |
|
272 |
}
|
| - |
|
273 |
else if(order.getCourier().equalsIgnoreCase(GATI_AIR)){
|
| - |
|
274 |
t_order.setLogistics_provider_id(36);
|
| - |
|
275 |
}
|
| 195 |
} else {
|
276 |
else {
|
| 196 |
logger.error("Error No Courier Match please add courier to our system for suborderid " + order.getSuborderId() + "Courier Name " + order.getCourier());
|
277 |
logger.error("Error No Courier Match please add courier to our system for suborderid " + order.getSuborderId() + "Courier Name " + order.getCourier());
|
| 197 |
continue;
|
278 |
continue;
|
| 198 |
}
|
279 |
}
|
| 199 |
|
280 |
|
| 200 |
t_order.setAirwaybill_no(String.valueOf(order.getAWBNumber()));
|
281 |
t_order.setAirwaybill_no(String.valueOf(order.getAWBNumber()));
|
| Line 310... |
Line 391... |
| 310 |
lineItem.setUnit_weight(item.getWeight());
|
391 |
lineItem.setUnit_weight(item.getWeight());
|
| 311 |
lineItem.setTotal_weight(item.getWeight());
|
392 |
lineItem.setTotal_weight(item.getWeight());
|
| 312 |
lineItem.setUnit_price(amount);
|
393 |
lineItem.setUnit_price(amount);
|
| 313 |
lineItem.setTotal_price(amount);
|
394 |
lineItem.setTotal_price(amount);
|
| 314 |
|
395 |
|
| 315 |
if (item.getColor() == null || "NA".equals(item.getColor())) {
|
396 |
if (item.getColor() == null || "NA".equals(item.getColor())) {
|
| 316 |
lineItem.setColor("");
|
397 |
lineItem.setColor("");
|
| 317 |
} else {
|
398 |
} else {
|
| 318 |
lineItem.setColor(item.getColor());
|
399 |
lineItem.setColor(item.getColor());
|
| 319 |
}
|
400 |
}
|
| 320 |
return lineItem;
|
401 |
return lineItem;
|