| Line 803... |
Line 803... |
| 803 |
attachment1);
|
803 |
attachment1);
|
| 804 |
|
804 |
|
| 805 |
// Reports to be sent to mapped partners
|
805 |
// Reports to be sent to mapped partners
|
| 806 |
Map<String, Set<String>> storeGuysMap = csService.getAuthUserPartnerEmailMapping();
|
806 |
Map<String, Set<String>> storeGuysMap = csService.getAuthUserPartnerEmailMapping();
|
| 807 |
|
807 |
|
| 808 |
Utils.sendMailWithAttachments(googleMailSender, (String[])storeGuysMap.keySet().toArray(), null, "Stock Aeging Report", "PFA", attachment);
|
808 |
Utils.sendMailWithAttachments(googleMailSender, storeGuysMap.keySet().toArray(new String[0]), null, "Stock Aeging Report", "PFA", attachment);
|
| 809 |
|
809 |
|
| 810 |
for (Map.Entry<String, Set<String>> storeGuyEntry : storeGuysMap.entrySet()) {
|
810 |
for (Map.Entry<String, Set<String>> storeGuyEntry : storeGuysMap.entrySet()) {
|
| 811 |
Map<String, String> params = new HashMap<>();
|
811 |
Map<String, String> params = new HashMap<>();
|
| 812 |
if (storeGuyEntry.getValue().size() == 0)
|
812 |
if (storeGuyEntry.getValue().size() == 0)
|
| 813 |
continue;
|
813 |
continue;
|
| Line 815... |
Line 815... |
| 815 |
InputStreamSource isr3 = reporticoService.getReportInputStreamSource(ReporticoProject.FOCO,
|
815 |
InputStreamSource isr3 = reporticoService.getReportInputStreamSource(ReporticoProject.FOCO,
|
| 816 |
"focostockreport.xml", params);
|
816 |
"focostockreport.xml", params);
|
| 817 |
Attachment attache = new Attachment(
|
817 |
Attachment attache = new Attachment(
|
| 818 |
"partner-stock-report" + FormattingUtils.formatDate(LocalDateTime.now()) + ".csv", isr3);
|
818 |
"partner-stock-report" + FormattingUtils.formatDate(LocalDateTime.now()) + ".csv", isr3);
|
| 819 |
System.out.println(storeGuyEntry.getValue());
|
819 |
System.out.println(storeGuyEntry.getValue());
|
| 820 |
Utils.sendMailWithAttachments(googleMailSender, storeGuyEntry.getValue().toArray(new String[] {}), null,
|
820 |
Utils.sendMailWithAttachments(googleMailSender, storeGuyEntry.getValue().toArray(new String[0]), null,
|
| 821 |
"Partner Stock Report", "PFA", attache);
|
821 |
"Partner Stock Report", "PFA", attache);
|
| 822 |
}
|
822 |
}
|
| 823 |
|
823 |
|
| 824 |
}
|
824 |
}
|
| 825 |
|
825 |
|