Subversion Repositories SmartDukaan

Rev

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

Rev 34605 Rev 34607
Line 1489... Line 1489...
1489
            partnerRowsMap.put(fofoStore.getId(), row);
1489
            partnerRowsMap.put(fofoStore.getId(), row);
1490
            rows.add(row);
1490
            rows.add(row);
1491
 
1491
 
1492
        }
1492
        }
1493
 
1493
 
1494
        String fileName = "InvestmentSummary-" + FormattingUtils.formatDate(LocalDateTime.now()) + ".csv";
1494
       /* String fileName = "InvestmentSummary-" + FormattingUtils.formatDate(LocalDateTime.now()) + ".csv";
1495
 
1495
 
1496
        if (sendTo == null) {
1496
        if (sendTo == null) {
1497
            for (Entry<String, Set<Integer>> storeGuyEntry : csService.getAuthUserPartnerIdMapping().entrySet()) {
1497
            for (Entry<String, Set<Integer>> storeGuyEntry : csService.getAuthUserPartnerIdMapping().entrySet()) {
1498
                List<List<?>> filteredRows = storeGuyEntry.getValue().stream().map(x -> partnerRowsMap.get(x)).filter(x -> x != null).collect(Collectors.toList());
1498
                List<List<?>> filteredRows = storeGuyEntry.getValue().stream().map(x -> partnerRowsMap.get(x)).filter(x -> x != null).collect(Collectors.toList());
1499
                ByteArrayOutputStream baos = FileUtil.getCSVByteStream(headers, filteredRows);
1499
                ByteArrayOutputStream baos = FileUtil.getCSVByteStream(headers, filteredRows);
Line 1503... Line 1503...
1503
            sendTo = Arrays.asList("tarun.verma@smartdukaan.com", "kamini.sharma@smartdukaan.com", "neeraj.gupta@smartdukaan.com", "amit.gupta@shop2020.in", "manish.gupta1@smartdukaan.com", "niranjan.kala@smartdukaan.com");
1503
            sendTo = Arrays.asList("tarun.verma@smartdukaan.com", "kamini.sharma@smartdukaan.com", "neeraj.gupta@smartdukaan.com", "amit.gupta@shop2020.in", "manish.gupta1@smartdukaan.com", "niranjan.kala@smartdukaan.com");
1504
        }
1504
        }
1505
 
1505
 
1506
        ByteArrayOutputStream baos = FileUtil.getCSVByteStream(headers, rows);
1506
        ByteArrayOutputStream baos = FileUtil.getCSVByteStream(headers, rows);
1507
        String[] sendToArray = sendTo.toArray(new String[sendTo.size()]);
1507
        String[] sendToArray = sendTo.toArray(new String[sendTo.size()]);
1508
       // Utils.sendMailWithAttachment(googleMailSender, sendToArray, null, "Franchise Investment Summary", "PFA", fileName, new ByteArrayResource(baos.toByteArray()));
1508
        Utils.sendMailWithAttachment(googleMailSender, sendToArray, null, "Franchise Investment Summary", "PFA", fileName, new ByteArrayResource(baos.toByteArray()));*/
1509
 
1509
 
1510
    }
1510
    }
1511
 
1511
 
1512
    private Map<Integer, FofoReportingModel> getPartnerIdSalesHeaders() throws ProfitMandiBusinessException {
1512
    private Map<Integer, FofoReportingModel> getPartnerIdSalesHeaders() throws ProfitMandiBusinessException {
1513
        Map<String, SaleRoles> partnerEmailSalesMap = new HashMap<>();
1513
        Map<String, SaleRoles> partnerEmailSalesMap = new HashMap<>();