Subversion Repositories SmartDukaan

Rev

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

Rev 30771 Rev 30773
Line 8... Line 8...
8
import com.spice.profitmandi.dao.entity.fofo.PartnerDailyInvestment;
8
import com.spice.profitmandi.dao.entity.fofo.PartnerDailyInvestment;
9
import com.spice.profitmandi.dao.entity.user.FranchiseeActivity;
9
import com.spice.profitmandi.dao.entity.user.FranchiseeActivity;
10
import com.spice.profitmandi.dao.entity.user.FranchiseeVisit;
10
import com.spice.profitmandi.dao.entity.user.FranchiseeVisit;
11
import com.spice.profitmandi.dao.entity.user.Lead;
11
import com.spice.profitmandi.dao.entity.user.Lead;
12
import com.spice.profitmandi.dao.entity.user.LeadActivity;
12
import com.spice.profitmandi.dao.entity.user.LeadActivity;
-
 
13
import com.spice.profitmandi.dao.enumuration.cs.EscalationType;
13
import com.spice.profitmandi.dao.enumuration.dtr.LeadSource;
14
import com.spice.profitmandi.dao.enumuration.dtr.LeadSource;
14
import com.spice.profitmandi.dao.enumuration.dtr.LeadStatus;
15
import com.spice.profitmandi.dao.enumuration.dtr.LeadStatus;
15
import com.spice.profitmandi.dao.model.*;
16
import com.spice.profitmandi.dao.model.*;
16
import com.spice.profitmandi.dao.repository.auth.AuthRepository;
17
import com.spice.profitmandi.dao.repository.auth.AuthRepository;
17
import com.spice.profitmandi.dao.repository.auth.PartnerCollectionPlanRepository;
18
import com.spice.profitmandi.dao.repository.auth.PartnerCollectionPlanRepository;
Line 1147... Line 1148...
1147
	@RequestMapping(value = "/indent/today_target", method = RequestMethod.GET)
1148
	@RequestMapping(value = "/indent/today_target", method = RequestMethod.GET)
1148
	public String todayTarget(HttpServletRequest request, Model model) throws Exception {
1149
	public String todayTarget(HttpServletRequest request, Model model) throws Exception {
1149
		//model.addAttribute("warehouseCollectionMap", warehouseCollectionMap);
1150
		//model.addAttribute("warehouseCollectionMap", warehouseCollectionMap);
1150
		List<RBMPerformanceSummaryModel> summaryModels = new ArrayList<>();
1151
		List<RBMPerformanceSummaryModel> summaryModels = new ArrayList<>();
1151
		List<Integer> rbmPositionsAuthIds = positionRepository
1152
		List<Integer> rbmPositionsAuthIds = positionRepository
1152
				.selectPositionByCategoryId(ProfitMandiConstants.TICKET_CATEGORY_RBM).stream()
1153
				.selectPositionByCategoryId(ProfitMandiConstants.TICKET_CATEGORY_RBM).stream().filter(x -> Arrays.asList(EscalationType.L1, EscalationType.L1).contains(x.getEscalationType()))
1153
				.map(x -> x.getAuthUserId()).distinct().collect(Collectors.toList());
1154
				.map(x -> x.getAuthUserId()).distinct().collect(Collectors.toList());
1154
		Map<String, Set<Integer>> storeGuyMap = csService.getAuthUserPartnerIdMapping();
1155
		Map<String, Set<Integer>> storeGuyMap = csService.getAuthUserPartnerIdMapping();
1155
		List<TeamCommitmentModel> teamCommitmentModels = partnerCollectionPlanRepository.selectTeamCommitmentByDate(LocalDate.now());
1156
		List<TeamCommitmentModel> teamCommitmentModels = partnerCollectionPlanRepository.selectTeamCommitmentByDate(LocalDate.now());
1156
		Map<Integer, TeamCommitmentModel> rbmCommittmentMap = teamCommitmentModels.stream().filter(x -> rbmPositionsAuthIds.contains(x.getAuthId())).collect(Collectors.toMap(x -> x.getAuthId(), x -> x));
1157
		Map<Integer, TeamCommitmentModel> rbmCommittmentMap = teamCommitmentModels.stream().filter(x -> rbmPositionsAuthIds.contains(x.getAuthId())).collect(Collectors.toMap(x -> x.getAuthId(), x -> x));
1157
		LocalDateTime startDate = LocalDate.now().atStartOfDay();
1158
		LocalDateTime startDate = LocalDate.now().atStartOfDay();