| Line 107... |
Line 107... |
| 107 |
import com.spice.profitmandi.service.transaction.CreditBlockedExceptionPartnersRepository;
|
107 |
import com.spice.profitmandi.service.transaction.CreditBlockedExceptionPartnersRepository;
|
| 108 |
import com.spice.profitmandi.service.transaction.CreditNoteService;
|
108 |
import com.spice.profitmandi.service.transaction.CreditNoteService;
|
| 109 |
import com.spice.profitmandi.service.transaction.SDCreditService;
|
109 |
import com.spice.profitmandi.service.transaction.SDCreditService;
|
| 110 |
import com.spice.profitmandi.service.transaction.TransactionService;
|
110 |
import com.spice.profitmandi.service.transaction.TransactionService;
|
| 111 |
import com.spice.profitmandi.service.transaction.invoicing.InvoiceService;
|
111 |
import com.spice.profitmandi.service.transaction.invoicing.InvoiceService;
|
| - |
|
112 |
import com.spice.profitmandi.service.user.StoreStatusService;
|
| 112 |
import com.spice.profitmandi.service.user.RetailerService;
|
113 |
import com.spice.profitmandi.service.user.RetailerService;
|
| 113 |
import com.spice.profitmandi.service.user.StoreTimelineTatService;
|
114 |
import com.spice.profitmandi.service.user.StoreTimelineTatService;
|
| 114 |
import com.spice.profitmandi.service.wallet.CommonPaymentService;
|
115 |
import com.spice.profitmandi.service.wallet.CommonPaymentService;
|
| 115 |
import com.spice.profitmandi.service.wallet.WalletService;
|
116 |
import com.spice.profitmandi.service.wallet.WalletService;
|
| 116 |
import com.spice.profitmandi.service.warehouse.PurchaseOrderService;
|
117 |
import com.spice.profitmandi.service.warehouse.PurchaseOrderService;
|
| Line 364... |
Line 365... |
| 364 |
private DailyRechargeRepository dailyRechargeRepository;
|
365 |
private DailyRechargeRepository dailyRechargeRepository;
|
| 365 |
|
366 |
|
| 366 |
@Autowired
|
367 |
@Autowired
|
| 367 |
private FofoStoreRepository fofoStoreRepository;
|
368 |
private FofoStoreRepository fofoStoreRepository;
|
| 368 |
|
369 |
|
| - |
|
370 |
@Autowired
|
| - |
|
371 |
private StoreStatusService storeStatusService;
|
| - |
|
372 |
|
| 369 |
@Value("${prod}")
|
373 |
@Value("${prod}")
|
| 370 |
private boolean prod;
|
374 |
private boolean prod;
|
| 371 |
|
375 |
|
| 372 |
@Autowired
|
376 |
@Autowired
|
| 373 |
private StateGstRateRepository stateGstRateRepository;
|
377 |
private StateGstRateRepository stateGstRateRepository;
|
| Line 2028... |
Line 2032... |
| 2028 |
mailOutboxService.queueMailWithAttachmentsViaGoogle(INDENT_TERTIARY_MAIL_LIST, null, "Indent Tertiary Report", "PFA", "ScheduledTasks.sendIndentTertiary", attachment);
|
2032 |
mailOutboxService.queueMailWithAttachmentsViaGoogle(INDENT_TERTIARY_MAIL_LIST, null, "Indent Tertiary Report", "PFA", "ScheduledTasks.sendIndentTertiary", attachment);
|
| 2029 |
|
2033 |
|
| 2030 |
}
|
2034 |
}
|
| 2031 |
|
2035 |
|
| 2032 |
public void checkPartnerActiveStore() throws Exception {
|
2036 |
public void checkPartnerActiveStore() throws Exception {
|
| - |
|
2037 |
storeStatusService.expireTemporaryActivations();
|
| - |
|
2038 |
}
|
| 2033 |
|
2039 |
|
| 2034 |
List<FofoStore> fofoStores = fofoStoreRepository.selectByStatus(true);
|
- |
|
| 2035 |
|
- |
|
| 2036 |
LocalDateTime currentDate = LocalDate.now().atStartOfDay();
|
- |
|
| 2037 |
if (!fofoStores.isEmpty()) {
|
- |
|
| 2038 |
for (FofoStore fofoStore : fofoStores) {
|
2040 |
public void sendStoreClosureReminder() throws Exception {
|
| 2039 |
|
- |
|
| 2040 |
if (currentDate.isBefore(fofoStore.getActiveTimeStamp())) {
|
- |
|
| 2041 |
|
- |
|
| 2042 |
fofoStore.setActive(true);
|
- |
|
| 2043 |
fofoStoreRepository.persist(fofoStore);
|
- |
|
| 2044 |
LOGGER.info("inserted into InActiveFofoStore successfully");
|
- |
|
| 2045 |
|
- |
|
| 2046 |
} else {
|
- |
|
| 2047 |
fofoStore.setActive(false);
|
2041 |
storeStatusService.sendClosureReminder();
|
| 2048 |
fofoStore.setActiveTimeStamp(null);
|
- |
|
| 2049 |
fofoStoreRepository.persist(fofoStore);
|
- |
|
| 2050 |
LOGGER.info("inserted into InActiveFofoStore successfully");
|
- |
|
| 2051 |
}
|
- |
|
| 2052 |
|
- |
|
| 2053 |
}
|
- |
|
| 2054 |
}
|
- |
|
| 2055 |
|
- |
|
| 2056 |
}
|
2042 |
}
|
| 2057 |
|
2043 |
|
| 2058 |
public void updatePartnerActivationTypeByMonthlySale() throws Exception {
|
2044 |
public void updatePartnerActivationTypeByMonthlySale() throws Exception {
|
| 2059 |
LocalDateTime now = LocalDateTime.now();
|
2045 |
LocalDateTime now = LocalDateTime.now();
|
| 2060 |
LocalDateTime thirtyDaysAgo = now.minusDays(30);
|
2046 |
LocalDateTime thirtyDaysAgo = now.minusDays(30);
|