| Line 871... |
Line 871... |
| 871 |
for (int i = 0; i <= 6; i++) {
|
871 |
for (int i = 0; i <= 6; i++) {
|
| 872 |
|
872 |
|
| 873 |
Map<Integer, PartnerCollectionPlanModel> collectionMap = partnerCollectionService
|
873 |
Map<Integer, PartnerCollectionPlanModel> collectionMap = partnerCollectionService
|
| 874 |
.getCollectionMap(fofoIdList, startDate.minusDays(i));
|
874 |
.getCollectionMap(fofoIdList, startDate.minusDays(i));
|
| 875 |
|
875 |
|
| - |
|
876 |
LOGGER.info("dddd {} {}", startDate.minusDays(i), collectionMap.get(175138989));
|
| - |
|
877 |
|
| 876 |
pcpmMap.put(startDate.minusDays(i).toLocalDate(), collectionMap);
|
878 |
pcpmMap.put(startDate.minusDays(i).toLocalDate(), collectionMap);
|
| 877 |
}
|
879 |
}
|
| 878 |
|
880 |
|
| 879 |
Map<Integer, PartnerCollectionPlanModel> todayPcpmMap = pcpmMap.get(startDate.toLocalDate());
|
881 |
Map<Integer, PartnerCollectionPlanModel> todayPcpmMap = pcpmMap.get(startDate.toLocalDate());
|
| 880 |
model.addAttribute("todayPcpmMap", todayPcpmMap);
|
882 |
model.addAttribute("todayPcpmMap", todayPcpmMap);
|
| 881 |
|
883 |
|
| 882 |
Map<Integer, CustomRetailer> customRetailers = retailerService.getFofoRetailers(fofoIdList);
|
884 |
Map<Integer, CustomRetailer> customRetailers = retailerService.getFofoRetailers(fofoIdList);
|
| 883 |
List<Integer> allReportees = authService.getAllReportees(authUser.getId());
|
885 |
List<Integer> allReportees = authService.getAllReportees(authUser.getId());
|
| 884 |
LOGGER.info("allReportees" + allReportees);
|
- |
|
| - |
|
886 |
|
| 885 |
List<Integer> salesPositionsAuthIds = positionRepository
|
887 |
List<Integer> salesPositionsAuthIds = positionRepository
|
| 886 |
.selectPositionByCategoryId(ProfitMandiConstants.TICKET_CATEGORY_SALES).stream()
|
888 |
.selectPositionByCategoryId(ProfitMandiConstants.TICKET_CATEGORY_SALES).stream()
|
| 887 |
.map(x -> x.getAuthUserId()).collect(Collectors.toList());
|
889 |
.map(x -> x.getAuthUserId()).collect(Collectors.toList());
|
| 888 |
LOGGER.info("salesPositionsAuthIds" + salesPositionsAuthIds);
|
- |
|
| 889 |
List<Integer> rbmPositionsAuthIds = positionRepository
|
890 |
List<Integer> rbmPositionsAuthIds = positionRepository
|
| 890 |
.selectPositionByCategoryId(ProfitMandiConstants.TICKET_CATEGORY_RBM).stream()
|
891 |
.selectPositionByCategoryId(ProfitMandiConstants.TICKET_CATEGORY_RBM).stream()
|
| 891 |
.map(x -> x.getAuthUserId()).collect(Collectors.toList());
|
892 |
.map(x -> x.getAuthUserId()).collect(Collectors.toList());
|
| 892 |
LOGGER.info("rbmPositionsAuthIds" + rbmPositionsAuthIds);
|
- |
|
| 893 |
|
893 |
|
| 894 |
salesPositionsAuthIds.addAll(rbmPositionsAuthIds);
|
894 |
salesPositionsAuthIds.addAll(rbmPositionsAuthIds);
|
| 895 |
|
895 |
|
| 896 |
LOGGER.info("sdddd" + salesPositionsAuthIds);
|
- |
|
| 897 |
|
- |
|
| 898 |
Set<Integer> empHierarchy = allReportees.stream().filter(x -> salesPositionsAuthIds.contains(x))
|
896 |
Set<Integer> empHierarchy = allReportees.stream().filter(x -> salesPositionsAuthIds.contains(x))
|
| 899 |
.collect(Collectors.toSet());
|
897 |
.collect(Collectors.toSet());
|
| 900 |
|
898 |
|
| 901 |
LOGGER.info("empHierarchy" + empHierarchy);
|
- |
|
| 902 |
List<AuthUser> authUsers = authRepository.selectAllAuthUserByIds(new ArrayList<>(empHierarchy));
|
899 |
List<AuthUser> authUsers = authRepository.selectAllAuthUserByIds(new ArrayList<>(empHierarchy));
|
| 903 |
|
900 |
|
| 904 |
LOGGER.info("dddd" + authUsers);
|
- |
|
| 905 |
model.addAttribute("authUsers", authUsers);
|
901 |
model.addAttribute("authUsers", authUsers);
|
| 906 |
model.addAttribute("partnerCollectionPlanMap", pcpmMap);
|
902 |
model.addAttribute("partnerCollectionPlanMap", pcpmMap);
|
| 907 |
model.addAttribute("partnerDailyInvestmentMap", partnerDailyInvestmentMap);
|
903 |
model.addAttribute("partnerDailyInvestmentMap", partnerDailyInvestmentMap);
|
| 908 |
model.addAttribute("customRetailers", customRetailers);
|
904 |
model.addAttribute("customRetailers", customRetailers);
|
| 909 |
model.addAttribute("rankColorMap", ProfitMandiConstants.Rank_Color_Map);
|
905 |
model.addAttribute("rankColorMap", ProfitMandiConstants.Rank_Color_Map);
|