| Line 394... |
Line 394... |
| 394 |
List<Integer> loanFofoIds = loans.stream().map(x -> x.getFofoId()).collect(Collectors.toList());
|
394 |
List<Integer> loanFofoIds = loans.stream().map(x -> x.getFofoId()).collect(Collectors.toList());
|
| 395 |
|
395 |
|
| 396 |
List<SDCreditRequirement> sdCreditRequirements = sdCreditRequirementRepository.selectByFofoIds(new ArrayList<>(loanFofoIds));
|
396 |
List<SDCreditRequirement> sdCreditRequirements = sdCreditRequirementRepository.selectByFofoIds(new ArrayList<>(loanFofoIds));
|
| 397 |
|
397 |
|
| 398 |
Map<Integer, Long> loanCountMap = loans.stream().collect(Collectors.groupingBy(x -> x.getFofoId(), Collectors.counting()));
|
398 |
Map<Integer, Long> loanCountMap = loans.stream().collect(Collectors.groupingBy(x -> x.getFofoId(), Collectors.counting()));
|
| - |
|
399 |
LOGGER.info("loanCountMap" + loanCountMap);
|
| 399 |
|
400 |
|
| 400 |
Map<Integer, UserWallet> userWalletMap = userWalletRepository.selectByRetailerIds(fofoIds).stream().collect(Collectors.toMap(x -> x.getUserId(), x -> x));
|
401 |
Map<Integer, UserWallet> userWalletMap = userWalletRepository.selectByRetailerIds(fofoIds).stream().collect(Collectors.toMap(x -> x.getUserId(), x -> x));
|
| 401 |
Map<Integer, CurrentPartnerDailyInvestment> currentPartnerDailyInvestmentMap = currentPartnerDailyInvestmentRepository.selectAll().stream().collect(Collectors.toMap(x -> x.getFofoId(), x -> x));
|
402 |
Map<Integer, CurrentPartnerDailyInvestment> currentPartnerDailyInvestmentMap = currentPartnerDailyInvestmentRepository.selectAll().stream().collect(Collectors.toMap(x -> x.getFofoId(), x -> x));
|
| 402 |
|
403 |
|
| 403 |
model.addAttribute("userWalletMap", userWalletMap);
|
404 |
model.addAttribute("userWalletMap", userWalletMap);
|
| Line 436... |
Line 437... |
| 436 |
}
|
437 |
}
|
| 437 |
}
|
438 |
}
|
| 438 |
List<Integer> fofoIds = loans.stream().map(x -> x.getFofoId()).collect(Collectors.toList());
|
439 |
List<Integer> fofoIds = loans.stream().map(x -> x.getFofoId()).collect(Collectors.toList());
|
| 439 |
Map<Integer, Double> fofoIdLoansMap = loans.stream().collect(Collectors.groupingBy(x -> x.getFofoId(), Collectors.summingDouble(x -> x.getPendingAmount().doubleValue())));
|
440 |
Map<Integer, Double> fofoIdLoansMap = loans.stream().collect(Collectors.groupingBy(x -> x.getFofoId(), Collectors.summingDouble(x -> x.getPendingAmount().doubleValue())));
|
| 440 |
Map<Integer, CustomRetailer> customRetailerMap = retailerService.getFofoRetailers(fofoIds);
|
441 |
Map<Integer, CustomRetailer> customRetailerMap = retailerService.getFofoRetailers(fofoIds);
|
| - |
|
442 |
Map<Integer, Long> loanCountMap = loans.stream().collect(Collectors.groupingBy(x -> x.getFofoId(), Collectors.counting()));
|
| 441 |
model.addAttribute("customRetailerMap", customRetailerMap);
|
443 |
model.addAttribute("customRetailerMap", customRetailerMap);
|
| 442 |
model.addAttribute("loans", loans);
|
444 |
model.addAttribute("loans", loans);
|
| 443 |
model.addAttribute("fofoReportingModelMap", fofoReportingModelMap);
|
445 |
model.addAttribute("fofoReportingModelMap", fofoReportingModelMap);
|
| 444 |
model.addAttribute("fofoIdLoansMap", fofoIdLoansMap);
|
446 |
model.addAttribute("fofoIdLoansMap", fofoIdLoansMap);
|
| - |
|
447 |
model.addAttribute("loanCountMap", loanCountMap);
|
| 445 |
return "partner-wise-loan-summary";
|
448 |
return "partner-wise-loan-summary";
|
| 446 |
}
|
449 |
}
|
| 447 |
|
450 |
|
| 448 |
@RequestMapping(value = "/getLoanSummary", method = RequestMethod.GET)
|
451 |
@RequestMapping(value = "/getLoanSummary", method = RequestMethod.GET)
|
| 449 |
public String getLoanSummary(HttpServletRequest request, @RequestParam int fofoId, Model model) throws ProfitMandiBusinessException {
|
452 |
public String getLoanSummary(HttpServletRequest request, @RequestParam int fofoId, Model model) throws ProfitMandiBusinessException {
|