Subversion Repositories SmartDukaan

Rev

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

Rev 29696 Rev 29757
Line 1... Line 1...
1
package com.smartdukaan.cron.scheduled;
1
package com.smartdukaan.cron.scheduled;
2
 
2
 
3
import java.io.IOException;
-
 
4
import java.time.LocalDate;
3
import java.time.LocalDate;
5
import java.time.LocalDateTime;
4
import java.time.LocalDateTime;
6
import java.util.Date;
5
import java.util.Date;
7
import java.util.LinkedHashMap;
6
import java.util.LinkedHashMap;
8
 
7
 
Line 14... Line 13...
14
 
13
 
15
import com.smartdukaan.cron.migrations.RunOnceTasks;
14
import com.smartdukaan.cron.migrations.RunOnceTasks;
16
import com.smartdukaan.cron.monitored.NagiosMonitorTasks;
15
import com.smartdukaan.cron.monitored.NagiosMonitorTasks;
17
import com.smartdukaan.cron.properties.WriteToPropertiesFile;
16
import com.smartdukaan.cron.properties.WriteToPropertiesFile;
18
import com.smartdukaan.cron.scheduled.leadsync.LeadSyncRunner;
17
import com.smartdukaan.cron.scheduled.leadsync.LeadSyncRunner;
19
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
-
 
20
import com.spice.profitmandi.common.model.RechargeCredential;
-
 
21
 
18
 
