Subversion Repositories SmartDukaan

Rev

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

Rev 28888 Rev 28908
Line 483... Line 483...
483
		Map<String, Set<String>> storeGuyMap = new HashMap<>();
483
		Map<String, Set<String>> storeGuyMap = new HashMap<>();
484
		Set<Integer> activeFofoIds = fofoStoreRepository.selectActiveStores().stream().map(x -> x.getId())
484
		Set<Integer> activeFofoIds = fofoStoreRepository.selectActiveStores().stream().map(x -> x.getId())
485
				.collect(Collectors.toSet());
485
				.collect(Collectors.toSet());
486
		List<Position> categoryPositions = positionRepository
486
		List<Position> categoryPositions = positionRepository
487
				.selectPositionByCategoryId(ProfitMandiConstants.TICKET_CATEGORY_SALES);
487
				.selectPositionByCategoryId(ProfitMandiConstants.TICKET_CATEGORY_SALES);
-
 
488
		categoryPositions
488
		categoryPositions.addAll(positionRepository.selectPositionByCategoryId(ProfitMandiConstants.TICKET_CATEGORY_RBM));
489
				.addAll(positionRepository.selectPositionByCategoryId(ProfitMandiConstants.TICKET_CATEGORY_RBM));
489
		Map<Integer, Position> positionsMap = categoryPositions.stream()
490
		Map<Integer, Position> positionsMap = categoryPositions.stream()
490
				.collect(Collectors.toMap(x -> x.getId(), x -> x));
491
				.collect(Collectors.toMap(x -> x.getId(), x -> x));
491
 
492
 
492
		Map<Integer, List<CustomRetailer>> positonPartnerMap = this.getPositionCustomRetailerMap(categoryPositions);
493
		Map<Integer, List<CustomRetailer>> positonPartnerMap = this.getPositionCustomRetailerMap(categoryPositions);
