Subversion Repositories SmartDukaan

Rev

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

Rev 28866 Rev 28921
Line 27... Line 27...
27
import org.springframework.scheduling.annotation.EnableScheduling;
27
import org.springframework.scheduling.annotation.EnableScheduling;
28
import org.springframework.ui.velocity.VelocityEngineFactoryBean;
28
import org.springframework.ui.velocity.VelocityEngineFactoryBean;
29
 
29
 
30
import com.smartdukaan.cron.migrations.RunOnceTasks;
30
import com.smartdukaan.cron.migrations.RunOnceTasks;
31
import com.smartdukaan.cron.scheduled.InvestmentRelatedTasks;
31
import com.smartdukaan.cron.scheduled.InvestmentRelatedTasks;
-
 
32
import com.smartdukaan.cron.scheduled.OnBoardingRelatedSchelduleTask;
32
import com.smartdukaan.cron.scheduled.Reconciliation;
33
import com.smartdukaan.cron.scheduled.Reconciliation;
33
import com.smartdukaan.cron.scheduled.ScheduledSkeleton;
34
import com.smartdukaan.cron.scheduled.ScheduledSkeleton;
34
import com.smartdukaan.cron.scheduled.ScheduledTasks;
35
import com.smartdukaan.cron.scheduled.ScheduledTasks;
35
import com.smartdukaan.cron.scheduled.TicketRelatedScheduledTask;
36
import com.smartdukaan.cron.scheduled.TicketRelatedScheduledTask;
36
import com.smartdukaan.cron.scheduled.leadsync.LeadSyncRunner;
37
import com.smartdukaan.cron.scheduled.leadsync.LeadSyncRunner;
Line 53... Line 54...
53
 
54
 
54
	@Autowired
55
	@Autowired
55
	private TicketRelatedScheduledTask ticketRelatedScheduledTask;
56
	private TicketRelatedScheduledTask ticketRelatedScheduledTask;
56
 
57
 
57
	@Autowired
58
	@Autowired
-
 
59
	private OnBoardingRelatedSchelduleTask onBoardingRelatedSchelduleTask;
-
 
60
 
-
 
61
	@Autowired
58
	private InvestmentRelatedTasks investmentRelatedTasks;
62
	private InvestmentRelatedTasks investmentRelatedTasks;
59
 
63
 
60
	@Autowired
64
	@Autowired
61
	private CsService csService;
65
	private CsService csService;
62
 
66
 
Line 69... Line 73...
69
		LOGGER.info("Called Configuration");
73
		LOGGER.info("Called Configuration");
70
		PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer = new PropertySourcesPlaceholderConfigurer();
74
		PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer = new PropertySourcesPlaceholderConfigurer();
71
		propertySourcesPlaceholderConfigurer.setLocation(new ClassPathResource("/META-INF/env.properties"));
75
		propertySourcesPlaceholderConfigurer.setLocation(new ClassPathResource("/META-INF/env.properties"));
72
		return propertySourcesPlaceholderConfigurer;
76
		return propertySourcesPlaceholderConfigurer;
73
	}
77
	}
74
	
-
 
75
 
78
 
76
	@Bean(name = "veloctyEngine")
79
	@Bean(name = "veloctyEngine")
