Subversion Repositories SmartDukaan

Rev

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

Rev 34324 Rev 34335
Line 1411... Line 1411...
1411
 
1411
 
1412
        }
1412
        }
1413
 
1413
 
1414
        String fileName = "InvestmentSummary-" + FormattingUtils.formatDate(LocalDateTime.now()) + ".csv";
1414
        String fileName = "InvestmentSummary-" + FormattingUtils.formatDate(LocalDateTime.now()) + ".csv";
1415
 
1415
 
1416
        if (sendTo == null) {
1416
        /*if (sendTo == null) {
1417
            for (Entry<String, Set<Integer>> storeGuyEntry : csService.getAuthUserPartnerIdMapping().entrySet()) {
1417
            for (Entry<String, Set<Integer>> storeGuyEntry : csService.getAuthUserPartnerIdMapping().entrySet()) {
1418
                List<List<?>> filteredRows = storeGuyEntry.getValue().stream().map(x -> partnerRowsMap.get(x)).filter(x -> x != null).collect(Collectors.toList());
1418
                List<List<?>> filteredRows = storeGuyEntry.getValue().stream().map(x -> partnerRowsMap.get(x)).filter(x -> x != null).collect(Collectors.toList());
1419
                ByteArrayOutputStream baos = FileUtil.getCSVByteStream(headers, filteredRows);
1419
                ByteArrayOutputStream baos = FileUtil.getCSVByteStream(headers, filteredRows);
1420
                String[] sendToArray = new String[]{storeGuyEntry.getKey()};
1420
                String[] sendToArray = new String[]{storeGuyEntry.getKey()};
1421
                Utils.sendMailWithAttachment(googleMailSender, sendToArray, null, "Franchise Investment Summary", "PFA", fileName, new ByteArrayResource(baos.toByteArray()));
1421
                Utils.sendMailWithAttachment(googleMailSender, sendToArray, null, "Franchise Investment Summary", "PFA", fileName, new ByteArrayResource(baos.toByteArray()));
Line 1423... Line 1423...
1423
            sendTo = Arrays.asList("tarun.verma@smartdukaan.com", "kamini.sharma@smartdukaan.com", "neeraj.gupta@smartdukaan.com", "amit.gupta@shop2020.in", "manish.gupta@smartdukaan.com", "niranjan.kala@smartdukaan.com");
1423
            sendTo = Arrays.asList("tarun.verma@smartdukaan.com", "kamini.sharma@smartdukaan.com", "neeraj.gupta@smartdukaan.com", "amit.gupta@shop2020.in", "manish.gupta@smartdukaan.com", "niranjan.kala@smartdukaan.com");
1424
        }
1424
        }
1425
 
1425
 
1426
        ByteArrayOutputStream baos = FileUtil.getCSVByteStream(headers, rows);
1426
        ByteArrayOutputStream baos = FileUtil.getCSVByteStream(headers, rows);
1427
        String[] sendToArray = sendTo.toArray(new String[sendTo.size()]);
1427
        String[] sendToArray = sendTo.toArray(new String[sendTo.size()]);
1428
        Utils.sendMailWithAttachment(googleMailSender, sendToArray, null, "Franchise Investment Summary", "PFA", fileName, new ByteArrayResource(baos.toByteArray()));
1428
        Utils.sendMailWithAttachment(googleMailSender, sendToArray, null, "Franchise Investment Summary", "PFA", fileName, new ByteArrayResource(baos.toByteArray()));*/
1429
 
1429
 
1430
    }
1430
    }
1431
 
1431
 
1432
    private Map<Integer, FofoReportingModel> getPartnerIdSalesHeaders() throws ProfitMandiBusinessException {
1432
    private Map<Integer, FofoReportingModel> getPartnerIdSalesHeaders() throws ProfitMandiBusinessException {
1433
        Map<String, SaleRoles> partnerEmailSalesMap = new HashMap<>();
1433
        Map<String, SaleRoles> partnerEmailSalesMap = new HashMap<>();