Subversion Repositories SmartDukaan

Rev

Rev 29280 | Rev 29287 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 29280 Rev 29284
Line 114... Line 114...
114
				color.add("green");
114
				color.add("green");
115
			}
115
			}
116
			if(authPositon)
116
			if(authPositon)
117
			{
117
			{
118
				List<Integer> authUserIds = authService.getAllReportees(authUser.getId());
118
				List<Integer> authUserIds = authService.getAllReportees(authUser.getId());
-
 
119
				authUserIds.add(authUser.getId());
119
				LOGGER.info("authIds" + authUserIds);
120
				LOGGER.info("authIds" + authUserIds);
120
			leads = leadRepository.selectAllByColorStatusAndUpdatedTimestampAndAuthIds(leadStatus, authUserIds, color,
121
			leads = leadRepository.selectAllByColorStatusAndUpdatedTimestampAndAuthIds(leadStatus, authUserIds, color,
121
					LocalDateTime.now().withDayOfMonth(1).minusMonths(3));
122
					LocalDateTime.now().withDayOfMonth(1).minusMonths(3));
122
			
123
			
123
			}
124
			}
Line 129... Line 130...
129
			
130
			
130
		} else {
131
		} else {
131
 
132
 
132
			if(authPositon) {
133
			if(authPositon) {
133
				List<Integer> authUserIds = authService.getAllReportees(authUser.getId());
134
				List<Integer> authUserIds = authService.getAllReportees(authUser.getId());
-
 
135
				authUserIds.add(authUser.getId());
134
				LOGGER.info("authIds" + authUserIds);
136
				LOGGER.info("authIds" + authUserIds);
135
				leads =	leadRepository.selectAllByStatusAndUpdatedTimestampAndAuthId(leadStatus,
137
				leads =	leadRepository.selectAllByStatusAndUpdatedTimestampAndAuthId(leadStatus,
136
						LocalDateTime.now().withDayOfMonth(1).minusMonths(3),authUserIds);
138
						LocalDateTime.now().withDayOfMonth(1).minusMonths(3),authUserIds);
137
			
139
			
138
			}
140
			}
Line 208... Line 210...
208
					leadActivityMap.put(lead.getId(), leadActivity.get(0));
210
					leadActivityMap.put(lead.getId(), leadActivity.get(0));
209
				}
211
				}
210
			}
212
			}
211
			Map<Integer, AuthUser> authIdAndAuthUserMap = authRepository.selectAllAuthUserByIds(authIds).stream()
213
			Map<Integer, AuthUser> authIdAndAuthUserMap = authRepository.selectAllAuthUserByIds(authIds).stream()
212
					.collect(Collectors.toMap(x -> x.getId(), x -> x));
214
					.collect(Collectors.toMap(x -> x.getId(), x -> x));
213
			model.addAttribute("lead", leads);
-
 
214
			model.addAttribute("leadActivityMap", leadActivityMap);
215
			model.addAttribute("leadActivityMap", leadActivityMap);
215
			model.addAttribute("authIdAndAuthUserMap", authIdAndAuthUserMap);
216
			model.addAttribute("authIdAndAuthUserMap", authIdAndAuthUserMap);
216
 
-
 
217
		} else {
-
 
218
			model.addAttribute("lead", leads);
-
 
219
		}
217
		}
220
 
218
 
221
		ChartLeadModel cm = this.getLeadChart(leads);
219
		ChartLeadModel cm = this.getLeadChart(leads);
222
		model.addAttribute("chartLead", gson.toJson(cm));
220
		model.addAttribute("chartLead", gson.toJson(cm));
223
 
221