22
@Component
19
@Component
23
public class ScheduledSkeleton {
20
public class ScheduledSkeleton {
24
 
21
 
25
	private static final Logger log = LogManager.getLogger(ScheduledSkeleton.class);
22
	private static final Logger log = LogManager.getLogger(ScheduledSkeleton.class);
Line 47... Line 44...
47
 
44
 
48
	@Autowired
45
	@Autowired
49
	private WriteToPropertiesFile writeToPropertiesFile;
46
	private WriteToPropertiesFile writeToPropertiesFile;
50
 
47
 
51
	String nagiosCronPropertiesFile = "/var/log/services/nagios-Cron-Monitoring.properties";
48
	String nagiosCronPropertiesFile = "/var/log/services/nagios-Cron-Monitoring.properties";
52
	
49
 
53
	// @Scheduled(cron = "0 0 2 * * *")
50
	// @Scheduled(cron = "0 0 2 * * *")
54
	public void processDailySchemes() throws Exception {
51
	public void processDailySchemes() throws Exception {
55
		
52
 
56
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
53
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
57
		propertiesDetails.put("processDailySchemes", "0");
54
		propertiesDetails.put("processDailySchemes", "0");
58
 
55
 
59
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
56
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
60
 
57
 
61
		scheduledTasks.processScheme(LocalDateTime.now().minusDays(7), LocalDateTime.now(), false);
58
		scheduledTasks.processScheme(LocalDateTime.now().minusDays(7), LocalDateTime.now(), false);
62
		
59
 
63
		propertiesDetails.put("processDailySchemes", "1");
60
		propertiesDetails.put("processDailySchemes", "1");
64
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
61
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
65
 
62
 
66
	}
63
	}
67
 
64
 
68
	@Scheduled(cron = "0 15 0 * * *")
65
	@Scheduled(cron = "0 15 0 * * *")
69
	public void runOnceTasks() throws Exception {
66
	public void runOnceTasks() throws Exception {
70
		
67
 
71
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
68
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
72
		propertiesDetails.put("runOnceTasks", "0");
69
		propertiesDetails.put("runOnceTasks", "0");
73
 
70
 
74
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
71
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
75
 
72
 
76
		scheduledTasks.reconcileRecharge();
73
		scheduledTasks.reconcileRecharge();
77
		
74
 
78
		propertiesDetails.put("runOnceTasks", "1");
75
		propertiesDetails.put("runOnceTasks", "1");
79
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
76
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
80
	}
77
	}
81
 
78
 
82
	/*
79
	/*
Line 102... Line 99...
102
	public void sendPartnerInvestmentDetails() throws Exception {
99
	public void sendPartnerInvestmentDetails() throws Exception {
103
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
100
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
104
		propertiesDetails.put("sendPartnerInvestmentDetails", "0");
101
		propertiesDetails.put("sendPartnerInvestmentDetails", "0");
105
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
102
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
106
		scheduledTasks.sendPartnerInvestmentDetails();
103
		scheduledTasks.sendPartnerInvestmentDetails();
107
		long secs = (new Date().getTime())/1000;
104
		long secs = (new Date().getTime()) / 1000;
108
		log.info("sendPartnerInvestmentDetails" + LocalDateTime.now());
105
		log.info("sendPartnerInvestmentDetails" + LocalDateTime.now());
109
		
106
 
110
		propertiesDetails.put("investmentDate", Long.toString(secs));
107
		propertiesDetails.put("investmentDate", Long.toString(secs));
111
		propertiesDetails.put("sendPartnerInvestmentDetails", "1");
108
		propertiesDetails.put("sendPartnerInvestmentDetails", "1");
112
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
109
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
113
 
110
 
114
	}
111
	}
115
 
112
 
116
	@Scheduled(cron = "0 0 10,15,17 * * *")
113
	@Scheduled(cron = "0 0 10,15,17 * * *")
117
	public void sendIndentTertiaryReport() throws Exception {
114
	public void sendIndentTertiaryReport() throws Exception {
118
		
115
 
119
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
116
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
120
		propertiesDetails.put("sendIndentTertiaryReport", "0");
117
		propertiesDetails.put("sendIndentTertiaryReport", "0");
121
 
118
 
122
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
119
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
123
 
120
 
124
		scheduledTasks.sendIndentTertiary();
121
		scheduledTasks.sendIndentTertiary();
125
		
122
 
126
		propertiesDetails.put("sendIndentTertiaryReport", "1");
123
		propertiesDetails.put("sendIndentTertiaryReport", "1");
127
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
124
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
128
 
125
 
129
	}
126
	}
130
 
127
 
Line 133... Line 130...
133
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
130
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
134
		propertiesDetails.put("checkPartnerActiveStoreByStatus", "0");
131
		propertiesDetails.put("checkPartnerActiveStoreByStatus", "0");
135
 
132
 
136
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
133
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
137
 
134
 
138
		
-
 
139
		scheduledTasks.checkPartnerActiveStore();
135
		scheduledTasks.checkPartnerActiveStore();
140
		propertiesDetails.put("checkPartnerActiveStoreByStatus", "1");
136
		propertiesDetails.put("checkPartnerActiveStoreByStatus", "1");
141
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
137
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
142
 
138
 
143
	}
139
	}
144
 
140
 
145
	// @Scheduled(cron = "0 0 8 * * *")
141
	// @Scheduled(cron = "0 0 8 * * *")
146
	public void sendStockAgeingReport() throws Throwable {
142
	public void sendStockAgeingReport() throws Throwable {
147
		
143
 
148
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
144
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
149
		propertiesDetails.put("sendStockAgeingReport", "0");
145
		propertiesDetails.put("sendStockAgeingReport", "0");
150
 
146
 
151
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
147
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
152
 
148
 
153
		scheduledTasks.sendAgeingReport();
149
		scheduledTasks.sendAgeingReport();
154
		
150
 
155
		propertiesDetails.put("sendStockAgeingReport", "1");
151
		propertiesDetails.put("sendStockAgeingReport", "1");
156
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
152
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
157
 
153
 
158
	}
154
	}
159
 
155
 
Line 162... Line 158...
162
		log.info("escalate ticket");
158
		log.info("escalate ticket");
163
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
159
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
164
		propertiesDetails.put("escalateTicket", "0");
160
		propertiesDetails.put("escalateTicket", "0");
165
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
161
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
166
		ticketRelatedScheduledTask.escalateTicket();
162
		ticketRelatedScheduledTask.escalateTicket();
167
		
163
 
168
		propertiesDetails.put("escalateTicket", "1");
164
		propertiesDetails.put("escalateTicket", "1");
169
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
165
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
170
 
166
 
171
	}
167
	}
172
 
168
 
Line 189... Line 185...
189
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
185
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
190
		propertiesDetails.put("dailySaleNotification", "0");
186
		propertiesDetails.put("dailySaleNotification", "0");
191
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
187
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
192
 
188
 
193
		scheduledTasks.sendDailySalesNotificationToPartner(null);
189
		scheduledTasks.sendDailySalesNotificationToPartner(null);
194
		
190
 
195
		propertiesDetails.put("dailySaleNotification", "1");
191
		propertiesDetails.put("dailySaleNotification", "1");
196
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
192
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
197
 
193
 
198
	}
194
	}
199
 
195
 
Line 202... Line 198...
202
	 * Exception { reconciliation.dailyReconciliation(); }
198
	 * Exception { reconciliation.dailyReconciliation(); }
203
	 */
199
	 */
204
 
200
 
205
	@Scheduled(cron = "0 0 1 * * *")
201
	@Scheduled(cron = "0 0 1 * * *")
206
	public void processActivation() throws Exception {
202
	public void processActivation() throws Exception {
207
		
203
 
208
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
204
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
209
		propertiesDetails.put("processActivation", "0");
205
		propertiesDetails.put("processActivation", "0");
210
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
206
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
211
 
207
 
212
		scheduledTasks.processActivation();
208
		scheduledTasks.processActivation();
213
		
209
 
214
		propertiesDetails.put("processActivation", "1");
210
		propertiesDetails.put("processActivation", "1");
215
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
211
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
216
 
212
 
217
	}
213
	}
218
 
214
 
219
	@Scheduled(cron = "0 */5 * * * *")
215
	@Scheduled(cron = "0 */5 * * * *")
220
	public void sendNotification() throws Throwable {
216
	public void sendNotification() throws Throwable {
221
		
217
 
222
		log.info("send Notification");
218
		log.info("send Notification");
223
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
219
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
224
		propertiesDetails.put("sendNotification", "0");
220
		propertiesDetails.put("sendNotification", "0");
225
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
221
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
226
 
222
 
Line 231... Line 227...
231
 
227
 
232
	}
228
	}
233
 
229
 
234
	@Scheduled(cron = "0 */15 * * * *")
230
	@Scheduled(cron = "0 */15 * * * *")
235
	public void checkRazorPayPaymentStatus() throws Throwable {
231
	public void checkRazorPayPaymentStatus() throws Throwable {
236
		
232
 
237
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
233
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
238
		propertiesDetails.put("checkRazorPayPaymentStatus", "0");
234
		propertiesDetails.put("checkRazorPayPaymentStatus", "0");
239
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
235
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
240
 
236
 
241
		scheduledTasks.checkRazorPayPaymentStatus();
237
		scheduledTasks.checkRazorPayPaymentStatus();
242
		propertiesDetails.put("checkRazorPayPaymentStatus", "1");
238
		propertiesDetails.put("checkRazorPayPaymentStatus", "1");
243
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
239
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
244
 
240
 
245
	}
241
	}
246
	
-
 
247
 
242
 
248
	@Scheduled(cron = "0 */10 * * * *")
243
	@Scheduled(cron = "0 */10 * * * *")
249
	public void attachToffeeInvoices() throws Throwable {
244
	public void attachToffeeInvoices() throws Throwable {
250
		
245
 
251
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
246
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
252
		propertiesDetails.put("attachToffeeInvoices", "0");
247
		propertiesDetails.put("attachToffeeInvoices", "0");
253
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
248
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
254
 
249
 
255
		scheduledTasks.attachToffeeInvoices();
250
		scheduledTasks.attachToffeeInvoices();
256
		
251
 
257
		propertiesDetails.put("attachToffeeInvoices", "1");
252
		propertiesDetails.put("attachToffeeInvoices", "1");
258
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
253
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
259
 
254
 
260
	}
255
	}
261
 
256
 
Line 265... Line 260...
265
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
260
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
266
		propertiesDetails.put("ticketClosed", "0");
261
		propertiesDetails.put("ticketClosed", "0");
267
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
262
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
268
 
263
 
269
		scheduledTasks.ticketClosed();
264
		scheduledTasks.ticketClosed();
270
		
265
 
271
		propertiesDetails.put("ticketClosed", "1");
266
		propertiesDetails.put("ticketClosed", "1");
272
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
267
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
273
 
268
 
274
 
-
 
275
	}
269
	}
