Subversion Repositories SmartDukaan

Rev

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

Rev 28272 Rev 28277
Line 738... Line 738...
738
			@RequestParam(name = "fofoId", required = true, defaultValue = "0") int fofoId,
738
			@RequestParam(name = "fofoId", required = true, defaultValue = "0") int fofoId,
739
			@RequestParam(name = "limit", required = true, defaultValue = "0") float limit, Model model)
739
			@RequestParam(name = "limit", required = true, defaultValue = "0") float limit, Model model)
740
			throws Exception {
740
			throws Exception {
741
 
741
 
742
		CustomRetailer cr = retailerService.getFofoRetailer(fofoId);
742
		CustomRetailer cr = retailerService.getFofoRetailer(fofoId);
743
		
-
 
744
		
743
 
745
		Map.Entry<Integer, CustomRetailer> customRetailers =  new AbstractMap.SimpleEntry(cr.getPartnerId(), cr);
744
		Map.Entry<Integer, CustomRetailer> customRetailers = new AbstractMap.SimpleEntry(cr.getPartnerId(), cr);
746
		
745
 
747
		//Map<Integer, CustomRetailer> customRetailers = retailerService.getFofoRetailers(true);
746
		// Map<Integer, CustomRetailer> customRetailers =
-
 
747
		// retailerService.getFofoRetailers(true);
748
		LOGGER.info("customRetailers"+customRetailers);
748
		LOGGER.info("customRetailers" + customRetailers);
749
		RetailerBrandsLimit retailerBrands = retailerBrandsLimitRepository.selectLimitByBrandAndFofoId(fofoId, brand);
749
		RetailerBrandsLimit retailerBrands = retailerBrandsLimitRepository.selectLimitByBrandAndFofoId(fofoId, brand);
750
		
750
 
751
		if (retailerBrands == null) {
751
		if (retailerBrands == null) {
752
			retailerBrands = new RetailerBrandsLimit();
752
			retailerBrands = new RetailerBrandsLimit();
753
			retailerBrands.setBrandLimit(limit);
753
			retailerBrands.setBrandLimit(limit);
754
			retailerBrands.setIsUpdate(1);
754
			retailerBrands.setIsUpdate(1);
755
			retailerBrands.setCreatedTimestamp(LocalDateTime.now());
755
			retailerBrands.setCreatedTimestamp(LocalDateTime.now());
Line 776... Line 776...
776
		BrandLimit brandLimit = brandLimitRepository.setLimitByBrands(brand);
776
		BrandLimit brandLimit = brandLimitRepository.setLimitByBrands(brand);
777
 
777
 
778
		model.addAttribute("retailerBrandsLimitMap", retailerBrandsLimitMap);
778
		model.addAttribute("retailerBrandsLimitMap", retailerBrandsLimitMap);
779
		model.addAttribute("brandLimit", brandLimit);
779
		model.addAttribute("brandLimit", brandLimit);
780
		model.addAttribute("customRetailers", customRetailers);
780
		model.addAttribute("customRetailers", customRetailers);
781
		
781
 
782
		model.addAttribute("brands", brand);
782
		model.addAttribute("brand", brand);
783
		return "brands-limit-row-mapping";
783
		return "brands-limit-row-mapping";
784
 
784
 
785
	}
785
	}
786
 
786
 
787
	@RequestMapping(value = "/getRetailerBrandslimitMapping", method = RequestMethod.GET)
787
	@RequestMapping(value = "/getRetailerBrandslimitMapping", method = RequestMethod.GET)
Line 838... Line 838...
838
 
838
 
839
		}
839
		}
840
		brandLimit = brandLimitRepository.setLimitByBrands(brands);
840
		brandLimit = brandLimitRepository.setLimitByBrands(brands);
841
 
841
 
842
		LOGGER.info("brandLimit" + brandLimit);
842
		LOGGER.info("brandLimit" + brandLimit);
-
 
843
		model.addAttribute("brand", brands);
843
		model.addAttribute("brandLimit", brandLimit);
844
		model.addAttribute("brandLimit", brandLimit);
844
		model.addAttribute("customRetailers", customRetailers);
845
		model.addAttribute("customRetailers", customRetailers);
845
		model.addAttribute("retailerBrandsLimitMap", retailerBrandsLimitMap);
846
		model.addAttribute("retailerBrandsLimitMap", retailerBrandsLimitMap);
846
		return "brands-limit-mapping";
847
		return "brands-limit-mapping";
847
 
848