| Line 85... |
Line 85... |
| 85 |
import com.spice.profitmandi.service.wallet.WalletService;
|
85 |
import com.spice.profitmandi.service.wallet.WalletService;
|
| 86 |
import com.spice.profitmandi.service.warehouse.PurchaseOrderService;
|
86 |
import com.spice.profitmandi.service.warehouse.PurchaseOrderService;
|
| 87 |
import com.spice.profitmandi.service.warehouse.WarehouseInventoryService;
|
87 |
import com.spice.profitmandi.service.warehouse.WarehouseInventoryService;
|
| 88 |
import in.shop2020.model.v1.order.OrderStatus;
|
88 |
import in.shop2020.model.v1.order.OrderStatus;
|
| 89 |
import in.shop2020.model.v1.order.WalletReferenceType;
|
89 |
import in.shop2020.model.v1.order.WalletReferenceType;
|
| 90 |
import jdk.nashorn.api.scripting.ScriptObjectMirror;
|
- |
|
| 91 |
import okhttp3.OkHttpClient;
|
90 |
import okhttp3.OkHttpClient;
|
| 92 |
import okhttp3.Request;
|
91 |
import okhttp3.Request;
|
| 93 |
import okhttp3.Response;
|
92 |
import okhttp3.Response;
|
| 94 |
import org.apache.commons.io.output.ByteArrayOutputStream;
|
93 |
import org.apache.commons.io.output.ByteArrayOutputStream;
|
| 95 |
import org.apache.commons.lang.StringUtils;
|
94 |
import org.apache.commons.lang.StringUtils;
|
| Line 134... |
Line 133... |
| 134 |
import java.util.*;
|
133 |
import java.util.*;
|
| 135 |
import java.util.Map.Entry;
|
134 |
import java.util.Map.Entry;
|
| 136 |
import java.util.stream.Collectors;
|
135 |
import java.util.stream.Collectors;
|
| 137 |
import java.util.stream.Stream;
|
136 |
import java.util.stream.Stream;
|
| 138 |
|
137 |
|
| 139 |
|
- |
|
| 140 |
import static java.util.stream.Collectors.groupingBy;
|
138 |
import static java.util.stream.Collectors.groupingBy;
|
| 141 |
import static java.util.stream.Collectors.mapping;
|
139 |
import static java.util.stream.Collectors.mapping;
|
| 142 |
|
140 |
|
| 143 |
|
141 |
|
| 144 |
@Component
|
142 |
@Component
|
| Line 3495... |
Line 3493... |
| 3495 |
if (!orders.isEmpty()) {
|
3493 |
if (!orders.isEmpty()) {
|
| 3496 |
|
3494 |
|
| 3497 |
Set<String> airwayBillNo = orders.stream().map(x -> x.getAirwayBillNumber()).collect(Collectors.toSet());
|
3495 |
Set<String> airwayBillNo = orders.stream().map(x -> x.getAirwayBillNumber()).collect(Collectors.toSet());
|
| 3498 |
|
3496 |
|
| 3499 |
LOGGER.info("airwayBill" + airwayBillNo);
|
3497 |
LOGGER.info("airwayBill" + airwayBillNo);
|
| 3500 |
String url = "https://api.bluedart.com/servlet/RoutingServlet?handler=tnt&action=custawbquery";
|
3498 |
//String url = "https://api.bluedart.com/servlet/RoutingServlet?handler=tnt&action=custawbquery";
|
| - |
|
3499 |
String url = "https://apigateway.bluedart.com/in/transportation/tracking/v1/shipment?scan=1";
|
| 3501 |
|
3500 |
|
| 3502 |
String response = restClient.get(url + "&loginid=" + loginId + "&awb=awb&numbers=" + String.join(",", airwayBillNo) + "&format=xml&lickey=" + licencekey + "&verno=1.3&scan=1", null, null);
|
3501 |
String response = restClient.get(url + "&loginid=" + loginId + "&awb=awb&numbers=" + String.join(",", airwayBillNo) + "&format=xml&lickey=" + licencekey + "&verno=1.3", null, null);
|
| 3503 |
|
3502 |
|
| 3504 |
JSONObject updateJson = XML.toJSONObject(response);
|
3503 |
JSONObject updateJson = XML.toJSONObject(response);
|
| 3505 |
|
3504 |
|
| 3506 |
JSONObject shipmentData = updateJson.getJSONObject("ShipmentData");
|
3505 |
JSONObject shipmentData = updateJson.getJSONObject("ShipmentData");
|
| 3507 |
Object shipmentObject = shipmentData.get("Shipment");
|
3506 |
Object shipmentObject = shipmentData.get("Shipment");
|