Subversion Repositories SmartDukaan

Rev

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

Rev 5215 Rev 5218
Line 167... Line 167...
167
                        GmailUtils g = new GmailUtils();
167
                        GmailUtils g = new GmailUtils();
168
                        g.sendSSLMessage(new String[]{ "mandeep.dhir@shop2020.in" }, "Error resetting availability for " + plbDetail.getItemKey() + " in warehouseId: " + warehouseId + " to " + plbDetail.getQuantity(), "", "cnc.center@shop2020.in", "5hop2o2o", new ArrayList<File>());
168
                        g.sendSSLMessage(new String[]{ "mandeep.dhir@shop2020.in" }, "Error resetting availability for " + plbDetail.getItemKey() + " in warehouseId: " + warehouseId + " to " + plbDetail.getQuantity(), "", "cnc.center@shop2020.in", "5hop2o2o", new ArrayList<File>());
169
                    }
169
                    }
170
			    }
170
			    }
171
 
171
 
172
			    semdMailForPLBMismatches(snapshotClient, warehouseId,
172
			    sendMailForPLBMismatches(warehouseId, currentInventory);
173
                        currentInventory);
-
 
174
			}
173
			}
175
		} catch (Exception e) {
174
		} catch (Exception e) {
176
			logger.error("Unable to update inventory", e);
175
			logger.error("Unable to update inventory", e);
177
		}
176
		}
178
		
177
		
179
		return new DefaultHttpHeaders("psuccess");
178
		return new DefaultHttpHeaders("psuccess");
180
 
179
 
181
	}
180
	}
182
 
181
 
183
    private void semdMailForPLBMismatches(Client snapshotClient,
-
 
184
            Long warehouseId, Map<String, PLBDetails> currentInventory)
182
    private void sendMailForPLBMismatches(Long warehouseId, Map<String, PLBDetails> currentInventory)
185
            throws InventoryServiceException, TException, MessagingException {
183
            throws InventoryServiceException, TException, MessagingException {
186
        if (fullPlbSync) {
184
        if (fullPlbSync) {
187
            Map<Item, PLBDetails> mismatches = new HashMap<Item, PLBDetails>();
185
            Map<Item, PLBDetails> mismatches = new HashMap<Item, PLBDetails>();
-
 
186
            Client snapshotClient = new CatalogClient().getClient();
188
            List<Item> items = snapshotClient.getAllItems(true);
187
            List<Item> items = snapshotClient.getAllItems(true);
189
            for (Item item : items) {
188
            for (Item item : items) {
190
                if (ItemType.NON_SERIALIZED.equals(item.getType())) {
189
                if (ItemType.NON_SERIALIZED.equals(item.getType())) {
191
                    continue;
190
                    continue;
192
                }
191
                }