Subversion Repositories SmartDukaan

Rev

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

Rev 8941 Rev 9143
Line 209... Line 209...
209
			for(Provider provider : providerList){
209
			for(Provider provider : providerList){
210
				providerNameMap.put(provider.getId(), provider.getName());
210
				providerNameMap.put(provider.getId(), provider.getName());
211
			}*/
211
			}*/
212
			order = transactionServiceClient.getClient().getOrder(orderId);
212
			order = transactionServiceClient.getClient().getOrder(orderId);
213
			//Start:- Added by Manish Sharma for Displaying Logistics Provider Id and Amazon Order Id on 25-Jul-2013
213
			//Start:- Added by Manish Sharma for Displaying Logistics Provider Id and Amazon Order Id on 25-Jul-2013
-
 
214
			if(OrderSource.AMAZON == OrderSource.findByValue((int)order.getSource())){
214
			try {
215
				try {
215
			    amazonOrder = transactionServiceClient.getClient().getAmazonOrder(orderId);
216
				    amazonOrder = transactionServiceClient.getClient().getAmazonOrder(orderId);
216
			} catch (Exception e) {
217
				} catch (Exception e) {
217
			    log.error("Exception : No Amazon order found with orderId " + orderId);
218
				    log.error("Exception : No Amazon order found with orderId " + orderId);
-
 
219
				}
218
			}
220
			}
219
			if (order.getLogistics_provider_id() > 0) {
221
			if (order.getLogistics_provider_id() > 0) {
220
			    setProviderName(providerNameMap.get(order.getLogistics_provider_id()));
222
			    setProviderName(providerNameMap.get(order.getLogistics_provider_id()));
221
			}
223
			}
222
			//End:- Added by Manish Sharma for Displaying Logistics Provider Id and Amazon Order Id on 25-Jul-2013
224
			//End:- Added by Manish Sharma for Displaying Logistics Provider Id and Amazon Order Id on 25-Jul-2013
Line 905... Line 907...
905
			log.error(e);
907
			log.error(e);
906
		}
908
		}
907
		return 1;
909
		return 1;
908
	}
910
	}
909
	
911
	
-
 
912
	public int checkForOriginalOrders(){
-
 
913
		try{
-
 
914
			TransactionClient transactionServiceClient = new TransactionClient();
-
 
915
			in.shop2020.model.v1.order.TransactionService.Client transactionClient
-
 
916
		    = transactionServiceClient.getClient();
-
 
917
			in.shop2020.model.v1.order.Order t_order = transactionClient.getOrder(orderId);
-
 
918
			if(t_order.getOriginalOrderId()!=0l && t_order.getOriginalOrderId() > 0l){
-
 
919
				in.shop2020.model.v1.order.Order old_order = transactionClient.getOrder(t_order.getOriginalOrderId());
-
 
920
				if(old_order.isCod()){
-
 
921
					return 1;
-
 
922
				}
-
 
923
				else{
-
 
924
					return 2;
-
 
925
				}
-
 
926
			}
-
 
927
		}
-
 
928
		catch(Exception e){
-
 
929
			log.error(e);
-
 
930
		}
-
 
931
		return 0;
-
 
932
	}
-
 
933
	
910
	public void setPhysicalRefundDetails(List<String> details){
934
	public void setPhysicalRefundDetails(List<String> details){
911
		this.refundDetails = details;
935
		this.refundDetails = details;
912
	}
936
	}
913
	
937
	
914
	public List<String> getPhysicalRefundDetails(){
938
	public List<String> getPhysicalRefundDetails(){
Line 959... Line 983...
959
	public void setAddresses(List<Address> addresses) {
983
	public void setAddresses(List<Address> addresses) {
960
		this.addresses = addresses;
984
		this.addresses = addresses;
961
	}
985
	}
962
 
986
 
963
	public String getOrderStatusDescription(Order order) {
987
	public String getOrderStatusDescription(Order order) {
964
		String status = order.getStatus().getDescription();
988
		String status = order.getStatus().toString();
965
 
989
 
966
		if (order.getStatus() == OrderStatus.DELIVERY_SUCCESS) {
990
		if (order.getStatus() == OrderStatus.DELIVERY_SUCCESS) {
967
			status = "Completed";
991
			status = "Completed";
968
		}
992
		}
969
 
993