276
 
270
 
277
	@Scheduled(cron = "0 0 10 * * *")
271
	@Scheduled(cron = "0 0 8 * * *")
278
	public void checkfocusedModelInPartnerStock() throws Throwable {
272
	public void checkfocusedModelInPartnerStock() throws Throwable {
279
		log.info("startTime" + LocalDateTime.now());
273
		log.info("startTime" + LocalDateTime.now());
280
		
274
 
281
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
275
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
282
		propertiesDetails.put("checkfocusedModelInPartnerStock", "0");
276
		propertiesDetails.put("checkfocusedModelInPartnerStock", "0");
283
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
277
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
284
 
278
 
285
		scheduledTasks.checkfocusedModelInPartnerStock();
279
		scheduledTasks.checkfocusedModelInPartnerStock();
286
		propertiesDetails.put("checkfocusedModelInPartnerStock", "1");
280
		propertiesDetails.put("checkfocusedModelInPartnerStock", "1");
287
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
281
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
288
 
282
 
289
 
-
 
290
		log.info("endTime" + LocalDateTime.now());
283
		log.info("endTime" + LocalDateTime.now());
291
	}
284
	}
292
 
285
 
293
	@Scheduled(cron = "0 0 8,10,12,14,16,18,20 * * *")
286
	@Scheduled(cron = "0 0 8,10,12,14,16,18,20 * * *")
