| Line 650... |
Line 650... |
| 650 |
|
650 |
|
| 651 |
Map<Integer, Object> authIdAndallValues = new LinkedHashMap<>();
|
651 |
Map<Integer, Object> authIdAndallValues = new LinkedHashMap<>();
|
| 652 |
Map<Integer, Object> authIdAndAuthUserMap = new LinkedHashMap<>();
|
652 |
Map<Integer, Object> authIdAndAuthUserMap = new LinkedHashMap<>();
|
| 653 |
|
653 |
|
| 654 |
Map<Integer, Long> ticketMap = ticketRepository.selectAllNotClosedTicketsGroupByRetailer();
|
654 |
Map<Integer, Long> ticketMap = ticketRepository.selectAllNotClosedTicketsGroupByRetailer();
|
| 655 |
for (Integer auth : l1authIds) {
|
655 |
for (Integer l1AuthId : l1authIds) {
|
| 656 |
|
656 |
|
| 657 |
double totallmtdAmount = 0;
|
657 |
double totallmtdAmount = 0;
|
| 658 |
double totalmtdAmount = 0;
|
658 |
double totalmtdAmount = 0;
|
| 659 |
int totalTicketCount = 0;
|
659 |
int totalTicketCount = 0;
|
| 660 |
float totalTodayInvestment = 0;
|
660 |
float totalTodayInvestment = 0;
|
| 661 |
float totalStockInInvestment = 0;
|
661 |
float totalStockInInvestment = 0;
|
| 662 |
double currentMonthRatingAllPartners = 0;
|
662 |
double currentMonthRatingAllPartners = 0;
|
| 663 |
Map<Integer, Long> leadCount = leadRepository.selectByAssignAuthIdAndStatus(auth, LeadStatus.followUp)
|
663 |
Map<Integer, Long> leadCount = leadRepository.selectByAssignAuthIdAndStatus(l1AuthId, LeadStatus.followUp)
|
| 664 |
.stream().collect(Collectors.groupingBy(Lead::getAssignTo, Collectors.counting()));
|
664 |
.stream().collect(Collectors.groupingBy(Lead::getAssignTo, Collectors.counting()));
|
| 665 |
|
665 |
|
| 666 |
AuthUser authUser = authRepository.selectById(auth);
|
666 |
AuthUser authUser = authRepository.selectById(l1AuthId);
|
| 667 |
|
667 |
|
| 668 |
authIdAndAuthUserMap.put(auth, authUser);
|
668 |
authIdAndAuthUserMap.put(l1AuthId, authUser);
|
| 669 |
|
669 |
|
| 670 |
List<Integer> fofoIds = pp.get(auth);
|
670 |
List<Integer> fofoIds = pp.get(l1AuthId);
|
| 671 |
|
671 |
|
| 672 |
for (Integer fId : fofoIds) {
|
672 |
for (Integer fId : fofoIds) {
|
| 673 |
try {
|
673 |
try {
|
| 674 |
PartnerDailyInvestment investment = partnerInvestmentService.getInvestment(fId, 0);
|
674 |
PartnerDailyInvestment investment = partnerInvestmentService.getInvestment(fId, 0);
|
| 675 |
totalTodayInvestment += investment.getTotalInvestment();
|
675 |
totalTodayInvestment += investment.getTotalInvestment();
|
| Line 707... |
Line 707... |
| 707 |
LOGGER.info("totalHygieneRating" + totalHygieneRating);
|
707 |
LOGGER.info("totalHygieneRating" + totalHygieneRating);
|
| 708 |
|
708 |
|
| 709 |
PartnerDetailModel pm = new PartnerDetailModel();
|
709 |
PartnerDetailModel pm = new PartnerDetailModel();
|
| 710 |
pm.setLmtd(totallmtdAmount);
|
710 |
pm.setLmtd(totallmtdAmount);
|
| 711 |
pm.setMtd(totalmtdAmount);
|
711 |
pm.setMtd(totalmtdAmount);
|
| 712 |
if (leadCount.get(auth) != null) {
|
712 |
if (leadCount.get(l1AuthId) != null) {
|
| 713 |
pm.setLeads(leadCount.get(auth).intValue());
|
713 |
pm.setLeads(leadCount.get(l1AuthId).intValue());
|
| 714 |
} else {
|
714 |
} else {
|
| 715 |
pm.setLeads(0);
|
715 |
pm.setLeads(0);
|
| 716 |
}
|
716 |
}
|
| 717 |
|
717 |
|
| 718 |
pm.setInvestment(totalTodayInvestment);
|
718 |
pm.setInvestment(totalTodayInvestment);
|
| 719 |
pm.setStockInInvestment(totalStockInInvestment);
|
719 |
pm.setStockInInvestment(totalStockInInvestment);
|
| 720 |
pm.setTicket(totalTicketCount);
|
720 |
pm.setTicket(totalTicketCount);
|
| 721 |
pm.setHygiene((double) Math.round(totalHygieneRating));
|
721 |
pm.setHygiene((double) Math.round(totalHygieneRating));
|
| 722 |
authIdAndallValues.put(auth, pm);
|
722 |
authIdAndallValues.put(l1AuthId, pm);
|
| 723 |
|
723 |
|
| 724 |
}
|
724 |
}
|
| 725 |
model.addAttribute("authIdAndallValues", authIdAndallValues);
|
725 |
model.addAttribute("authIdAndallValues", authIdAndallValues);
|
| 726 |
model.addAttribute("authIdAndAuthUserMap", authIdAndAuthUserMap);
|
726 |
model.addAttribute("authIdAndAuthUserMap", authIdAndAuthUserMap);
|
| 727 |
LOGGER.info("authIdAndallValues" + authIdAndallValues);
|
727 |
LOGGER.info("authIdAndallValues" + authIdAndallValues);
|