Subversion Repositories SmartDukaan

Rev

Rev 32972 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 32972 Rev 33247
Line 149... Line 149...
149
	@Override
149
	@Override
150
	public List<Integer> getMopVoilatedRetailerIds() {
150
	public List<Integer> getMopVoilatedRetailerIds() {
151
		return mopVoilatedRetailerIds;
151
		return mopVoilatedRetailerIds;
152
	}
152
	}
153
	@Override
153
	@Override
154
	public Map<Integer, PriceModel> getMopPrices(Set<Integer> itemIds, int retailerId) {
154
    public Map<Integer, PriceModel> getMopPrices(Set<Integer> itemIds, int retailerId) throws ProfitMandiBusinessException {
155
		//Set Price with max value
155
		//Set Price with max value
156
		Map<Integer, PriceModel> itemPriceMap = this.preparePriceModelDefaultValues(itemIds);
156
		Map<Integer, PriceModel> itemPriceMap = this.preparePriceModelDefaultValues(itemIds);
157
		List<TagListing> tagListings = this.getTagListing(itemIds, retailerId);
157
		List<TagListing> tagListings = this.getTagListing(itemIds, retailerId);
158
		for(TagListing tagListing : tagListings){
158
		for(TagListing tagListing : tagListings){
159
			Item item = null;
159
			Item item = null;
Line 206... Line 206...
206
		}
206
		}
207
		return pricesMap;
207
		return pricesMap;
208
	}
208
	}
209
	
209
	
210
	@Override
210
	@Override
211
	public Map<Integer, PriceModel> getPurchasePriceMopPriceNotFound(Set<Integer> itemIds, int retailerId) {
211
    public Map<Integer, PriceModel> getPurchasePriceMopPriceNotFound(Set<Integer> itemIds, int retailerId) throws ProfitMandiBusinessException {
212
		return this.getMopPrices(itemIds, retailerId);
212
		return this.getMopPrices(itemIds, retailerId);
213
	}
213
	}
214
	
214
	
215
	//Currently it only handles fofos
215
	//Currently it only handles fofos
216
	@SuppressWarnings("unchecked")
216
	@SuppressWarnings("unchecked")
217
	public List<Integer> getTagsIdsByRetailerId(int retailerId){
217
    public List<Integer> getTagsIdsByRetailerId(int retailerId) throws ProfitMandiBusinessException {
218
		Set<Integer> pinCodeTagIds = tagService.getFofoTagIdsByPinCode("110001");
218
		Set<Integer> pinCodeTagIds = tagService.getFofoTagIdsByPinCode("110001");
219
		Set<Integer> pinNegativeTagIds = tagService.getPinCodeNegativeTagIds();
219
		Set<Integer> pinNegativeTagIds = tagService.getPinCodeNegativeTagIds();
220
		Set<Integer> pinCodeIntersection = new HashSet<>(CollectionUtils.intersection(pinCodeTagIds, pinNegativeTagIds));
220
		Set<Integer> pinCodeIntersection = new HashSet<>(CollectionUtils.intersection(pinCodeTagIds, pinNegativeTagIds));
221
		
221
		
222
		Set<Integer> validTagIds = new HashSet<>(CollectionUtils.subtract(pinNegativeTagIds, pinCodeIntersection));
222
		Set<Integer> validTagIds = new HashSet<>(CollectionUtils.subtract(pinNegativeTagIds, pinCodeIntersection));