| Line 35... |
Line 35... |
| 35 |
import com.spice.profitmandi.dao.entity.fofo.*;
|
35 |
import com.spice.profitmandi.dao.entity.fofo.*;
|
| 36 |
import com.spice.profitmandi.dao.entity.inventory.PartnerAgeingModel;
|
36 |
import com.spice.profitmandi.dao.entity.inventory.PartnerAgeingModel;
|
| 37 |
import com.spice.profitmandi.dao.entity.inventory.ReporticoCacheTable;
|
37 |
import com.spice.profitmandi.dao.entity.inventory.ReporticoCacheTable;
|
| 38 |
import com.spice.profitmandi.dao.entity.inventory.SaholicCIS;
|
38 |
import com.spice.profitmandi.dao.entity.inventory.SaholicCIS;
|
| 39 |
import com.spice.profitmandi.dao.entity.inventory.SaholicPOItem;
|
39 |
import com.spice.profitmandi.dao.entity.inventory.SaholicPOItem;
|
| - |
|
40 |
import com.spice.profitmandi.dao.entity.inventory.VendorCatalogPricingLog;
|
| - |
|
41 |
import com.spice.profitmandi.dao.entity.inventory.VendorItemPricing;
|
| 40 |
import com.spice.profitmandi.dao.entity.transaction.*;
|
42 |
import com.spice.profitmandi.dao.entity.transaction.*;
|
| 41 |
import com.spice.profitmandi.dao.entity.user.*;
|
43 |
import com.spice.profitmandi.dao.entity.user.*;
|
| 42 |
import com.spice.profitmandi.dao.enumuration.auth.CollectionRemark;
|
44 |
import com.spice.profitmandi.dao.enumuration.auth.CollectionRemark;
|
| 43 |
import com.spice.profitmandi.dao.enumuration.catalog.SchemeType;
|
45 |
import com.spice.profitmandi.dao.enumuration.catalog.SchemeType;
|
| 44 |
import com.spice.profitmandi.dao.enumuration.cs.EscalationType;
|
46 |
import com.spice.profitmandi.dao.enumuration.cs.EscalationType;
|
| 45 |
import com.spice.profitmandi.dao.enumuration.dtr.RefferalStatus;
|
47 |
import com.spice.profitmandi.dao.enumuration.dtr.RefferalStatus;
|
| 46 |
import com.spice.profitmandi.dao.enumuration.fofo.Gateway;
|
48 |
import com.spice.profitmandi.dao.enumuration.fofo.Gateway;
|
| 47 |
import com.spice.profitmandi.dao.enumuration.fofo.PaymentStatus;
|
49 |
import com.spice.profitmandi.dao.enumuration.fofo.PaymentStatus;
|
| 48 |
import com.spice.profitmandi.dao.enumuration.fofo.ScanType;
|
50 |
import com.spice.profitmandi.dao.enumuration.fofo.ScanType;
|
| - |
|
51 |
import com.spice.profitmandi.dao.enumuration.inventory.VendorCatalogPricingStatus;
|
| 49 |
import com.spice.profitmandi.dao.enumuration.transaction.CreditRisk;
|
52 |
import com.spice.profitmandi.dao.enumuration.transaction.CreditRisk;
|
| 50 |
import com.spice.profitmandi.dao.enumuration.transaction.LoanReferenceType;
|
53 |
import com.spice.profitmandi.dao.enumuration.transaction.LoanReferenceType;
|
| 51 |
import com.spice.profitmandi.dao.enumuration.transaction.PriceDropImeiStatus;
|
54 |
import com.spice.profitmandi.dao.enumuration.transaction.PriceDropImeiStatus;
|
| 52 |
import com.spice.profitmandi.dao.model.*;
|
55 |
import com.spice.profitmandi.dao.model.*;
|
| 53 |
import com.spice.profitmandi.dao.repository.auth.AuthRepository;
|
56 |
import com.spice.profitmandi.dao.repository.auth.AuthRepository;
|
| Line 57... |
Line 60... |
| 57 |
import com.spice.profitmandi.dao.repository.dtr.*;
|
60 |
import com.spice.profitmandi.dao.repository.dtr.*;
|
| 58 |
import com.spice.profitmandi.dao.repository.fofo.*;
|
61 |
import com.spice.profitmandi.dao.repository.fofo.*;
|
| 59 |
import com.spice.profitmandi.dao.repository.inventory.BrandAgeingLimitRepository;
|
62 |
import com.spice.profitmandi.dao.repository.inventory.BrandAgeingLimitRepository;
|
| 60 |
import com.spice.profitmandi.dao.repository.inventory.ReporticoCacheTableRepository;
|
63 |
import com.spice.profitmandi.dao.repository.inventory.ReporticoCacheTableRepository;
|
| 61 |
import com.spice.profitmandi.dao.repository.inventory.StateRepository;
|
64 |
import com.spice.profitmandi.dao.repository.inventory.StateRepository;
|
| - |
|
65 |
import com.spice.profitmandi.dao.repository.inventory.VendorCatalogPricingLogRepository;
|
| - |
|
66 |
import com.spice.profitmandi.dao.repository.inventory.VendorItemPricingRepository;
|
| 62 |
import com.spice.profitmandi.dao.repository.inventory.WarehouseRepository;
|
67 |
import com.spice.profitmandi.dao.repository.inventory.WarehouseRepository;
|
| 63 |
import com.spice.profitmandi.dao.repository.transaction.*;
|
68 |
import com.spice.profitmandi.dao.repository.transaction.*;
|
| 64 |
import com.spice.profitmandi.dao.repository.user.AddressRepository;
|
69 |
import com.spice.profitmandi.dao.repository.user.AddressRepository;
|
| 65 |
import com.spice.profitmandi.dao.repository.user.UserRepository;
|
70 |
import com.spice.profitmandi.dao.repository.user.UserRepository;
|
| 66 |
import com.spice.profitmandi.dao.repository.warehouse.BilledImeiModel;
|
71 |
import com.spice.profitmandi.dao.repository.warehouse.BilledImeiModel;
|
| Line 77... |
Line 82... |
| 77 |
import com.spice.profitmandi.service.integrations.toffee.ToffeeService;
|
82 |
import com.spice.profitmandi.service.integrations.toffee.ToffeeService;
|
| 78 |
import com.spice.profitmandi.service.inventory.AgeingModel;
|
83 |
import com.spice.profitmandi.service.inventory.AgeingModel;
|
| 79 |
import com.spice.profitmandi.service.inventory.AgeingService;
|
84 |
import com.spice.profitmandi.service.inventory.AgeingService;
|
| 80 |
import com.spice.profitmandi.service.inventory.InventoryService;
|
85 |
import com.spice.profitmandi.service.inventory.InventoryService;
|
| 81 |
import com.spice.profitmandi.service.inventory.SaholicInventoryService;
|
86 |
import com.spice.profitmandi.service.inventory.SaholicInventoryService;
|
| - |
|
87 |
import com.spice.profitmandi.service.inventory.VendorCatalogPricingService;
|
| 82 |
import com.spice.profitmandi.service.offers.OfferService;
|
88 |
import com.spice.profitmandi.service.offers.OfferService;
|
| 83 |
import com.spice.profitmandi.service.order.OrderService;
|
89 |
import com.spice.profitmandi.service.order.OrderService;
|
| 84 |
import com.spice.profitmandi.service.pricing.PriceDropService;
|
90 |
import com.spice.profitmandi.service.pricing.PriceDropService;
|
| 85 |
import com.spice.profitmandi.service.recharge.provider.OxigenRechargeProviderService;
|
91 |
import com.spice.profitmandi.service.recharge.provider.OxigenRechargeProviderService;
|
| 86 |
import com.spice.profitmandi.service.recharge.provider.ThinkWalnutDigitalRechargeProviderService;
|
92 |
import com.spice.profitmandi.service.recharge.provider.ThinkWalnutDigitalRechargeProviderService;
|
| Line 139... |
Line 145... |
| 139 |
import java.util.stream.Stream;
|
145 |
import java.util.stream.Stream;
|
| 140 |
|
146 |
|
| 141 |
import static java.util.stream.Collectors.groupingBy;
|
147 |
import static java.util.stream.Collectors.groupingBy;
|
| 142 |
import static java.util.stream.Collectors.mapping;
|
148 |
import static java.util.stream.Collectors.mapping;
|
| 143 |
|
149 |
|
| - |
|
150 |
|
| 144 |
@Component
|
151 |
@Component
|
| 145 |
@Transactional(rollbackFor = Throwable.class)
|
152 |
@Transactional(rollbackFor = Throwable.class)
|
| 146 |
public class ScheduledTasks {
|
153 |
public class ScheduledTasks {
|
| 147 |
|
154 |
|
| 148 |
@Value("${oxigen.recharge.transaction.url}")
|
155 |
@Value("${oxigen.recharge.transaction.url}")
|
| Line 4274... |
Line 4281... |
| 4274 |
}
|
4281 |
}
|
| 4275 |
|
4282 |
|
| 4276 |
}
|
4283 |
}
|
| 4277 |
|
4284 |
|
| 4278 |
@Autowired
|
4285 |
@Autowired
|
| 4279 |
private RetailerFilterRepository retailerFilterRepository;
|
- |
|
| 4280 |
|
- |
|
| 4281 |
@Autowired
|
- |
|
| 4282 |
private PerformanceService performanceService;
|
4286 |
private PerformanceService performanceService;
|
| 4283 |
|
4287 |
|
| 4284 |
|
4288 |
|
| 4285 |
public void sendFilteredRetailerPerformance() throws Exception {
|
4289 |
public void sendFilteredRetailerPerformance() throws Exception {
|
| 4286 |
RetailerFilterModel retailerFilterModel = performanceService.getRetailerFilterModel();
|
4290 |
RetailerFilterModel retailerFilterModel = performanceService.getRetailerFilterModel();
|
| Line 4299... |
Line 4303... |
| 4299 |
}
|
4303 |
}
|
| 4300 |
|
4304 |
|
| 4301 |
|
4305 |
|
| 4302 |
}
|
4306 |
}
|
| 4303 |
|
4307 |
|
| - |
|
4308 |
@Autowired
|
| - |
|
4309 |
private VendorItemPricingRepository vendorItemPricingRepository;
|
| - |
|
4310 |
|
| - |
|
4311 |
@Autowired
|
| - |
|
4312 |
private VendorCatalogPricingLogRepository vendorCatalogPricingLogRepository;
|
| - |
|
4313 |
|
| - |
|
4314 |
|
| - |
|
4315 |
@Autowired
|
| - |
|
4316 |
private VendorCatalogPricingService vendorCatalogPricingService;
|
| - |
|
4317 |
|
| - |
|
4318 |
|
| - |
|
4319 |
public void migrateVendorItemPricing() {
|
| - |
|
4320 |
|
| - |
|
4321 |
List<VendorItemPricing> vendorItemPricings = vendorItemPricingRepository.selectAll();
|
| - |
|
4322 |
for (VendorItemPricing vendorItemPricing : vendorItemPricings) {
|
| - |
|
4323 |
Item item = null;
|
| - |
|
4324 |
try {
|
| - |
|
4325 |
item = itemRepository.selectById(vendorItemPricing.getItemId());
|
| - |
|
4326 |
} catch (ProfitMandiBusinessException e) {
|
| - |
|
4327 |
// TODO Auto-generated catch block
|
| - |
|
4328 |
e.printStackTrace();
|
| - |
|
4329 |
}
|
| - |
|
4330 |
VendorCatalogPricingModel vendorCatalogPricingModel = new VendorCatalogPricingModel();
|
| - |
|
4331 |
vendorCatalogPricingModel.setCatalogId(item.getCatalogItemId());
|
| - |
|
4332 |
vendorCatalogPricingModel.setAuthId(13);
|
| - |
|
4333 |
|
| - |
|
4334 |
vendorCatalogPricingModel.setTp(vendorItemPricing.getTp());
|
| - |
|
4335 |
vendorCatalogPricingModel.setMop(vendorItemPricing.getMop());
|
| - |
|
4336 |
vendorCatalogPricingModel.setEffectedOn(LocalDate.now());
|
| - |
|
4337 |
vendorCatalogPricingModel.setVendorId(vendorItemPricing.getVendorId());
|
| - |
|
4338 |
|
| - |
|
4339 |
|
| - |
|
4340 |
try {
|
| - |
|
4341 |
vendorCatalogPricingService.createVendorCatalogPricingLog(vendorCatalogPricingModel);
|
| - |
|
4342 |
} catch (ProfitMandiBusinessException e) {
|
| - |
|
4343 |
continue;
|
| - |
|
4344 |
}
|
| - |
|
4345 |
|
| - |
|
4346 |
}
|
| - |
|
4347 |
|
| - |
|
4348 |
}
|
| - |
|
4349 |
|
| - |
|
4350 |
public void approveVendorCatalogPricing() {
|
| - |
|
4351 |
List<VendorCatalogPricingLog> vendorCatalogPricingLogs = vendorCatalogPricingLogRepository.selectByStatus(VendorCatalogPricingStatus.PENDING);
|
| - |
|
4352 |
|
| - |
|
4353 |
for (VendorCatalogPricingLog vendorCatalogPricingLog : vendorCatalogPricingLogs) {
|
| - |
|
4354 |
vendorCatalogPricingService.createVendorCatalogPricing(vendorCatalogPricingLog);
|
| - |
|
4355 |
}
|
| - |
|
4356 |
|
| - |
|
4357 |
}
|
| - |
|
4358 |
|
| 4304 |
|
4359 |
|
| 4305 |
}
|
4360 |
}
|
| 4306 |
// 2284'
|
4361 |
// 2284'
|
| 4307 |
|
4362 |
|