Subversion Repositories SmartDukaan

Rev

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

Rev 34925 Rev 34926
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 = Arrays.asList(175139993,175139441,175139442,175140143,175140146);
490
//        List<Integer> retailerIds = Arrays.asList(175139993,175139441,175139442,175140143,175140146);
491
        Map<Integer,CustomRetailer> customRetailers = retailerService.getFofoRetailers(retailerIds);
491
//        Map<Integer,CustomRetailer> customRetailers = retailerService.getFofoRetailers(retailerIds);
492
 
492
 
493
        //partner daily investment
493
        //partner daily investment
494
        List<Loan> defaultLoans = sdCreditService.getDefaultLoans();
494
        List<Loan> defaultLoans = sdCreditService.getDefaultLoans();
495
        Map<Integer,List<Loan>> defaultLoanMap = defaultLoans.stream().collect(Collectors.groupingBy(Loan::getFofoId));
495
        Map<Integer,List<Loan>> defaultLoanMap = defaultLoans.stream().collect(Collectors.groupingBy(Loan::getFofoId));
496
 
496
 
Line 1198... Line 1198...
1198
            rows.add(row);
1198
            rows.add(row);
1199
        }
1199
        }
1200
 
1200
 
1201
        Map<String, Set<Integer>> storeGuyMap = this.generateBiReportHierarchyWise();
1201
        Map<String, Set<Integer>> storeGuyMap = this.generateBiReportHierarchyWise();
1202
 
1202
 
1203
        /*for (Map.Entry<String, Set<Integer>> storeGuyEntry : storeGuyMap.entrySet()) {
1203
        for (Map.Entry<String, Set<Integer>> storeGuyEntry : storeGuyMap.entrySet()) {
1204
            String storeGuyEmail = storeGuyEntry.getKey();
1204
            String storeGuyEmail = storeGuyEntry.getKey();
1205
            Set<Integer> fofoIds = storeGuyEntry.getValue();
1205
            Set<Integer> fofoIds = storeGuyEntry.getValue();
1206
            String[] sendToArray = new String[]{storeGuyEmail};
1206
            String[] sendToArray = new String[]{storeGuyEmail};
1207
 
1207
 
1208
            List<List<?>> filteredRows = rows.stream()
1208
            List<List<?>> filteredRows = rows.stream()
1209
                    .filter(row -> row.size() > 5 && fofoIds.contains((Integer) row.get(5)))
1209
                    .filter(row -> row.size() > 5 && fofoIds.contains((Integer) row.get(5)))
1210
                    .collect(Collectors.toList());
1210
                    .collect(Collectors.toList());
1211
            this.sendMailToUser(headerGroup,filteredRows,sendToArray);
1211
            this.sendMailToUser(headerGroup,filteredRows,sendToArray);
1212
        }*/
1212
        }
1213
 
1213
 
1214
        this.sendMailToUser(headerGroup,rows,new String[]{"ranu.rajput@smartdukaan.com"});
1214
        this.sendMailToUser(headerGroup,rows,new String[]{"ranu.rajput@smartdukaan.com"});
1215
 
1215
 
1216
 
1216
 
1217
    }
1217
    }