Subversion Repositories SmartDukaan

Rev

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

Rev 34920 Rev 34922
Line 475... Line 475...
475
            // Otherwise, use today
475
            // Otherwise, use today
476
            startOfToday = LocalDate.now().atStartOfDay();
476
            startOfToday = LocalDate.now().atStartOfDay();
477
            previousDay = startOfToday.with(LocalTime.MAX).minusDays(1);
477
            previousDay = startOfToday.with(LocalTime.MAX).minusDays(1);
478
        }
478
        }
479
 
479
 
480
        /*Map<Integer, CustomRetailer> customRetailers = retailerService.getAllFofoRetailersInternalFalse();
480
        Map<Integer, CustomRetailer> customRetailers = retailerService.getAllFofoRetailersInternalFalse();
481
 
481
 
482
        List<Integer> retailerIds = customRetailers.values().stream()
482
        List<Integer> retailerIds = customRetailers.values().stream()
483
                .filter(retailer -> {
483
                .filter(retailer -> {
484
                    String storeCode = retailer.getCode(); // adjust method name if different
484
                    String storeCode = retailer.getCode(); // adjust method name if different
485
                    return !storeCode.equalsIgnoreCase("UPGBN640") && !storeCode.equalsIgnoreCase("HRYN039");
485
                    return !storeCode.equalsIgnoreCase("UPGBN640") && !storeCode.equalsIgnoreCase("HRYN039");
486
                })
486
                })
487
                .map(CustomRetailer::getPartnerId)
487
                .map(CustomRetailer::getPartnerId)
488
                .collect(Collectors.toList());*/
488
                .collect(Collectors.toList());
489
 
489
 
490
//        List<Integer> retailerIds = customRetailers.values().stream().map(CustomRetailer::getPartnerId).collect(Collectors.toList());
490
//        List<Integer> retailerIds = customRetailers.values().stream().map(CustomRetailer::getPartnerId).collect(Collectors.toList());
491
 
491
 
492
        List<Integer> retailerIds = Arrays.asList(175139440,175139441,175139442);
492
/*        List<Integer> retailerIds = Arrays.asList(175139440,175139441,175139442);
493
        Map<Integer,CustomRetailer> customRetailers = retailerService.getFofoRetailers(retailerIds);
493
        Map<Integer,CustomRetailer> customRetailers = retailerService.getFofoRetailers(retailerIds);*/
494
 
494
 
495
        //partner daily investment
495
        //partner daily investment
496
        List<Loan> defaultLoans = sdCreditService.getDefaultLoans();
496
        List<Loan> defaultLoans = sdCreditService.getDefaultLoans();
497
        Map<Integer,List<Loan>> defaultLoanMap = defaultLoans.stream().collect(Collectors.groupingBy(Loan::getFofoId));
497
        Map<Integer,List<Loan>> defaultLoanMap = defaultLoans.stream().collect(Collectors.groupingBy(Loan::getFofoId));
498
 
498
 
Line 1200... Line 1200...
1200
            rows.add(row);
1200
            rows.add(row);
1201
        }
1201
        }
1202
 
1202
 
1203
        Map<String, Set<Integer>> storeGuyMap = this.generateBiReportHierarchyWise();
1203
        Map<String, Set<Integer>> storeGuyMap = this.generateBiReportHierarchyWise();
1204
 
1204
 
1205
       /* for (Map.Entry<String, Set<Integer>> storeGuyEntry : storeGuyMap.entrySet()) {
1205
        for (Map.Entry<String, Set<Integer>> storeGuyEntry : storeGuyMap.entrySet()) {
1206
            String storeGuyEmail = storeGuyEntry.getKey();
1206
            String storeGuyEmail = storeGuyEntry.getKey();
1207
            Set<Integer> fofoIds = storeGuyEntry.getValue();
1207
            Set<Integer> fofoIds = storeGuyEntry.getValue();
1208
            String[] sendToArray = new String[]{storeGuyEmail};
1208
            String[] sendToArray = new String[]{storeGuyEmail};
1209
 
1209
 
1210
            List<List<?>> filteredRows = rows.stream()
1210
            List<List<?>> filteredRows = rows.stream()
1211
                    .filter(row -> row.size() > 5 && fofoIds.contains((Integer) row.get(5)))
1211
                    .filter(row -> row.size() > 5 && fofoIds.contains((Integer) row.get(5)))
1212
                    .collect(Collectors.toList());
1212
                    .collect(Collectors.toList());
1213
            this.sendMailToUser(headerGroup,filteredRows,sendToArray);
1213
            this.sendMailToUser(headerGroup,filteredRows,sendToArray);
1214
        }*/
1214
        }
1215
 
1215
 
1216
        this.sendMailToUser(headerGroup,rows,new String[]{"ranu.rajput@smartdukaan.com"});
1216
        this.sendMailToUser(headerGroup,rows,new String[]{"ranu.rajput@smartdukaan.com"});
1217
 
1217
 
1218
 
1218
 
1219
    }
1219
    }