| Line 1... |
Line 1... |
| 1 |
package com.spice.profitmandi.web.controller;
|
1 |
package com.spice.profitmandi.web.controller;
|
| 2 |
|
2 |
|
| 3 |
import com.mongodb.DBObject;
|
3 |
import com.mongodb.DBObject;
|
| - |
|
4 |
import com.spice.profitmandi.common.enumuration.ActivationType;
|
| 4 |
import com.spice.profitmandi.common.enumuration.CounterSize;
|
5 |
import com.spice.profitmandi.common.enumuration.CounterSize;
|
| 5 |
import com.spice.profitmandi.common.enumuration.MessageType;
|
6 |
import com.spice.profitmandi.common.enumuration.MessageType;
|
| 6 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
7 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
| 7 |
import com.spice.profitmandi.common.model.*;
|
8 |
import com.spice.profitmandi.common.model.*;
|
| 8 |
import com.spice.profitmandi.common.util.FileUtil;
|
9 |
import com.spice.profitmandi.common.util.FileUtil;
|
| Line 1726... |
Line 1727... |
| 1726 |
Map<Integer, PartnerType> fofoIdPartnerTypeMap = new HashMap<>();
|
1727 |
Map<Integer, PartnerType> fofoIdPartnerTypeMap = new HashMap<>();
|
| 1727 |
|
1728 |
|
| 1728 |
if (fofoIds.size() > 0 && fofoIds != null) {
|
1729 |
if (fofoIds.size() > 0 && fofoIds != null) {
|
| 1729 |
List<Integer> fofoIdList = new ArrayList<>(fofoIds);
|
1730 |
List<Integer> fofoIdList = new ArrayList<>(fofoIds);
|
| 1730 |
|
1731 |
|
| - |
|
1732 |
Map<Integer, ActivationType> partnerActivationType = fofoStoreRepository.selectByRetailerIds(fofoIdList)
|
| - |
|
1733 |
.stream().collect(Collectors.toMap(x -> x.getId(), x -> x.getActivationType()));
|
| - |
|
1734 |
|
| - |
|
1735 |
model.addAttribute("partnerActivationType", partnerActivationType);
|
| - |
|
1736 |
model.addAttribute("activationTypes", ActivationType.values());
|
| - |
|
1737 |
|
| 1731 |
Map<Integer, FofoReportingModel> partnerSalesHeadersMap = csService.getPartnerIdSalesHeaders();
|
1738 |
Map<Integer, FofoReportingModel> partnerSalesHeadersMap = csService.getPartnerIdSalesHeaders();
|
| 1732 |
|
1739 |
|
| 1733 |
model.addAttribute("partnerSalesHeadersMap", partnerSalesHeadersMap);
|
1740 |
model.addAttribute("partnerSalesHeadersMap", partnerSalesHeadersMap);
|
| 1734 |
|
1741 |
|
| 1735 |
Map<Integer, Map<String, Float>> partnerBrandLimitMap = brandLimitRepository.selectAllPartnerBrandLimit()
|
1742 |
Map<Integer, Map<String, Float>> partnerBrandLimitMap = brandLimitRepository.selectAllPartnerBrandLimit()
|
| Line 1842... |
Line 1849... |
| 1842 |
model.addAttribute("grnPendingAccessTvOrders", grnPendingAccessTvOrders);
|
1849 |
model.addAttribute("grnPendingAccessTvOrders", grnPendingAccessTvOrders);
|
| 1843 |
model.addAttribute("fofoIdPartnerTypeMap", fofoIdPartnerTypeMap);
|
1850 |
model.addAttribute("fofoIdPartnerTypeMap", fofoIdPartnerTypeMap);
|
| 1844 |
return "partner-brandwise-detail";
|
1851 |
return "partner-brandwise-detail";
|
| 1845 |
}
|
1852 |
}
|
| 1846 |
|
1853 |
|
| - |
|
1854 |
@RequestMapping(value = "/changeActivationType", method = RequestMethod.POST)
|
| - |
|
1855 |
public String changeActivationType(HttpServletRequest request, @RequestParam String code,
|
| - |
|
1856 |
@RequestParam ActivationType activationType, Model model) throws Exception {
|
| - |
|
1857 |
|
| - |
|
1858 |
FofoStore fofoStore = fofoStoreRepository.selectByStoreCode(code);
|
| - |
|
1859 |
|
| - |
|
1860 |
fofoStore.setActivationType(activationType);
|
| - |
|
1861 |
|
| - |
|
1862 |
model.addAttribute("response", mvcResponseSender.createResponseString(true));
|
| - |
|
1863 |
return "response";
|
| - |
|
1864 |
|
| - |
|
1865 |
}
|
| - |
|
1866 |
|
| 1847 |
@RequestMapping(value = "/createPo", method = RequestMethod.POST)
|
1867 |
@RequestMapping(value = "/createPo", method = RequestMethod.POST)
|
| 1848 |
public String createPo(HttpServletRequest request, @RequestBody SuggestedPoModel monthlyPoModel, Model model)
|
1868 |
public String createPo(HttpServletRequest request, @RequestBody SuggestedPoModel monthlyPoModel, Model model)
|
| 1849 |
throws Exception {
|
1869 |
throws Exception {
|
| 1850 |
LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
|
1870 |
LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
|
| 1851 |
SuggestedPo mp = new SuggestedPo();
|
1871 |
SuggestedPo mp = new SuggestedPo();
|