294
	public void notifyLead() throws Throwable {
287
	public void notifyLead() throws Throwable {
295
		
288
 
296
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
289
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
297
		propertiesDetails.put("notifyLead", "0");
290
		propertiesDetails.put("notifyLead", "0");
298
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
291
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
299
 
292
 
300
		scheduledTasks.notifyLead();
293
		scheduledTasks.notifyLead();
301
		
294
 
302
		propertiesDetails.put("notifyLead", "1");
295
		propertiesDetails.put("notifyLead", "1");
303
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
296
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
304
 
297
 
305
		// scheduledTasks.notifyVisits();
298
		// scheduledTasks.notifyVisits();
306
	}
299
	}
Line 309... Line 302...
309
	public void fetchImeiActivation() throws Throwable {
302
	public void fetchImeiActivation() throws Throwable {
310
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
303
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
311
		propertiesDetails.put("fetchImeiActivation", "0");
304
		propertiesDetails.put("fetchImeiActivation", "0");
312
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
305
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
313
 
306
 
314
		
-
 
315
		runOnceTasks.fetchImeiActivation(0);
307
		runOnceTasks.fetchImeiActivation(0);
316
		
308
 
317
		propertiesDetails.put("fetchImeiActivation", "1");
309
		propertiesDetails.put("fetchImeiActivation", "1");
318
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
310
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
319
 
311
 
320
	}
312
	}
321
 
313
 
Line 325... Line 317...
325
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
317
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
326
		propertiesDetails.put("checkValidateReferral", "0");
318
		propertiesDetails.put("checkValidateReferral", "0");
327
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
319
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
328
 
320
 
329
		scheduledTasks.checkValidateReferral();
321
		scheduledTasks.checkValidateReferral();
330
		
322
 
331
		propertiesDetails.put("checkValidateReferral", "1");
323
		propertiesDetails.put("checkValidateReferral", "1");
332
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
324
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
333
 
325
 
334
 
-
 
335
		log.info("endTime" + LocalDateTime.now());
326
		log.info("endTime" + LocalDateTime.now());
336
	}
327
	}
337
 
328
 
338
	// @Scheduled(cron = "0 0 8 * * *")
329
	// @Scheduled(cron = "0 0 8 * * *")
339
	public void partnerProblemAlert() throws Throwable {
330
	public void partnerProblemAlert() throws Throwable {
Line 378... Line 369...
378
	}
369
	}
379
 
370
 
380
	@Scheduled(cron = "0 0 7 * * *")
371
	@Scheduled(cron = "0 0 7 * * *")
