Subversion Repositories SmartDukaan

Rev

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

Rev 3364 Rev 4209
Line 76... Line 76...
76
	
76
	
77
	// Handler for GET /courier-details/<warehouseId>
77
	// Handler for GET /courier-details/<warehouseId>
78
	public String show(){
78
	public String show(){
79
		try {
79
		try {
80
			long warehouseId = Long.parseLong(getId());
80
			long warehouseId = Long.parseLong(getId());
-
 
81
			if(warehouseId == 1){
-
 
82
				warehouseId = 0;
-
 
83
			}
81
			long providerId = ((Long)session.getAttribute("providerId")).longValue();
84
			long providerId = ((Long)session.getAttribute("providerId")).longValue();
82
			boolean isCod;
85
			boolean isCod;
83
			try {
86
			try {
84
	            isCod = Boolean.parseBoolean(request.getParameter("isCod"));
87
	            isCod = Boolean.parseBoolean(request.getParameter("isCod"));
85
	        } catch (Exception e) {
88
	        } catch (Exception e) {
Line 190... Line 193...
190
		try{
193
		try{
191
			CatalogClient csc = new CatalogClient();
194
			CatalogClient csc = new CatalogClient();
192
			in.shop2020.model.v1.catalog.InventoryService.Client catalogClient= csc.getClient();
195
			in.shop2020.model.v1.catalog.InventoryService.Client catalogClient= csc.getClient();
193
			List<Warehouse> warehouses = catalogClient.getAllWarehouses(true);
196
			List<Warehouse> warehouses = catalogClient.getAllWarehouses(true);
194
			for(Warehouse warehouse : warehouses){
197
			for(Warehouse warehouse : warehouses){
-
 
198
				// FIXME Remove the hardcoding
-
 
199
				if(warehouse.getId() == 2 || warehouse.getId() == 5){
-
 
200
					continue;
-
 
201
				}
195
				warehouseMap.put(warehouse.getId(), warehouse.getDisplayName());
202
				warehouseMap.put(warehouse.getId(), warehouse.getDisplayName());
196
			}
203
			}
197
		}catch(Exception e){
204
		}catch(Exception e){
198
			logger.error("Error getting the list of warehouses", e);
205
			logger.error("Error getting the list of warehouses", e);
199
		}
206
		}