Subversion Repositories SmartDukaan

Rev

Rev 34162 | Rev 34249 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 34162 Rev 34241
Line 4... Line 4...
4
import com.smartdukaan.cron.monitored.NagiosMonitorTasks;
4
import com.smartdukaan.cron.monitored.NagiosMonitorTasks;
5
import com.smartdukaan.cron.properties.WriteToPropertiesFile;
5
import com.smartdukaan.cron.properties.WriteToPropertiesFile;
6
import com.smartdukaan.cron.scheduled.leadsync.LeadSyncRunner;
6
import com.smartdukaan.cron.scheduled.leadsync.LeadSyncRunner;
7
import com.smartdukaan.cron.scheduled.ordertracking.OrderTrackingService;
7
import com.smartdukaan.cron.scheduled.ordertracking.OrderTrackingService;
8
import com.smartdukaan.cron.scheduled.purchaseorder.POScheduler;
8
import com.smartdukaan.cron.scheduled.purchaseorder.POScheduler;
-
 
9
import com.spice.profitmandi.dao.service.PurSaleService;
9
import org.apache.logging.log4j.LogManager;
10
import org.apache.logging.log4j.LogManager;
10
import org.apache.logging.log4j.Logger;
11
import org.apache.logging.log4j.Logger;
11
import org.springframework.beans.factory.annotation.Autowired;
12
import org.springframework.beans.factory.annotation.Autowired;
12
import org.springframework.scheduling.annotation.Scheduled;
13
import org.springframework.scheduling.annotation.Scheduled;
13
import org.springframework.stereotype.Component;
14
import org.springframework.stereotype.Component;
Line 230... Line 231...
230
    public void rollOutUpgardedMargins() throws Exception {
231
    public void rollOutUpgardedMargins() throws Exception {
231
        scheduledTasks.rollOutUpgardedMarginsNextMonth();
232
        scheduledTasks.rollOutUpgardedMarginsNextMonth();
232
 
233
 
233
    }
234
    }
234
 
235
 
235
    @Scheduled(fixedDelay = 60*1000)
236
    @Scheduled(fixedDelay = 60 * 1000)
236
    public void sendNotification() throws Throwable {
237
    public void sendNotification() throws Throwable {
237
 
238
 
238
        log.info("send Notification");
239
        log.info("send Notification");
239
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
240
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
240
        propertiesDetails.put("sendNotification", "0");
241
        propertiesDetails.put("sendNotification", "0");
Line 258... Line 259...
258
        propertiesDetails.put("checkRazorPayPaymentStatus", "1");
259
        propertiesDetails.put("checkRazorPayPaymentStatus", "1");
259
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
260
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
260
 
261
 
261
    }
262
    }
262
 
263
 
263
    @Scheduled(fixedDelay = 2*1000)
264
    @Scheduled(fixedDelay = 2 * 1000)
264
    //@Scheduled(cron = "0 5 23 * * *")
265
    //@Scheduled(cron = "0 5 23 * * *")
265
    public void updateIrnsToInvoices() throws Throwable {
266
    public void updateIrnsToInvoices() throws Throwable {
266
        runOnceTasks.updateIrnsToInvoices();
267
        runOnceTasks.updateIrnsToInvoices();
267
    }
268
    }
268
 
269
 
Line 499... Line 500...
499
        log.info("updateSaholicCISTable startTime" + LocalDateTime.now());
500
        log.info("updateSaholicCISTable startTime" + LocalDateTime.now());
500
        runOnceTasks.updateSaholicCISTable();
501
        runOnceTasks.updateSaholicCISTable();
501
        log.info("updateSaholicCISTable endTime" + LocalDateTime.now());
502
        log.info("updateSaholicCISTable endTime" + LocalDateTime.now());
502
    }
503
    }
503
 
504
 
-
 
505
    @Autowired
-
 
506
    PurSaleService purSaleService;
-
 
507
 
-
 
508
    @Scheduled(cron = "0 0 10,19 * * ?")
-
 
509
    public void send10DaysEgedStockReport() throws Throwable {
-
 
510
        log.info("sendPursaleRatioReportOnMail startTime" + LocalDateTime.now());
-
 
511
        purSaleService.sendPursaleRatioReportOnMail();
-
 
512
        log.info("sendPursaleRatioReportOnMail endTime" + LocalDateTime.now());
-
 
513
    }
-
 
514
 