381
	public void onboardingEventDelays() throws Throwable {
372
	public void onboardingEventDelays() throws Throwable {
382
		log.info("startTime" + LocalDateTime.now());
373
		log.info("startTime" + LocalDateTime.now());
383
		
374
 
384
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
375
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
385
		propertiesDetails.put("onboardingEventDelays", "0");
376
		propertiesDetails.put("onboardingEventDelays", "0");
386
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
377
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
387
 
378
 
388
		onBoardingRelatedSchelduleTask.onboardingEventDelays();
379
		onBoardingRelatedSchelduleTask.onboardingEventDelays();
389
		
380
 
390
		propertiesDetails.put("onboardingEventDelays", "1");
381
		propertiesDetails.put("onboardingEventDelays", "1");
391
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
382
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
392
 
383
 
393
		log.info("endTime" + LocalDateTime.now());
384
		log.info("endTime" + LocalDateTime.now());
394
	}
385
	}
Line 408... Line 399...
408
	}
399
	}
409
 
400
 
410
	@Scheduled(cron = "0 0 8 * * *")
401
	@Scheduled(cron = "0 0 8 * * *")
411
	public void advancePaymentPendingAlert() throws Throwable {
402
	public void advancePaymentPendingAlert() throws Throwable {
412
		log.info("startTime" + LocalDateTime.now());
403
		log.info("startTime" + LocalDateTime.now());
413
		
404
 
414
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
405
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
415
		propertiesDetails.put("advancePaymentPendingAlert", "0");
406
		propertiesDetails.put("advancePaymentPendingAlert", "0");
416
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
407
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
417
 
408
 
418
		onBoardingRelatedSchelduleTask.advancePaymentPendingAlert();
409
		onBoardingRelatedSchelduleTask.advancePaymentPendingAlert();
Line 423... Line 414...
423
	}
414
	}
424
 
415
 
425
	@Scheduled(cron = "0 0 8 * * *")
416
	@Scheduled(cron = "0 0 8 * * *")
426
	public void fullPaymentPendingAlert() throws Throwable {
417
	public void fullPaymentPendingAlert() throws Throwable {
427
		log.info("startTime" + LocalDateTime.now());
418
		log.info("startTime" + LocalDateTime.now());
428
		
419
 
429
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
420
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
430
		propertiesDetails.put("fullPaymentPendingAlert", "0");
421
		propertiesDetails.put("fullPaymentPendingAlert", "0");
431
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
422
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
432
 
423
 
433
		onBoardingRelatedSchelduleTask.fullPaymentPendingAlert();
424
		onBoardingRelatedSchelduleTask.fullPaymentPendingAlert();
434
		
425
 
435
		propertiesDetails.put("fullPaymentPendingAlert", "1");
426
		propertiesDetails.put("fullPaymentPendingAlert", "1");
436
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
427
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
437
 
428
 
438
		log.info("endTime" + LocalDateTime.now());
429
		log.info("endTime" + LocalDateTime.now());
439
	}
430
	}
Line 444... Line 435...
444
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
435
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
445
		propertiesDetails.put("advancePaymentPendinglegalAlert", "0");
436
		propertiesDetails.put("advancePaymentPendinglegalAlert", "0");
446
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
437
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
447
 
438
 
448
		onBoardingRelatedSchelduleTask.advancePaymentPendinglegalAlert();
439
		onBoardingRelatedSchelduleTask.advancePaymentPendinglegalAlert();
449
		
440
 
450
		propertiesDetails.put("advancePaymentPendinglegalAlert", "1");
441
		propertiesDetails.put("advancePaymentPendinglegalAlert", "1");
451
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
442
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
452
 
443
 
453
		log.info("endTime" + LocalDateTime.now());
444
		log.info("endTime" + LocalDateTime.now());
454
	}
445
	}
Line 468... Line 459...
468
	}
459
	}
469
 
460
 
470
	@Scheduled(cron = "0 0 9 * * *")
461
	@Scheduled(cron = "0 0 9 * * *")
