| Line 8... |
Line 8... |
| 8 |
import java.time.LocalTime;
|
8 |
import java.time.LocalTime;
|
| 9 |
import java.time.ZoneOffset;
|
9 |
import java.time.ZoneOffset;
|
| 10 |
import java.time.format.DateTimeFormatter;
|
10 |
import java.time.format.DateTimeFormatter;
|
| 11 |
import java.util.ArrayList;
|
11 |
import java.util.ArrayList;
|
| 12 |
import java.util.Arrays;
|
12 |
import java.util.Arrays;
|
| - |
|
13 |
import java.util.Comparator;
|
| 13 |
import java.util.HashMap;
|
14 |
import java.util.HashMap;
|
| 14 |
import java.util.HashSet;
|
15 |
import java.util.HashSet;
|
| 15 |
import java.util.LinkedHashMap;
|
16 |
import java.util.LinkedHashMap;
|
| 16 |
import java.util.List;
|
17 |
import java.util.List;
|
| 17 |
import java.util.Map;
|
18 |
import java.util.Map;
|
| Line 51... |
Line 52... |
| 51 |
import com.spice.profitmandi.common.model.DatasetModel;
|
52 |
import com.spice.profitmandi.common.model.DatasetModel;
|
| 52 |
import com.spice.profitmandi.common.model.LegendModel;
|
53 |
import com.spice.profitmandi.common.model.LegendModel;
|
| 53 |
import com.spice.profitmandi.common.model.Notification;
|
54 |
import com.spice.profitmandi.common.model.Notification;
|
| 54 |
import com.spice.profitmandi.common.model.OptionsModel;
|
55 |
import com.spice.profitmandi.common.model.OptionsModel;
|
| 55 |
import com.spice.profitmandi.common.model.ProfitMandiConstants;
|
56 |
import com.spice.profitmandi.common.model.ProfitMandiConstants;
|
| - |
|
57 |
import com.spice.profitmandi.common.model.SaholicInventoryCIsModel;
|
| 56 |
import com.spice.profitmandi.common.model.TitleModel;
|
58 |
import com.spice.profitmandi.common.model.TitleModel;
|
| 57 |
import com.spice.profitmandi.common.web.util.ResponseSender;
|
59 |
import com.spice.profitmandi.common.web.util.ResponseSender;
|
| 58 |
import com.spice.profitmandi.dao.Interface.Campaign;
|
60 |
import com.spice.profitmandi.dao.Interface.Campaign;
|
| 59 |
import com.spice.profitmandi.dao.entity.auth.AuthUser;
|
61 |
import com.spice.profitmandi.dao.entity.auth.AuthUser;
|
| 60 |
import com.spice.profitmandi.dao.entity.auth.Menu;
|
62 |
import com.spice.profitmandi.dao.entity.auth.Menu;
|
| Line 67... |
Line 69... |
| 67 |
import com.spice.profitmandi.dao.entity.dtr.NotificationCampaign;
|
69 |
import com.spice.profitmandi.dao.entity.dtr.NotificationCampaign;
|
| 68 |
import com.spice.profitmandi.dao.entity.fofo.FofoStore;
|
70 |
import com.spice.profitmandi.dao.entity.fofo.FofoStore;
|
| 69 |
import com.spice.profitmandi.dao.entity.fofo.PartnerDailyInvestment;
|
71 |
import com.spice.profitmandi.dao.entity.fofo.PartnerDailyInvestment;
|
| 70 |
import com.spice.profitmandi.dao.entity.fofo.PartnerTargetDetails;
|
72 |
import com.spice.profitmandi.dao.entity.fofo.PartnerTargetDetails;
|
| 71 |
import com.spice.profitmandi.dao.entity.fofo.PartnerType;
|
73 |
import com.spice.profitmandi.dao.entity.fofo.PartnerType;
|
| - |
|
74 |
import com.spice.profitmandi.dao.entity.fofo.PartnerTypeChange;
|
| 72 |
import com.spice.profitmandi.dao.entity.inventory.ReporticoCacheTable;
|
75 |
import com.spice.profitmandi.dao.entity.inventory.ReporticoCacheTable;
|
| - |
|
76 |
import com.spice.profitmandi.dao.entity.inventory.SaholicInventoryCIS;
|
| 73 |
import com.spice.profitmandi.dao.entity.user.Lead;
|
77 |
import com.spice.profitmandi.dao.entity.user.Lead;
|
| 74 |
import com.spice.profitmandi.dao.enumuration.catalog.ItemCriteriaType;
|
78 |
import com.spice.profitmandi.dao.enumuration.catalog.ItemCriteriaType;
|
| 75 |
import com.spice.profitmandi.dao.enumuration.cs.EscalationType;
|
79 |
import com.spice.profitmandi.dao.enumuration.cs.EscalationType;
|
| 76 |
import com.spice.profitmandi.dao.enumuration.dtr.LeadStatus;
|
80 |
import com.spice.profitmandi.dao.enumuration.dtr.LeadStatus;
|
| 77 |
import com.spice.profitmandi.dao.model.CreateOfferRequest;
|
81 |
import com.spice.profitmandi.dao.model.CreateOfferRequest;
|
| Line 785... |
Line 789... |
| 785 |
|
789 |
|
| 786 |
wm.put(0, "Total Values");
|
790 |
wm.put(0, "Total Values");
|
| 787 |
long stockValue = 0;
|
791 |
long stockValue = 0;
|
| 788 |
long stockQty = 0;
|
792 |
long stockQty = 0;
|
| 789 |
long pendingIndent = 0;
|
793 |
long pendingIndent = 0;
|
| - |
|
794 |
long tertiary = 0;
|
| 790 |
|
795 |
|
| 791 |
Map<Integer, PartnerDetailModel> authIdAndallValues = null;
|
796 |
Map<Integer, PartnerDetailModel> authIdAndallValues = null;
|
| 792 |
if (positions.size() > 0) {
|
797 |
if (positions.size() > 0) {
|
| 793 |
if (positions.stream()
|
798 |
if (positions.stream()
|
| 794 |
.filter(x -> x.getEscalationType().equals(EscalationType.L3)
|
799 |
.filter(x -> x.getEscalationType().equals(EscalationType.L3)
|
| Line 816... |
Line 821... |
| 816 |
if (!warehouseStocks.isEmpty()) {
|
821 |
if (!warehouseStocks.isEmpty()) {
|
| 817 |
for (WarehouseWiseStockModel warehouseStock : warehouseStocks) {
|
822 |
for (WarehouseWiseStockModel warehouseStock : warehouseStocks) {
|
| 818 |
stockValue += warehouseStock.getStockValue();
|
823 |
stockValue += warehouseStock.getStockValue();
|
| 819 |
stockQty += warehouseStock.getStockQty();
|
824 |
stockQty += warehouseStock.getStockQty();
|
| 820 |
pendingIndent += warehouseStock.getPendingIndent();
|
825 |
pendingIndent += warehouseStock.getPendingIndent();
|
| - |
|
826 |
tertiary += warehouseStock.getTertiary();
|
| 821 |
}
|
827 |
}
|
| 822 |
WarehouseWiseStockModel ws = new WarehouseWiseStockModel();
|
828 |
WarehouseWiseStockModel ws = new WarehouseWiseStockModel();
|
| 823 |
ws.setStockQty(stockQty);
|
829 |
ws.setStockQty(stockQty);
|
| 824 |
ws.setStockValue(stockValue);
|
830 |
ws.setStockValue(stockValue);
|
| 825 |
ws.setPendingIndent(pendingIndent);
|
831 |
ws.setPendingIndent(pendingIndent);
|
| - |
|
832 |
ws.setTertiary(tertiary);
|
| 826 |
ws.setWarehouseId(0);
|
833 |
ws.setWarehouseId(0);
|
| 827 |
warehouseStockMap.put(0, ws);
|
834 |
warehouseStockMap.put(0, ws);
|
| 828 |
|
835 |
|
| 829 |
}
|
836 |
}
|
| 830 |
|
837 |
|
| Line 997... |
Line 1004... |
| 997 |
|
1004 |
|
| 998 |
return "auth_user_partner_detail";
|
1005 |
return "auth_user_partner_detail";
|
| 999 |
}
|
1006 |
}
|
| 1000 |
|
1007 |
|
| 1001 |
@RequestMapping(value = "/getWarehouseWiseBrandStock", method = RequestMethod.GET)
|
1008 |
@RequestMapping(value = "/getWarehouseWiseBrandStock", method = RequestMethod.GET)
|
| 1002 |
public String getWarehouseWiseBrandStock(HttpServletRequest request, Model model,
|
1009 |
public String getWarehouseWiseBrandStock(HttpServletRequest request, Model model, @RequestParam int warehouseId)
|
| 1003 |
@RequestParam List<Integer> warehouseId) throws Exception {
|
- |
|
| 1004 |
Map<Integer, String> warehouseMap = ProfitMandiConstants.WAREHOUSE_MAP;
|
- |
|
| 1005 |
model.addAttribute("warehouseId", warehouseId);
|
- |
|
| 1006 |
if (warehouseId.contains(0)) {
|
1010 |
throws Exception {
|
| 1007 |
warehouseId.addAll(warehouseMap.keySet());
|
- |
|
| 1008 |
}
|
- |
|
| 1009 |
|
1011 |
|
| 1010 |
List<WarehouseWiseBrandStockModel> warehouseWiseBrandStock = saholicInventoryCISRepository
|
1012 |
List<WarehouseWiseBrandStockModel> warehouseWiseBrandStock = saholicInventoryCISRepository
|
| 1011 |
.selectGroupByWarehouseAndBrand(warehouseId);
|
1013 |
.selectGroupByWarehouseAndBrand(warehouseId);
|
| - |
|
1014 |
Map<Integer, String> warehouseMap = ProfitMandiConstants.WAREHOUSE_MAP;
|
| 1012 |
model.addAttribute("warehouseWiseBrandStock", warehouseWiseBrandStock);
|
1015 |
model.addAttribute("warehouseWiseBrandStock", warehouseWiseBrandStock);
|
| 1013 |
|
- |
|
| - |
|
1016 |
model.addAttribute("warehouseId", warehouseId);
|
| 1014 |
model.addAttribute("warehouseMap", warehouseMap);
|
1017 |
model.addAttribute("warehouseMap", warehouseMap);
|
| 1015 |
LOGGER.info("warehouseWiseBrandStock" + warehouseWiseBrandStock);
|
1018 |
LOGGER.info("warehouseWiseBrandStock" + warehouseWiseBrandStock);
|
| 1016 |
return "warehouse_brand_stock";
|
1019 |
return "warehouse_brand_stock";
|
| 1017 |
}
|
1020 |
}
|
| 1018 |
|
1021 |
|