Subversion Repositories SmartDukaan

Rev

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

Rev 30776 Rev 30777
Line 1148... Line 1148...
1148
	@RequestMapping(value = "/indent/today_target", method = RequestMethod.GET)
1148
	@RequestMapping(value = "/indent/today_target", method = RequestMethod.GET)
1149
	public String todayTarget(HttpServletRequest request, Model model) throws Exception {
1149
	public String todayTarget(HttpServletRequest request, Model model) throws Exception {
1150
		//model.addAttribute("warehouseCollectionMap", warehouseCollectionMap);
1150
		//model.addAttribute("warehouseCollectionMap", warehouseCollectionMap);
1151
		List<RBMPerformanceSummaryModel> summaryModels = new ArrayList<>();
1151
		List<RBMPerformanceSummaryModel> summaryModels = new ArrayList<>();
1152
		List<Integer> rbmPositionsAuthIds = positionRepository
1152
		List<Integer> rbmPositionsAuthIds = positionRepository
1153
				.selectPositionByCategoryId(ProfitMandiConstants.TICKET_CATEGORY_RBM).stream().filter(x -> Arrays.asList(EscalationType.L1, EscalationType.L1).contains(x.getEscalationType()))
1153
				.selectPositionByCategoryId(ProfitMandiConstants.TICKET_CATEGORY_RBM).stream().filter(x -> Arrays.asList(EscalationType.L1, EscalationType.L2).contains(x.getEscalationType()))
1154
				.map(x -> x.getAuthUserId()).distinct().collect(Collectors.toList());
1154
				.map(x -> x.getAuthUserId()).distinct().collect(Collectors.toList());
1155
		Map<String, Set<Integer>> storeGuyMap = csService.getAuthUserPartnerIdMapping();
1155
		Map<String, Set<Integer>> storeGuyMap = csService.getAuthUserPartnerIdMapping();
1156
		List<TeamCommitmentModel> teamCommitmentModels = partnerCollectionPlanRepository.selectTeamCommitmentByDate(LocalDate.now());
1156
		List<TeamCommitmentModel> teamCommitmentModels = partnerCollectionPlanRepository.selectTeamCommitmentByDate(LocalDate.now());
1157
		Map<Integer, Double> rbmSecondaryTargetMap = teamCommitmentModels.stream().filter(x -> rbmPositionsAuthIds.contains(x.getAuthId())).collect(Collectors.groupingBy(x -> x.getAuthId(), Collectors.summingDouble(x -> x.getTotalTarget() == null ? 0 : x.getTotalTarget())));
1157
		Map<Integer, Double> rbmSecondaryTargetMap = teamCommitmentModels.stream().filter(x -> rbmPositionsAuthIds.contains(x.getAuthId())).collect(Collectors.groupingBy(x -> x.getAuthId(), Collectors.summingDouble(x -> x.getTotalTarget() == null ? 0 : x.getTotalTarget())));
1158
		Map<Integer, Double> rbmSecondaryMap = teamCommitmentModels.stream().filter(x -> rbmPositionsAuthIds.contains(x.getAuthId())).collect(Collectors.groupingBy(x -> x.getAuthId(), Collectors.summingDouble(x -> x.getTotalAchievement() == null ? 0 : x.getTotalAchievement())));
1158
		Map<Integer, Double> rbmSecondaryMap = teamCommitmentModels.stream().filter(x -> rbmPositionsAuthIds.contains(x.getAuthId())).collect(Collectors.groupingBy(x -> x.getAuthId(), Collectors.summingDouble(x -> x.getTotalAchievement() == null ? 0 : x.getTotalAchievement())));