Subversion Repositories SmartDukaan

Rev

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

Rev 5556 Rev 5769
Line 117... Line 117...
117
	 *            manifested.
117
	 *            manifested.
118
	 * @param cod
118
	 * @param cod
119
	 *             Whether cod orders have to be marked as manifested
119
	 *             Whether cod orders have to be marked as manifested
120
	 * @return True if everything goes fine, false otherwise.
120
	 * @return True if everything goes fine, false otherwise.
121
	 */
121
	 */
122
	public static List<Long> getBilledOrders(long warehouseId, String providerId, boolean cod){
122
	public static Map<Long, Long> getBilledOrders(long warehouseId, String providerId, boolean cod){
123
		List<Long> orders = new ArrayList<Long>();
123
		Map<Long, Long> orders = new HashMap<Long, Long>();
124
		try {
124
		try {
125
			long provider_id = Long.parseLong(providerId);
125
			long provider_id = Long.parseLong(providerId);
126
			TransactionClient client = new TransactionClient();
126
			TransactionClient client = new TransactionClient();
127
			Client c = client.getClient();
127
			Client c = client.getClient();
128
			
128
			
129
			List<OrderStatus> statuses = new ArrayList<OrderStatus>();
129
			List<OrderStatus> statuses = new ArrayList<OrderStatus>();
130
			statuses.add(OrderStatus.BILLED);
130
			statuses.add(OrderStatus.BILLED);
131
			List<in.shop2020.model.v1.order.Order> torders = c.getOrdersInBatch(statuses, 0, 0, warehouseId);
131
			List<in.shop2020.model.v1.order.Order> torders = c.getOrdersInBatch(statuses, 0, 0, warehouseId);
132
			for(in.shop2020.model.v1.order.Order torder: torders){
132
			for(in.shop2020.model.v1.order.Order torder: torders){
133
				if(torder.getLogistics_provider_id() == provider_id && torder.isLogisticsCod() == cod){
133
				if(torder.getLogistics_provider_id() == provider_id && torder.isLogisticsCod() == cod){
134
					orders.add(torder.getId());
134
					orders.put(torder.getId(), torder.getPickupStoreId());
135
				}
135
				}
136
			}
136
			}
137
			
137
			
138
		}catch(Exception e){
138
		}catch(Exception e){
139
			e.printStackTrace();
139
			e.printStackTrace();
Line 270... Line 270...
270
				t_order.isLogisticsCod(),
270
				t_order.isLogisticsCod(),
271
				delayReason,
271
				delayReason,
272
				pickFromWarehouse,
272
				pickFromWarehouse,
273
				ItemType.SERIALIZED.equals(item.getType()),
273
				ItemType.SERIALIZED.equals(item.getType()),
274
				item.isHasItemNo(),
274
				item.isHasItemNo(),
275
				t_order.getFulfilmentWarehouseId());
275
				t_order.getFulfilmentWarehouseId(),
-
 
276
				t_order.getPickupStoreId());
276
		return order;
277
		return order;
277
	}
278
	}
278
 
279
 
279
	/**
280
	/**
280
	 * Queries the transction server to get the list of all return orders that
281
	 * Queries the transction server to get the list of all return orders that