Subversion Repositories SmartDukaan

Rev

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

Rev 32010 Rev 32048
Line 17... Line 17...
17
 
17
 
18
@Component
18
@Component
19
//@ConditionalOnProperty(name = "scheduled", havingValue = "true", matchIfMissing = true)
19
//@ConditionalOnProperty(name = "scheduled", havingValue = "true", matchIfMissing = true)
20
public class ScheduledSkeleton {
20
public class ScheduledSkeleton {
21
 
21
 
22
	private static final Logger log = LogManager.getLogger(ScheduledSkeleton.class);
22
    private static final Logger log = LogManager.getLogger(ScheduledSkeleton.class);
23
 
23
 
24
	@Autowired
24
    @Autowired
25
	private ScheduledTasks scheduledTasks;
25
    private ScheduledTasks scheduledTasks;
26
 
26
 
27
	@Autowired
27
    @Autowired
28
	private LeadSyncRunner leadSyncRunner;
28
    private LeadSyncRunner leadSyncRunner;
29
 
29
 
30
	@Autowired
30
    @Autowired
31
	private Reconciliation reconciliation;
31
    private Reconciliation reconciliation;
32
 
32
 
33
	@Autowired
33
    @Autowired
34
	private RunOnceTasks runOnceTasks;
34
    private RunOnceTasks runOnceTasks;
35
 
35
 
36
	@Autowired
36
    @Autowired
37
	NagiosMonitorTasks nagiosMonitorTasks;
37
    NagiosMonitorTasks nagiosMonitorTasks;
38
 
38
 
39
	@Autowired
39
    @Autowired
40
	private TicketRelatedScheduledTask ticketRelatedScheduledTask;
40
    private TicketRelatedScheduledTask ticketRelatedScheduledTask;
41
 
41
 
42
	@Autowired
42
    @Autowired
43
	private OnBoardingRelatedSchelduleTask onBoardingRelatedSchelduleTask;
43
    private OnBoardingRelatedSchelduleTask onBoardingRelatedSchelduleTask;
44
 
44
 
45
	@Autowired
45
    @Autowired
46
	private WriteToPropertiesFile writeToPropertiesFile;
46
    private WriteToPropertiesFile writeToPropertiesFile;
47
 
47
 
48
	String nagiosCronPropertiesFile = "/var/log/services/nagios-Cron-Monitoring.properties";
48
    String nagiosCronPropertiesFile = "/var/log/services/nagios-Cron-Monitoring.properties";
49
 
49
 
50
	@Scheduled(cron = "0 0 2 * * *")
50
    @Scheduled(cron = "0 0 2 * * *")
51
	public void processDailySchemes() throws Exception {
51
    public void processDailySchemes() throws Exception {
52
 
52
 
53
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
53
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
54
		propertiesDetails.put("processDailySchemes", "0");
54
        propertiesDetails.put("processDailySchemes", "0");
55
 
55
 
56
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
56
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
57
		int maxMinusDays = 5;
57
        int maxMinusDays = 5;
58
		int currentDayOfMonth = LocalDate.now().getDayOfMonth();
58
        int currentDayOfMonth = LocalDate.now().getDayOfMonth();
59
		int minusDays = currentDayOfMonth > maxMinusDays ? maxMinusDays : currentDayOfMonth - 1;
59
        int minusDays = currentDayOfMonth > maxMinusDays ? maxMinusDays : currentDayOfMonth - 1;
60
		if (minusDays > 0) {
60
        if (minusDays > 0) {
61
			scheduledTasks.processScheme(LocalDateTime.now().minusDays(minusDays), LocalDateTime.now(), false);
61
            scheduledTasks.processScheme(LocalDateTime.now().minusDays(minusDays), LocalDateTime.now(), false);
62
		}
62
        }
63
		propertiesDetails.put("processDailySchemes", "1");
63
        propertiesDetails.put("processDailySchemes", "1");
64
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
64
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
65
 
65
 
66
	}
66
    }
67
 
67
 
68
	@Scheduled(cron = "0 15 0 * * *")
68
    @Scheduled(cron = "0 15 0 * * *")
69
	public void runOnceTasks() throws Exception {
69
    public void runOnceTasks() throws Exception {
70
 
70
 
71
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
71
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
72
		propertiesDetails.put("runOnceTasks", "0");
72
        propertiesDetails.put("runOnceTasks", "0");
73
 
73
 
74
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
74
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
75
 
75
 
76
		scheduledTasks.reconcileRecharge();
76
        scheduledTasks.reconcileRecharge();
77
 
77
 
78
		propertiesDetails.put("runOnceTasks", "1");
78
        propertiesDetails.put("runOnceTasks", "1");
79
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
79
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
80
	}
80
    }
81
 
81
 
82
	/*
82
    /*
83
	 * @Scheduled(cron = "0 0 8 * * *") public void mailDashboardScreenshots()
83
     * @Scheduled(cron = "0 0 8 * * *") public void mailDashboardScreenshots()
84
	 * throws Exception { runOnceTasks.mailDashboardScreenshots(); }
84
     * throws Exception { runOnceTasks.mailDashboardScreenshots(); }
85
	 */
85
     */
86
 
86
 
87
	@Scheduled(cron = "0 05 0 1,16 * ?")
87
    @Scheduled(cron = "0 05 0 1,16 * ?")
88
	public void processRechargeCashback() throws Throwable {
88
    public void processRechargeCashback() throws Throwable {
89
 
89
 
90
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
90
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
91
		propertiesDetails.put("processRechargeCashback", "0");
91
        propertiesDetails.put("processRechargeCashback", "0");
92
 
92
 
93
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
93
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
94
		scheduledTasks.processRechargeCashback();
94
        scheduledTasks.processRechargeCashback();
95
 
95
 
96
		propertiesDetails.put("processRechargeCashback", "1");
96
        propertiesDetails.put("processRechargeCashback", "1");
97
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
97
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
98
 
98
 
99
	}
99
    }
100
 
100
 
101
	@Scheduled(cron = "0 0 6 * * *")
101
    @Scheduled(cron = "0 0 6 * * *")
102
	public void sendPartnerInvestmentDetails() throws Exception {
102
    public void sendPartnerInvestmentDetails() throws Exception {
103
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
103
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
104
		propertiesDetails.put("sendPartnerInvestmentDetails", "0");
104
        propertiesDetails.put("sendPartnerInvestmentDetails", "0");
105
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
105
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
106
		scheduledTasks.sendPartnerInvestmentDetails();
106
        scheduledTasks.sendPartnerInvestmentDetails();
107
		long secs = (new Date().getTime()) / 1000;
107
        long secs = (new Date().getTime()) / 1000;
108
		log.info("sendPartnerInvestmentDetails" + LocalDateTime.now());
108
        log.info("sendPartnerInvestmentDetails" + LocalDateTime.now());
109
 
109
 
110
		propertiesDetails.put("investmentDate", Long.toString(secs));
110
        propertiesDetails.put("investmentDate", Long.toString(secs));
111
		propertiesDetails.put("sendPartnerInvestmentDetails", "1");
111
        propertiesDetails.put("sendPartnerInvestmentDetails", "1");
112
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
112
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
113
 
113
 
114
	}
114
    }
115
 
115
 
116
	@Scheduled(cron = "0 0 10,15,17 * * *")
116
    @Scheduled(cron = "0 0 10,15,17 * * *")
117
	public void sendIndentTertiaryReport() throws Exception {
117
    public void sendIndentTertiaryReport() throws Exception {
118
 
118
 
119
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
119
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
120
		propertiesDetails.put("sendIndentTertiaryReport", "0");
120
        propertiesDetails.put("sendIndentTertiaryReport", "0");
121
 
121
 
122
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
122
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
123
 
123
 
124
		scheduledTasks.sendIndentTertiary();
124
        scheduledTasks.sendIndentTertiary();
125
 
125
 
126
		propertiesDetails.put("sendIndentTertiaryReport", "1");
126
        propertiesDetails.put("sendIndentTertiaryReport", "1");
127
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
127
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
128
 
128
 
129
	}
129
    }
130
 
130
 
131
	@Scheduled(cron = "0 0 6 * * *")
131
    @Scheduled(cron = "0 0 6 * * *")
132
	public void checkPartnerActiveStoreByStatus() throws Exception {
132
    public void checkPartnerActiveStoreByStatus() throws Exception {
133
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
133
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
134
		propertiesDetails.put("checkPartnerActiveStoreByStatus", "0");
134
        propertiesDetails.put("checkPartnerActiveStoreByStatus", "0");
135
 
135
 
136
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
136
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
137
 
137
 
138
		scheduledTasks.checkPartnerActiveStore();
138
        scheduledTasks.checkPartnerActiveStore();
139
		propertiesDetails.put("checkPartnerActiveStoreByStatus", "1");
139
        propertiesDetails.put("checkPartnerActiveStoreByStatus", "1");
140
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
140
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
141
 
141
 
142
	}
142
    }
143
 
143
 
144
	// @Scheduled(cron = "0 0 8 * * *")
144
    // @Scheduled(cron = "0 0 8 * * *")
145
	public void sendStockAgeingReport() throws Throwable {
145
    public void sendStockAgeingReport() throws Throwable {
146
 
146
 
147
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
147
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
148
		propertiesDetails.put("sendStockAgeingReport", "0");
148
        propertiesDetails.put("sendStockAgeingReport", "0");
149
 
149
 
150
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
150
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
151
 
151
 
152
		scheduledTasks.sendAgeingReport();
152
        scheduledTasks.sendAgeingReport();
153
 
153
 
154
		propertiesDetails.put("sendStockAgeingReport", "1");
154
        propertiesDetails.put("sendStockAgeingReport", "1");
155
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
155
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
156
 
156
 
157
	}
157
    }
158
 
158
 
159
	@Scheduled(cron = "0 0 11 * * *")
159
    @Scheduled(cron = "0 0 11 * * *")
160
	public void escalateTicket() throws Exception {
160
    public void escalateTicket() throws Exception {
161
		log.info("escalate ticket");
161
        log.info("escalate ticket");
162
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
162
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
163
		propertiesDetails.put("escalateTicket", "0");
163
        propertiesDetails.put("escalateTicket", "0");
164
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
164
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
165
		ticketRelatedScheduledTask.escalateTicket();
165
        ticketRelatedScheduledTask.escalateTicket();
166
 
166
 
167
		propertiesDetails.put("escalateTicket", "1");
167
        propertiesDetails.put("escalateTicket", "1");
168
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
168
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
169
 
169
 
170
	}
170
    }
171
 
171
 
172
	@Scheduled(cron = "0 0 11 * * *")
172
    @Scheduled(cron = "0 0 11 * * *")
173
	public void alertTicketToUser() throws Exception {
173
    public void alertTicketToUser() throws Exception {
174
		log.info("alert for ticket");
174
        log.info("alert for ticket");
175
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
175
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
176
		propertiesDetails.put("alertTicketToUser", "0");
176
        propertiesDetails.put("alertTicketToUser", "0");
177
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
177
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
178
 
178
 
179
		ticketRelatedScheduledTask.alertforTicket();
179
        ticketRelatedScheduledTask.alertforTicket();
180
		propertiesDetails.put("alertTicketToUser", "1");
180
        propertiesDetails.put("alertTicketToUser", "1");
181
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
181
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
182
 
182
 
183
	}
183
    }
184
 
184
 
185
	@Scheduled(cron = "0 0 14,18,23 ? * *")
185
    @Scheduled(cron = "0 0 14,18,23 ? * *")
186
	public void dailySaleNotification() throws Exception {
186
    public void dailySaleNotification() throws Exception {
187
		log.info("daily send Notification");
187
        log.info("daily send Notification");
188
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
188
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
189
		propertiesDetails.put("dailySaleNotification", "0");
189
        propertiesDetails.put("dailySaleNotification", "0");
190
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
190
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
191
 
191
 
192
		scheduledTasks.sendDailySalesNotificationToPartner(null);
192
        scheduledTasks.sendDailySalesNotificationToPartner(null);
193
 
193
 
194
		propertiesDetails.put("dailySaleNotification", "1");
194
        propertiesDetails.put("dailySaleNotification", "1");
195
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
195
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
196
 
196
 
197
	}
197
    }
198
 
198
 
199
	/*
199
    /*
200
	 * @Scheduled(cron = "0 0 6 * * *") public void dailyReconciliation() throws
200
     * @Scheduled(cron = "0 0 6 * * *") public void dailyReconciliation() throws
201
	 * Exception { reconciliation.dailyReconciliation(); }
201
     * Exception { reconciliation.dailyReconciliation(); }
202
	 */
202
     */
203
 
203
 
204
	@Scheduled(cron = "0 0 1 * * *")
204
    @Scheduled(cron = "0 0 1 * * *")
205
	public void selectFinServiceFollowUpDateByCurrDate() throws Exception {
205
    public void selectFinServiceFollowUpDateByCurrDate() throws Exception {
206
		log.info("selectFinServiceFollowUpDateByCurrDate");
206
        log.info("selectFinServiceFollowUpDateByCurrDate");
207
		scheduledTasks.selectFinServiceFollowUpDateByCurrDate(LocalDate.now());
207
        scheduledTasks.selectFinServiceFollowUpDateByCurrDate(LocalDate.now());
208
 
208
 
209
	}
209
    }
210
 
210
 
211
	@Scheduled(cron = "0 0 2 * * *")
211
    @Scheduled(cron = "0 0 2 * * *")
212
	public void processActivation() throws Exception {
212
    public void processActivation() throws Exception {
213
 
213
 
214
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
214
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
215
		propertiesDetails.put("processActivation", "0");
215
        propertiesDetails.put("processActivation", "0");
216
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
216
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
217
 
217
 
218
		scheduledTasks.processActivation();
218
        scheduledTasks.processActivation();
219
 
219
 
220
		propertiesDetails.put("processActivation", "1");
220
        propertiesDetails.put("processActivation", "1");
221
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
221
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
222
 
222
 
223
	}
223
    }
224
 
224
 
225
	// TODO: Change it back to first of every month
225
    // TODO: Change it back to first of every month
226
	// @Scheduled(cron = "0 0 1 1 * *")
226
    // @Scheduled(cron = "0 0 1 1 * *")
227
	@Scheduled(cron = "0 0 1 2 * *")
227
    @Scheduled(cron = "0 0 1 2 * *")
228
	public void rollOutUpgardedMargins() throws Exception {
228
    public void rollOutUpgardedMargins() throws Exception {
229
		scheduledTasks.rollOutUpgardedMarginsNextMonth();
229
        scheduledTasks.rollOutUpgardedMarginsNextMonth();
230
 
230
 
231
	}
231
    }
232
 
232
 
233
	@Scheduled(cron = "0 */5 * * * *")
233
    @Scheduled(cron = "0 */5 * * * *")
234
	public void sendNotification() throws Throwable {
234
    public void sendNotification() throws Throwable {
235
 
235
 
236
		log.info("send Notification");
236
        log.info("send Notification");
237
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
237
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
238
		propertiesDetails.put("sendNotification", "0");
238
        propertiesDetails.put("sendNotification", "0");
239
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
239
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
240
 
240
 
241
		scheduledTasks.sendNotification();
241
        scheduledTasks.sendNotification();
242
		propertiesDetails.put("sendNotification", "1");
242
        propertiesDetails.put("sendNotification", "1");
243
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
243
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
244
		log.info("send Notification Done");
244
        log.info("send Notification Done");
245
 
245
 
246
	}
246
    }
247
 
247
 
248
	@Scheduled(cron = "0 */15 * * * *")
248
    @Scheduled(cron = "0 */15 * * * *")
249
	public void checkRazorPayPaymentStatus() throws Throwable {
249
    public void checkRazorPayPaymentStatus() throws Throwable {
250
 
250
 
251
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
251
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
252
		propertiesDetails.put("checkRazorPayPaymentStatus", "0");
252
        propertiesDetails.put("checkRazorPayPaymentStatus", "0");
253
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
253
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
254
 
254
 
255
		scheduledTasks.checkRazorPayPaymentStatus();
255
        scheduledTasks.checkRazorPayPaymentStatus();
256
		propertiesDetails.put("checkRazorPayPaymentStatus", "1");
256
        propertiesDetails.put("checkRazorPayPaymentStatus", "1");
257
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
257
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
258
 
258
 
259
	}
259
    }
260
 
260
 
261
	@Scheduled(fixedDelay = 30 * 60 * 1000)
261
    @Scheduled(fixedDelay = 30 * 60 * 1000)
262
	public void updateIrnsToInvoices() throws Throwable {
262
    public void updateIrnsToInvoices() throws Throwable {
263
		runOnceTasks.updateIrnsToInvoices();
263
        runOnceTasks.updateIrnsToInvoices();
264
	}
264
    }
265
 
265
 
266
	// No longer needed
266
    // No longer needed
267
	// @Scheduled(cron = "0 */10 * * * *")
267
    // @Scheduled(cron = "0 */10 * * * *")
268
	public void attachToffeeInvoices() throws Throwable {
268
    public void attachToffeeInvoices() throws Throwable {
269
 
269
 
270
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
270
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
271
		propertiesDetails.put("attachToffeeInvoices", "0");
271
        propertiesDetails.put("attachToffeeInvoices", "0");
272
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
272
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
273
 
273
 
274
		scheduledTasks.attachToffeeInvoices();
274
        scheduledTasks.attachToffeeInvoices();
275
 
275
 
276
		propertiesDetails.put("attachToffeeInvoices", "1");
276
        propertiesDetails.put("attachToffeeInvoices", "1");
277
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
277
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
278
 
278
 
279
	}
279
    }
280
 
280
 
281
	@Scheduled(cron = "0 0 5 * * *")
281
    @Scheduled(cron = "0 0 5 * * *")
282
	public void ticketClosed() throws Throwable {
282
    public void ticketClosed() throws Throwable {
283
 
283
 
284
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
284
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
285
		propertiesDetails.put("ticketClosed", "0");
285
        propertiesDetails.put("ticketClosed", "0");
286
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
286
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
287
 
287
 
288
		scheduledTasks.ticketClosed();
288
        scheduledTasks.ticketClosed();
289
 
289
 
290
		propertiesDetails.put("ticketClosed", "1");
290
        propertiesDetails.put("ticketClosed", "1");
291
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
291
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
292
 
292
 
293
	}
293
    }
294
 
294
 
295
	@Scheduled(cron = "0 0 8 * * *")
295
    @Scheduled(cron = "0 0 8 * * *")
296
	public void checkfocusedModelInPartnerStock() throws Throwable {
296
    public void checkfocusedModelInPartnerStock() throws Throwable {
297
		log.info("startTime" + LocalDateTime.now());
297
        log.info("startTime" + LocalDateTime.now());
298
 
298
 
299
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
299
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
300
		propertiesDetails.put("checkfocusedModelInPartnerStock", "0");
300
        propertiesDetails.put("checkfocusedModelInPartnerStock", "0");
301
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
301
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
302
 
302
 
303
		scheduledTasks.checkfocusedModelInPartnerStock();
303
        scheduledTasks.checkfocusedModelInPartnerStock();
304
		propertiesDetails.put("checkfocusedModelInPartnerStock", "1");
304
        propertiesDetails.put("checkfocusedModelInPartnerStock", "1");
305
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
305
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
306
 
306
 
307
		log.info("endTime" + LocalDateTime.now());
307
        log.info("endTime" + LocalDateTime.now());
308
	}
308
    }
309
 
309
 
310
	@Scheduled(cron = "0 0 8,10,12,14,16,18,20 * * *")
310
    @Scheduled(cron = "0 0 8,10,12,14,16,18,20 * * *")
311
	public void notifyLead() throws Throwable {
311
    public void notifyLead() throws Throwable {
312
 
312
 
313
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
313
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
314
		propertiesDetails.put("notifyLead", "0");
314
        propertiesDetails.put("notifyLead", "0");
315
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
315
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
316
 
316
 
317
		scheduledTasks.notifyLead();
317
        scheduledTasks.notifyLead();
318
 
318
 
319
		propertiesDetails.put("notifyLead", "1");
319
        propertiesDetails.put("notifyLead", "1");
320
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
320
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
321
 
321
 
322
		// scheduledTasks.notifyVisits();
322
        // scheduledTasks.notifyVisits();
323
	}
323
    }
324
 
324
 
325
	// No longer scheduled
325
    // No longer scheduled
326
	// @Scheduled(cron = "0 0 1 * * *")
326
    // @Scheduled(cron = "0 0 1 * * *")
327
	public void fetchImeiActivation() throws Throwable {
327
    public void fetchImeiActivation() throws Throwable {
328
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
328
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
329
		propertiesDetails.put("fetchImeiActivation", "0");
329
        propertiesDetails.put("fetchImeiActivation", "0");
330
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
330
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
331
 
331
 
332
		runOnceTasks.fetchImeiActivation(0);
332
        runOnceTasks.fetchImeiActivation(0);
333
 
333
 
334
		propertiesDetails.put("fetchImeiActivation", "1");
334
        propertiesDetails.put("fetchImeiActivation", "1");
335
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
335
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
336
 
336
 
337
	}
337
    }
338
 
338
 
339
	@Scheduled(cron = "0 0 1 * * *")
339
    @Scheduled(cron = "0 0 1 * * *")
340
	public void checkValidateReferral() throws Throwable {
340
    public void checkValidateReferral() throws Throwable {
341
		log.info("startTime" + LocalDateTime.now());
341
        log.info("startTime" + LocalDateTime.now());
342
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
342
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
343
		propertiesDetails.put("checkValidateReferral", "0");
343
        propertiesDetails.put("checkValidateReferral", "0");
344
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
344
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
345
 
345
 
346
		scheduledTasks.checkValidateReferral();
346
        scheduledTasks.checkValidateReferral();
347
 
347
 
348
		propertiesDetails.put("checkValidateReferral", "1");
348
        propertiesDetails.put("checkValidateReferral", "1");
349
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
349
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
350
 
350
 
351
		log.info("endTime" + LocalDateTime.now());
351
        log.info("endTime" + LocalDateTime.now());
352
	}
352
    }
353
 
353
 
354
	// @Scheduled(cron = "0 0 8 * * *")
354
    // @Scheduled(cron = "0 0 8 * * *")
355
	public void partnerProblemAlert() throws Throwable {
355
    public void partnerProblemAlert() throws Throwable {
356
		log.info("startTime" + LocalDateTime.now());
356
        log.info("startTime" + LocalDateTime.now());
357
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
357
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
358
		propertiesDetails.put("partnerProblemAlert", "0");
358
        propertiesDetails.put("partnerProblemAlert", "0");
359
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
359
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
360
 
360
 
361
		scheduledTasks.partnerProblemAlert();
361
        scheduledTasks.partnerProblemAlert();
362
		propertiesDetails.put("partnerProblemAlert", "1");
362
        propertiesDetails.put("partnerProblemAlert", "1");
363
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
363
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
364
 
364
 
365
		log.info("endTime" + LocalDateTime.now());
365
        log.info("endTime" + LocalDateTime.now());
366
	}
366
    }
367
 
367
 
368
	/*
368
    /*
369
	 * @Scheduled(cron = "0 30 10 * * MON-SAT") public void
369
     * @Scheduled(cron = "0 30 10 * * MON-SAT") public void
370
	 * sendMorningAttendanceAlert() throws Throwable { log.info("startTime" +
370
     * sendMorningAttendanceAlert() throws Throwable { log.info("startTime" +
371
	 * LocalDateTime.now()); LinkedHashMap<String, String> propertiesDetails = new
371
     * LocalDateTime.now()); LinkedHashMap<String, String> propertiesDetails = new
372
	 * LinkedHashMap<>(); propertiesDetails.put("sendMorningAttendanceAlert", "0");
372
     * LinkedHashMap<>(); propertiesDetails.put("sendMorningAttendanceAlert", "0");
373
	 * writeToPropertiesFile.saveParamChanges(propertiesDetails,
373
     * writeToPropertiesFile.saveParamChanges(propertiesDetails,
374
	 * nagiosCronPropertiesFile);
374
     * nagiosCronPropertiesFile);
375
	 * 
375
     * 
376
	 * scheduledTasks.sendAttendanceMorningAlert();
376
     * scheduledTasks.sendAttendanceMorningAlert();
377
	 * propertiesDetails.put("sendMorningAttendanceAlert", "1");
377
     * propertiesDetails.put("sendMorningAttendanceAlert", "1");
378
	 * writeToPropertiesFile.saveParamChanges(propertiesDetails,
378
     * writeToPropertiesFile.saveParamChanges(propertiesDetails,
379
	 * nagiosCronPropertiesFile);
379
     * nagiosCronPropertiesFile);
380
	 * 
380
     * 
381
	 * log.info("endTime" + LocalDateTime.now()); }
381
     * log.info("endTime" + LocalDateTime.now()); }
382
	 * 
382
     * 
383
	 * @Scheduled(cron = "0 30 20 * * MON-SAT") public void
383
     * @Scheduled(cron = "0 30 20 * * MON-SAT") public void
384
	 * sendEveningAttendanceAlert() throws Throwable { log.info("startTime" +
384
     * sendEveningAttendanceAlert() throws Throwable { log.info("startTime" +
385
	 * LocalDateTime.now()); LinkedHashMap<String, String> propertiesDetails = new
385
     * LocalDateTime.now()); LinkedHashMap<String, String> propertiesDetails = new
386
	 * LinkedHashMap<>(); propertiesDetails.put("sendEveningAttendanceAlert", "0");
386
     * LinkedHashMap<>(); propertiesDetails.put("sendEveningAttendanceAlert", "0");
387
	 * writeToPropertiesFile.saveParamChanges(propertiesDetails,
387
     * writeToPropertiesFile.saveParamChanges(propertiesDetails,
388
	 * nagiosCronPropertiesFile);
388
     * nagiosCronPropertiesFile);
389
	 * 
389
     * 
390
	 * scheduledTasks.sendAttendanceEveningAlert();
390
     * scheduledTasks.sendAttendanceEveningAlert();
391
	 * propertiesDetails.put("sendEveningAttendanceAlert", "1");
391
     * propertiesDetails.put("sendEveningAttendanceAlert", "1");
392
	 * writeToPropertiesFile.saveParamChanges(propertiesDetails,
392
     * writeToPropertiesFile.saveParamChanges(propertiesDetails,
393
	 * nagiosCronPropertiesFile);
393
     * nagiosCronPropertiesFile);
394
	 * 
394
     * 
395
	 * log.info("endTime" + LocalDateTime.now()); }
395
     * log.info("endTime" + LocalDateTime.now()); }
396
	 */
396
     */
397
 
397
 
398
	@Scheduled(cron = "0 0 7 * * *")
398
    @Scheduled(cron = "0 0 7 * * *")
399
	public void onboardingEventDelays() throws Throwable {
399
    public void onboardingEventDelays() throws Throwable {
400
		log.info("startTime" + LocalDateTime.now());
400
        log.info("startTime" + LocalDateTime.now());
401
 
401
 
402
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
402
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
403
		propertiesDetails.put("onboardingEventDelays", "0");
403
        propertiesDetails.put("onboardingEventDelays", "0");
404
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
404
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
405
 
405
 
406
		onBoardingRelatedSchelduleTask.onboardingEventDelays();
406
        onBoardingRelatedSchelduleTask.onboardingEventDelays();
407
 
407
 
408
		propertiesDetails.put("onboardingEventDelays", "1");
408
        propertiesDetails.put("onboardingEventDelays", "1");
409
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
409
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
410
 
410
 
411
		log.info("endTime" + LocalDateTime.now());
411
        log.info("endTime" + LocalDateTime.now());
412
	}
412
    }
413
 
413
 
414
	@Scheduled(cron = "0 0 8 * * *")
414
    @Scheduled(cron = "0 0 8 * * *")
415
	public void brandingAlert() throws Throwable {
415
    public void brandingAlert() throws Throwable {
416
		log.info("startTime" + LocalDateTime.now());
416
        log.info("startTime" + LocalDateTime.now());
417
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
417
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
418
		propertiesDetails.put("brandingAlert", "0");
418
        propertiesDetails.put("brandingAlert", "0");
419
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
419
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
420
 
420
 
421
		onBoardingRelatedSchelduleTask.brandingAlert();
421
        onBoardingRelatedSchelduleTask.brandingAlert();
422
		propertiesDetails.put("brandingAlert", "1");
422
        propertiesDetails.put("brandingAlert", "1");
423
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
423
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
424
 
424
 
425
		log.info("endTime" + LocalDateTime.now());
425
        log.info("endTime" + LocalDateTime.now());
426
	}
426
    }
427
 
427
 
428
	@Scheduled(cron = "0 0 8 * * *")
428
    @Scheduled(cron = "0 0 8 * * *")
429
	public void advancePaymentPendingAlert() throws Throwable {
429
    public void advancePaymentPendingAlert() throws Throwable {
430
		log.info("startTime" + LocalDateTime.now());
430
        log.info("startTime" + LocalDateTime.now());
431
 
431
 
432
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
432
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
433
		propertiesDetails.put("advancePaymentPendingAlert", "0");
433
        propertiesDetails.put("advancePaymentPendingAlert", "0");
434
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
434
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
435
 
435
 
436
		onBoardingRelatedSchelduleTask.advancePaymentPendingAlert();
436
        onBoardingRelatedSchelduleTask.advancePaymentPendingAlert();
437
		propertiesDetails.put("advancePaymentPendingAlert", "1");
437
        propertiesDetails.put("advancePaymentPendingAlert", "1");
438
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
438
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
439
 
439
 
440
		log.info("endTime" + LocalDateTime.now());
440
        log.info("endTime" + LocalDateTime.now());
441
	}
441
    }
442
 
442
 
443
	@Scheduled(cron = "0 0 8 * * *")
443
    @Scheduled(cron = "0 0 8 * * *")
444
	public void fullPaymentPendingAlert() throws Throwable {
444
    public void fullPaymentPendingAlert() throws Throwable {
445
		log.info("startTime" + LocalDateTime.now());
445
        log.info("startTime" + LocalDateTime.now());
446
 
446
 
447
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
447
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
448
		propertiesDetails.put("fullPaymentPendingAlert", "0");
448
        propertiesDetails.put("fullPaymentPendingAlert", "0");
449
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
449
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
450
 
450
 
451
		onBoardingRelatedSchelduleTask.fullPaymentPendingAlert();
451
        onBoardingRelatedSchelduleTask.fullPaymentPendingAlert();
452
 
452
 
453
		propertiesDetails.put("fullPaymentPendingAlert", "1");
453
        propertiesDetails.put("fullPaymentPendingAlert", "1");
454
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
454
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
455
 
455
 
456
		log.info("endTime" + LocalDateTime.now());
456
        log.info("endTime" + LocalDateTime.now());
457
	}
457
    }
458
 
458
 
459
	@Scheduled(cron = "0 0 9 * * *")
459
    @Scheduled(cron = "0 0 9 * * *")
460
	public void advancePaymentPendinglegalAlert() throws Throwable {
460
    public void advancePaymentPendinglegalAlert() throws Throwable {
461
		log.info("startTime" + LocalDateTime.now());
461
        log.info("startTime" + LocalDateTime.now());
462
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
462
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
463
		propertiesDetails.put("advancePaymentPendinglegalAlert", "0");
463
        propertiesDetails.put("advancePaymentPendinglegalAlert", "0");
464
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
464
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
465
 
465
 
466
		onBoardingRelatedSchelduleTask.advancePaymentPendinglegalAlert();
466
        onBoardingRelatedSchelduleTask.advancePaymentPendinglegalAlert();
467
 
467
 
468
		propertiesDetails.put("advancePaymentPendinglegalAlert", "1");
468
        propertiesDetails.put("advancePaymentPendinglegalAlert", "1");
469
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
469
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
470
 
470
 
471
		log.info("endTime" + LocalDateTime.now());
471
        log.info("endTime" + LocalDateTime.now());
472
	}
472
    }
473
 
473
 
474
	@Scheduled(cron = "0 */5 * * * *")
474
    @Scheduled(cron = "0 */5 * * * *")
475
	public void onBoardingCompleteEventEmail() throws Throwable {
475
    public void onBoardingCompleteEventEmail() throws Throwable {
476
		log.info("startTime" + LocalDateTime.now());
476
        log.info("startTime" + LocalDateTime.now());
477
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
477
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
478
		propertiesDetails.put("onBoardingCompleteEventEmail", "0");
478
        propertiesDetails.put("onBoardingCompleteEventEmail", "0");
479
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
479
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
480
 
480
 
481
		onBoardingRelatedSchelduleTask.onBoardingCompleteEventEmail();
481
        onBoardingRelatedSchelduleTask.onBoardingCompleteEventEmail();
482
		propertiesDetails.put("onBoardingCompleteEventEmail", "1");
482
        propertiesDetails.put("onBoardingCompleteEventEmail", "1");
483
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
483
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
484
 
484
 
485
		log.info("endTime" + LocalDateTime.now());
485
        log.info("endTime" + LocalDateTime.now());
486
	}
486
    }
487
 
487
 
488
	@Scheduled(cron = "0 */5 * * * *")
488
    @Scheduled(cron = "0 */5 * * * *")
489
	public void updateSaholicCISTable() throws Throwable {
489
    public void updateSaholicCISTable() throws Throwable {
490
		log.info("updateSaholicCISTable startTime" + LocalDateTime.now());
490
        log.info("updateSaholicCISTable startTime" + LocalDateTime.now());
491
		runOnceTasks.updateSaholicCISTable();
491
        runOnceTasks.updateSaholicCISTable();
492
		log.info("updateSaholicCISTable endTime" + LocalDateTime.now());
492
        log.info("updateSaholicCISTable endTime" + LocalDateTime.now());
493
	}
493
    }
494
 
494
 
495
	@Scheduled(fixedDelay = 30 * 60 * 1000, initialDelay = 15 * 60 * 1000)
495
    @Scheduled(fixedDelay = 30 * 60 * 1000, initialDelay = 15 * 60 * 1000)
496
	public void fetchPartnerStat() throws Throwable {
496
    public void fetchPartnerStat() throws Throwable {
497
		scheduledTasks.fetchParnterStats();
497
        scheduledTasks.fetchParnterStats();
498
	}
498
    }
499
 
499
 
500
	@Scheduled(cron = "0 0 9 * * *")
500
    @Scheduled(cron = "0 0 9 * * *")
501
	public void storeTimelinePromoterPending() throws Throwable {
501
    public void storeTimelinePromoterPending() throws Throwable {
502
		log.info("startTime" + LocalDateTime.now());
502
        log.info("startTime" + LocalDateTime.now());
503
 
503
 
504
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
504
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
505
		propertiesDetails.put("storeTimelinePromoterPending", "0");
505
        propertiesDetails.put("storeTimelinePromoterPending", "0");
506
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
506
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
507
 
507
 
508
		onBoardingRelatedSchelduleTask.storeTimelinePromoterPending();
508
        onBoardingRelatedSchelduleTask.storeTimelinePromoterPending();
509
		propertiesDetails.put("storeTimelinePromoterPending", "1");
509
        propertiesDetails.put("storeTimelinePromoterPending", "1");
510
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
510
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
511
 
511
 
512
		log.info("endTime" + LocalDateTime.now());
512
        log.info("endTime" + LocalDateTime.now());
513
	}
513
    }
514
 
514
 
515
	@Scheduled(cron = "0 0 23 * * *")
515
    @Scheduled(cron = "0 0 23 * * *")
516
	public void checkItelImeiActivation() throws Throwable {
516
    public void checkItelImeiActivation() throws Throwable {
517
		log.info("startTime" + LocalDate.now());
517
        log.info("startTime" + LocalDate.now());
518
 
518
 
519
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
519
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
520
		propertiesDetails.put("checkItelImeiActivation", "0");
520
        propertiesDetails.put("checkItelImeiActivation", "0");
521
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
521
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
522
		log.info("startTimecheckItelImeiActivation" + LocalDate.now());
522
        log.info("startTimecheckItelImeiActivation" + LocalDate.now());
523
		scheduledTasks.checkItelImeiActivation(LocalDate.now(), 90);
523
        scheduledTasks.checkItelImeiActivation(LocalDate.now(), 90);
524
		long secs = (new Date().getTime()) / 1000;
524
        long secs = (new Date().getTime()) / 1000;
525
		log.info("endTimecheckItelImeiActivation" + LocalDate.now());
525
        log.info("endTimecheckItelImeiActivation" + LocalDate.now());
526
		propertiesDetails.put("checkItelImeiActivation", "1");
526
        propertiesDetails.put("checkItelImeiActivation", "1");
527
		propertiesDetails.put("itelDate", Long.toString(secs));
527
        propertiesDetails.put("itelDate", Long.toString(secs));
528
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
528
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
529
 
529
 
530
	}
530
    }
531
 
531
 
532
	@Scheduled(cron = "0 0 23 * * *")
532
    @Scheduled(cron = "0 0 23 * * *")
533
	public void checkTecnoImeiActivation() throws Throwable {
533
    public void checkTecnoImeiActivation() throws Throwable {
534
 
534
 
535
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
535
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
536
		propertiesDetails.put("checkTecnoImeiActivation", "0");
536
        propertiesDetails.put("checkTecnoImeiActivation", "0");
537
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
537
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
538
 
538
 
539
		log.info("startTime" + LocalDate.now());
539
        log.info("startTime" + LocalDate.now());
540
		log.info("startTimecheckTecnoImeiActivation" + LocalDate.now());
540
        log.info("startTimecheckTecnoImeiActivation" + LocalDate.now());
541
		scheduledTasks.checkTecnoImeiActivation(LocalDate.now(), 90);
541
        scheduledTasks.checkTecnoImeiActivation(LocalDate.now(), 90);
542
		log.info("endTimecheckTecnoImeiActivation" + LocalDate.now());
542
        log.info("endTimecheckTecnoImeiActivation" + LocalDate.now());
543
 
543
 
544
		long secs = (new Date().getTime()) / 1000;
544
        long secs = (new Date().getTime()) / 1000;
545
		propertiesDetails.put("checkTecnoImeiActivation", "1");
545
        propertiesDetails.put("checkTecnoImeiActivation", "1");
546
		propertiesDetails.put("technoDate", Long.toString(secs));
546
        propertiesDetails.put("technoDate", Long.toString(secs));
547
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
547
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
548
 
548
 
549
	}
549
    }
550
 
550
 
551
	@Scheduled(fixedDelay = 60 * 1000)
551
    @Scheduled(fixedDelay = 60 * 1000)
552
	public void vivoImeiActivation() throws Throwable {
552
    public void vivoImeiActivation() throws Throwable {
553
		log.info("startTimevivoImeiActivation" + LocalDateTime.now());
553
        log.info("startTimevivoImeiActivation" + LocalDateTime.now());
554
 
554
 
555
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
555
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
556
		propertiesDetails.put("vivoImeiActivation", "0");
556
        propertiesDetails.put("vivoImeiActivation", "0");
557
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
557
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
558
 
558
 
559
		scheduledTasks.checkImeiActivation();
559
        scheduledTasks.checkImeiActivation();
560
		long secs = (new Date().getTime()) / 1000;
560
        long secs = (new Date().getTime()) / 1000;
561
		log.info("endTimevivoImeiActivation" + LocalDateTime.now());
561
        log.info("endTimevivoImeiActivation" + LocalDateTime.now());
562
		propertiesDetails.put("vivoImeiActivation", "1");
562
        propertiesDetails.put("vivoImeiActivation", "1");
563
 
563
 
564
		propertiesDetails.put("vivoDate", Long.toString(secs));
564
        propertiesDetails.put("vivoDate", Long.toString(secs));
565
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
565
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
566
 
566
 
567
	}
567
    }
568
 
568
 
569
	@Scheduled(cron = "0 0 8 * * *")
569
    @Scheduled(cron = "0 0 8 * * *")
570
	public void reviewUncontactablePartner() throws Throwable {
570
    public void reviewUncontactablePartner() throws Throwable {
571
		log.info("startTime" + LocalDateTime.now());
571
        log.info("startTime" + LocalDateTime.now());
572
 
572
 
573
		scheduledTasks.reviewUncontactablePartner();
573
        scheduledTasks.reviewUncontactablePartner();
574
 
574
 
575
	}
575
    }
576
 
576
 
577
	@Autowired
577
    @Autowired
578
	private StandAlone standAlone;
578
    private StandAlone standAlone;
579
 
579
 
580
	// @Scheduled(fixedDelay = 60 * 1000)
580
    // @Scheduled(fixedDelay = 60 * 1000)
581
	public void oppo() throws Throwable {
581
    public void oppo() throws Throwable {
582
		standAlone.checkOppoImeiStatus();
582
        standAlone.checkOppoImeiStatus();
583
	}
583
    }
584
 
584
 
585
	@Scheduled(cron = "0 0 * * * *")
585
    @Scheduled(cron = "0 0 * * * *")
586
	public void markBlueDartOrderDelivered() throws Throwable {
586
    public void markBlueDartOrderDelivered() throws Throwable {
587
		log.info("startTime" + LocalDateTime.now());
587
        log.info("startTime" + LocalDateTime.now());
588
		scheduledTasks.markBlueDartOrderDelivered();
588
        scheduledTasks.markBlueDartOrderDelivered();
589
		log.info("endTime" + LocalDateTime.now());
589
        log.info("endTime" + LocalDateTime.now());
590
	}
590
    }
591
 
591
 
592
	@Scheduled(cron = "0 0 * * * *")
592
    @Scheduled(cron = "0 0 * * * *")
593
	public void markDelhiveryOrderDelivered() throws Throwable {
593
    public void markDelhiveryOrderDelivered() throws Throwable {
594
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
594
        LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
595
		propertiesDetails.put("markDelhiveryOrderDelivered", "0");
595
        propertiesDetails.put("markDelhiveryOrderDelivered", "0");
596
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
596
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
597
 
597
 
598
		log.info("startTime" + LocalDateTime.now());
598
        log.info("startTime" + LocalDateTime.now());
599
		scheduledTasks.markDelhiveryOrderDelivered();
599
        scheduledTasks.markDelhiveryOrderDelivered();
600
		propertiesDetails.put("markDelhiveryOrderDelivered", "1");
600
        propertiesDetails.put("markDelhiveryOrderDelivered", "1");
601
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
601
        writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
602
 
602
 
603
		log.info("endTime" + LocalDateTime.now());
603
        log.info("endTime" + LocalDateTime.now());
604
	}
604
    }
605
 
605
 
606
	@Scheduled(cron = "0 0 4 * * *")
606
    @Scheduled(cron = "0 0 4 * * *")
607
	public void processPriceDrop() throws Throwable {
607
    public void processPriceDrop() throws Throwable {
608
		scheduledTasks.processPriceDrop();
608
        scheduledTasks.processPriceDrop();
609
	}
609
    }
610
 
610
 
611
	@Scheduled(cron = "0 0 0 * * *")
611
    @Scheduled(cron = "0 0 0 * * *")
612
	public void calculateInterestAccured() throws Throwable {
612
    public void calculateInterestAccured() throws Throwable {
613
		scheduledTasks.calculateInterestAccured();
613
        scheduledTasks.calculateInterestAccured();
614
	}
614
    }
615
 
615
 
616
	@Scheduled(cron = "0 */5 2-22 * * *")
616
    @Scheduled(cron = "0 */5 2-22 * * *")
617
	public void loanSettlement() throws Throwable {
617
    public void loanSettlement() throws Throwable {
618
		scheduledTasks.loanSettlement();
618
        scheduledTasks.loanSettlement();
619
	}
619
    }
620
 
620
 
621
	@Scheduled(cron = "0 */15 * * * *")
621
    @Scheduled(cron = "0 */15 * * * *")
622
	public void ccAvenueSettlement() throws Throwable {
622
    public void ccAvenueSettlement() throws Throwable {
623
		scheduledTasks.settleCCAvePayments();
623
        scheduledTasks.settleCCAvePayments();
624
	}
624
    }
625
 
625
 
626
	@Scheduled(cron = "0 0 6 * * *")
626
    @Scheduled(cron = "0 0 6 * * *")
627
	public void dailyLoanAlert() throws Throwable {
627
    public void dailyLoanAlert() throws Throwable {
628
		scheduledTasks.dailyLoanAlert();
628
        scheduledTasks.dailyLoanAlert();
629
	}
629
    }
630
 
630
 
631
	@Scheduled(cron = "0 0 1 * * *")
631
    @Scheduled(cron = "0 0 1 * * *")
632
	public void processActivatedImeisForSchemes() throws Throwable {
632
    public void processActivatedImeisForSchemes() throws Throwable {
633
		scheduledTasks.processActivatedImeisForSchemes();
633
        scheduledTasks.processActivatedImeisForSchemes();
634
	}
634
    }
635
 
635
 
636
	@Scheduled(cron = "0 0 7 * * *")
636
    @Scheduled(cron = "0 0 7 * * *")
637
	public void updatePartnerLimit() throws Throwable {
637
    public void updatePartnerLimit() throws Throwable {
638
		scheduledTasks.updatePartnerLimit();
638
        scheduledTasks.updatePartnerLimit();
639
	}
639
    }
640
 
640
 
641
	@Scheduled(cron = "0 0 7 * * *")
641
    @Scheduled(cron = "0 0 7 * * *")
642
	public void alertForDueDate() throws Throwable {
642
    public void alertForDueDate() throws Throwable {
643
		scheduledTasks.alertForDueDate();
643
        scheduledTasks.alertForDueDate();
644
	}
644
    }
645
 
645
 
646
	@Scheduled(cron = "0 0 8 * * *")
646
    @Scheduled(cron = "0 0 8 * * *")
647
	public void notifyLoanDueDateCross() throws Throwable {
647
    public void notifyLoanDueDateCross() throws Throwable {
648
		scheduledTasks.notifyLoanDueDateCross();
648
        scheduledTasks.notifyLoanDueDateCross();
649
	}
649
    }
650
 
650
 
651
	@Scheduled(cron = "0 0 9 * * *")
651
    @Scheduled(cron = "0 0 9 * * *")
652
	public void notifyDefaultLoans() throws Throwable {
652
    public void notifyDefaultLoans() throws Throwable {
653
		scheduledTasks.notifyDefaultLoans();
653
        scheduledTasks.notifyDefaultLoans();
654
	}
654
    }
655
 
655
 
656
	@Scheduled(cron = "0 0 23 * * *")
656
    @Scheduled(cron = "0 0 23 * * *")
657
	public void hygineAlertForInternalTeam() throws Throwable {
657
    public void hygineAlertForInternalTeam() throws Throwable {
658
		scheduledTasks.hygineAlertForInternalTeam();
658
        scheduledTasks.hygineAlertForInternalTeam();
659
 
659
 
660
	}
660
    }
661
 
661
 
662
	@Scheduled(cron = "0 0 23 * * *")
662
    @Scheduled(cron = "0 0 23 * * *")
663
	public void hygineAlertForPartner() throws Throwable {
663
    public void hygineAlertForPartner() throws Throwable {
664
		scheduledTasks.hygineAlertForPartner();
664
        scheduledTasks.hygineAlertForPartner();
665
 
665
 
666
	}
666
    }
667
 
667
 
668
	@Scheduled(cron = "0 0 0 * * MON")
668
    @Scheduled(cron = "0 0 0 * * MON")
669
	public void monthlyTargetForPartner() throws Throwable {
669
    public void monthlyTargetForPartner() throws Throwable {
670
		scheduledTasks.monthlyTargetForPartner();
670
        scheduledTasks.monthlyTargetForPartner();
671
 
671
 
672
	}
672
    }
673
 
673
 
674
	@Scheduled(cron = "0 0 0 * * MON")
674
    @Scheduled(cron = "0 0 0 * * MON")
675
	public void monthlyTargetForInternalTeam() throws Throwable {
675
    public void monthlyTargetForInternalTeam() throws Throwable {
676
		scheduledTasks.monthlyTargetForInternalTeam();
676
        scheduledTasks.monthlyTargetForInternalTeam();
677
 
677
 
678
	}
678
    }
679
 
679
 
680
	@Scheduled(cron = "0 0 6 * * *")
680
    @Scheduled(cron = "0 0 6 * * *")
681
	public void sendSamsungRebilling() throws Throwable {
681
    public void sendSamsungRebilling() throws Throwable {
682
		scheduledTasks.sendMailForSamsungRebilling();
682
        scheduledTasks.sendMailForSamsungRebilling();
683
	}
683
    }
684
 
684
 
685
	@Scheduled(cron = "0 10 8 * * *")
685
    @Scheduled(cron = "0 10 8 * * *")
686
	public void sendMailForAgeingAlert() throws Throwable {
686
    public void sendMailForAgeingAlert() throws Throwable {
687
		scheduledTasks.sendMailForAgeingAlert();
687
        scheduledTasks.sendMailForAgeingAlert();
-
 
688
    }
-
 
689
 
688
	}
690
 
-
 
691
    @Scheduled(cron = "0 0 8 * * *")
-
 
692
    public void sendFilteredRetailerPerformance() throws Throwable {
-
 
693
        scheduledTasks.sendFilteredRetailerPerformance();
-
 
694
    }
689
	/*
695
    /*
690
	 * @Scheduled(cron = "0 0 9 * * *") public void onBoardingDocumentsPending()
696
     * @Scheduled(cron = "0 0 9 * * *") public void onBoardingDocumentsPending()
691
	 * throws Throwable { log.info("startTime" + LocalDateTime.now());
697
     * throws Throwable { log.info("startTime" + LocalDateTime.now());
692
	 * onBoardingRelatedSchelduleTask.onBoardingDocumentsPending();
698
     * onBoardingRelatedSchelduleTask.onBoardingDocumentsPending();
693
	 * log.info("endTime" + LocalDateTime.now()); }
699
     * log.info("endTime" + LocalDateTime.now()); }
694
	 */
700
     */
695
}
701
}