Subversion Repositories SmartDukaan

Rev

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

Rev 30122 Rev 30148
Line 1... Line 1...
1
package com.spice.profitmandi.web.controller;
1
package com.spice.profitmandi.web.controller;
2
 
2
 
3
import com.spice.profitmandi.common.enumuration.DateTimePattern;
3
import com.spice.profitmandi.common.enumuration.DateTimePattern;
4
import com.spice.profitmandi.common.enumuration.ReporticoProject;
4
import com.spice.profitmandi.common.enumuration.ReporticoProject;
5
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
5
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
-
 
6
import com.spice.profitmandi.common.model.CustomRetailer;
-
 
7
import com.spice.profitmandi.common.model.ProfitMandiConstants;
-
 
8
import com.spice.profitmandi.common.model.SchemeItems;
6
import com.spice.profitmandi.common.model.*;
9
import com.spice.profitmandi.common.model.SchemeModel;
7
import com.spice.profitmandi.common.services.ReporticoService;
10
import com.spice.profitmandi.common.services.ReporticoService;
8
import com.spice.profitmandi.common.util.*;
11
import com.spice.profitmandi.common.util.*;
9
import com.spice.profitmandi.common.web.util.ResponseSender;
12
import com.spice.profitmandi.common.web.util.ResponseSender;
10
import com.spice.profitmandi.dao.entity.catalog.*;
13
import com.spice.profitmandi.dao.entity.catalog.*;
11
import com.spice.profitmandi.dao.entity.fofo.*;
14
import com.spice.profitmandi.dao.entity.fofo.*;
Line 196... Line 199...
196
 
199
 
197
		return fullAccesss;
200
		return fullAccesss;
198
 
201
 
199
	}
202
	}
200
 
203
 
201
	@RequestMapping(value = "/getTagListingItemsByBrand", method = RequestMethod.POST)
204
	@RequestMapping(value = "/getCatalogDescriptionByBrands", method = RequestMethod.POST)
202
	public String getTagListingItemsByBrand(HttpServletRequest request, @RequestBody List<String> brands, Model model) {
205
	public String getTagListingItemsByBrand(HttpServletRequest request, @RequestBody List<String> brands, Model model) throws Exception {
203
		Map<Integer, String> itemIdItemDescriptionMap = new HashMap<>();
-
 
204
		LOGGER.info("brands" + brands);
-
 
205
 
-
 
206
		List<MapWrapper<Integer, String>> itemIdItemDescriptionMaplist = inventoryService
206
		Map<Integer, String> catalogIdItemDescriptionMap = inventoryService
207
				.getAllTagListingItemIdItemDescriptionMap(new HashSet<>(brands));
207
				.getModelDescriptionMap(new HashSet<>(brands));
208
		for (MapWrapper<Integer, String> mapWrapper : itemIdItemDescriptionMaplist) {
-
 
209
			itemIdItemDescriptionMap.put(mapWrapper.getKey(), mapWrapper.getValue());
-
 
210
		}
-
 
211
		model.addAttribute("itemIdItemDescriptionMap", itemIdItemDescriptionMap);
208
		model.addAttribute("catalogIdItemDescriptionMap", catalogIdItemDescriptionMap);
212
		// model.addAttribute("brands", inventoryService.getAllBrands());
209
		// model.addAttribute("brands", inventoryService.getAllBrands());
213
 
210
 
214
		return "tag-listing-items-description";
211
		return "tag-listing-items-description";
215
	}
212
	}
216
 
213
 
Line 649... Line 646...
649
			Map<Integer, Map<Integer, Long>> offerSlabPayoutMap = new HashMap<>();
646
			Map<Integer, Map<Integer, Long>> offerSlabPayoutMap = new HashMap<>();
650
			List<PriceDropIMEI> priceDropImeis = new ArrayList<>();
647
			List<PriceDropIMEI> priceDropImeis = new ArrayList<>();
651
			if (searchModel > 0) {
648
			if (searchModel > 0) {
652
				offers = offerService.getPublishedOffers(date, loginDetails.getFofoId(), searchModel);
649
				offers = offerService.getPublishedOffers(date, loginDetails.getFofoId(), searchModel);
653
				for (CreateOfferRequest createOfferRequest : offers) {
650
				for (CreateOfferRequest createOfferRequest : offers) {
654
					Map<Integer, Map<Integer, Long>> itemSlabPayoutMap = offerService
651
					Map<Integer, Map<Integer, Long>> catalogSlabPayoutMap = offerService
655
							.getSlabPayoutMap(createOfferRequest);
652
							.getSlabPayoutMap(createOfferRequest);
656
					Map<Integer, Long> slabPayoutMap = itemSlabPayoutMap.get(searchModel);
653
					Map<Integer, Long> slabPayoutMap = catalogSlabPayoutMap.get(searchModel);
657
					offerSlabPayoutMap.put(createOfferRequest.getId(), slabPayoutMap);
654
					offerSlabPayoutMap.put(createOfferRequest.getId(), slabPayoutMap);
658
				}
655
				}
659
			} else {
656
			} else {
660
				offers = new ArrayList<>();
657
				offers = new ArrayList<>();
661
			}
658
			}