Subversion Repositories SmartDukaan

Rev

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

Rev 5218 Rev 5220
Line 172... Line 172...
172
			    sendMailForPLBMismatches(warehouseId, currentInventory);
172
			    sendMailForPLBMismatches(warehouseId, currentInventory);
173
			}
173
			}
174
		} catch (Exception e) {
174
		} catch (Exception e) {
175
			logger.error("Unable to update inventory", e);
175
			logger.error("Unable to update inventory", e);
176
		}
176
		}
177
		
-
 
178
		return new DefaultHttpHeaders("psuccess");
-
 
179
 
177
 
-
 
178
		return new DefaultHttpHeaders("psuccess");
180
	}
179
	}
181
 
180
 
182
    private void sendMailForPLBMismatches(Long warehouseId, Map<String, PLBDetails> currentInventory)
181
    private void sendMailForPLBMismatches(Long warehouseId, Map<String, PLBDetails> currentInventory)
183
            throws InventoryServiceException, TException, MessagingException {
182
            throws InventoryServiceException, TException, MessagingException {
184
        if (fullPlbSync) {
183
        if (fullPlbSync) {
Line 215... Line 214...
215
                }
214
                }
216
                else {
215
                else {
217
                    body.append(item.getId() + " " + item.getBrand() + "|" + item.getModelName() + "|" + item.getModelNumber() + "|" + item.getColor() + " " + item.getItemInventory().getAvailability().get(warehouseId) + " 0\n");
216
                    body.append(item.getId() + " " + item.getBrand() + "|" + item.getModelName() + "|" + item.getModelNumber() + "|" + item.getColor() + " " + item.getItemInventory().getAvailability().get(warehouseId) + " 0\n");
218
                }                
217
                }                
219
            }
218
            }
-
 
219
 
-
 
220
            logger.info(body.toString());
220
            GmailUtils g = new GmailUtils();
221
            GmailUtils g = new GmailUtils();
221
            g.sendSSLMessage(new String[]{ "mandeep.dhir@shop2020.in" }, subject, body.toString(), "cnc.center@shop2020.in", "5hop2o2o", new ArrayList<File>());
222
            g.sendSSLMessage(new String[]{ "mandeep.dhir@shop2020.in" }, subject, body.toString(), "cnc.center@shop2020.in", "5hop2o2o", new ArrayList<File>());
222
        }
223
        }
223
    }
224
    }
224
 
225