| Line 622... |
Line 622... |
| 622 |
String fileName = "InvestmentSummary-" + FormattingUtils.formatDate(LocalDateTime.now()) + ".csv";
|
622 |
String fileName = "InvestmentSummary-" + FormattingUtils.formatDate(LocalDateTime.now()) + ".csv";
|
| 623 |
for (Map.Entry<String, Set<String>> storeGuyEntry : storeGuyMap.entrySet()) {
|
623 |
for (Map.Entry<String, Set<String>> storeGuyEntry : storeGuyMap.entrySet()) {
|
| 624 |
List<List<? extends Serializable>> filteredRows = storeGuyEntry.getValue().stream()
|
624 |
List<List<? extends Serializable>> filteredRows = storeGuyEntry.getValue().stream()
|
| 625 |
.map(x -> partnerRow.get(x)).collect(Collectors.toList());
|
625 |
.map(x -> partnerRow.get(x)).collect(Collectors.toList());
|
| 626 |
ByteArrayOutputStream baos = FileUtil.getCSVByteStream(headers, filteredRows);
|
626 |
ByteArrayOutputStream baos = FileUtil.getCSVByteStream(headers, filteredRows);
|
| 627 |
String[] sendToArray = new String[] { storeGuyEntry.getKey() };
|
627 |
String[] sendToArray = new String[] { nameEmail.get(storeGuyEntry.getKey()) };
|
| 628 |
Utils.sendMailWithAttachment(googleMailSender, sendToArray, null, "Partner Investment Summary", "PFA",
|
628 |
Utils.sendMailWithAttachment(googleMailSender, sendToArray, null, "Partner Investment Summary", "PFA",
|
| 629 |
fileName, new ByteArrayResource(baos.toByteArray()));
|
629 |
fileName, new ByteArrayResource(baos.toByteArray()));
|
| 630 |
}
|
630 |
}
|
| 631 |
|
631 |
|
| 632 |
ByteArrayOutputStream baos = FileUtil.getCSVByteStream(headers, rows);
|
632 |
ByteArrayOutputStream baos = FileUtil.getCSVByteStream(headers, rows);
|