| Line 477... |
Line 477... |
| 477 |
String schemeCategory = null;
|
477 |
String schemeCategory = null;
|
| 478 |
if (staticScheme != null) {
|
478 |
if (staticScheme != null) {
|
| 479 |
Map<Integer, Double> schemeAchievementMap = orderRepository.selectBillingDatesBetweenSumGroupByRetailerId(staticScheme.getStartDateTime(), staticScheme.getEndDateTime());
|
479 |
Map<Integer, Double> schemeAchievementMap = orderRepository.selectBillingDatesBetweenSumGroupByRetailerId(staticScheme.getStartDateTime(), staticScheme.getEndDateTime());
|
| 480 |
if (schemeAchievementMap.get(fofoId) != null) {
|
480 |
if (schemeAchievementMap.get(fofoId) != null) {
|
| 481 |
schemeAchievement = schemeAchievementMap.get(fofoId);
|
481 |
schemeAchievement = schemeAchievementMap.get(fofoId);
|
| 482 |
if (staticScheme.getTarget() >= 120000 && staticScheme.getTarget() < 2000000) {
|
482 |
if (staticScheme.getTarget() >= 1500000 && staticScheme.getTarget() < 2500000) {
|
| 483 |
schemeCategory = "Bronze Club";
|
- |
|
| 484 |
} else if (staticScheme.getTarget() < 3000000) {
|
- |
|
| 485 |
schemeCategory = "Silver Club";
|
483 |
schemeCategory = "Silver Club";
|
| 486 |
} else if (staticScheme.getTarget() < 4000000) {
|
484 |
} else if (staticScheme.getTarget() < 3000000) {
|
| 487 |
schemeCategory = "Gold Club";
|
485 |
schemeCategory = "Gold Club";
|
| 488 |
} else if (staticScheme.getTarget() < 6000000) {
|
486 |
} else if (staticScheme.getTarget() < 6000000) {
|
| 489 |
schemeCategory = "Rising Star Club";
|
487 |
schemeCategory = "Rising Star Club";
|
| 490 |
} else if (staticScheme.getTarget() < 8000000) {
|
488 |
} else if (staticScheme.getTarget() < 8000000) {
|
| 491 |
schemeCategory = "Super Star Club";
|
489 |
schemeCategory = "Super Star Club";
|
| 492 |
} else if (staticScheme.getTarget() < 12500000) {
|
490 |
} else if (staticScheme.getTarget() < 10000000) {
|
| 493 |
schemeCategory = "Diamond Club";
|
491 |
schemeCategory = "Diamond Club";
|
| 494 |
} else if (staticScheme.getTarget() < 28000000) {
|
492 |
} else if (staticScheme.getTarget() < 20000000) {
|
| 495 |
schemeCategory = "Platinum Club";
|
493 |
schemeCategory = "Platinum Club";
|
| 496 |
} else {
|
494 |
} else {
|
| 497 |
schemeCategory = "Premium Club";
|
495 |
schemeCategory = "Premium Club";
|
| 498 |
}
|
496 |
}
|
| 499 |
}
|
497 |
}
|
| Line 1295... |
Line 1293... |
| 1295 |
Set<Integer> authfofoIds = new HashSet<>();
|
1293 |
Set<Integer> authfofoIds = new HashSet<>();
|
| 1296 |
authfofoIds = csService1.getAuthFofoIds(email, true);
|
1294 |
authfofoIds = csService1.getAuthFofoIds(email, true);
|
| 1297 |
Map<Integer, List<Integer>> warehouseIdFofoIdMap = fofoStoreRepository.selectActivePartnersByRetailerIds(new ArrayList<>(authfofoIds)).stream().collect(Collectors.groupingBy(
|
1295 |
Map<Integer, List<Integer>> warehouseIdFofoIdMap = fofoStoreRepository.selectActivePartnersByRetailerIds(new ArrayList<>(authfofoIds)).stream().collect(Collectors.groupingBy(
|
| 1298 |
FofoStore::getWarehouseId, Collectors.mapping(FofoStore::getId, Collectors.toList())));
|
1296 |
FofoStore::getWarehouseId, Collectors.mapping(FofoStore::getId, Collectors.toList())));
|
| 1299 |
|
1297 |
|
| - |
|
1298 |
if (!warehouseIdFofoIdMap.containsKey(7573)) {
|
| - |
|
1299 |
warehouseIdFofoIdMap.put(7573, new ArrayList<>());
|
| - |
|
1300 |
}
|
| - |
|
1301 |
|
| 1300 |
Map<Integer, CustomRetailer> fofoIdAndPartnerMap = retailerService.getFofoRetailers(false);
|
1302 |
Map<Integer, CustomRetailer> fofoIdAndPartnerMap = retailerService.getFofoRetailers(false);
|
| 1301 |
Map<Integer, PartnerDetailModel> fofoIdAndallValues = adminUser.getPartnersStatDataFromFile();
|
1303 |
Map<Integer, PartnerDetailModel> fofoIdAndallValues = adminUser.getPartnersStatDataFromFile();
|
| 1302 |
if (warehouseId != 0) {
|
1304 |
if (warehouseId != 0) {
|
| 1303 |
List<Integer> fofoIds = warehouseIdFofoIdMap.get(warehouseId);
|
1305 |
List<Integer> fofoIds = warehouseIdFofoIdMap.get(warehouseId);
|
| 1304 |
/*
|
1306 |
/*
|
| Line 1337... |
Line 1339... |
| 1337 |
LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
|
1339 |
LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
|
| 1338 |
String email = loginDetails.getEmailId();
|
1340 |
String email = loginDetails.getEmailId();
|
| 1339 |
Set<Integer> authfofoIds = csService1.getAuthFofoIds(email, true);
|
1341 |
Set<Integer> authfofoIds = csService1.getAuthFofoIds(email, true);
|
| 1340 |
Map<Integer, List<Integer>> warehouseIdFofoIdMap = fofoStoreRepository.selectActivePartnersByRetailerIds(new ArrayList<>(authfofoIds)).stream().collect(Collectors.groupingBy(
|
1342 |
Map<Integer, List<Integer>> warehouseIdFofoIdMap = fofoStoreRepository.selectActivePartnersByRetailerIds(new ArrayList<>(authfofoIds)).stream().collect(Collectors.groupingBy(
|
| 1341 |
FofoStore::getWarehouseId, Collectors.mapping(FofoStore::getId, Collectors.toList())));
|
1343 |
FofoStore::getWarehouseId, Collectors.mapping(FofoStore::getId, Collectors.toList())));
|
| - |
|
1344 |
|
| - |
|
1345 |
if (!warehouseIdFofoIdMap.containsKey(7573)) {
|
| - |
|
1346 |
warehouseIdFofoIdMap.put(7573, new ArrayList<>());
|
| - |
|
1347 |
}
|
| 1342 |
List<WarehouseWiseBrandStockModel> warehouseWiseBrandStock = new ArrayList<>();
|
1348 |
List<WarehouseWiseBrandStockModel> warehouseWiseBrandStock = new ArrayList<>();
|
| 1343 |
if (!warehouseId.contains(0)) {
|
1349 |
if (!warehouseId.contains(0)) {
|
| 1344 |
warehouseWiseBrandStock = saholicInventoryCISRepository.selectGroupByWarehouseAndBrand(warehouseId);
|
1350 |
warehouseWiseBrandStock = saholicInventoryCISRepository.selectGroupByWarehouseAndBrand(warehouseId);
|
| 1345 |
} else {
|
1351 |
} else {
|
| 1346 |
LOGGER.info("warehouseIdFofoIdMap" + warehouseIdFofoIdMap.keySet());
|
1352 |
LOGGER.info("warehouseIdFofoIdMap" + warehouseIdFofoIdMap.keySet());
|