Subversion Repositories SmartDukaan

Rev

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

Rev 4825 Rev 4826
Line 157... Line 157...
157
                case PAUSED:
157
                case PAUSED:
158
                case PAUSED_BY_RISK:
158
                case PAUSED_BY_RISK:
159
                case ACTIVE:
159
                case ACTIVE:
160
                    RowItem rowItem = new RowItem(item);
160
                    RowItem rowItem = new RowItem(item);
161
                    if(state == status.ACTIVE){
161
                    if(state == status.ACTIVE){
-
 
162
                    	long deliveryDays = 3;
-
 
163
                    	try{
162
                    	long deliveryDays = logisticsClient.getLogisticsEstimation(item.getId(), DEFAULT_PINCODE, DeliveryType.PREPAID).getDeliveryTime();
164
                    		deliveryDays = logisticsClient.getLogisticsEstimation(item.getId(), DEFAULT_PINCODE, DeliveryType.PREPAID).getDeliveryTime();
-
 
165
                    	}catch (LogisticsServiceException e) {
-
 
166
                    		logger.error("Error while getting estimate of the inventory for item " + item.getId(), e);
-
 
167
                    		return null;
-
 
168
                    	}
163
                        if(deliveryDays == 1)
169
                        if(deliveryDays == 1)
164
                            itemsDeliverableNextDay.add(rowItem);
170
                            itemsDeliverableNextDay.add(rowItem);
165
                        else
171
                        else
166
                            itemsNotDeliverableNextDay.add(rowItem);    
172
                            itemsNotDeliverableNextDay.add(rowItem);    
167
                    }else
173
                    }else
Line 175... Line 181...
175
            logger.error("Error while getting the items from the inventory", e);
181
            logger.error("Error while getting the items from the inventory", e);
176
            return null;
182
            return null;
177
        } catch (TException e) {
183
        } catch (TException e) {
178
            logger.error("Error while getting the items from the inventory", e);
184
            logger.error("Error while getting the items from the inventory", e);
179
            return null;
185
            return null;
180
		} catch (LogisticsServiceException e) {
-
 
181
	        logger.error("Error while getting estimate of the inventory", e);
-
 
182
            return null;
-
 
183
	
-
 
184
		}
186
		}
185
        
187
        
186
        ByteArrayOutputStream baosXLS = new ByteArrayOutputStream();
188
        ByteArrayOutputStream baosXLS = new ByteArrayOutputStream();
187
 
189
 
188
        Workbook wb = new HSSFWorkbook();
190
        Workbook wb = new HSSFWorkbook();