Subversion Repositories SmartDukaan

Rev

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

Rev 31518 Rev 31662
Line 975... Line 975...
975
		}
975
		}
976
		return partnerIdSalesHeadersMap;
976
		return partnerIdSalesHeadersMap;
977
 
977
 
978
	}
978
	}
979
 
979
 
980
	@Override
-
 
981
	public Set<Integer> getAuthFofoIds(String email, boolean active) throws ProfitMandiBusinessException {
-
 
982
 
-
 
983
		List<Integer> categoryIds = Arrays.asList(ProfitMandiConstants.TICKET_CATEGORY_LOGISTICS,
-
 
984
				ProfitMandiConstants.TICKET_CATEGORY_FINANCIAL_SERVICES, ProfitMandiConstants.TICKET_CATEGORY_CATEGORY,
-
 
985
				ProfitMandiConstants.TICKET_CATEGORY_RBM, ProfitMandiConstants.TICKET_CATEGORY_SALES,
-
 
986
				ProfitMandiConstants.TICKET_CATEGORY_MARKETING, ProfitMandiConstants.TICKET_CATEGORY_ACCOUNTS,
-
 
987
				ProfitMandiConstants.TICKET_CATEGORY_BUSINESSINTELLIGENT,
-
 
988
				ProfitMandiConstants.TICKET_CATEGORY_TECHNOLOGY, ProfitMandiConstants.TICKET_CATEGORY_TRAINING);
-
 
989
 
-
 
990
		Map<String, Set<Integer>> storeGuyMap = this.getAuthUserPartnerIdMappingByCategoryIds(categoryIds, active);
-
 
991
		Set<Integer> authfofoIds = storeGuyMap.get(email);
-
 
992
 
-
 
993
		AuthUser authUser = authRepository.selectByEmailOrMobile(email);
-
 
994
		if (authfofoIds == null) {
-
 
995
			List<Position> positions1 = positionRepository.selectAll(authUser.getId());
-
 
996
			if (positions1.stream().filter(x -> x.getCategoryId() == ProfitMandiConstants.TICKET_CATEGORY_MASTER)
-
 
997
					.count() > 0) {
-
 
998
				authfofoIds = this.getPositionCustomRetailerMap(positions1).values().stream().flatMap(x -> x.stream())
-
 
999
						.map(x -> x.getPartnerId()).collect(Collectors.toSet());
-
 
1000
			}
-
 
1001
		}
-
 
1002
 
-
 
1003
		return authfofoIds;
-
 
1004
	}
-
 
1005
 
-
 
1006
}
980
}