Subversion Repositories SmartDukaan

Rev

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

Rev 37417 Rev 37470
Line 3... Line 3...
3
import com.google.auth.oauth2.GoogleCredentials;
3
import com.google.auth.oauth2.GoogleCredentials;
4
import com.google.common.collect.Lists;
4
import com.google.common.collect.Lists;
5
import com.google.gson.Gson;
5
import com.google.gson.Gson;
6
import com.razorpay.Payment;
6
import com.razorpay.Payment;
7
import com.smartdukaan.cron.itelImeiActivation.ItelImeiActivationNewService;
7
import com.smartdukaan.cron.itelImeiActivation.ItelImeiActivationNewService;
8
import com.smartdukaan.cron.itelImeiActivation.ItelImeiActivationService;
-
 
9
import com.smartdukaan.cron.itelImeiActivation.TecnoImeiActivation;
-
 
10
import com.smartdukaan.cron.migrations.RunOnceTasks;
8
import com.smartdukaan.cron.migrations.RunOnceTasks;
11
import com.smartdukaan.cron.scheduled.ambreports.AbmReportSender;
9
import com.smartdukaan.cron.scheduled.ambreports.AbmReportSender;
12
import com.smartdukaan.cron.scheduled.beatmiss.BeatMissDetectorRunner;
10
import com.smartdukaan.cron.scheduled.beatmiss.BeatMissDetectorRunner;
13
import com.smartdukaan.cron.scheduled.runnables.PurchaseMigration;
11
import com.smartdukaan.cron.scheduled.runnables.PurchaseMigration;
14
import com.spice.profitmandi.common.enumuration.*;
12
import com.spice.profitmandi.common.enumuration.*;
Line 199... Line 197...
199
    private ASTRepository astRepository;
197
    private ASTRepository astRepository;
200
 
198
 
201
    @Autowired
199
    @Autowired
202
    private ServiceConfigService serviceConfigService;
200
    private ServiceConfigService serviceConfigService;
203
 
201
 
204
    @Autowired
-
 
205
    private TecnoImeiActivation tecnoImeiActivation;
-
 
206
 
-
 
207
    private static final DateTimeFormatter leadTimeFormatter = DateTimeFormatter.ofPattern("d LLL, hh:mm a");
202
    private static final DateTimeFormatter leadTimeFormatter = DateTimeFormatter.ofPattern("d LLL, hh:mm a");
208
 
203
 
209
    @Autowired
204
    @Autowired
210
    private PartnerRegionRepository partnerRegionRepository;
205
    private PartnerRegionRepository partnerRegionRepository;
211
 
206
 
Line 214... Line 209...
214
 
209
 
215
    @Autowired
210
    @Autowired
216
    VivoImeiActivationService vivoImeiActivationService;
211
    VivoImeiActivationService vivoImeiActivationService;
217
 
212
 
218
    @Autowired
213
    @Autowired
219
    ItelImeiActivationService itelImeiActivationService;
-
 
220
 
-
 
221
    @Autowired
-
 
222
    private PartnerTypeChangeService partnerTypeChangeService;
214
    private PartnerTypeChangeService partnerTypeChangeService;
223
 
215
 
224
 
216
 
225
    @Autowired
217
    @Autowired
226
    private LeadRepository leadRepository;
218
    private LeadRepository leadRepository;
Line 3759... Line 3751...
3759
            e.printStackTrace();
3751
            e.printStackTrace();
3760
        }
3752
        }
3761
 
3753
 
3762
    }
3754
    }
3763
 
3755
 
3764
    public void checkItelImeiActivation(LocalDate date, Integer day) {
-
 
3765
        LOGGER.info("Hello - {}", "hhh");
-
 
3766
 
-
 
3767
        try {
-
 
3768
            itelImeiActivationService.checkItelImeiActivation(date, day);
-
 
3769
        } catch (ProfitMandiBusinessException e) {
-
 
3770
            // TODO Auto-generated catch block
-
 
3771
            e.printStackTrace();
-
 
3772
        } catch (IOException e) {
-
 
3773
            // TODO Auto-generated catch block
-
 
3774
            e.printStackTrace();
-
 
3775
        } catch (Exception e) {
-
 
3776
            // TODO Auto-generated catch block
-
 
3777
            e.printStackTrace();
-
 
3778
        }
-
 
3779
 
-
 
3780
    }
-
 
3781
 
-
 
3782
    public void selectFinServiceFollowUpDateByCurrDate(LocalDate currentDate) throws
3756
    public void selectFinServiceFollowUpDateByCurrDate(LocalDate currentDate) throws
3783
            MessagingException, ProfitMandiBusinessException, IOException {
3757
            MessagingException, ProfitMandiBusinessException, IOException {
3784
        LOGGER.info("selectfinServiceFollow - {}", "selectfinServiceFollowUpDateByCurrDate");
3758
        LOGGER.info("selectfinServiceFollow - {}", "selectfinServiceFollowUpDateByCurrDate");
3785
 
3759
 
3786
        serviceConfigService.selectFinServicePartnerfollowUpDateByCurrentDate(currentDate);
3760
        serviceConfigService.selectFinServicePartnerfollowUpDateByCurrentDate(currentDate);
3787
 
3761
 
3788
    }
3762
    }
3789
 
3763
 
3790
    public void checkTecnoImeiActivation(LocalDate date, Integer day) {
-
 
3791
        LOGGER.info("Hello - {}", "hhh");
-
 
3792
 
-
 
3793
        try {
-
 
3794
            tecnoImeiActivation.checkTecnoImeiActivation(date, day);
-
 
3795
        } catch (ProfitMandiBusinessException e) {
-
 
3796
            // TODO Auto-generated catch block
-
 
3797
            e.printStackTrace();
-
 
3798
        } catch (IOException e) {
-
 
3799
            // TODO Auto-generated catch block
-
 
3800
            e.printStackTrace();
-
 
3801
        } catch (Exception e) {
-
 
3802
            // TODO Auto-generated catch block
-
 
3803
            e.printStackTrace();
-
 
3804
        }
-
 
3805
 
-
 
3806
    }
-
 
3807
 
-
 
3808
    public void checkCancellationMargin() throws Exception {
3764
    public void checkCancellationMargin() throws Exception {
3809
        LocalDateTime startDate = LocalDate.of(2021, 4, 1).atStartOfDay();
3765
        LocalDateTime startDate = LocalDate.of(2021, 4, 1).atStartOfDay();
3810
        List<FofoOrder> fofoOrders = fofoOrderRepository.selectCancelledBetweenSaleDate(startDate, LocalDateTime.now());
3766
        List<FofoOrder> fofoOrders = fofoOrderRepository.selectCancelledBetweenSaleDate(startDate, LocalDateTime.now());
3811
        LOGGER.info("Total Orders =  {}", fofoOrders.size());
3767
        LOGGER.info("Total Orders =  {}", fofoOrders.size());
3812
        for (FofoOrder fofoOrder : fofoOrders) {
3768
        for (FofoOrder fofoOrder : fofoOrders) {