Subversion Repositories SmartDukaan

Rev

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

Rev 24684 Rev 24688
Line 701... Line 701...
701
	}
701
	}
702
 
702
 
703
	public void sendAgeingReport() throws Exception {
703
	public void sendAgeingReport() throws Exception {
704
		HttpResponse response = reporticoService.getReportFile(ReporticoProject.WAREHOUSENEW, "itemstockageing.xml");
704
		HttpResponse response = reporticoService.getReportFile(ReporticoProject.WAREHOUSENEW, "itemstockageing.xml");
705
		HttpEntity respsonseEntity = response.getEntity();
705
		HttpEntity respsonseEntity = response.getEntity();
706
		System.out.println("Content Length - " + respsonseEntity.getContentLength());
-
 
707
		byte[] responseBytes = new byte[(int) respsonseEntity.getContentLength()];
706
		byte[] buffer = new byte[respsonseEntity.getContent().available()];
708
		respsonseEntity.getContent().read(responseBytes);
707
		respsonseEntity.getContent().read(buffer);
709
		String[] to = { "amod.sen@smartdukaan.com", "adeel.yazdani@smartdukaan.com", "kamini.sharma@smartdukaan.com",
708
		String[] to = { "amod.sen@smartdukaan.com", "adeel.yazdani@smartdukaan.com", "kamini.sharma@smartdukaan.com",
710
				"tarun.verma@smartdukaan.com", "chaitnaya.vats@smartdukaan.com", "mohinder.mutreja@smartdukaan.com" };
709
				"tarun.verma@smartdukaan.com", "chaitnaya.vats@smartdukaan.com", "mohinder.mutreja@smartdukaan.com" };
711
		Attachment attachment = new Attachment(
710
		Attachment attachment = new Attachment(
712
				"aeging-report-" + FormattingUtils.formatDate(LocalDateTime.now().minusDays(1)),
711
				"aeging-report-" + FormattingUtils.formatDate(LocalDateTime.now().minusDays(1)),
713
				new ByteArrayResource(responseBytes));
712
				new ByteArrayResource(buffer));
714
		Utils.sendMailWithAttachments(googleMailSender, to, null, "Stock Aeging Report", "PFA", attachment);
713
		Utils.sendMailWithAttachments(googleMailSender, to, null, "Stock Aeging Report", "PFA", attachment);
715
	}
714
	}
716
 
715
 
717
	public void moveImeisToPriceDropImeis() throws Exception {
716
	public void moveImeisToPriceDropImeis() throws Exception {
718
		List<PriceDrop> priceDrops = priceDropRepository.selectAll();
717
		List<PriceDrop> priceDrops = priceDropRepository.selectAll();