471
	public void storeTimelinePromoterPending() throws Throwable {
462
	public void storeTimelinePromoterPending() throws Throwable {
472
		log.info("startTime" + LocalDateTime.now());
463
		log.info("startTime" + LocalDateTime.now());
473
		
464
 
474
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
465
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
475
		propertiesDetails.put("storeTimelinePromoterPending", "0");
466
		propertiesDetails.put("storeTimelinePromoterPending", "0");
476
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
467
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
477
 
468
 
478
		onBoardingRelatedSchelduleTask.storeTimelinePromoterPending();
469
		onBoardingRelatedSchelduleTask.storeTimelinePromoterPending();
Line 489... Line 480...
489
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
480
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
490
		propertiesDetails.put("checkItelImeiActivation", "0");
481
		propertiesDetails.put("checkItelImeiActivation", "0");
491
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
482
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
492
		log.info("startTimecheckItelImeiActivation" + LocalDate.now());
483
		log.info("startTimecheckItelImeiActivation" + LocalDate.now());
493
		scheduledTasks.checkItelImeiActivation(LocalDate.now(), 15);
484
		scheduledTasks.checkItelImeiActivation(LocalDate.now(), 15);
494
		long secs = (new Date().getTime())/1000;
485
		long secs = (new Date().getTime()) / 1000;
495
		log.info("endTimecheckItelImeiActivation" + LocalDate.now());
486
		log.info("endTimecheckItelImeiActivation" + LocalDate.now());
496
		propertiesDetails.put("checkItelImeiActivation", "1");
487
		propertiesDetails.put("checkItelImeiActivation", "1");
497
		propertiesDetails.put("itelDate",  Long.toString(secs));
488
		propertiesDetails.put("itelDate", Long.toString(secs));
498
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
489
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
499
		
-
 
500
		}
-
 
501
 
490
 
-
 
491
	}
502
 
492
 
503
	@Scheduled(cron = "0 0 23 * * *")
493
	@Scheduled(cron = "0 0 23 * * *")
504
	public void checkTecnoImeiActivation() throws Throwable {
494
	public void checkTecnoImeiActivation() throws Throwable {
505
		
495
 
506
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
496
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
507
		propertiesDetails.put("checkTecnoImeiActivation", "0");
497
		propertiesDetails.put("checkTecnoImeiActivation", "0");
508
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
498
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
509
 
499
 
510
		log.info("startTime" + LocalDate.now());
500
		log.info("startTime" + LocalDate.now());
511
		log.info("startTimecheckTecnoImeiActivation" + LocalDate.now());
501
		log.info("startTimecheckTecnoImeiActivation" + LocalDate.now());
512
		scheduledTasks.checkTecnoImeiActivation(LocalDate.now(), 15);
502
		scheduledTasks.checkTecnoImeiActivation(LocalDate.now(), 15);
513
		log.info("endTimecheckTecnoImeiActivation" + LocalDate.now());
503
		log.info("endTimecheckTecnoImeiActivation" + LocalDate.now());
514
		
504
 
515
		long secs = (new Date().getTime())/1000;
505
		long secs = (new Date().getTime()) / 1000;
516
		propertiesDetails.put("checkTecnoImeiActivation", "1");
506
		propertiesDetails.put("checkTecnoImeiActivation", "1");
517
		propertiesDetails.put("technoDate", Long.toString(secs));
507
		propertiesDetails.put("technoDate", Long.toString(secs));
518
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
508
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
519
	
509
 
520
	}
510
	}
521
 
511
 
522
	@Scheduled(cron = "0 0 23 * * *")
512
	@Scheduled(cron = "0 0 23 * * *")
523
	public void vivoImeiActivation() throws Throwable {
513
	public void vivoImeiActivation() throws Throwable {
524
		log.info("startTimevivoImeiActivation" + LocalDateTime.now());
514
		log.info("startTimevivoImeiActivation" + LocalDateTime.now());
525
		
515
 
526
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
516
		LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
527
		propertiesDetails.put("vivoImeiActivation", "0");
517
		propertiesDetails.put("vivoImeiActivation", "0");
528
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
518
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
529
 
519
 
530
		scheduledTasks.checkImeiActivation();
520
		scheduledTasks.checkImeiActivation();
531
		long secs = (new Date().getTime())/1000;
521
		long secs = (new Date().getTime()) / 1000;
532
		log.info("endTimevivoImeiActivation" + LocalDateTime.now());
522
		log.info("endTimevivoImeiActivation" + LocalDateTime.now());
533
		propertiesDetails.put("vivoImeiActivation", "1");
523
		propertiesDetails.put("vivoImeiActivation", "1");
534
		
524
 
535
		propertiesDetails.put("vivoDate", Long.toString(secs));
525
		propertiesDetails.put("vivoDate", Long.toString(secs));
536
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
526
		writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
537
 
527
 
538
	}
528
	}
539
 
529