| Line 996... |
Line 996... |
| 996 |
|
996 |
|
| 997 |
Map<Integer, List<Integer>> pp = csService.getAuthUserIdPartnerIdMapping();
|
997 |
Map<Integer, List<Integer>> pp = csService.getAuthUserIdPartnerIdMapping();
|
| 998 |
Map<Integer, Long> ticketMap = ticketRepository.selectAllNotClosedTicketsGroupByRetailer();
|
998 |
Map<Integer, Long> ticketMap = ticketRepository.selectAllNotClosedTicketsGroupByRetailer();
|
| 999 |
Map<Integer, Integer> authIdAndleadsCountMap = new HashMap<>();
|
999 |
Map<Integer, Integer> authIdAndleadsCountMap = new HashMap<>();
|
| 1000 |
Map<Integer, List<Integer>> L2L1Mapping = csService.getL1L2Mapping();
|
1000 |
Map<Integer, List<Integer>> L2L1Mapping = csService.getL1L2Mapping();
|
| - |
|
1001 |
|
| - |
|
1002 |
LOGGER.info("L2L1Mapping" + L2L1Mapping);
|
| 1001 |
|
1003 |
|
| 1002 |
for (Entry<Integer, List<Integer>> l2l1 : L2L1Mapping.entrySet()) {
|
1004 |
for (Entry<Integer, List<Integer>> l2l1 : L2L1Mapping.entrySet()) {
|
| 1003 |
List<Integer> authIds = l2l1.getValue();
|
1005 |
List<Integer> authIds = l2l1.getValue();
|
| 1004 |
authIds.add(l2l1.getKey());
|
1006 |
authIds.add(l2l1.getKey());
|
| 1005 |
|
1007 |
|
| 1006 |
List<Lead> leads = leadRepository.selectByAssignAuthIdsAndStatus(authIds, LeadStatus.followUp);
|
1008 |
List<Lead> leads = leadRepository.selectByAssignAuthIdsAndStatus(authIds, LeadStatus.followUp);
|
| 1007 |
|
- |
|
| - |
|
1009 |
LOGGER.info("authIdAndleadsCountMap" + authIdAndleadsCountMap);
|
| 1008 |
AuthUser auth = authRepository.selectById(l2l1.getKey());
|
1010 |
AuthUser auth = authRepository.selectById(l2l1.getKey());
|
| 1009 |
if (!leads.isEmpty()) {
|
1011 |
if (!leads.isEmpty()) {
|
| 1010 |
authIdAndleadsCountMap.put(auth.getId(), leads.size());
|
1012 |
authIdAndleadsCountMap.put(auth.getId(), leads.size());
|
| 1011 |
} else {
|
1013 |
} else {
|
| 1012 |
authIdAndleadsCountMap.put(auth.getId(), 0);
|
1014 |
authIdAndleadsCountMap.put(auth.getId(), 0);
|
| 1013 |
}
|
1015 |
}
|
| 1014 |
}
|
1016 |
}
|
| - |
|
1017 |
|
| - |
|
1018 |
LOGGER.info("authIdAndleadsCountMap" + authIdAndleadsCountMap);
|
| 1015 |
|
1019 |
|
| 1016 |
Map<Integer, Object> authIdAndallValues = new LinkedHashMap<>();
|
1020 |
Map<Integer, Object> authIdAndallValues = new LinkedHashMap<>();
|
| 1017 |
|
1021 |
|
| 1018 |
for (Position po : pos) {
|
1022 |
for (Position po : pos) {
|
| 1019 |
|
1023 |
|
| Line 1069... |
Line 1073... |
| 1069 |
LOGGER.info("authIdAndleadsCountMap" + authIdAndleadsCountMap.get(po.getAuthUserId()));
|
1073 |
LOGGER.info("authIdAndleadsCountMap" + authIdAndleadsCountMap.get(po.getAuthUserId()));
|
| 1070 |
|
1074 |
|
| 1071 |
PartnerDetailModel pm = new PartnerDetailModel();
|
1075 |
PartnerDetailModel pm = new PartnerDetailModel();
|
| 1072 |
pm.setLmtd(totallmtdAmount);
|
1076 |
pm.setLmtd(totallmtdAmount);
|
| 1073 |
pm.setMtd(totalmtdAmount);
|
1077 |
pm.setMtd(totalmtdAmount);
|
| - |
|
1078 |
if(authIdAndleadsCountMap == null) {
|
| - |
|
1079 |
pm.setLeads(0);
|
| - |
|
1080 |
}
|
| - |
|
1081 |
else {
|
| 1074 |
pm.setLeads(authIdAndleadsCountMap.get(po.getAuthUserId()));
|
1082 |
pm.setLeads(authIdAndleadsCountMap.get(po.getAuthUserId()));
|
| - |
|
1083 |
}
|
| 1075 |
pm.setInvestment(totalTodayInvestment);
|
1084 |
pm.setInvestment(totalTodayInvestment);
|
| 1076 |
pm.setStockInInvestment(totalStockInInvestment);
|
1085 |
pm.setStockInInvestment(totalStockInInvestment);
|
| 1077 |
pm.setTicket(totalTicketCount);
|
1086 |
pm.setTicket(totalTicketCount);
|
| 1078 |
pm.setHygiene((double) Math.round(totalHygieneRating));
|
1087 |
pm.setHygiene((double) Math.round(totalHygieneRating));
|
| 1079 |
authIdAndallValues.put(auth.getId(), pm);
|
1088 |
authIdAndallValues.put(auth.getId(), pm);
|