Subversion Repositories SmartDukaan

Rev

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

Rev 29296 Rev 29318
Line 545... Line 545...
545
		List<String> emails = new ArrayList<>();
545
		List<String> emails = new ArrayList<>();
546
		List<Integer> regionIds = partnerRegionRepository.selectByfofoId(fofoId).stream().map(x -> x.getRegionId())
546
		List<Integer> regionIds = partnerRegionRepository.selectByfofoId(fofoId).stream().map(x -> x.getRegionId())
547
				.collect(Collectors.toList());
547
				.collect(Collectors.toList());
548
 
548
 
549
		regionIds.add(5);// All partners Id;
549
		regionIds.add(5);// All partners Id;
550
		List<Integer> fofoIds = new ArrayList<>();
-
 
551
		fofoIds.add(fofoId);
-
 
552
		fofoIds.add(0);
-
 
553
 
550
 
554
		LOGGER.info("fofoIds" + fofoIds);
551
		List<Integer> partnerPositionIds = partnersPositionRepository
555
		List<Integer> partnerPositionIds = partnersPositionRepository.selectByRegionIdAndPartnerId(regionIds, fofoIds)
552
				.selectByRegionIdAndPartnerId(regionIds, Arrays.asList(fofoId, 0)).stream().map(x -> x.getPositionId())
556
				.stream().map(x -> x.getPositionId()).collect(Collectors.toList());
553
				.collect(Collectors.toList());
557
 
554
 
558
		LOGGER.info("partnerPositionIds" + partnerPositionIds);
555
		LOGGER.info("partnerPositionIds" + partnerPositionIds);
559
 
556
 
560
		for (Integer partnerPostionId : partnerPositionIds) {
-
 
561
			Position position = positionRepository.selectByIdAndCategoryId(partnerPostionId,
557
		List<Position> positions = positionRepository.selectAll(partnerPositionIds);
562
					ProfitMandiConstants.TICKET_CATEGORY_SALES);
-
 
563
			LOGGER.info("position" + position);
-
 
564
			if (position != null) {
-
 
565
 
558
 
-
 
559
		positions = positions.stream().filter(x -> (x.getCategoryId() == ProfitMandiConstants.TICKET_CATEGORY_SALES
-
 
560
				|| x.getCategoryId() == ProfitMandiConstants.TICKET_CATEGORY_RBM)).collect(Collectors.toList());
-
 
561
 
-
 
562
		if (!positions.isEmpty()) {
-
 
563
			for (Position partnerPostionId : positions) {
-
 
564
 
566
				AuthUser authUser = authRepository.selectById(position.getAuthUserId());
565
				AuthUser authUser = authRepository.selectById(partnerPostionId.getAuthUserId());
567
				LOGGER.info("authUser" + authUser);
566
				LOGGER.info("authUser" + authUser);
568
				emails.add(authUser.getEmailId());
567
				emails.add(authUser.getEmailId());
569
			}
568
			}
570
		}
569
		}
571
 
570
 
Line 775... Line 774...
775
		List<AuthUser> authUsers = authRepository.selectAllAuthUserByIds(authIds);
774
		List<AuthUser> authUsers = authRepository.selectAllAuthUserByIds(authIds);
776
 
775
 
777
		LOGGER.info("authUsers" + authUsers);
776
		LOGGER.info("authUsers" + authUsers);
778
		return authUsers;
777
		return authUsers;
779
	}
778
	}
780
	
779
 
781
	@Override
780
	@Override
782
	public List<AuthUser> getAuthUserBycateggoryId(int categoryId, EscalationType escalationType) {
781
	public List<AuthUser> getAuthUserBycateggoryId(int categoryId, EscalationType escalationType) {
783
 
782
 
784
		List<Position> positions = positionRepository.selectPositionbyCategoryIdAndEscalationType(categoryId,
783
		List<Position> positions = positionRepository.selectPositionbyCategoryIdAndEscalationType(categoryId,
785
				escalationType);
784
				escalationType);
Line 791... Line 790...
791
 
790
 
792
		LOGGER.info("authUsers" + authUsers);
791
		LOGGER.info("authUsers" + authUsers);
793
		return authUsers;
792
		return authUsers;
794
	}
793
	}
795
 
794
 
796
 
-
 
797
	@Override
795
	@Override
798
	public List<AuthUser> getAuthUserByCategoryId(int categoryId) {
796
	public List<AuthUser> getAuthUserByCategoryId(int categoryId) {
799
		List<Position> positions = positionRepository.selectPositionByCategoryId(categoryId);
797
		List<Position> positions = positionRepository.selectPositionByCategoryId(categoryId);
800
		List<Integer> authIds = positions.stream().map(x -> x.getAuthUserId()).distinct().collect(Collectors.toList());
798
		List<Integer> authIds = positions.stream().map(x -> x.getAuthUserId()).distinct().collect(Collectors.toList());
801
 
799