493
		for (Map.Entry<Integer, List<CustomRetailer>> positionPartnerEntry : positonPartnerMap.entrySet()) {
494
		for (Map.Entry<Integer, List<CustomRetailer>> positionPartnerEntry : positonPartnerMap.entrySet()) {
Line 513... Line 514...
513
		Map<String, Set<Integer>> storeGuyMap = new HashMap<>();
514
		Map<String, Set<Integer>> storeGuyMap = new HashMap<>();
514
		Set<Integer> activeFofoIds = fofoStoreRepository.selectActiveStores().stream().map(x -> x.getId())
515
		Set<Integer> activeFofoIds = fofoStoreRepository.selectActiveStores().stream().map(x -> x.getId())
515
				.collect(Collectors.toSet());
516
				.collect(Collectors.toSet());
516
		List<Position> categoryPositions = positionRepository
517
		List<Position> categoryPositions = positionRepository
517
				.selectPositionByCategoryId(ProfitMandiConstants.TICKET_CATEGORY_SALES);
518
				.selectPositionByCategoryId(ProfitMandiConstants.TICKET_CATEGORY_SALES);
518
		categoryPositions.addAll(positionRepository
519
		categoryPositions
519
				.selectPositionByCategoryId(ProfitMandiConstants.TICKET_CATEGORY_RBM));
520
				.addAll(positionRepository.selectPositionByCategoryId(ProfitMandiConstants.TICKET_CATEGORY_RBM));
520
		Map<Integer, Position> positionsMap = categoryPositions.stream()
521
		Map<Integer, Position> positionsMap = categoryPositions.stream()
521
				.collect(Collectors.toMap(x -> x.getId(), x -> x));
522
				.collect(Collectors.toMap(x -> x.getId(), x -> x));
522
 
523
 
523
		Map<Integer, List<CustomRetailer>> positonPartnerMap = this.getPositionCustomRetailerMap(categoryPositions);
524
		Map<Integer, List<CustomRetailer>> positonPartnerMap = this.getPositionCustomRetailerMap(categoryPositions);
524
		for (Map.Entry<Integer, List<CustomRetailer>> positionPartnerEntry : positonPartnerMap.entrySet()) {
525
		for (Map.Entry<Integer, List<CustomRetailer>> positionPartnerEntry : positonPartnerMap.entrySet()) {
Line 614... Line 615...
614
		Map<Integer, List<Integer>> storeGuyMap = new HashMap<>();
615
		Map<Integer, List<Integer>> storeGuyMap = new HashMap<>();
615
		Set<Integer> activeFofoIds = fofoStoreRepository.selectActiveStores().stream().map(x -> x.getId())
616
		Set<Integer> activeFofoIds = fofoStoreRepository.selectActiveStores().stream().map(x -> x.getId())
616
				.collect(Collectors.toSet());
617
				.collect(Collectors.toSet());
617
		List<Position> categoryPositions = positionRepository
618
		List<Position> categoryPositions = positionRepository
618
				.selectPositionByCategoryId(ProfitMandiConstants.TICKET_CATEGORY_SALES);
619
				.selectPositionByCategoryId(ProfitMandiConstants.TICKET_CATEGORY_SALES);
619
		categoryPositions.addAll(positionRepository
620
		categoryPositions
620
				.selectPositionByCategoryId(ProfitMandiConstants.TICKET_CATEGORY_RBM));
621
				.addAll(positionRepository.selectPositionByCategoryId(ProfitMandiConstants.TICKET_CATEGORY_RBM));
621
		Map<Integer, Position> positionsMap = categoryPositions.stream()
622
		Map<Integer, Position> positionsMap = categoryPositions.stream()
622
				.collect(Collectors.toMap(x -> x.getId(), x -> x));
623
				.collect(Collectors.toMap(x -> x.getId(), x -> x));
623
 
624
 
624
		Map<Integer, List<CustomRetailer>> positonPartnerMap = this.getPositionCustomRetailerMap(categoryPositions);
625
		Map<Integer, List<CustomRetailer>> positonPartnerMap = this.getPositionCustomRetailerMap(categoryPositions);
625
		for (Map.Entry<Integer, List<CustomRetailer>> positionPartnerEntry : positonPartnerMap.entrySet()) {
626
		for (Map.Entry<Integer, List<CustomRetailer>> positionPartnerEntry : positonPartnerMap.entrySet()) {
Line 760... Line 761...
760
 
761
 
761
	@Override
762
	@Override
762
	public List<AuthUser> getAuthUserIds(int categoryId, EscalationType escalationType) {
763
	public List<AuthUser> getAuthUserIds(int categoryId, EscalationType escalationType) {
763
		List<Position> positions = positionRepository.selectPositionbyCategoryIdAndEscalationType(categoryId,
764
		List<Position> positions = positionRepository.selectPositionbyCategoryIdAndEscalationType(categoryId,
764
				escalationType);
765
				escalationType);
765
		List<Integer>authIds =positions.stream().map(x->x.getAuthUserId()).distinct().collect(Collectors.toList());
766
		List<Integer> authIds = positions.stream().map(x -> x.getAuthUserId()).distinct().collect(Collectors.toList());
-
 
767
 
-
 
768
		LOGGER.info("authIds" + authIds);
-
 
769
 
-
 
770
		List<AuthUser> authUsers = authRepository.selectAllAuthUserByIds(authIds);
-
 
771
 
-
 
772
		LOGGER.info("authUsers" + authUsers);
-
 
773
		return authUsers;
766
		
774
	}
-
 
775
 
-
 
776
	@Override
-
 
777
	public List<AuthUser> getAuthUserByCategoryId(int categoryId) {
-
 
778
		List<Position> positions = positionRepository.selectPositionByCategoryId(categoryId);
-
 
779
		List<Integer> authIds = positions.stream().map(x -> x.getAuthUserId()).distinct().collect(Collectors.toList());
-
 
780
 
767
		LOGGER.info("authIds"+authIds);
781
		LOGGER.info("authIds" + authIds);
768
		
782
 
769
		 List<AuthUser> authUsers = authRepository.selectAllAuthUserByIds(authIds);
783
		List<AuthUser> authUsers = authRepository.selectAllAuthUserByIds(authIds);
770
		 
784
 
771
		 LOGGER.info("authUsers"+authUsers);
785
		LOGGER.info("authUsers" + authUsers);
772
		return authUsers;
786
		return authUsers;
773
	}
787
	}
774
 
788
 
775
}
789
}