Subversion Repositories SmartDukaan

Rev

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

Rev 30524 Rev 30582
Line 962... Line 962...
962
					.collect(Collectors.summingLong(x -> x.getValue().getAmount()));
962
					.collect(Collectors.summingLong(x -> x.getValue().getAmount()));
963
 
963
 
964
			model.addAttribute("totalPartnerAchievement", totalPartnerAchievement);
964
			model.addAttribute("totalPartnerAchievement", totalPartnerAchievement);
965
 
965
 
966
			Map<Integer, CustomRetailer> customRetailerMap = retailerService.getAllFofoRetailers();
966
			Map<Integer, CustomRetailer> customRetailerMap = retailerService.getAllFofoRetailers();
967
			Map<Integer, CustomRetailer> customRetailers = fofoIdList.stream().map(x -> customRetailerMap.get(x))
967
			Map<Integer, CustomRetailer> customRetailers = fofoIdList.stream().distinct()
968
					.filter(x -> x != null).collect(Collectors.toList()).stream()
968
					.map(x -> customRetailerMap.get(x)).filter(x -> x != null).collect(Collectors.toList()).stream()
969
					.collect(Collectors.toMap(x -> x.getPartnerId(), x -> x));
969
					.collect(Collectors.toMap(x -> x.getPartnerId(), x -> x));
970
			List<Integer> allReportees = authService.getAllReportees(authUser.getId());
970
			List<Integer> allReportees = authService.getAllReportees(authUser.getId());
971
 
971
 
972
			List<Integer> salesPositionsAuthIds = positionRepository
972
			List<Integer> salesPositionsAuthIds = positionRepository
973
					.selectPositionByCategoryId(ProfitMandiConstants.TICKET_CATEGORY_SALES).stream()
973
					.selectPositionByCategoryId(ProfitMandiConstants.TICKET_CATEGORY_SALES).stream()
Line 1114... Line 1114...
1114
 
1114
 
1115
	@RequestMapping(value = "/getFranchiseVisit", method = RequestMethod.GET)
1115
	@RequestMapping(value = "/getFranchiseVisit", method = RequestMethod.GET)
1116
	public String getFranchiseVisit(HttpServletRequest request,
1116
	public String getFranchiseVisit(HttpServletRequest request,
1117
			@RequestParam(name = "authId", required = false) int authId, int yearMonth, Model model) throws Exception {
1117
			@RequestParam(name = "authId", required = false) int authId, int yearMonth, Model model) throws Exception {
1118
 
1118
 
1119
		LocalDateTime startDate = LocalDate.now().minusMonths(yearMonth).withDayOfMonth(1).atStartOfDay();
1119
		LocalDateTime startDate = LocalDate.now().minusMonths(8).withDayOfMonth(1).atStartOfDay();
1120
		LocalDateTime endDate = startDate.plusMonths(1).withDayOfMonth(1).toLocalDate().atStartOfDay();
1120
		LocalDateTime endDate = startDate.plusMonths(1).withDayOfMonth(1).toLocalDate().atStartOfDay();
1121
 
1121
 
1122
		DateRangeModel drm = DateRangeModel.of(startDate, endDate);
1122
		DateRangeModel drm = DateRangeModel.of(startDate, endDate);
1123
 
1123
 
1124
		List<FranchiseeVisit> visits = franchiseeVisitRepository.selectByAuthUserAndDateRange(drm, authId);
1124
		List<FranchiseeVisit> visits = franchiseeVisitRepository.selectByAuthUserAndDateRange(drm, authId);