504
    @Scheduled(fixedDelay = 30 * 60 * 1000, initialDelay = 15 * 60 * 1000)
515
    @Scheduled(fixedDelay = 30 * 60 * 1000, initialDelay = 15 * 60 * 1000)
505
    public void fetchPartnerStat() throws Throwable {
516
    public void fetchPartnerStat() throws Throwable {
506
        scheduledTasks.fetchParnterStats();
517
        scheduledTasks.fetchParnterStats();
507
    }
518
    }
508
 
519
 
Line 656... Line 667...
656
    //Look out for imeis that have activation pending based of sale and mark create new SIO out of them
667
    //Look out for imeis that have activation pending based of sale and mark create new SIO out of them
657
    @Scheduled(cron = "0 0 1 * * *")
668
    @Scheduled(cron = "0 0 1 * * *")
658
    public void processActivatedImeisForSchemes() throws Throwable {
669
    public void processActivatedImeisForSchemes() throws Throwable {
659
        scheduledTasks.processActivatedImeisForSchemes();
670
        scheduledTasks.processActivatedImeisForSchemes();
660
    }
671
    }
-
 
672
 
661
    //On every fifth update deductions
673
    //On every fifth update deductions
662
    @Scheduled(cron = "0 30 6 5 * ?")
674
    @Scheduled(cron = "0 30 6 5 * ?")
663
    public void processSidbiDeductions() throws Throwable {
675
    public void processSidbiDeductions() throws Throwable {
664
        scheduledTasks.processSidbiDeductions();
676
        scheduledTasks.processSidbiDeductions();
665
    }
677
    }
Line 683... Line 695...
683
    //Loans due/overdue/default notifications sent to parnters
695
    //Loans due/overdue/default notifications sent to parnters
684
    @Scheduled(cron = "0 0 11 * * *")
696
    @Scheduled(cron = "0 0 11 * * *")
685
    public void sendMailWhatsAppAfterLoanDueDate() throws Throwable {
697
    public void sendMailWhatsAppAfterLoanDueDate() throws Throwable {
686
        scheduledTasks.sendMailWhatsAppAfterLoanDueDate();
698
        scheduledTasks.sendMailWhatsAppAfterLoanDueDate();
687
    }
699
    }
-
 
700
 
688
    @Scheduled(cron = "0 0 8 * * *")
701
    @Scheduled(cron = "0 0 8 * * *")
689
    public void alertForDueDate() throws Throwable {
702
    public void alertForDueDate() throws Throwable {
690
        scheduledTasks.alertForDueDate();
703
        scheduledTasks.alertForDueDate();
691
    }
704
    }
692
 
705
 
Line 742... Line 755...
742
 
755
 
743
    @Scheduled(cron = "0 0 0 * * MON")
756
    @Scheduled(cron = "0 0 0 * * MON")
744
    public void findAllLiveDemoBrandItemsByBillingDate() throws Throwable {
757
    public void findAllLiveDemoBrandItemsByBillingDate() throws Throwable {
745
        scheduledTasks.findAllLiveDemoBrandItemsByBillingDate();
758
        scheduledTasks.findAllLiveDemoBrandItemsByBillingDate();
746
    }
759
    }
-
 
760
 
747
    @Scheduled(cron = "0 10 6 * * *")
761
    @Scheduled(cron = "0 10 6 * * *")
748
    public void findTodayPocoBillingItems() throws Throwable {
762
    public void findTodayPocoBillingItems() throws Throwable {
749
        scheduledTasks.findTodayPocoBillingItems();
763
        scheduledTasks.findTodayPocoBillingItems();
750
    }
764
    }
751
 
765
 
Line 755... Line 769...
755
        scheduledTasks.rejectPriceDropsOfApprovedImeis();
769
        scheduledTasks.rejectPriceDropsOfApprovedImeis();
756
    }
770
    }
757
 
771
 
758
    @Autowired
772
    @Autowired
759
    POScheduler poScheduler;
773
    POScheduler poScheduler;
-
 
774
 
760
    @Scheduled(cron = "0 0 1 * * *")
775
    @Scheduled(cron = "0 0 1 * * *")
761
    public void autoClosePO() {
776
    public void autoClosePO() {
762
        poScheduler.autoClosePurchaseOrders();
777
        poScheduler.autoClosePurchaseOrders();
763
    }
778
    }
764
    /*
779
    /*