| Line 1... |
Line 1... |
| 1 |
package com.smartdukaan.cron.scheduled;
|
1 |
package com.smartdukaan.cron.scheduled;
|
| 2 |
|
2 |
|
| - |
|
3 |
import com.spice.profitmandi.service.warehouse.BillingWarehouseService;
|
| - |
|
4 |
|
| 3 |
import com.google.auth.oauth2.GoogleCredentials;
|
5 |
import com.google.auth.oauth2.GoogleCredentials;
|
| 4 |
import com.google.common.collect.Lists;
|
6 |
import com.google.common.collect.Lists;
|
| 5 |
import com.google.gson.Gson;
|
7 |
import com.google.gson.Gson;
|
| 6 |
import com.razorpay.Payment;
|
8 |
import com.razorpay.Payment;
|
| 7 |
import com.smartdukaan.cron.itelImeiActivation.ItelImeiActivationNewService;
|
9 |
import com.smartdukaan.cron.itelImeiActivation.ItelImeiActivationNewService;
|
| Line 160... |
Line 162... |
| 160 |
|
162 |
|
| 161 |
@Component
|
163 |
@Component
|
| 162 |
@Transactional(rollbackFor = {Throwable.class, ProfitMandiBusinessException.class})
|
164 |
@Transactional(rollbackFor = {Throwable.class, ProfitMandiBusinessException.class})
|
| 163 |
public class ScheduledTasks {
|
165 |
public class ScheduledTasks {
|
| 164 |
|
166 |
|
| - |
|
167 |
@Autowired
|
| - |
|
168 |
private BillingWarehouseService billingWarehouseService;
|
| - |
|
169 |
|
| - |
|
170 |
|
| 165 |
// Lock to serialize all methods that write to sd_credit_requirement table.
|
171 |
// Lock to serialize all methods that write to sd_credit_requirement table.
|
| 166 |
// Prevents deadlocks and stale-data overwrites from concurrent cron threads.
|
172 |
// Prevents deadlocks and stale-data overwrites from concurrent cron threads.
|
| 167 |
public static final Object SD_CREDIT_LOCK = new Object();
|
173 |
public static final Object SD_CREDIT_LOCK = new Object();
|
| 168 |
|
174 |
|
| 169 |
@Value("${oxigen.recharge.enquiry.url}")
|
175 |
@Value("${oxigen.recharge.enquiry.url}")
|
| Line 2717... |
Line 2723... |
| 2717 |
Map<Integer, FofoStore> fofoStoreMap = fofoStoreRepository.selectActiveStores().stream()
|
2723 |
Map<Integer, FofoStore> fofoStoreMap = fofoStoreRepository.selectActiveStores().stream()
|
| 2718 |
.collect(Collectors.toMap(FofoStore::getId, x -> x));
|
2724 |
.collect(Collectors.toMap(FofoStore::getId, x -> x));
|
| 2719 |
List<Integer> allPartnerIds = new ArrayList<>(fofoStoreMap.keySet());
|
2725 |
List<Integer> allPartnerIds = new ArrayList<>(fofoStoreMap.keySet());
|
| 2720 |
|
2726 |
|
| 2721 |
Map<Integer, Map<Integer, List<SaholicCIS>>> warehouseItemAvailabilityMap = saholicInventoryService.getSaholicStock();
|
2727 |
Map<Integer, Map<Integer, List<SaholicCIS>>> warehouseItemAvailabilityMap = saholicInventoryService.getSaholicStock();
|
| 2722 |
Map<Integer, String> warehouseMap = ProfitMandiConstants.WAREHOUSE_MAP;
|
2728 |
Map<Integer, String> warehouseMap = billingWarehouseService.getActiveWarehouses();
|
| 2723 |
Map<Integer, FofoReportingModel> partnerIdSalesHeadersMap = this.getPartnerIdSalesHeaders();
|
2729 |
Map<Integer, FofoReportingModel> partnerIdSalesHeadersMap = this.getPartnerIdSalesHeaders();
|
| 2724 |
Map<Integer, List<FocusedModel>> regionFocusedModelsMap = focusedModelRepository.selectAll().stream()
|
2730 |
Map<Integer, List<FocusedModel>> regionFocusedModelsMap = focusedModelRepository.selectAll().stream()
|
| 2725 |
.collect(Collectors.groupingBy(FocusedModel::getRegionId));
|
2731 |
.collect(Collectors.groupingBy(FocusedModel::getRegionId));
|
| 2726 |
LOGGER.info("regionFocusedModelsMap - {}", regionFocusedModelsMap);
|
2732 |
LOGGER.info("regionFocusedModelsMap - {}", regionFocusedModelsMap);
|
| 2727 |
Map<Integer, Map<Integer, List<SaholicPOItem>>> warehousePoItemAvailabilityMap = saholicInventoryService.getSaholicPOItems();
|
2733 |
Map<Integer, Map<Integer, List<SaholicPOItem>>> warehousePoItemAvailabilityMap = saholicInventoryService.getSaholicPOItems();
|