| Line 991... |
Line 991... |
| 991 |
model.addAttribute("response", mvcResponseSender.createResponseString(true));
|
991 |
model.addAttribute("response", mvcResponseSender.createResponseString(true));
|
| 992 |
return "response";
|
992 |
return "response";
|
| 993 |
}
|
993 |
}
|
| 994 |
|
994 |
|
| 995 |
@RequestMapping(value = "/getWarehouseWiseBrandItemStock", method = RequestMethod.GET)
|
995 |
@RequestMapping(value = "/getWarehouseWiseBrandItemStock", method = RequestMethod.GET)
|
| 996 |
public String getWarehouseWiseBrandItemStock(HttpServletRequest request, Model model, @RequestParam int warehouseId,
|
996 |
public String getWarehouseWiseBrandItemStock(HttpServletRequest request, Model model,
|
| 997 |
@RequestParam List<String> brands) throws Exception {
|
997 |
@RequestParam List<Integer> warehouseId, @RequestParam List<String> brands, @RequestParam String category)
|
| - |
|
998 |
throws Exception {
|
| 998 |
|
999 |
|
| 999 |
List<WarehouseWiseitemStockModel> warehouseWiseItemStock = saholicInventoryCISRepository
|
1000 |
List<WarehouseWiseitemStockModel> warehouseWiseItemStock = saholicInventoryCISRepository
|
| 1000 |
.selectWarehouseItemStock(warehouseId, brands);
|
1001 |
.selectWarehouseItemStock(warehouseId, brands, category);
|
| 1001 |
Map<Integer, String> warehouseMap = ProfitMandiConstants.WAREHOUSE_MAP;
|
1002 |
Map<Integer, String> warehouseMap = ProfitMandiConstants.WAREHOUSE_MAP;
|
| 1002 |
List<String> listbrands = saholicInventoryCISRepository.selectAllBrand();
|
1003 |
List<String> listbrands = saholicInventoryCISRepository.selectAllBrand();
|
| - |
|
1004 |
List<String> listCategory = saholicInventoryCISRepository.selectAllSubCategory();
|
| 1003 |
model.addAttribute("warehouseWiseItemStock", warehouseWiseItemStock);
|
1005 |
model.addAttribute("warehouseWiseItemStock", warehouseWiseItemStock);
|
| 1004 |
model.addAttribute("warehouseMap", warehouseMap);
|
1006 |
model.addAttribute("warehouseMap", warehouseMap);
|
| 1005 |
model.addAttribute("warehouseId", warehouseId);
|
- |
|
| 1006 |
model.addAttribute("brands", listbrands);
|
1007 |
model.addAttribute("brands", listbrands);
|
| - |
|
1008 |
model.addAttribute("listCategory", listCategory);
|
| - |
|
1009 |
|
| 1007 |
model.addAttribute("selectedBrand", brands);
|
1010 |
model.addAttribute("selectedBrand", brands);
|
| - |
|
1011 |
model.addAttribute("selectedWarehouse", warehouseId);
|
| 1008 |
LOGGER.info("warehouseWiseItemStock" + warehouseWiseItemStock);
|
1012 |
LOGGER.info("warehouseWiseItemStock" + warehouseWiseItemStock);
|
| 1009 |
return "warehouse_brand_item_stock";
|
1013 |
return "warehouse_brand_item_stock";
|
| 1010 |
}
|
1014 |
}
|
| 1011 |
|
1015 |
|
| - |
|
1016 |
@RequestMapping(value = "/getWarehouseWiseItemStock", method = RequestMethod.GET)
|
| - |
|
1017 |
public String getWarehouseWiseItemStock(HttpServletRequest request, Model model,
|
| - |
|
1018 |
@RequestParam List<Integer> warehouseId, @RequestParam List<String> brands, @RequestParam String category)
|
| - |
|
1019 |
throws Exception {
|
| - |
|
1020 |
|
| - |
|
1021 |
List<WarehouseWiseitemStockModel> warehouseWiseItemStock = saholicInventoryCISRepository
|
| - |
|
1022 |
.selectWarehouseItemStock(warehouseId, brands, category);
|
| - |
|
1023 |
Map<Integer, String> warehouseMap = ProfitMandiConstants.WAREHOUSE_MAP;
|
| - |
|
1024 |
model.addAttribute("warehouseWiseItemStock", warehouseWiseItemStock);
|
| - |
|
1025 |
model.addAttribute("warehouseMap", warehouseMap);
|
| - |
|
1026 |
|
| - |
|
1027 |
LOGGER.info("warehouseWiseItemStock" + warehouseWiseItemStock);
|
| - |
|
1028 |
return "warehouse_item_details";
|
| - |
|
1029 |
}
|
| - |
|
1030 |
|
| 1012 |
private String getWarehouses(Set<CustomRetailer> positionRetailers) {
|
1031 |
private String getWarehouses(Set<CustomRetailer> positionRetailers) {
|
| 1013 |
Map<Integer, String> warehouses = new HashMap<>();
|
1032 |
Map<Integer, String> warehouses = new HashMap<>();
|
| 1014 |
positionRetailers.stream().forEach(x -> {
|
1033 |
positionRetailers.stream().forEach(x -> {
|
| 1015 |
if (x.getWarehouseId() != 0) {
|
1034 |
if (x.getWarehouseId() != 0) {
|
| 1016 |
warehouses.put(x.getWarehouseId(), ProfitMandiConstants.WAREHOUSE_MAP.get(x.getWarehouseId()));
|
1035 |
warehouses.put(x.getWarehouseId(), ProfitMandiConstants.WAREHOUSE_MAP.get(x.getWarehouseId()));
|