| Line 157... |
Line 157... |
| 157 |
|
157 |
|
| 158 |
LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
|
158 |
LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
|
| 159 |
String emailId = loginDetails.getEmailId();
|
159 |
String emailId = loginDetails.getEmailId();
|
| 160 |
AuthUser authUser = authRepository.selectByEmailOrMobile(emailId);
|
160 |
AuthUser authUser = authRepository.selectByEmailOrMobile(emailId);
|
| 161 |
|
161 |
|
| 162 |
boolean authPositon = positionRepository.hasCategory(authUser.getId(), ProfitMandiConstants.TICKET_CATEGORY_SALES);
|
162 |
boolean isPositionSales = positionRepository.hasCategory(authUser.getId(), ProfitMandiConstants.TICKET_CATEGORY_SALES);
|
| 163 |
|
163 |
|
| 164 |
if (leadStatus.contains(LeadStatus.All)) {
|
164 |
if (leadStatus.contains(LeadStatus.All)) {
|
| 165 |
|
165 |
|
| 166 |
leadStatus.add(LeadStatus.pending);
|
166 |
leadStatus.add(LeadStatus.pending);
|
| 167 |
leadStatus.add(LeadStatus.notInterested);
|
167 |
leadStatus.add(LeadStatus.notInterested);
|
| Line 180... |
Line 180... |
| 180 |
Map<Integer, List<LeadActivity>> leadActivityMap = new HashMap<>();
|
180 |
Map<Integer, List<LeadActivity>> leadActivityMap = new HashMap<>();
|
| 181 |
|
181 |
|
| 182 |
List<Integer> authUserIds = null;
|
182 |
List<Integer> authUserIds = null;
|
| 183 |
|
183 |
|
| 184 |
LOGGER.info("color111" + color);
|
184 |
LOGGER.info("color111" + color);
|
| 185 |
|
- |
|
| 186 |
List<Lead> leadFollowUp = new ArrayList<>();
|
185 |
List<Lead> leadFollowUp = new ArrayList<>();
|
| 187 |
|
- |
|
| 188 |
if (authPositon) {
|
186 |
if (isPositionSales) {
|
| 189 |
authUserIds = authService.getAllReportees(authUser.getId());
|
187 |
authUserIds = authService.getAllReportees(authUser.getId());
|
| 190 |
authUserIds.add(authUser.getId());
|
188 |
authUserIds.add(authUser.getId());
|
| 191 |
LOGGER.info("authIds" + authUserIds);
|
189 |
LOGGER.info("authIds" + authUserIds);
|
| 192 |
|
190 |
|
| 193 |
LOGGER.info("leadStatus" + leadStatus);
|
191 |
LOGGER.info("leadStatus" + leadStatus);
|
| Line 240... |
Line 238... |
| 240 |
if (!leadStatus.contains(LeadStatus.followUp)) {
|
238 |
if (!leadStatus.contains(LeadStatus.followUp)) {
|
| 241 |
|
239 |
|
| 242 |
leads = leadRepository.selectAllByColorStatusAndUpdatedTimestamp(leadStatus, color, localDateTime);
|
240 |
leads = leadRepository.selectAllByColorStatusAndUpdatedTimestamp(leadStatus, color, localDateTime);
|
| 243 |
}
|
241 |
}
|
| 244 |
|
242 |
|
| 245 |
if (leadStatus.contains(LeadStatus.followUp) || leadStatus.contains(LeadStatus.All)) {
|
243 |
if (leadStatus.contains(LeadStatus.followUp)) {
|
| 246 |
|
244 |
|
| 247 |
leadFollowUp = leadRepository.selectAllByStatus(LeadStatus.followUp);
|
245 |
leadFollowUp = leadRepository.selectAllByStatus(LeadStatus.followUp);
|
| 248 |
|
246 |
|
| 249 |
leads.addAll(leadFollowUp);
|
247 |
leads.addAll(leadFollowUp);
|
| 250 |
}
|
248 |
}
|
| Line 252... |
Line 250... |
| 252 |
|
250 |
|
| 253 |
}
|
251 |
}
|
| 254 |
|
252 |
|
| 255 |
}
|
253 |
}
|
| 256 |
|
254 |
|
| 257 |
if (authPositon && authUserIds.size() > 0) {
|
255 |
if (isPositionSales && authUserIds.size() > 0) {
|
| 258 |
List<String> leadCreators = new ArrayList<>();
|
256 |
List<String> leadCreators = new ArrayList<>();
|
| 259 |
leadCreators.add("daily-sync");
|
257 |
leadCreators.add("daily-sync");
|
| 260 |
leadCreators.addAll(csService.getAuthUserIds(ProfitMandiConstants.TICKET_CATEGORY_SALES, Arrays.asList(EscalationType.L1, EscalationType.L2)).stream().map(x -> x.getFullName()).collect(Collectors.toList()));
|
258 |
leadCreators.addAll(csService.getAuthUserIds(ProfitMandiConstants.TICKET_CATEGORY_SALES, Arrays.asList(EscalationType.L1, EscalationType.L2)).stream().map(x -> x.getFullName()).collect(Collectors.toList()));
|
| 261 |
leadCreators.addAll(csService.getAuthUserIds(ProfitMandiConstants.TICKET_CATEGORY_BGC, Arrays.asList(EscalationType.L1, EscalationType.L2, EscalationType.L3)).stream().map(x -> x.getFullName()).collect(Collectors.toList()));
|
259 |
leadCreators.addAll(csService.getAuthUserIds(ProfitMandiConstants.TICKET_CATEGORY_BGC, Arrays.asList(EscalationType.L1, EscalationType.L2, EscalationType.L3)).stream().map(x -> x.getFullName()).collect(Collectors.toList()));
|
| 262 |
model.addAttribute("leadCreators", leadCreators);
|
260 |
model.addAttribute("leadCreators", leadCreators);
|