| Line 16... |
Line 16... |
| 16 |
import com.spice.profitmandi.dao.entity.dtr.NotificationCampaign;
|
16 |
import com.spice.profitmandi.dao.entity.dtr.NotificationCampaign;
|
| 17 |
import com.spice.profitmandi.dao.entity.fofo.*;
|
17 |
import com.spice.profitmandi.dao.entity.fofo.*;
|
| 18 |
import com.spice.profitmandi.dao.entity.transaction.LineItem;
|
18 |
import com.spice.profitmandi.dao.entity.transaction.LineItem;
|
| 19 |
import com.spice.profitmandi.dao.entity.transaction.Order;
|
19 |
import com.spice.profitmandi.dao.entity.transaction.Order;
|
| 20 |
import com.spice.profitmandi.dao.enumuration.catalog.UpgradeOfferStatus;
|
20 |
import com.spice.profitmandi.dao.enumuration.catalog.UpgradeOfferStatus;
|
| - |
|
21 |
import com.spice.profitmandi.dao.enumuration.fofo.Milestone;
|
| 21 |
import com.spice.profitmandi.dao.enumuration.transaction.OrderStatus;
|
22 |
import com.spice.profitmandi.dao.enumuration.transaction.OrderStatus;
|
| 22 |
import com.spice.profitmandi.dao.model.SamsungUpgradeOfferModel;
|
23 |
import com.spice.profitmandi.dao.model.SamsungUpgradeOfferModel;
|
| 23 |
import com.spice.profitmandi.dao.model.*;
|
24 |
import com.spice.profitmandi.dao.model.*;
|
| 24 |
import com.spice.profitmandi.dao.repository.auth.AuthRepository;
|
25 |
import com.spice.profitmandi.dao.repository.auth.AuthRepository;
|
| 25 |
import com.spice.profitmandi.dao.repository.catalog.ItemRepository;
|
26 |
import com.spice.profitmandi.dao.repository.catalog.ItemRepository;
|
| Line 73... |
Line 74... |
| 73 |
import java.time.LocalDateTime;
|
74 |
import java.time.LocalDateTime;
|
| 74 |
import java.time.LocalTime;
|
75 |
import java.time.LocalTime;
|
| 75 |
import java.time.YearMonth;
|
76 |
import java.time.YearMonth;
|
| 76 |
import java.time.format.DateTimeFormatter;
|
77 |
import java.time.format.DateTimeFormatter;
|
| 77 |
import java.util.*;
|
78 |
import java.util.*;
|
| - |
|
79 |
import java.util.Map.Entry;
|
| 78 |
import java.util.stream.Collectors;
|
80 |
import java.util.stream.Collectors;
|
| 79 |
|
81 |
|
| 80 |
import static in.shop2020.model.v1.order.OrderStatus.*;
|
82 |
import static in.shop2020.model.v1.order.OrderStatus.*;
|
| 81 |
|
83 |
|
| 82 |
@Controller
|
84 |
@Controller
|
| Line 1896... |
Line 1898... |
| 1896 |
LOGGER.info("chartMap" + gson.toJson(cm));
|
1898 |
LOGGER.info("chartMap" + gson.toJson(cm));
|
| 1897 |
model.addAttribute("chartMap", gson.toJson(cm));
|
1899 |
model.addAttribute("chartMap", gson.toJson(cm));
|
| 1898 |
return "brand-wise-mobile-lmp-chart";
|
1900 |
return "brand-wise-mobile-lmp-chart";
|
| 1899 |
}
|
1901 |
}
|
| 1900 |
|
1902 |
|
| - |
|
1903 |
@RequestMapping(value = "/getCountByCategory", method = RequestMethod.GET)
|
| - |
|
1904 |
public String getCountByCategory(HttpServletRequest request,
|
| - |
|
1905 |
@RequestParam(required = false, defaultValue = "0") int warehouseId, Model model) throws Exception {
|
| - |
|
1906 |
|
| - |
|
1907 |
LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
|
| - |
|
1908 |
String email = loginDetails.getEmailId();
|
| - |
|
1909 |
|
| - |
|
1910 |
Set<Integer> fofoIds = csService.getAuthFofoIds(email);
|
| - |
|
1911 |
|
| - |
|
1912 |
if (fofoIds != null && fofoIds.size() > 0) {
|
| - |
|
1913 |
Map<Integer, PartnerDetailModel> partnerStats = adminUser.getPartnersStatDataFromFile();
|
| - |
|
1914 |
if (partnerStats != null) {
|
| - |
|
1915 |
Map<Milestone, Long> mtdMap = fofoIds.stream().map(x -> partnerStats.get(x))
|
| - |
|
1916 |
.collect(Collectors.groupingBy(x -> x.getMtdValue(), Collectors.counting()));
|
| - |
|
1917 |
Map<Milestone, Long> lmtdMap = fofoIds.stream().map(x -> partnerStats.get(x))
|
| - |
|
1918 |
.collect(Collectors.groupingBy(x -> x.getLMTDValue(), Collectors.counting()));
|
| - |
|
1919 |
|
| - |
|
1920 |
Map<Milestone, Long> lmsMap = fofoIds.stream().map(x -> partnerStats.get(x))
|
| - |
|
1921 |
.collect(Collectors.groupingBy(x -> x.getLMSValue(), Collectors.counting()));
|
| - |
|
1922 |
|
| - |
|
1923 |
model.addAttribute("mtdMap", mtdMap);
|
| - |
|
1924 |
model.addAttribute("lmtdMap", lmtdMap);
|
| - |
|
1925 |
model.addAttribute("lmsMap", lmsMap);
|
| - |
|
1926 |
|
| - |
|
1927 |
}
|
| - |
|
1928 |
}
|
| - |
|
1929 |
|
| - |
|
1930 |
model.addAttribute("milestones", Milestone.values());
|
| - |
|
1931 |
|
| - |
|
1932 |
return "milestone";
|
| - |
|
1933 |
|
| - |
|
1934 |
}
|
| - |
|
1935 |
|
| 1901 |
@RequestMapping(value = "/getActivatedModelWarehouseWise", method = RequestMethod.GET)
|
1936 |
@RequestMapping(value = "/getActivatedModelWarehouseWise", method = RequestMethod.GET)
|
| 1902 |
public String getActivatedModelWarehouseWise(HttpServletRequest request, Model model, @RequestParam String brand)
|
1937 |
public String getActivatedModelWarehouseWise(HttpServletRequest request, Model model, @RequestParam String brand)
|
| 1903 |
throws Exception {
|
1938 |
throws Exception {
|
| 1904 |
LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
|
1939 |
LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
|
| 1905 |
List<Integer> fofoIds = getFofoIds(loginDetails);
|
1940 |
List<Integer> fofoIds = getFofoIds(loginDetails);
|