77
	public VelocityEngine velocityEngine() throws VelocityException, IOException {
80
	public VelocityEngine velocityEngine() throws VelocityException, IOException {
78
		VelocityEngineFactoryBean factory = new VelocityEngineFactoryBean();
81
		VelocityEngineFactoryBean factory = new VelocityEngineFactoryBean();
79
		// Properties props = new Properties();
82
		// Properties props = new Properties();
Line 94... Line 97...
94
		velocityProperties.put("file.resource.loader.unicode", true);
97
		velocityProperties.put("file.resource.loader.unicode", true);
95
		velocityProperties.put("input.encoding", "UTF-8");
98
		velocityProperties.put("input.encoding", "UTF-8");
96
		velocityProperties.put("output.encoding", "UTF-8");
99
		velocityProperties.put("output.encoding", "UTF-8");
97
		velocityProperties.put("overrideLogging", true);
100
		velocityProperties.put("overrideLogging", true);
98
 
101
 
99
	//	velocityProperties.put("file.resource.loader.path", ".");
102
		// velocityProperties.put("file.resource.loader.path", ".");
100
 
103
 
101
		factory.setVelocityProperties(velocityProperties);
104
		factory.setVelocityProperties(velocityProperties);
102
 
105
 
103
		return factory.createVelocityEngine();
106
		return factory.createVelocityEngine();
104
 
107
 
Line 178... Line 181...
178
		if (args.containsOption("checkPartnerActiveStore")) {
181
		if (args.containsOption("checkPartnerActiveStore")) {
179
			System.out.println("checkPartnerActiveStore");
182
			System.out.println("checkPartnerActiveStore");
180
			scheduledTasks.checkPartnerActiveStore();
183
			scheduledTasks.checkPartnerActiveStore();
181
			System.exit(0);
184
			System.exit(0);
182
		}
185
		}
183
		
186
 
184
		if (args.containsOption("addHdfcPayment")) {
187
		if (args.containsOption("addHdfcPayment")) {
185
			runOnceTasks.addPayment();
188
			runOnceTasks.addPayment();
186
			System.exit(0);
189
			System.exit(0);
187
		}
190
		}
188
		if (args.containsOption("processSchemeOut")) {
191
		if (args.containsOption("processSchemeOut")) {
Line 262... Line 265...
262
 
265
 
263
		if (args.containsOption("ticketClosed")) {
266
		if (args.containsOption("ticketClosed")) {
264
			scheduledTasks.ticketClosed();
267
			scheduledTasks.ticketClosed();
265
			System.exit(0);
268
			System.exit(0);
266
		}
269
		}
267
		
270
 
268
		if (args.containsOption("getVendorWarehouses")) {
271
		if (args.containsOption("getVendorWarehouses")) {
269
			int warehouseId = Integer.parseInt(args.getOptionValues("warehouseId").get(0));
272
			int warehouseId = Integer.parseInt(args.getOptionValues("warehouseId").get(0));
270
			scheduledTasks.getVendorWarehouses(warehouseId);
273
			scheduledTasks.getVendorWarehouses(warehouseId);
271
			System.exit(0);
274
			System.exit(0);
272
		}
275
		}
Line 293... Line 296...
293
		}
296
		}
294
		if (args.containsOption("findMismatchesInIndent")) {
297
		if (args.containsOption("findMismatchesInIndent")) {
295
			runOnceTasks.findMismatchesInIndent();
298
			runOnceTasks.findMismatchesInIndent();
296
			System.exit(0);
299
			System.exit(0);
297
		}
300
		}
-
 
301
 
-
 
302
		if (args.containsOption("onboardingEventDelays")) {
-
 
303
			onBoardingRelatedSchelduleTask.onboardingEventDelays();
-
 
304
			System.exit(0);
-
 
305
		}
-
 
306
 
-
 
307
		if (args.containsOption("advancePaymentPendingAlert")) {
-
 
308
			onBoardingRelatedSchelduleTask.advancePaymentPendingAlert();
-
 
309
			System.exit(0);
-
 
310
		}
-
 
311
 
-
 
312
		if (args.containsOption("fullPaymentPendingAlert")) {
-
 
313
			onBoardingRelatedSchelduleTask.fullPaymentPendingAlert();
-
 
314
			System.exit(0);
-
 
315
		}
-
 
316
 
-
 
317
		if (args.containsOption("brandingAlert")) {
-
 
318
			onBoardingRelatedSchelduleTask.brandingAlert();
-
 
319
			System.exit(0);
-
 
320
		}
298
		if (args.containsOption("ppl")) {
321
		if (args.containsOption("ppl")) {
299
			runOnceTasks.printPendingLeads();
322
			runOnceTasks.printPendingLeads();
300
			System.exit(0);
323
			System.exit(0);
301
		}
324
		}
302
		if (args.containsOption("notifyAll")) {
325
		if (args.containsOption("notifyAll")) {
Line 471... Line 494...
471
			}
494
			}
472
 
495
 
473
			if (args.containsOption("fixScans")) {
496
			if (args.containsOption("fixScans")) {
474
				runOnceTasks.fixScans();
497
				runOnceTasks.fixScans();
475
			}
498
			}
476
			
499
 
477
			if (args.containsOption("reverseMaa")) {
500
			if (args.containsOption("reverseMaa")) {
478
				runOnceTasks.reverseMaa();
501
				runOnceTasks.reverseMaa();
479
			}
502
			}
480
			
503
 
481
			if (args.containsOption("fixOffer")) {
504
			if (args.containsOption("fixOffer")) {
482
				runOnceTasks.fixOffer();
505
				runOnceTasks.fixOffer();
483
			}
506
			}
484
			
507
 
485
			if (args.containsOption("opporeno")) {
508
			if (args.containsOption("opporeno")) {
486
				runOnceTasks.opporeno();
509
				runOnceTasks.opporeno();
487
			}
510
			}
488
			
511
 
489
			if (args.containsOption("fixorders")) {
512
			if (args.containsOption("fixorders")) {
490
				runOnceTasks.fixOrders();
513
				runOnceTasks.fixOrders();
491
			}
514
			}
492
			if (args.containsOption("fixreservations")) {
515
			if (args.containsOption("fixreservations")) {
493
				runOnceTasks.fixReservations();
516
				runOnceTasks.fixReservations();