| Line 16... |
Line 16... |
| 16 |
import com.spice.profitmandi.dao.model.WarehouseWiseStockModel;
|
16 |
import com.spice.profitmandi.dao.model.WarehouseWiseStockModel;
|
| 17 |
import com.spice.profitmandi.dao.repository.auth.AuthRepository;
|
17 |
import com.spice.profitmandi.dao.repository.auth.AuthRepository;
|
| 18 |
import com.spice.profitmandi.dao.repository.auth.MenuCategoryRepository;
|
18 |
import com.spice.profitmandi.dao.repository.auth.MenuCategoryRepository;
|
| 19 |
import com.spice.profitmandi.dao.repository.auth.MenuRepository;
|
19 |
import com.spice.profitmandi.dao.repository.auth.MenuRepository;
|
| 20 |
import com.spice.profitmandi.dao.repository.cs.CsService;
|
20 |
import com.spice.profitmandi.dao.repository.cs.CsService;
|
| - |
|
21 |
import com.spice.profitmandi.dao.repository.cs.CsService1;
|
| 21 |
import com.spice.profitmandi.dao.repository.cs.PositionRepository;
|
22 |
import com.spice.profitmandi.dao.repository.cs.PositionRepository;
|
| 22 |
import com.spice.profitmandi.dao.repository.cs.TicketRepository;
|
23 |
import com.spice.profitmandi.dao.repository.cs.TicketRepository;
|
| 23 |
import com.spice.profitmandi.dao.repository.dtr.FofoStoreRepository;
|
24 |
import com.spice.profitmandi.dao.repository.dtr.FofoStoreRepository;
|
| 24 |
import com.spice.profitmandi.dao.repository.fofo.ActivatedImeiRepository;
|
25 |
import com.spice.profitmandi.dao.repository.fofo.ActivatedImeiRepository;
|
| 25 |
import com.spice.profitmandi.dao.repository.inventory.ReporticoCacheTableRepository;
|
26 |
import com.spice.profitmandi.dao.repository.inventory.ReporticoCacheTableRepository;
|
| Line 67... |
Line 68... |
| 67 |
|
68 |
|
| 68 |
@Autowired
|
69 |
@Autowired
|
| 69 |
FofoStoreRepository fofoStoreRepository;
|
70 |
FofoStoreRepository fofoStoreRepository;
|
| 70 |
|
71 |
|
| 71 |
@Autowired
|
72 |
@Autowired
|
| - |
|
73 |
CsService1 csService1;
|
| - |
|
74 |
|
| - |
|
75 |
@Autowired
|
| 72 |
CsService csService;
|
76 |
CsService csService;
|
| 73 |
|
77 |
|
| 74 |
@Autowired
|
78 |
@Autowired
|
| 75 |
private MenuRepository menuRepository;
|
79 |
private MenuRepository menuRepository;
|
| 76 |
|
80 |
|
| Line 307... |
Line 311... |
| 307 |
Map<String, Object> map = new HashMap<>();
|
311 |
Map<String, Object> map = new HashMap<>();
|
| 308 |
Map<Integer, CustomRetailer> customRetailerMap = retailerService.getAllFofoRetailers();
|
312 |
Map<Integer, CustomRetailer> customRetailerMap = retailerService.getAllFofoRetailers();
|
| 309 |
Map<Integer, CustomRetailer> crm = null;
|
313 |
Map<Integer, CustomRetailer> crm = null;
|
| 310 |
Map<Integer, String> warehouseMap = ProfitMandiConstants.WAREHOUSE_MAP;
|
314 |
Map<Integer, String> warehouseMap = ProfitMandiConstants.WAREHOUSE_MAP;
|
| 311 |
|
315 |
|
| 312 |
Set<Integer> fofoIds = csService.getAuthFofoIds(email, true);
|
316 |
Set<Integer> fofoIds = csService1.getAuthFofoIds(email, true);
|
| 313 |
|
317 |
|
| 314 |
if (warehouseId != 0) {
|
318 |
if (warehouseId != 0) {
|
| 315 |
|
319 |
|
| 316 |
fofoIds = fofoStoreRepository.selectPartnerByfofoIdAndWarehouse(new ArrayList<>(fofoIds), warehouseId)
|
320 |
fofoIds = fofoStoreRepository.selectPartnerByfofoIdAndWarehouse(new ArrayList<>(fofoIds), warehouseId)
|
| 317 |
.stream().map(x -> x).collect(Collectors.toSet());
|
321 |
.stream().map(x -> x).collect(Collectors.toSet());
|
| Line 472... |
Line 476... |
| 472 |
long stockValue = 0;
|
476 |
long stockValue = 0;
|
| 473 |
long stockQty = 0;
|
477 |
long stockQty = 0;
|
| 474 |
long pendingIndent = 0;
|
478 |
long pendingIndent = 0;
|
| 475 |
long tertiary = 0;
|
479 |
long tertiary = 0;
|
| 476 |
|
480 |
|
| 477 |
Set<Integer> fofoIds = csService.getAuthFofoIds(email, true);
|
481 |
Set<Integer> fofoIds = csService1.getAuthFofoIds(email, true);
|
| 478 |
|
482 |
|
| 479 |
if (fofoIds != null && fofoIds.size() > 0) {
|
483 |
if (fofoIds != null && fofoIds.size() > 0) {
|
| 480 |
Map<Integer, List<Integer>> warehouseIdFofoIdMap = fofoStoreRepository
|
484 |
Map<Integer, List<Integer>> warehouseIdFofoIdMap = fofoStoreRepository
|
| 481 |
.selectActivePartnersByRetailerIds(new ArrayList<>(fofoIds)).stream()
|
485 |
.selectActivePartnersByRetailerIds(new ArrayList<>(fofoIds)).stream()
|
| 482 |
.collect(Collectors.groupingBy(FofoStore::getWarehouseId,
|
486 |
.collect(Collectors.groupingBy(FofoStore::getWarehouseId,
|