Subversion Repositories SmartDukaan

Rev

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

Rev 20830 Rev 20956
Line 447... Line 447...
447
		Map<Long, Long> orders = new HashMap<Long, Long>();
447
		Map<Long, Long> orders = new HashMap<Long, Long>();
448
		try {
448
		try {
449
			long provider_id = Long.parseLong(providerId);
449
			long provider_id = Long.parseLong(providerId);
450
			TransactionClient client = new TransactionClient();
450
			TransactionClient client = new TransactionClient();
451
			Client c = client.getClient();
451
			Client c = client.getClient();
452
			
452
 
453
			List<OrderStatus> statuses = new ArrayList<OrderStatus>();
-
 
454
			statuses.add(OrderStatus.BILLED);
-
 
455
			List<in.shop2020.model.v1.order.Order> torders = c.getOrdersInBatch(statuses, 0, 0, warehouseId, 0);
453
			List<in.shop2020.model.v1.order.Order> torders = c.getBilledOrdersForManifestGen(warehouseId, Long.valueOf(provider_id), cod);
456
			for(in.shop2020.model.v1.order.Order torder: torders){
454
			for(in.shop2020.model.v1.order.Order torder: torders){
457
				if(torder.getLogistics_provider_id() == provider_id && torder.isLogisticsCod() == cod){
-
 
458
					orders.put(torder.getId(), torder.getPickupStoreId());
455
				orders.put(torder.getId(), torder.getPickupStoreId());
459
				}
-
 
460
			}
456
			}
461
			
457
 
462
		}catch(Exception e){
458
		}catch(Exception e){
463
			e.printStackTrace();
459
			e.printStackTrace();
464
		}
460
		}
465
		return orders;
461
		return orders;
466
	}
462
	}
467
 
463
	
468
	public static boolean generateCourierDetailsFile(List<Long> orderIds, long providerId, long warehouseId, boolean isCod){
464
	public static boolean generateCourierDetailsFile(List<Long> orderIds, long providerId, long warehouseId, boolean isCod){
469
		Calendar date = new GregorianCalendar();
465
		Calendar date = new GregorianCalendar();
470
		int year = date.get(Calendar.YEAR);
466
		int year = date.get(Calendar.YEAR);
471
		int month = date.get(Calendar.MONTH) +1;
467
		int month = date.get(Calendar.MONTH) +1;
472
		int day = date.get(Calendar.DAY_OF_MONTH);
468
		int day = date.get(Calendar.DAY_OF_MONTH);