| 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.common.model.ProfitMandiConstants;
|
| 3 |
import com.spice.profitmandi.dao.entity.inventory.State;
|
4 |
import com.spice.profitmandi.dao.entity.inventory.State;
|
| 4 |
import com.spice.profitmandi.dao.entity.inventory.Vendor;
|
5 |
import com.spice.profitmandi.dao.entity.inventory.Vendor;
|
| 5 |
import com.spice.profitmandi.dao.entity.transaction.Seller;
|
6 |
import com.spice.profitmandi.dao.entity.transaction.Seller;
|
| 6 |
import com.spice.profitmandi.dao.entity.transaction.SellerWarehouse;
|
7 |
import com.spice.profitmandi.dao.entity.transaction.SellerWarehouse;
|
| 7 |
import com.spice.profitmandi.dao.entity.transaction.WarehouseAddressMapping;
|
8 |
import com.spice.profitmandi.dao.entity.transaction.WarehouseAddressMapping;
|
| Line 122... |
Line 123... |
| 122 |
|
123 |
|
| 123 |
}
|
124 |
}
|
| 124 |
|
125 |
|
| 125 |
@RequestMapping(value = "/getCreateNewSupplier", method = RequestMethod.GET)
|
126 |
@RequestMapping(value = "/getCreateNewSupplier", method = RequestMethod.GET)
|
| 126 |
public String getCreateNewSupplier(HttpServletRequest request, Model model) throws Exception {
|
127 |
public String getCreateNewSupplier(HttpServletRequest request, Model model) throws Exception {
|
| 127 |
|
- |
|
| 128 |
List<SellerWarehouse> sellerWarehouses = sellerWarehouseRepository.selectAll();
|
128 |
List<SellerWarehouse> sellerWarehouses = sellerWarehouseRepository.selectAll();
|
| 129 |
List<Integer> sellerwarehouseIds = sellerWarehouses.stream().map(x -> x.getWarehouseId()).collect(Collectors.toList());
|
129 |
Map<Integer, String> warehouseMap = ProfitMandiConstants.WAREHOUSE_MAP;
|
| 130 |
LOGGER.info("sellerWarehouses" + sellerWarehouses);
|
130 |
sellerWarehouses = sellerWarehouses.stream().filter(x -> warehouseMap.containsKey(x.getWarehouseId())).collect(Collectors.toList());
|
| - |
|
131 |
|
| 131 |
Map<Integer, WarehouseIdPrefixModel> warehouseIdAndState = new HashMap<>();
|
132 |
Map<Integer, WarehouseIdPrefixModel> warehouseIdAndState = new HashMap<>();
|
| 132 |
|
133 |
|
| 133 |
for (SellerWarehouse sw : sellerWarehouses) {
|
134 |
for (SellerWarehouse sw : sellerWarehouses) {
|
| 134 |
|
- |
|
| 135 |
WarehouseAddressMapping warehouseAddressMapping = warehouseAddressMappingRepository.selectByWarehouseId(sw.getWarehouseId());
|
135 |
WarehouseAddressMapping warehouseAddressMapping = warehouseAddressMappingRepository.selectByWarehouseId(sw.getWarehouseId());
|
| 136 |
LOGGER.info("warehouseAddressMapping" + warehouseAddressMapping);
|
136 |
LOGGER.info("warehouseAddressMapping" + warehouseAddressMapping);
|
| 137 |
if (warehouseAddressMapping != null) {
|
137 |
if (warehouseAddressMapping != null) {
|
| 138 |
WarehouseAddressMaster WarehouseAddressMaster = warehouseAddressMasterRepository.selectById(warehouseAddressMapping.getAddressId());
|
138 |
WarehouseAddressMaster WarehouseAddressMaster = warehouseAddressMasterRepository.selectById(warehouseAddressMapping.getAddressId());
|
| 139 |
LOGGER.info("warehouseAddressMappingAddreesId" + warehouseAddressMapping.getAddressId());
|
139 |
LOGGER.info("warehouseAddressMappingAddreesId" + warehouseAddressMapping.getAddressId());
|