Subversion Repositories SmartDukaan

Rev

Rev 29403 | Rev 29443 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 29403 Rev 29441
Line 3053... Line 3053...
3053
	public void markDelhiveryOrderDelivered() throws ProfitMandiBusinessException, IOException {
3053
	public void markDelhiveryOrderDelivered() throws ProfitMandiBusinessException, IOException {
3054
		List<Order> orders = orderRepository.selectOrderByProviderIdAndStatus(ProfitMandiConstants.DELHIVERY_PROVIDERID,
3054
		List<Order> orders = orderRepository.selectOrderByProviderIdAndStatus(ProfitMandiConstants.DELHIVERY_PROVIDERID,
3055
				OrderStatus.SHIPPED_FROM_WH);
3055
				OrderStatus.SHIPPED_FROM_WH);
3056
 
3056
 
3057
		if (!orders.isEmpty()) {
3057
		if (!orders.isEmpty()) {
3058
			List<String> airwayBill = orders.stream().map(x -> x.getAirwayBillNumber()).collect(Collectors.toList());
3058
			Set<String> airwayBill = orders.stream().map(x -> x.getAirwayBillNumber()).collect(Collectors.toSet());
3059
 
3059
 
-
 
3060
			int arraylength = airwayBill.size();
-
 
3061
 
-
 
3062
			if (arraylength >= 75) {
-
 
3063
 
-
 
3064
				airwayBill = airwayBill.stream().limit(74).collect(Collectors.toSet());
-
 
3065
			}
3060
			LOGGER.info("airwayBill" + airwayBill);
3066
			LOGGER.info("airwayBill" + airwayBill);
3061
			String url = "https://track.delhivery.com/api/v1/packages/json/";
3067
			String url = "https://track.delhivery.com/api/v1/packages/json/";
3062
 
3068
 
3063
			OkHttpClient client = new OkHttpClient();
3069
			OkHttpClient client = new OkHttpClient();
3064
 
3070