| 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.service.warehouse.BillingWarehouseService;
|
| - |
|
4 |
|
| 3 |
import com.google.gson.Gson;
|
5 |
import com.google.gson.Gson;
|
| 4 |
import com.spice.profitmandi.common.enumuration.OfferType;
|
6 |
import com.spice.profitmandi.common.enumuration.OfferType;
|
| 5 |
import com.spice.profitmandi.common.enumuration.ReporticoProject;
|
7 |
import com.spice.profitmandi.common.enumuration.ReporticoProject;
|
| 6 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
8 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
| 7 |
import com.spice.profitmandi.common.model.*;
|
9 |
import com.spice.profitmandi.common.model.*;
|
| Line 70... |
Line 72... |
| 70 |
import java.util.stream.Collectors;
|
72 |
import java.util.stream.Collectors;
|
| 71 |
|
73 |
|
| 72 |
@Controller
|
74 |
@Controller
|
| 73 |
@Transactional(rollbackFor = Throwable.class)
|
75 |
@Transactional(rollbackFor = Throwable.class)
|
| 74 |
public class SchemeController {
|
76 |
public class SchemeController {
|
| - |
|
77 |
|
| - |
|
78 |
@Autowired
|
| - |
|
79 |
private BillingWarehouseService billingWarehouseService;
|
| - |
|
80 |
|
| 75 |
// Scheme payouts are IMEI-driven, so only serialized Ear Buds are offered in the picker
|
81 |
// Scheme payouts are IMEI-driven, so only serialized Ear Buds are offered in the picker
|
| 76 |
private static final int EARBUDS_CATEGORY_ID = 10024;
|
82 |
private static final int EARBUDS_CATEGORY_ID = 10024;
|
| 77 |
// 14202 = LED TV
|
83 |
// 14202 = LED TV
|
| 78 |
private static final List<Integer> categoryIds = Arrays.asList(ProfitMandiConstants.MOBILE_CATEGORY_ID,
|
84 |
private static final List<Integer> categoryIds = Arrays.asList(ProfitMandiConstants.MOBILE_CATEGORY_ID,
|
| 79 |
ProfitMandiConstants.TABLET_CATEGORY_ID, 14202, EARBUDS_CATEGORY_ID);
|
85 |
ProfitMandiConstants.TABLET_CATEGORY_ID, 14202, EARBUDS_CATEGORY_ID);
|
| Line 1837... |
Line 1843... |
| 1837 |
Map<Integer, CustomRetailer> customRetailersMap = fofoIds.stream().map(x -> customRetailerMap.get(x))
|
1843 |
Map<Integer, CustomRetailer> customRetailersMap = fofoIds.stream().map(x -> customRetailerMap.get(x))
|
| 1838 |
.filter(x -> x != null).collect(Collectors.toList()).stream()
|
1844 |
.filter(x -> x != null).collect(Collectors.toList()).stream()
|
| 1839 |
.collect(Collectors.toMap(x -> x.getPartnerId(), x -> x));
|
1845 |
.collect(Collectors.toMap(x -> x.getPartnerId(), x -> x));
|
| 1840 |
|
1846 |
|
| 1841 |
model.addAttribute("customRetailersMap", customRetailersMap);
|
1847 |
model.addAttribute("customRetailersMap", customRetailersMap);
|
| 1842 |
model.addAttribute("warehouseRegion", ProfitMandiConstants.WAREHOUSE_MAP);
|
1848 |
model.addAttribute("warehouseRegion", billingWarehouseService.getActiveWarehouses());
|
| 1843 |
model.addAttribute("searchModel", searchModel);
|
1849 |
model.addAttribute("searchModel", searchModel);
|
| 1844 |
|
1850 |
|
| 1845 |
model.addAttribute("customerOffers", customerOffers);
|
1851 |
model.addAttribute("customerOffers", customerOffers);
|
| 1846 |
return "customer-offer";
|
1852 |
return "customer-offer";
|
| 1847 |
|
1853 |
|